mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Fallback to C++ impl of IfcAxis2PlacementLinear #4565
This commit is contained in:
@@ -69,12 +69,11 @@ def get_axis2placement(placement: ifcopenshell.entity_instance) -> MatrixType:
|
|||||||
if coordinates := getattr(location, "Coordinates", None):
|
if coordinates := getattr(location, "Coordinates", None):
|
||||||
o = coordinates
|
o = coordinates
|
||||||
else:
|
else:
|
||||||
ifc_class = location.is_a("IfcPointByDistanceExpression")
|
import ifcopenshell.geom
|
||||||
print(
|
st = ifcopenshell.geom.settings()
|
||||||
f'WARNING. Placement location of type "{ifc_class}" '
|
st.set('convert-back-units', True)
|
||||||
f'is not yet supported and placement {placement} may be placed incorrectly.'
|
shp = ifcopenshell.geom.create_shape(st, placement)
|
||||||
)
|
return np.array(shp.matrix).reshape((4,4))
|
||||||
o = (0.0, 0.0, 0.0)
|
|
||||||
|
|
||||||
elif ifc_class == "IfcAxis2Placement2D":
|
elif ifc_class == "IfcAxis2Placement2D":
|
||||||
z = np.array((0, 0, 1))
|
z = np.array((0, 0, 1))
|
||||||
|
|||||||
Reference in New Issue
Block a user