You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Offsetting an open polyline works as expectedpoly_line=Polyline((0,0),(10,0),(10,8),(0,8)) # okoffset_line=poly_line.offset_2d(0.25,side=Side.BOTH)
offset_line=poly_line.offset_2d(0.25,side=Side.LEFT)
offset_line=poly_line.offset_2d(0.25,side=Side.RIGHT)
Offsetting a closed polyline raise an exception with Side.LEFT or Side.RIGHT
poly_line=Polyline((0,0),(10,0),(10,8),(0,8),(0,0)) # a closed wire fails with LEFT and RIGHT#poly_line = Polyline((0,0),(10,0),(10,8),(0,8),close=True) # a closed wire fails with LEFT and RIGHToffset_line=poly_line.offset_2d(0.25,side=Side.BOTH) # worksoffset_line=poly_line.offset_2d(0.25,side=Side.LEFT) # failsoffset_line=poly_line.offset_2d(0.25,side=Side.RIGHT) # fails
Error message:
Traceback (most recent call last):
File "/home/test/build123d_dev/CAD_drawing_work/offset_closed_wire_bug.py", line 6, in <module>
offset_line = poly_line.offset_2d(0.25,Kind.INTERSECTION,Side.LEFT)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/test/build123d_dev/lib/python3.12/site-packages/build123d/topology.py", line 877, in offset_2d
centers = [w.position_at(0.5) for w in wires]
^^^^^^^^^^^^^^^^^^
File "/home/test/build123d_dev/lib/python3.12/site-packages/build123d/topology.py", line 680, in position_at
curve = self._geom_adaptor()
^^^^^^^^^^^^^^^^^^^^
File "/home/test/build123d_dev/lib/python3.12/site-packages/build123d/topology.py", line 7799, in _geom_adaptor
return BRepAdaptor_CompCurve(self.wrapped)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. OCP.BRepAdaptor.BRepAdaptor_CompCurve()
2. OCP.BRepAdaptor.BRepAdaptor_CompCurve(W: OCP.TopoDS.TopoDS_Wire, KnotByCurvilinearAbcissa: bool = False)
3. OCP.BRepAdaptor.BRepAdaptor_CompCurve(W: OCP.TopoDS.TopoDS_Wire, KnotByCurvilinearAbcissa: bool, First: float, Last: float, Tol: float)
Invoked with: None
The text was updated successfully, but these errors were encountered:
Tested with build123d version 0.7.1 and 0.6.0
Offsetting an open polyline works as expected:
Offsetting a closed polyline raise an exception with Side.LEFT or Side.RIGHT
Error message:
The text was updated successfully, but these errors were encountered: