mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fixes piecewise function evaluation in alignment api
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user