I am contouring a brep and trying to find a plane on each surface to orient them to xy plane in logical order. But I am getting opposite Y directions for some planes of surfaces. Is there a way that can assure all the planes always have y axis in upwards direction?
The easiest thing to do, in this case, would be to simply assign YZ planes to the origins of the planes, but the better thing to do would be to first correct the direction of the surfaces, and then align the planes to the -y direction:
Thank you for this solution. I did think of this approach and did exact same script as you did except last part of align plane. Does align plane orient all planes into one direction ?
Align Plane will rotate all planes around their Z axis in an attempt to bring the X axis in the same direction to a given guide direction. This is different from the plane orientation, which is defined by the planeâs Z axis and can be modified by use of Adjust Plane.
Another cheap cheat for a case like yours is to get one plane (e.g., the first surface) right/aligned and just âsend itâ to the other ones via PlaneOriginâif plane alignment is the priority vs flipping surfaces.
Sure⊠but none of these solutions actually fix the frame of the surface, just create corrected planes in the stead of the surface frame. To fix the surface frame, youâd have to start with the curves the surfaces are made from. Like so:
That makes sense and it corrects problem from the root. Before when we flipped surfaces only, when I oriented these planes to xy plane for laser profiles, all the surfaces did not align them on plane in unified directions.