Fixes piecewise function evaluation in alignment api

This commit is contained in:
Richard Brice
2024-11-02 14:42:44 -07:00
parent caeabe2cd5
commit bf8c3530a1
@@ -47,8 +47,9 @@ def evaluate_representation(shape_rep: entity_instance, dist_along: float) -> np
s = ifcopenshell.geom.settings()
piecewise_function = ifcopenshell_wrapper.map_shape(s, shape_rep.wrapped_data)
pwf_evaluator = ifcopenshell_wrapper.piecewise_function_evaluator(piecewise_function,s)
trans_matrix = piecewise_function.evaluate(dist_along)
trans_matrix = pwf_evaluator.evaluate(dist_along)
return np.array(trans_matrix, dtype=np.float64).T
@@ -68,8 +69,9 @@ def evaluate_segment(segment: entity_instance, dist_along: float) -> np.ndarray:
s = ifcopenshell.geom.settings()
piecewise_function = ifcopenshell_wrapper.map_shape(s, segment.wrapped_data)
pwf_evaluator = ifcopenshell_wrapper.piecewise_function_evaluator(piecewise_function,s)
trans_matrix = piecewise_function.evaluate(dist_along)
trans_matrix = pwf_evaluator.evaluate(dist_along)
return np.array(trans_matrix, dtype=np.float64).T