mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 03:05:33 +00:00
Removed code after refactor
This commit is contained in:
committed by
Bruno Perdigão
parent
4a178fca58
commit
50e629c02c
@@ -360,11 +360,6 @@ class WallPolylineDecorator:
|
|||||||
else:
|
else:
|
||||||
last_point = Vector((0, 0, 0))
|
last_point = Vector((0, 0, 0))
|
||||||
|
|
||||||
second_to_last_point = None
|
|
||||||
if len(polyline_data) > 1:
|
|
||||||
second_to_last_point_data = polyline_data[len(polyline_data) - 2]
|
|
||||||
second_to_last_point = Vector((second_to_last_point_data.x, second_to_last_point_data.y, second_to_last_point_data.z))
|
|
||||||
|
|
||||||
if is_input_on:
|
if is_input_on:
|
||||||
snap_vector = Vector(
|
snap_vector = Vector(
|
||||||
(float(cls.input_panel["X"]), float(cls.input_panel["Y"]), default_container_elevation)
|
(float(cls.input_panel["X"]), float(cls.input_panel["Y"]), default_container_elevation)
|
||||||
@@ -375,24 +370,16 @@ class WallPolylineDecorator:
|
|||||||
else:
|
else:
|
||||||
snap_vector = Vector((snap_prop.x, snap_prop.y, snap_prop.z))
|
snap_vector = Vector((snap_prop.x, snap_prop.y, snap_prop.z))
|
||||||
|
|
||||||
distance = (snap_vector - last_point).length
|
second_to_last_point = None
|
||||||
x_axis_edge = (
|
if len(polyline_data) > 1:
|
||||||
Vector((0, 0)),
|
second_to_last_point_data = polyline_data[len(polyline_data) - 2]
|
||||||
Vector((1, 0)),
|
second_to_last_point = Vector((second_to_last_point_data.x, second_to_last_point_data.y, second_to_last_point_data.z))
|
||||||
)
|
if not second_to_last_point:
|
||||||
if second_to_last_point:
|
# Creates a fake "second to last" point away from the first point but in the same x axis
|
||||||
previous_axis = (
|
# this allows to calculate the angle relative to x axis when there is only one point
|
||||||
Vector((second_to_last_point.x, second_to_last_point.y)),
|
|
||||||
Vector((last_point.x, last_point.y)),
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
second_to_last_point = Vector((last_point.x + 10, last_point.y, last_point.z))
|
second_to_last_point = Vector((last_point.x + 10, last_point.y, last_point.z))
|
||||||
previous_axis = x_axis_edge
|
|
||||||
|
|
||||||
current_axis = (
|
distance = (snap_vector - last_point).length
|
||||||
Vector((last_point.x, last_point.y)),
|
|
||||||
Vector((snap_vector.x, snap_vector.y)),
|
|
||||||
)
|
|
||||||
if distance > 0:
|
if distance > 0:
|
||||||
angle = tool.Cad.angle_3_vectors(snap_vector, last_point, second_to_last_point, degrees=True)
|
angle = tool.Cad.angle_3_vectors(snap_vector, last_point, second_to_last_point, degrees=True)
|
||||||
angle = 180 - angle
|
angle = 180 - angle
|
||||||
|
|||||||
Reference in New Issue
Block a user