Skip to content

Commit d3e0926

Browse files
committed
instance attributes
1 parent fd6d975 commit d3e0926

File tree

6 files changed

+54
-22
lines changed

6 files changed

+54
-22
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
* Changed assignment of groups to instance attributes.
15+
1416
### Removed
1517

1618

compas-RV.rhproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"id": "a6dc4669-0e8e-40ea-8d71-b9b0f4764ec1",
99
"identity": {
1010
"name": "COMPAS-RhinoVAULT",
11-
"version": "0.6.9",
11+
"version": "0.6.11",
1212
"publisher": {
1313
"email": "[email protected]",
1414
"name": "Tom Van Mele",

src/compas_rv/scene/forceobject.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,19 @@ class RhinoForceObject(RhinoDiagramObject):
1515
edgecolor = ColorDictAttribute(default=Color.blue().darkened(50))
1616
facecolor = ColorDictAttribute(default=Color.blue().lightened(25))
1717

18-
vertexgroup = "RV::ForceDiagram::Vertices"
19-
edgegroup = "RV::ForceDiagram::Edges"
20-
facegroup = "RV::ForceDiagram::Faces"
18+
def __init__(
19+
self,
20+
vertexgroup="RV::ForceDiagram::Vertices",
21+
edgegroup="RV::ForceDiagram::Edges",
22+
facegroup="RV::ForceDiagram::Faces",
23+
**kwargs,
24+
):
25+
super().__init__(
26+
vertexgroup=vertexgroup,
27+
edgegroup=edgegroup,
28+
facegroup=facegroup,
29+
**kwargs,
30+
)
2131

2232
# =============================================================================
2333
# Properties

src/compas_rv/scene/formobject.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,19 @@ class RhinoFormObject(RhinoDiagramObject):
1414
edgecolor = ColorDictAttribute(default=Color.green().darkened(50))
1515
facecolor = ColorDictAttribute(default=Color.green().lightened(25))
1616

17-
vertexgroup = "RV::FormDiagram::Vertices"
18-
edgegroup = "RV::FormDiagram::Edges"
19-
facegroup = "RV::FormDiagram::Faces"
17+
def __init__(
18+
self,
19+
vertexgroup="RV::FormDiagram::Vertices",
20+
edgegroup="RV::FormDiagram::Edges",
21+
facegroup="RV::FormDiagram::Faces",
22+
**kwargs,
23+
):
24+
super().__init__(
25+
vertexgroup=vertexgroup,
26+
edgegroup=edgegroup,
27+
facegroup=facegroup,
28+
**kwargs,
29+
)
2030

2131
# =============================================================================
2232
# Properties

src/compas_rv/scene/patternobject.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@ class RhinoPatternObject(RUIMeshObject):
1515
anchorcolor = ColorAttribute(default=Color.red())
1616
fixedcolor = ColorAttribute(default=Color.blue())
1717

18-
vertexgroup = "RV::Pattern::Vertices"
19-
edgegroup = "RV::Pattern::Edges"
20-
facegroup = "RV::Pattern::Faces"
21-
2218
def __init__(
2319
self,
2420
disjoint=True,
21+
vertexgroup="RV::FormDiagram::Vertices",
22+
edgegroup="RV::FormDiagram::Edges",
23+
facegroup="RV::FormDiagram::Faces",
2524
**kwargs,
2625
):
27-
super().__init__(disjoint=disjoint, **kwargs)
26+
super().__init__(
27+
disjoint=disjoint,
28+
vertexgroup=vertexgroup,
29+
edgegroup=edgegroup,
30+
facegroup=facegroup,
31+
**kwargs,
32+
)
2833

2934
# =============================================================================
3035
# Clear

src/compas_rv/scene/thrustobject.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,29 @@ class RhinoThrustObject(RUIMeshObject):
3030
compressioncolor = ColorAttribute(default=Color.blue())
3131
tensioncolor = ColorAttribute(default=Color.red())
3232

33-
vertexgroup = "RV::ThrustDiagram::Vertices"
34-
edgegroup = "RV::ThrustDiagram::Edges"
35-
facegroup = "RV::ThrustDiagram::Faces"
36-
3733
def __init__(
3834
self,
3935
disjoint=True,
4036
show_supports=True,
4137
show_fixed=True,
4238
show_free=False,
43-
loadgroup=None,
44-
selfweightgroup=None,
45-
forcegroup=None,
46-
reactiongroup=None,
47-
residualgroup=None,
39+
vertexgroup="RV::ThrustDiagram::Vertices",
40+
edgegroup="RV::ThrustDiagram::Edges",
41+
facegroup="RV::ThrustDiagram::Faces",
42+
loadgroup="RV::ThrustDiagram::Loads",
43+
selfweightgroup="RV::ThrustDiagram::Selfweight",
44+
forcegroup="RV::ThrustDiagram::Forces",
45+
reactiongroup="RV::ThrustDiagram::Reactions",
46+
residualgroup="RV::ThrustDiagram::Residuals",
4847
**kwargs,
4948
):
50-
super().__init__(disjoint=disjoint, **kwargs)
49+
super().__init__(
50+
disjoint=disjoint,
51+
vertexgroup=vertexgroup,
52+
edgegroup=edgegroup,
53+
facegroup=facegroup,
54+
**kwargs,
55+
)
5156

5257
self.show_faces = True
5358
self.show_edges = False

0 commit comments

Comments
 (0)