Skip to content

Commit 544d6bc

Browse files
committed
remove casting
1 parent 71dc6a6 commit 544d6bc

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

src/compas_blender/artists/circleartist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def draw(self, color: Optional[RGBColor] = None, show_point=False, show_normal=
4848
The objects created in Blender.
4949
"""
5050
color = color or self.color
51-
point = list(self.primitive.plane.point)
52-
normal = list(self.primitive.plane.normal)
51+
point = self.primitive.plane.point
52+
normal = self.primitive.plane.normal
5353
plane = point, normal
5454
radius = self.primitive.radius
5555
objects = []

src/compas_blender/artists/frameartist.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ def draw_axes(self) -> List[bpy.types.Object]:
9191
-------
9292
list of :class:`bpy.types.Object`
9393
"""
94-
origin = list(self.primitive.point)
95-
X = list(self.primitive.point + self.primitive.xaxis.scaled(self.scale))
96-
Y = list(self.primitive.point + self.primitive.yaxis.scaled(self.scale))
97-
Z = list(self.primitive.point + self.primitive.zaxis.scaled(self.scale))
94+
origin = self.primitive.point
95+
X = self.primitive.point + self.primitive.xaxis.scaled(self.scale)
96+
Y = self.primitive.point + self.primitive.yaxis.scaled(self.scale)
97+
Z = self.primitive.point + self.primitive.zaxis.scaled(self.scale)
9898
lines = [
9999
{'start': origin, 'end': X, 'color': self.color_xaxis, 'name': f"{self.primitive.name}.xaxis"},
100100
{'start': origin, 'end': Y, 'color': self.color_yaxis, 'name': f"{self.primitive.name}.yaxis"},

src/compas_blender/artists/lineartist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def draw(self, color: Optional[RGBColor] = None, show_points: Optional[bool] = F
6767
6868
"""
6969
color = color or self.color
70-
start = list(self.primitive.start)
71-
end = list(self.primitive.end)
70+
start = self.primitive.start
71+
end = self.primitive.end
7272
objects = []
7373
if show_points:
7474
points = [

src/compas_blender/artists/polygonartist.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,15 @@ def draw(self,
5151
-------
5252
list of bpy.types.Object
5353
"""
54-
_points = map(list, self.primitive.points)
5554
color = color or self.color
5655
objects = []
5756
if show_points:
58-
points = [{'pos': point, 'color': color, 'name': self.primitive.name, 'radius': 0.01} for point in _points]
57+
points = [{'pos': point, 'color': color, 'name': self.primitive.name, 'radius': 0.01} for point in self.primitive.points]
5958
objects += compas_blender.draw_points(points, collection=self.collection)
6059
if show_edges:
61-
lines = [{'start': list(a), 'end': list(b), 'color': color, 'name': self.primitive.name} for a, b in self.primitive.lines]
60+
lines = [{'start': a, 'end': b, 'color': color, 'name': self.primitive.name} for a, b in self.primitive.lines]
6261
objects += compas_blender.draw_lines(lines, collection=self.collection)
6362
if show_face:
64-
polygons = [{'points': list(_points), 'color': color, 'name': self.primitive.name}]
63+
polygons = [{'points': self.primitive.points, 'color': color, 'name': self.primitive.name}]
6564
objects += compas_blender.draw_faces(polygons, collection=self.collection)
6665
return objects

0 commit comments

Comments
 (0)