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 / 9386
9385  |  9387
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
Re: primer/tutorial on BFC?
Newsgroups: 
lugnet.cad.dev
Date: 
Sat, 3 Jan 2004 05:06:43 GMT
Viewed: 
1746 times
  
In lugnet.cad.dev, Travis Cobbs wrote:
In lugnet.cad.dev, Steve Bliss wrote:
That shouldn't work -- the rendering program should detect that you've mirrored the
object, and adjust accordingly.  Unfortunately, I see that it does 'work' in L3Lab.

I do agree that it isn't supposed to work, because the BFC spec very carefully
states that any polygons drawn with an aggregate matrix that causes mirroring
must be flipped back.

I think it works just fine.
L3Lab correctly detects that the matrix is mirroring,
see View/Tree View... and click the BFC radio button,
it should say INVERT in front of the line.

When we discussed the BFC business the general assumption was that a negative matrix
would flip the winding of the polygons. This is also true for e.g. 4-4cyli.dat,
but not for the 2D primitives like 4-4disc.dat when just toggling the y-value.
However, I think things do work as expected if you e.g. reference a stud:
1 16 0 0 0 10 0 0 0 1 0 0 0 10 4-4disc.dat
1 16 20 0 0 10 0 0 0 -1 0 0 0 10 4-4disc.dat
1 16 0 0 20 10 0 0 0 5 0 0 0 10 4-4cyli.dat
1 16 20 0 20 10 0 0 0 -5 0 0 0 10 4-4cyli.dat
1 16 0 0 40 1 0 0 0 1 0 0 0 1 stud.dat
1 16 20 0 40 1 0 0 0 -1 0 0 0 1 stud.dat

What you should do is flip the 2D object.  Inverting both X and Y is the same as
rotating 180 degrees around the Z axis:
1 16 0 0 0 -10 0 0 0 -1 0 0 0 10 4-4disc.dat

Or you could just use INVERTNEXT, which will work for both 2D and 3D objects,
and doesn't require any additional matrix math (Isn't that what it's there
for?):

0 BFC INVERTNEXT
1 16 0 0 0 10 0 0 0 1 0 0 0 10 4-4disc.dat

Yes, that would be nicer.
As Tore correctly stated, L3Lab does support INVERTNEXT.
/Lars



Message has 2 Replies:
  Re: primer/tutorial on BFC?
 
(...) You're right; I'm wrong. I'm still having a hard time visualizing it, but your stud example below convinced me that negating the one value in the matrix will indeed flip a 2D primitive like a disk, and this is the expected behavior. In fact, (...) (21 years ago, 3-Jan-04, to lugnet.cad.dev)
  Re: primer/tutorial on BFC?
 
(...) Hmmm, very good point. I don't like treating specific object specially, but I don't see any way around it. I played around with the stud and with a 'solid' cylinder object, I couldn't find a way to get L3Lab's BFC handling to fail. Steve (20 years ago, 4-Jan-04, to lugnet.cad.dev)

Message is in Reply To:
  Re: primer/tutorial on BFC?  [DAT]
 
(...) I do agree that it isn't supposed to work, because the BFC spec very carefully states that any polygons drawn with an aggregate matrix that causes mirroring must be flipped back. (...) I'm sorry that LDView is crashing your system, but it (...) (21 years ago, 3-Jan-04, to lugnet.cad.dev)

19 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