`Face.center_location` doesn't work for `Geom_BSplineSurface`
Closed this issue · 0 comments
gumyr commented
s1 = Spline((-1, 0, 0), (0, 0, 0.5), (0.5, 0, 0.3), (1, 0, 0))
s2 = Spline((-1, 1, 0), (0, 1, 0.5), (0.5, 1, 0.3), (1, 1, 0))
sur = Face.make_surface_from_curves(s1.edge(), s2.edge())
print(sur._geom_adaptor())
cen = sur.center_location
<OCP.Geom.Geom_BSplineSurface object at 0x72cb035f6cf0>
Traceback (most recent call last):
File "/home/roger-maitland/Documents/build123d/experiments/center_location.py", line 18, in <module>
cen = sur.center_location
File "/home/roger-maitland/Documents/build123d/src/build123d/topology.py", line 5297, in center_location
x_dir = Vector(self._geom_adaptor().Position().XDirection())
AttributeError: 'OCP.Geom.Geom_BSplineSurface' object has no attribute 'Position'
This does work for other types of non-planar surfaces.