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 / 10146
10145  |  10147
Subject: 
Parts editing made easy (well, easier)
Newsgroups: 
lugnet.cad.dev
Date: 
Fri, 18 Feb 2005 11:14:15 GMT
Viewed: 
2178 times
  
(I posted this to lugnet.cad toplevel, but considering the
total lack of response, I decided to try it down here in .dev
instead, where I got all that nice feedback for my last post.)

After a couple of days of coding fun, I finally have the
ASE to LDR file converter working. It is still not tested
for all possible kinds of input files, so there may still be
nasty bugs I haven't found, but to my own surprise, it seemed
to work right off the bat at first compilation for my chosen
test cases, from simple boxes and spheres to a quite complex
shape (a teapot).

The converter is a command-line utility. I compiled it for
Windows, because that's the platform where I have all my LDraw
and 3D modeling software, but it's written in ANSI C in a very
general way and should compile without changes also under Linux
and MacOS, although I haven't tested that.

Details and my first reasonably complicated LDR conversion
test (a teapot converted to LDR format, viewable with
utilities like LDView or MLCad) may be found here:

http://www.itn.liu.se/~stegu/lego/ase2dat/

Full source code is included. This is free software, and
you are free to use it and develop it further under the
conditions of the GNU GPL software license.

Some features are still missing, like sub-part identification
and replacement, and some may never be added, but I will do
some further development of this myself in the near future.

If you have any suggestions for additional features, bug
reports, offers for help or general questions, feel free to
either post followups here or mail me in person.

I have some ideas for stud and subpart inclusion that I will
try next. I'm not sure I want to try to reimplement the
complex cylinder matching algorithm of SLT2DAT, even though
I can see why it's useful. The source code for STL2DAT is
not available, and I'd rather not reinvent it. I know how
to do it, but it involves a lot of ad-hoc processing of the
mesh, and I have some ideas of my own I want to try first,
like using properly named imported proxies in 3dsmax for
the known subparts of the LDraw library. This will at least
take care of studs and boxes, but I need to spend some more
thought on cylinders to find a way to do it right. Perhaps
the method from STL2DAT does that best after all.

  Stefan G



Message has 5 Replies:
  Re: Parts editing made easy (well, easier)
 
Hi Stefan I don't know anything about neither optional lines or the programs you're converting from, but from a parts reviewers perspective, I'd say that the teapot.ldr looks pretty good. I wouldn't worry so much about automatic subpart generation. (...) (20 years ago, 18-Feb-05, to lugnet.cad.dev)
  Re: Parts editing made easy (well, easier)
 
(...) working. I don't have time right now to investigate, but I'm surprised that it doesn't work, given that you have obviously generated (seemingly) correct optional lines, and LDView's curve smoothing only relies on those. One other thing I (...) (20 years ago, 18-Feb-05, to lugnet.cad.dev)
  Re: Parts editing made easy (well, easier)
 
(...) Hi Stefan, don't get discouraged! I for one tried your converter (on a BBB part) here: (URL) I'd be interested to hear what the parts authors have to say, since we can directly compare the original DAT (converted with ?) and the "new" DAT (...) (20 years ago, 18-Feb-05, to lugnet.cad.dev, FTX)
  Re: Parts editing made easy (well, easier)
 
My converter has undergone a considerable update during the weekend. It is now called "max2dat", because it now handles the 3DS file format as well, and supports the two main export formats from 3dsmax. (The previous "max2dat" utility written in (...) (20 years ago, 21-Feb-05, to lugnet.cad.dev)
  Re: Parts editing made easy (well, easier)
 
(...) I noticed they were offset somewhat because of pivot point issues, and that took some time to resolve. The 3DS file format is actually very badly documented in public sources, but now it works the way it should. Now that I have the absolute (...) (20 years ago, 24-Feb-05, to lugnet.cad.dev)

12 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