Skip to content

Commit

Permalink
Plane instantiation from Face uses the new is_planar property Issue #756
Browse files Browse the repository at this point in the history
  • Loading branch information
dalibor-frivaldsky committed Nov 8, 2024
1 parent 89c29ab commit a797e59
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/build123d/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
from OCP.BRepTools import BRepTools
from OCP.Geom import Geom_BoundedSurface, Geom_Line, Geom_Plane
from OCP.GeomAPI import GeomAPI_ProjectPointOnSurf, GeomAPI_IntCS, GeomAPI_IntSS
from OCP.GeomLib import GeomLib_IsPlanarSurface
from OCP.gp import (
gp_Ax1,
gp_Ax2,
Expand Down Expand Up @@ -2093,8 +2092,7 @@ def optarg(kwargs, name, args, index, default):
elif arg_face:
# Determine if face is planar
surface = BRep_Tool.Surface_s(arg_face.wrapped)
is_surface_planar = GeomLib_IsPlanarSurface(surface, TOLERANCE).IsPlanar()
if not is_surface_planar:
if not arg_face.is_planar:
raise ValueError("Planes can only be created from planar faces")
properties = GProp_GProps()
BRepGProp.SurfaceProperties_s(arg_face.wrapped, properties)
Expand Down

0 comments on commit a797e59

Please sign in to comment.