To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.rayOpen lugnet.cad.ray in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Ray-Tracing / 1673
1672  |  1674
Subject: 
Re: Level B Simplification - LDraw Boxer
Newsgroups: 
lugnet.cad.ray
Date: 
Wed, 12 Feb 2003 22:30:25 GMT
Viewed: 
1074 times
  
In lugnet.cad.ray, Tore Eriksson writes:
Level B Simplification: Replace with plain boxes only those parts that has
all its studs and inside totally hidden by other parts.

I've just finished a program that scans for all non-transparent parts that
has their studs and bottoms covered with other non-transparent parts. Then
it replaces them with plain boxes, relieving POV from rendering studs and
tubes that can't possibly be seen anyway.

Trying this program on the Datsville Town Hall, it automatically replaced
1001 parts with boxes!

Two notes: Town Hall took more than half to go through on my AMD P1100, so
don't panic if your PC gets busy for a while.
And: Don't use this program on the only original copy of your masterpiece, I
leave no guarantees...



http://home.swipnet.se/simlego/ldraw/ldboxer/p_ld1.zip (170 kb)
You'll also need these files copied into %LDRAWDIR%\Parts\B\
http://home.swipnet.se/simlego/ldraw/ldboxer/b.zip (32 kb

Clever idea.
I don't know if you are interest by optimization.
I suppose a brick is (xmin,xmax,ymin,ymax,zmin,zmax).
I guess the most efficient data structure is octree.
Octrees can be implmented as binary trees.
On the first level you sort according X.
On the second level you sort according Y.
On the third level you sort according Z.
On the fourth level you sort again according X.

Thus you don't have to test any brick against any other brick.
Identifying brick clutching would be much faster.

Damien



Message has 1 Reply:
  LDraw Boxer Page
 
(...) Thanks! :o) (...) Sounds like a good idea. But first, I make the features I like to have, then I'll try to optimize it. /Tore (22 years ago, 21-Feb-03, to lugnet.cad.ray)

Message is in Reply To:
  Level B Simplification - LDraw Boxer
 
Level B Simplification: Replace with plain boxes only those parts that has all its studs and inside totally hidden by other parts. I've just finished a program that scans for all non-transparent parts that has their studs and bottoms covered with (...) (22 years ago, 11-Feb-03, to lugnet.cad.ray)

8 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