Skip to content

Commit d5c4ed4

Browse files
committed
Merge branch 'main' into shape-api
2 parents 34b77c9 + b043bf2 commit d5c4ed4

File tree

6 files changed

+270
-97
lines changed

6 files changed

+270
-97
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
* Added `compas.geometry.Geometry` base class.
1616
* Added `__add__`, `__sub__`, `__and__` to `compas.geometry.Shape` for boolean operations using binary operators.
1717
* Added `is_closed` to `compas.geometry.Polyhedron`.
18+
* Added `Plane.offset`.
19+
* Added `draw_node_labels` and `draw_edgelabels` to `compas_blender.artists.NetworkArtist`.
20+
* Added `compas_blender.artists.RobotModelArtist.clear`.
1821

1922
### Changed
2023

2124
* Fixed bug in `compas_blender.draw_texts`.
2225
* Changed default resolution for shape discretisation to 16 for both u and v where relevant.
2326
* Changed base class of `compas.geometry.Primitive` and `compas.geometry.Shape` to `compas.geometry.Geometry`.
27+
* `compas_blender.artists.RobotModelArtist.collection` can be assigned as a Blender collection or a name.
28+
* Generalized the parameter `color` of `compas_blender.draw_texts` and various label drawing methods.
2429

2530
### Removed
2631

src/compas_blender/artists/frameartist.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import bpy
2+
from typing import List
3+
from typing import Optional
4+
5+
from compas.geometry import Frame
6+
17
import compas_blender
28
from compas_blender.artists import BaseArtist
39

@@ -55,7 +61,10 @@ class FrameArtist(BaseArtist):
5561
artist.draw()
5662
5763
"""
58-
def __init__(self, frame, collection=None, scale=1.0):
64+
def __init__(self,
65+
frame: Frame,
66+
collection: Optional[bpy.types.Collection] = None,
67+
scale: float = 1.0):
5968
super(FrameArtist, self).__init__()
6069
self.collection = collection
6170
self.frame = frame
@@ -65,7 +74,7 @@ def __init__(self, frame, collection=None, scale=1.0):
6574
self.color_yaxis = (0, 255, 0)
6675
self.color_zaxis = (0, 0, 255)
6776

68-
def draw(self):
77+
def draw(self) -> None:
6978
"""Draw the frame.
7079
7180
Returns
@@ -76,7 +85,7 @@ def draw(self):
7685
self.draw_origin()
7786
self.draw_axes()
7887

79-
def draw_origin(self):
88+
def draw_origin(self) -> List[bpy.types.Object]:
8089
"""Draw the origin of the frame.
8190
8291
Returns
@@ -93,7 +102,7 @@ def draw_origin(self):
93102
self.objects += objects
94103
return objects
95104

96-
def draw_axes(self):
105+
def draw_axes(self) -> List[bpy.types.Object]:
97106
"""Draw the axes of the frame.
98107
99108
Returns

0 commit comments

Comments
 (0)