mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Minor fix in polyline decorator variables initialization.
This commit is contained in:
@@ -309,6 +309,7 @@ class PolylineDecorator:
|
|||||||
use_default_container = False
|
use_default_container = False
|
||||||
instructions = None
|
instructions = None
|
||||||
snap_info = None
|
snap_info = None
|
||||||
|
tool_state = None
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -372,7 +373,6 @@ class PolylineDecorator:
|
|||||||
points = []
|
points = []
|
||||||
edges = []
|
edges = []
|
||||||
for i in range(len(prop)):
|
for i in range(len(prop)):
|
||||||
print(prop[i].x, prop[i].y, prop[i].z)
|
|
||||||
points.append(Vector((
|
points.append(Vector((
|
||||||
prop[i].x,
|
prop[i].x,
|
||||||
prop[i].y,
|
prop[i].y,
|
||||||
@@ -383,8 +383,6 @@ class PolylineDecorator:
|
|||||||
edges.extend(bottom_loop)
|
edges.extend(bottom_loop)
|
||||||
upper_loop = [[i + n for i in edges] for edges in bottom_loop]
|
upper_loop = [[i + n for i in edges] for edges in bottom_loop]
|
||||||
edges.extend(upper_loop)
|
edges.extend(upper_loop)
|
||||||
print(bottom_loop)
|
|
||||||
print(upper_loop)
|
|
||||||
connections = [[i, j] for i, j in zip(range(n), range(n, n*2))]
|
connections = [[i, j] for i, j in zip(range(n), range(n, n*2))]
|
||||||
edges.extend(connections)
|
edges.extend(connections)
|
||||||
if len(points) > 1:
|
if len(points) > 1:
|
||||||
@@ -400,7 +398,10 @@ class PolylineDecorator:
|
|||||||
"Z": "Z coord:",
|
"Z": "Z coord:",
|
||||||
"AREA": "Area: ",
|
"AREA": "Area: ",
|
||||||
}
|
}
|
||||||
mouse_pos = self.event.mouse_region_x, self.event.mouse_region_y
|
try:
|
||||||
|
mouse_pos = self.event.mouse_region_x, self.event.mouse_region_y
|
||||||
|
except:
|
||||||
|
mouse_pos = (None, None)
|
||||||
|
|
||||||
self.addon_prefs = tool.Blender.get_addon_preferences()
|
self.addon_prefs = tool.Blender.get_addon_preferences()
|
||||||
self.font_id = 0
|
self.font_id = 0
|
||||||
@@ -550,7 +551,6 @@ class PolylineDecorator:
|
|||||||
|
|
||||||
# Draw polyline with selected points
|
# Draw polyline with selected points
|
||||||
self.line_shader.uniform_float("lineWidth", 2.0)
|
self.line_shader.uniform_float("lineWidth", 2.0)
|
||||||
print("PP", polyline_points)
|
|
||||||
self.draw_batch("POINTS", polyline_points, decorator_color_selected)
|
self.draw_batch("POINTS", polyline_points, decorator_color_selected)
|
||||||
if len(polyline_points) > 1:
|
if len(polyline_points) > 1:
|
||||||
self.draw_batch("LINES", polyline_points, decorator_color_selected, polyline_edges)
|
self.draw_batch("LINES", polyline_points, decorator_color_selected, polyline_edges)
|
||||||
|
|||||||
Reference in New Issue
Block a user