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 / 6867
6866  |  6868
Subject: 
A comprehensive LDraw object model
Newsgroups: 
lugnet.cad.dev
Date: 
Sat, 9 Feb 2002 19:18:28 GMT
Viewed: 
538 times
  
Hey folks,

I think we need to figure out a comprehensive LDraw object model.  Something
that can be presented simply, and easily ported to various modern
programming languages.  A comprehensive class diagram would be a great
start, and some code to illustrate behavior, too.  To include datfile line
types, a basic datfile collection type, minimum essential matrix and vector
math, rudimentary (generic?) bitmap generation from DAT content, etc.
(Maybe not too much, let's keep it lean and mean.)  At the least, I think we
should make the object model workable in C++, Java, Perl and Python.

I have a modest start on an object model for Java in the works for my own
use, but I think that if we all pool our efforts, we can enable a wide array
of LDraw tools to be made quickly and easily.  Over the past week, I
implemented a datline class hierarchy and various matrix and vector math
classes.  After that was about 90% finished, here's what I was able to write
in LESS THAN HALF A DAY (check out the window titled "xjjld - Jeremy's Java
LDraw", lower left corner):

http://www.brickshelf.com/cgi-bin/gallery.cgi?i=115962

(Note:  there is absolutely NO Java3D in that program.  And it's even kinda
fast.  So far... for smallish models... with no filled polygons... ;-)

I was writing this stuff JUST to make a model inliner for my instructions
generator.  But there's obviously so much more that can be done with a good
core library.  Datfile renderer, datfile editor, datfile filters, quick &
painless datfile scripting, translator for various other file formats, etc.
LDrawSript can be implemented over a Perl or Python back-end.  Web servers
can deliver rendered DAT images quickly & painlessly.  I'm sure the
possibilities have a limit, but it'd be a pretty dang high limit.

This could be the way to get LDraw to work on everyone's computer who wants
it.  Mac, BSD, Linux, Solaris, they all have the above languages available
*with* decent GUI libs to boot.  This wouldn't necessarily compete with what
we have now -- there are some really good tools out there already -- but it
would encourage code generation in the LDraw community.

If the LDraw community can pool their efforts into providing at least an
object model for LDraw parts and functionality, or at best a reference
implementation in the four languages I mentioned above, I feel that this
would open the doors for those programmers who want to contribute but are
intimidated by having to reinvent the wheel for even simple LDraw tasks.

Comments?  Concerns?  Ideas?  Please respond and let me know what you think.

Cheers,
- jsproat



Message has 4 Replies:
  Re: A comprehensive LDraw object model
 
(...) Here's my first contribution, a rough outline of a class structure. *** LDRAW LINE TYPE CLASSES *** abstract class LineType - ancestor class for all line-type objects + class LineType0 - comment line-type + class LineTypeCommand - command (...) (23 years ago, 9-Feb-02, to lugnet.cad.dev)
  Re: A comprehensive LDraw object model
 
(...) > (Maybe not too much, let's keep it lean and mean.) At the least, I > think we should make the object model workable in C++, Java, Perl and > Python. (...) This is interesting. I wonder what we can do as far as making it both comprehensive (...) (23 years ago, 10-Feb-02, to lugnet.cad.dev)
  Re: A comprehensive LDraw object model
 
How about an LDraw DAT model reducer - something that hacks out the insides and leaves nothing but a hollow shell? This way you could port it to platforms that can't handle so many polygons, and also render in realtime. It would kind of be like (...) (23 years ago, 10-Feb-02, to lugnet.cad.dev)
  Re: A comprehensive LDraw object model
 
(...) Standard libraries/classes for reading, writing and processing LDraw and MPD files is certainly a good idea, but I am not certain rendering functions should be a part of such a library although it is an obvious extension. Jacob (23 years ago, 10-Feb-02, to lugnet.cad.dev)

30 Messages in This Thread:











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

Custom Search

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