To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 16206
16205  |  16207
Subject: 
Re: Part naming and hard colored parts
Newsgroups: 
lugnet.cad
Date: 
Tue, 19 May 2009 19:18:07 GMT
Viewed: 
8417 times
  
In lugnet.cad, Sergio Reano wrote:
Hi everybody,

as many of you already know, I'm the programmer of SR 3D Builder.

Using the lDraw prebuild library has been for me the starting point for
developing my application, but as things become complex I have to assume
some convention in my application to deal with part colors and description.

For example I use the part description to recognize if what I'm loading
is an assembly or a single part. This is even more important if the
assembly contains part that can be moved (like  4592C01.DAT control
stick for example).

For colors the problem is more complex: I search the 0 color ID Min and
Max vertex to determine part boundaries, but for hard colored part this
could not work since there are no 0 colorID vertex.

What I'm asking is a 'Description convention'  for example use
- '-Assemblies-' word for all assemblies
- '-Colored-' for all colored parts

or (preferred) use some flag in .DAT files like
0 !ASSEMBLY
0 !COLORED

(or whatever you want) to help solving these ambiguties

let me know your opinions...

Sergio

Sergio

From the complete library update that was 2008-01, the !LDRAW_ORG line (line 4
of every file) should tell you what you need to know. Full details are in the
header specification at http://www.ldraw.org/Article398.html

- Generic colour parts have an identifier of "Part" and no optional qualifiers.
- What you are calling assemblies have an identifier of "Shortcut" and no
optional qualifiers.
- Parts with hard-coded colours have an identifier of Part (or possibly
Shortcut) and an optional qualifier of "Physical_Colour".

However none of this can be trusted from unofficial parts, which as explained at
http://news.lugnet.com/cad/?n=15586 should not be automatically downloaded
by LDraw applications.

I hope that you can recognise that the last sentence in that post is being
addressed with the release of 2009-01 and a commitment to issue further updates
this year.

If this information is crucial to your application, then I'd suggest that you
don't allow it to run unless the library is updated to at least 2008-01. You can
check this by the presence of Note0801CA.txt in the models directory.

Chris Dee (LDraw Parts Library admin)



Message has 1 Reply:
  Re: Part naming and hard colored parts
 
(...) Hi Chris, thanks for the informations. I missed the first article (often I'm immersed in programming and don't take care of news). With the information on line 4 I got all I need (expecially for hard colored parts) and will be implemented in (...) (16 years ago, 20-May-09, to lugnet.cad)

Message is in Reply To:
  Part naming and hard colored parts
 
Hi everybody, as many of you already know, I'm the programmer of SR 3D Builder. Using the lDraw prebuild library has been for me the starting point for developing my application, but as things become complex I have to assume some convention in my (...) (16 years ago, 19-May-09, to lugnet.cad)

3 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