Skip to content

Commit 8e94997

Browse files
committed
creating roadblocks
1 parent 9733416 commit 8e94997

13 files changed

+50
-10
lines changed

plugin/RV_force.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@
1414
def RunCommand():
1515
session = RVSession()
1616

17-
form = session.find_formdiagram()
17+
form = session.find_formdiagram(warn=False)
1818
if not form:
19+
print("There is no FormDiagram in the scene.")
20+
return
21+
22+
force = session.find_forcediagram(warn=False)
23+
if force:
24+
print("ForceDiagram already exists in the scene.")
1925
return
2026

2127
session.clear_all_forcediagrams()
@@ -49,6 +55,8 @@ def RunCommand():
4955

5056
rs.Redraw()
5157

58+
print('ForceDiagram successfully created.')
59+
5260
if session.settings.autosave:
5361
session.record(name="Create Force Diagram")
5462

plugin/RV_force_modify.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ def RunCommand():
1212

1313
form = session.find_formdiagram()
1414
if not form:
15+
print("There is no FormDiagram in the scene.")
1516
return
1617

1718
force = session.find_forcediagram()
1819
if not force:
20+
print("There is no ForceDiagram in the scene.")
1921
return
2022

2123
# =============================================================================

plugin/RV_form.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,21 @@
1616
def RunCommand():
1717
session = RVSession()
1818

19-
pattern = session.find_pattern()
19+
pattern = session.find_pattern(warn=False)
2020
if not pattern:
21+
print("There is no Pattern in the scene.")
2122
return
2223

23-
session.clear_all_diagrams()
24+
if not list(pattern.mesh.vertices_where(is_support=True)):
25+
print("Pattern has no supports! Please define supports vertices.")
26+
return
27+
28+
form = session.find_formdiagram(warn=False)
29+
if form:
30+
print("FormDiagram already exists in the scene.")
31+
return
32+
33+
session.clear_all_formdiagrams()
2434

2535
# =============================================================================
2636
# Init the form diagram
@@ -72,6 +82,8 @@ def RunCommand():
7282

7383
rs.Redraw()
7484

85+
print('FormDiagram successfully created.')
86+
7587
if session.settings.autosave:
7688
session.record(name="Init Form Diagram")
7789

plugin/RV_form_modify.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def RunCommand():
1212

1313
form = session.find_formdiagram()
1414
if not form:
15+
print("There is no FormDiagram in the scene.")
1516
return
1617

1718
# =============================================================================

plugin/RV_form_relax.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def RunCommand():
1212

1313
form = session.find_formdiagram()
1414
if not form:
15+
print("There is no FormDiagram in the scene.")
1516
return
1617

1718
# =============================================================================

plugin/RV_form_smooth.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def RunCommand():
1313

1414
form = session.find_formdiagram()
1515
if not form:
16+
print("There is no FormDiagram in the scene.")
1617
return
1718

1819
# =============================================================================

plugin/RV_pattern.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ def RunCommand():
1717
patternobj = session.find_pattern(warn=False)
1818

1919
if patternobj:
20-
if session.confirm("This will remove all current RhinoVAULT data and objects. Do you wish to proceed?"):
21-
session.scene.clear()
22-
else:
23-
return
20+
print("Pattern already exists in the scene.")
21+
return
2422

25-
else:
26-
session.scene.clear()
23+
session.clear_all_patterns()
2724

2825
# =============================================================================
2926
# Make a Force "Pattern"
@@ -111,6 +108,8 @@ def RunCommand():
111108
session.scene.add(pattern, name=pattern.name)
112109
session.scene.draw()
113110

111+
print('Pattern successfully created.')
112+
114113
if session.settings.autosave:
115114
session.record(name="Make Pattern")
116115

plugin/RV_pattern_modify.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def RunCommand():
1212

1313
pattern = session.find_pattern()
1414
if not pattern:
15+
print("There is no Pattern in the scene.")
1516
return
1617

1718
# =============================================================================

plugin/RV_pattern_openings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def RunCommand():
1212

1313
pattern = session.find_pattern()
1414
if not pattern:
15+
print("There is no Pattern in the scene.")
1516
return
1617

1718
# =============================================================================

plugin/RV_pattern_relax.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def RunCommand():
1212

1313
pattern = session.find_pattern()
1414
if not pattern:
15+
print("There is no Pattern in the scene.")
1516
return
1617

1718
# =============================================================================

0 commit comments

Comments
 (0)