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 / 8267
8266  |  8268
Subject: 
Re: Seam width
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 22 Jan 2003 03:02:24 GMT
Viewed: 
692 times
  
In lugnet.cad.dev, Trond Hasse Lie writes:
Hi.

Just wondering:

How do you calculate the seam width in programs like L3P and LDView?
Do you just scale the part by x% ? Or ?

In LDView, I do a few things.  First, I check to see if the file I just
loaded is a part.  In order to be a part, it has to satisfy two criteria.
First, it can't be the child of a part.  Second, it has to either be in the
LDraw Parts directory, or it has to have a header comment indicating that it
is a part.

Once I have determined that I have a part, I calculate its axis-aligned
bounding box.  Then, for each of the X, Y, and Z axes, I calculate the scale
factor necessary to shrink that dimension by the seam width.  For example,
for X I would calculate (width - seamWidth) / width as my scale factor.

Finally, I scale the part in each dimension based on the calculated scale
factor, while being sure that the resulting scaled part has a bounding box
centered in the same spot as the original bounding box.

--Travis Cobbs (tcobbs@REMOVE.halibut.com)



Message is in Reply To:
  Seam width
 
Hi. Just wondering: How do you calculate the seam width in programs like L3P and LDView? Do you just scale the part by x% ? Or ? Trond Hasse Lie Norway (o\_/o) (22 years ago, 20-Jan-03, to lugnet.cad.dev)

3 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