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 / 3157
3156  |  3158
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
Re: Object Orientation & DAT files & CLIPPING/WINDING
Newsgroups: 
lugnet.cad.dev
Date: 
Wed, 20 Oct 1999 22:09:42 GMT
Viewed: 
465 times
  
Steve Bliss wrote...
On Tue, 19 Oct 1999 13:25:53 GMT, "Lars C. Hassing" wrote:

Steve Bliss wrote in message <380b3366.9260126@lugnet.com>...
Now the INVERT problem: • [snip]
NOTE:
if you had a non simetrical object, you will probably need an invert
matrix (with a negative determinant), besides the INVERT meta command.

You'll always need to specify the inversion in the matrix, whether the
subfile is asymmetrical or not.  The matrix specifies the exact inversion
to perform.  The 0 INVERT is just a flag to the renderer, which says • "Hey,
rendering program! The next statement intentionally turns the subfile
inside-out, so don't correct it."


No, you don't need to bother with the matrix. Use the 0 INVERT to tell
the renderer: "Hey, please turn the following subfiles inside-out".

Yes the coded inversion is needed, for one big reason:

The clipping-ready parts library must be compatible with non-clipping
rendering programs, such as LDraw.  So the inversions need to occur in the
real commands, not in the clipping-extension meta-commands.

But it *is* compatible with LDraw!
You left out my example (which BTW had the INVERT placed incorrectly :-),
so I'll repeat it. stud2.dat is the hollow stud used on technic bricks.
It uses two cylinders:
  1 16 0 -4 0 6 0 0 0 4 0 0 0 6 4-4cyli.dat
  0 INVERT ON
  1 16 0 -4 0 4 0 0 0 4 0 0 0 4 4-4cyli.dat
  0 INVERT OFF
The first cylinder is the outer wall. Let's assume that the orientation
of 4-4cyli.dat is outwards. This is what we want, so we use a normal matrix.

The second cylinder is the inner wall, the wall of the hole in the stud.
Here the orientation of 4-4cyli should be inverted, because we now want the
inner side of the cyli to be the outside. We still use a normal matrix,
it's easy and intuitive - and correct. If we had used an inverting matrix,
(which would also be correct to do) the rendering program would just
"cancel it out", as it would do when mirroring sub-models.

And LDraw merely draws ALL tris/quads as usual! The stud2.dat file has not
changed from LDraw's point of view, just a few comments were added.
There's no reason to use an inverting matrix for LDraw. You are welcome to
do it, and it will work too, because LDraw draws everything.

Now, if you want to talk about having a special version of the parts
library just for clipping-ready renderers, let's go!  But in a separate
thread, please.

No, no special versions, thank you. Backward compatibility with our
reference-renderer, LDraw, is very important.

Apart from that I fully agree with Steve's comments to Rui.

Seems like there was an echo in here, eh? ;)  My earlier reply looked a lot
like yours.

Yeah, I'm glad we were so agreed :-)
/Lars



Message has 1 Reply:
  Re: Object Orientation & DAT files & CLIPPING/WINDING
 
(...) You are right. Or more precisely, I was wrong. Matrix-based *inversions* are not required. But matrix-based mirrorings will be necessary, for asymmetric primitives, like 1-4cyls.dat. (...) I was thinking about some approach that would map (...) (25 years ago, 21-Oct-99, to lugnet.cad.dev)

Message is in Reply To:
  Re: Object Orientation & DAT files & CLIPPING/WINDING
 
(...) Yes the coded inversion is needed, for one big reason: The clipping-ready parts library must be compatible with non-clipping rendering programs, such as LDraw. So the inversions need to occur in the real commands, not in the clipping-extension (...) (25 years ago, 19-Oct-99, to lugnet.cad.dev)

13 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