-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c3c361
commit c01665b
Showing
2 changed files
with
70 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"id": "4384e04f-2997-429b-b3fc-53e7fe78703e", | ||
"identity": { | ||
"name": "COMPAS-Masonry", | ||
"version": "0.1.1", | ||
"version": "0.1.1-beta", | ||
"publisher": { | ||
"email": "[email protected]", | ||
"name": "Tom Van Mele", | ||
|
@@ -36,7 +36,13 @@ | |
"version": "3.*.*" | ||
}, | ||
"title": "Masonry", | ||
"uri": "Masonry.py" | ||
"uri": "Masonry.py", | ||
"image": { | ||
"light": { | ||
"type": "svg", | ||
"data": "PHN2ZyBpZD0iT1BFTl94NUZfU0FWRSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgo8L3N2Zz4=" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "04447f90-ccb1-40dd-b091-723956a0b949", | ||
|
@@ -119,5 +125,17 @@ | |
"title": "Masonry_reqs_install", | ||
"uri": "Masonry_reqs_install.py" | ||
} | ||
], | ||
"libraries": [ | ||
{ | ||
"type": "uri", | ||
"library": { | ||
"base": "file:///Users/vanmelet/Code/compas-Masonry/src/compas_masonry/", | ||
"language": { | ||
"id": "*.*.python", | ||
"version": "3.*.*" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#! python3 | ||
|
||
import rhinoscriptsyntax as rs # type: ignore | ||
|
||
from compas_session.namedsession import NamedSession | ||
|
||
|
||
def RunCommand(is_interactive): | ||
|
||
session = NamedSession(name="COMPAS-Masonry") | ||
|
||
scene = session.scene() | ||
|
||
# ============================================================================= | ||
# Remove existing model | ||
# ============================================================================= | ||
|
||
# ============================================================================= | ||
# Make new model | ||
# ============================================================================= | ||
|
||
options = ["RhinoBreps", "RhinoMeshes", "MeshGrid", "JSON", "OBJ"] | ||
option = rs.GetString("Make a Masonry Model", strings=options) | ||
if not option: | ||
return | ||
|
||
if option == "RhinoBreps": | ||
pass | ||
|
||
elif option == "RhinoMeshes": | ||
pass | ||
|
||
else: | ||
raise NotImplementedError | ||
|
||
# ============================================================================= | ||
# Update scene | ||
# ============================================================================= | ||
|
||
# ============================================================================= | ||
# Save session | ||
# ============================================================================= | ||
|
||
|
||
# ============================================================================= | ||
# Run as main | ||
# ============================================================================= | ||
|
||
if __name__ == "__main__": | ||
RunCommand(True) |