mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
Round angle in polytool input numbers calculations.
This commit is contained in:
@@ -414,6 +414,10 @@ class PolylineDecorator:
|
|||||||
distance = (snap_vector - last_point).length
|
distance = (snap_vector - last_point).length
|
||||||
if distance > 0:
|
if distance > 0:
|
||||||
angle = tool.Cad.angle_3_vectors(second_to_last_point, last_point, snap_vector, new_angle=None, degrees=True)
|
angle = tool.Cad.angle_3_vectors(second_to_last_point, last_point, snap_vector, new_angle=None, degrees=True)
|
||||||
|
|
||||||
|
# Round angle to the nearest 0.05
|
||||||
|
angle = round(angle / 0.05) * 0.05
|
||||||
|
|
||||||
if cls.input_panel:
|
if cls.input_panel:
|
||||||
cls.input_panel["X"] = str(round(snap_vector.x, 3))
|
cls.input_panel["X"] = str(round(snap_vector.x, 3))
|
||||||
cls.input_panel["Y"] = str(round(snap_vector.y, 3))
|
cls.input_panel["Y"] = str(round(snap_vector.y, 3))
|
||||||
|
|||||||
Reference in New Issue
Block a user