To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10829
10828  |  10830
Subject: 
Re: 3ds Max Import Script
Newsgroups: 
lugnet.cad.dev
Date: 
Sat, 3 May 2008 18:38:34 GMT
Highlighted: 
(details)
Viewed: 
10496 times
  
In lugnet.cad.dev, Shane Whitehead wrote:
   I’ve been working on a script to import ldraw data into 3ds max with some moderate success.

Hi Shane,

This sounds like an interesting project. And useful. :)

   I’ve been able to build primitive data and apply color/texture to the objects.

I did find an issue between max 9 and 10 this morning which has me cursing autodesks’s name, but that’s another story.

I think any user of autodesk tools has cursed their name at some time or another. ;)

   What I would like to do is supplement some of the ldraw data with more optimised mesh object. That is, instead of building a brick from the primitive (or base) data everything, I want to pre-build brick elements and supplement the subfile import requests with these objects. The primitive brick would of course be build from the primitive data to begin with.

And, if you wanted, you could replace some of the imported “primitive bricks” with one developed in 3ds Max. Cool.

   So, my question here is, how to determine what is a “brick” within terms of ldraw.

At the moment I’m looking at the contents of the “parts” folder as been “brick” primitives, what I really need is some clarification of the directory structure so that I can move forward...

You’re on the right track. Pretty much every file in the parts folder is a “brick”.

I thought the standard directory structure would be well-documented on ldraw.org, but I couldn’t find such a document.

What I did find was in the File Format Specification, under the section on Line Type 1:

“Sub-files can be located in the LDRAW/PARTS sub-directory, the LDRAW/P sub-directory, the LDRAW/MODELS sub-directory, the current file’s directory, a path relative to one of these directories, or a full path may be specified. Sub-parts are typically stored in the LDRAW/PARTS/S sub-directory and so are referenced as s/subpart.dat, while hi-res primitives are stored in the LDRAW/P/48 sub-directory and so referenced as 48/hires.dat.”

To restate this, the LDraw system has a standard directory structure like this:
LDRAW/
|--- MODELS/
|--- P/
|    |--- 48/
|--- PARTS/
     |--- S/
And your importer should search the directories for subfiles in this order:
  1. LDRAW/PARTS
  2. LDRAW/P
  3. current directory
There is also some information about different “types” of files in the parts library at File Types FAQ.

Does this help?

Steve



Message has 3 Replies:
  Re: 3ds Max Import Script
 
(...) Note that in addition to the directory structure, official parts should all have a comment line in them that starts with one of the following prefixes: 0 !LDRAW_ORG PART 0 LDRAW_ORG PART 0 LDRAW_ORG ELEMENT 0 OFFICIAL LCAD UPDATE 0 Original (...) (16 years ago, 3-May-08, to lugnet.cad.dev)
  Re: 3ds Max Import Script
 
Thanks Steve! That's really useful! I too thought that ldraw site would have the directory structure more documented then it is, but clarification is always nice. Cheers Shane (16 years ago, 3-May-08, to lugnet.cad.dev, FTX)
  Re: 3ds Max Import Script
 
(...) Hi Guys, thanks for the feedback, what I've done is basically take both suggestions and merge them. Basically what I've observed so far is that not all parts in the "Parts" folder have the LDRAWORG meta tag (which denotes the type of file, (...) (16 years ago, 4-May-08, to lugnet.cad.dev, FTX)

Message is in Reply To:
  3ds Max Import Script
 
I've been working on a script to import ldraw data into 3ds max with some moderate success. I've been able to build primitive data and apply color/texture to the objects. I did find an issue between max 9 and 10 this morning which has me cursing (...) (16 years ago, 3-May-08, to lugnet.cad.dev)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR