coplanar faces
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
coplanar faces
Is there a function available which checks if two or more faces are coplanar?
-
- Posts: 329
- Joined: Mon Sep 09, 2013 6:08 pm
Re: coplanar faces
You could check whether the normals are parallel, for example by calculating the cross product and checking if it is close to zero.
Re: coplanar faces
Code: Select all
isinstance(ob1.Shape.Surface,Part.Plane) and isinstance(ob2.Shape.Surface,Part.Plane) abs(ob1.Shape.Surface.Axis*ob2.Shape.Surface.Axis) > (1-1e-6) and ob1.Shape.isInside(ob2.Shape.Surface.Position,1e-6,True)
Re: coplanar faces
Code: Select all
DraftGeomUtils.isCoplanar(list_of_faces)