I’m doing a definition to analyse world orientations of Windows and Curtain Panels. It’s quite easy for Windows, but as node FamilyInstance.FacingOrientation cannot be used for Curtain Panels and CurtainPanel.PanelPlane doesn’t work for panels on a curved Curtain Wall, I’m running into trouble.
I’ve got everything working except panels on curved walls. I’m just starting to wrap my head around vectors and normals, but I understand what is going on and why it fails - I just don’t know how to solve it. It seems like the direction / orientation of the panels is the missing link.
Here’s another method that may also work assuming the normals of the CurtainPanel.Boundaries is consistent:
Assuming it is, and assuming the surfaces created from the CurtainPanel.Boundaries results in inconsistent normals; calculate their dot product. Any scalar of -1 is an inverted Surface.NormalAtPoint. Use Vector.Reverese guided by an if statement and you should now be able to output the correct angles for all panels from this ‘corrected’ set of vectors.
EDIT: ps, if the result of the dot is anything to go by, it seems the normals of the CurtainPanel.Boundaries indicate these elements are treated as planar, meaning you can bypass everything and simply use Curve.Normal, I haven’t tested this so I’ll leave that for you to uncover.
I have tried many things on my own and what you and @Thomas_Mahon have posted with no luck. The screen shot below is using the script you posted (without any changes). The two show, one was copied and then flipped but it is still showing the normal in the same direction. The two curtain walls in the first image are the same ones in the following ones after.
Hi - I have a similar problem but need a different solution. I’m creating generic adaptive family members which are defined with 4 points (a rectangle) and a thickness. This works, but the thickness side dynamo/revit chooses is not consistent. I would like to do the above approach (vector dot product of the resultant shape and the curve.normal, to properly fix the thickness side (- or + value to my thickness parameter). My problem is that I don’t know how to find the normal vector of my adaptive component. It’s not a surface, not a curtain wall, not a wall… so how can I find the direction that dynamo/revit has chosen, to analyze and adjust which way it really should go? I am 100% certain that all my points are being fed in a consistent order to match my generic adaptive component family, but being new to both Revit and Dynamo, it is possible that my family is lacking a control/constraint somehow, which would help me out. Thanks so much!