Skip to content

Commit 75e8a45

Browse files
committed
first attempt as mesh info
1 parent 64d307c commit 75e8a45

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

commands/RV_thrust_info.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#! python3
2+
# venv: brg-csd
3+
# r: compas_rv>=0.9.1
4+
5+
from compas_rui.forms.meshinfo import MeshInfoForm
6+
from compas_rv.session import RVSession
7+
8+
9+
def RunCommand():
10+
session = RVSession()
11+
12+
thrust = session.find_thrustdiagram()
13+
if not thrust:
14+
print("There is no ThrustDiagram in the scene.")
15+
return
16+
17+
form = MeshInfoForm(
18+
thrust.diagram,
19+
vertex_attr_names=["x", "y", "z", "px", "py", "pz", "is_support", "_rx", "_ry", "_rz"],
20+
edge_attr_names=["q"],
21+
face_attr_names=["_is_loaded"],
22+
title="Thrust Diagram Info",
23+
)
24+
25+
form.show()
26+
27+
28+
# =============================================================================
29+
# Run as main
30+
# =============================================================================
31+
32+
if __name__ == "__main__":
33+
RunCommand()

0 commit comments

Comments
 (0)