1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 """The references frames, nodes and elements manipulated inside
23 groups as VTK objects"""
24 from mbdyn.groups import ReferenceList as ReferenceListBase
25 from mbdyn.groups import Nodes as NodesBase
26
27 from mbdyn.interface.common import BaseMenu
28 from mbdyn.interface.references import ReferenceFrame
29
30 DESC = {}
31 DESC["vtk"] = [\
32 ("visibility", "_Show _all")
33 ]
34
36 """The menu for the list of nodes"""
37
43
44
46 """The list of nodes"""
47
50
51
52 DESC = {}
53 DESC["vtk"] = [\
54 ("visibility", "_Show _all")
55 ]
56
58 """The menu for the reference frames"""
59
62
63
65 """The reference frames list"""
66
68 ReferenceListBase.__init__(self)
69 self.menu_type = "reference_list"
70 self.boolean = {}
71 self.boolean["visibility"] = False
72
74 """Set the arrow mapper representing the unit vector"""
75 for ref in self:
76 ref.set_unit_arrow(unit_arrow)
77
78 - def activate(self, key_feature, current_frame_id, vtk_area):
79 """Activate a feature according to the current simulation frame"""
80 for ref in self:
81 ref.activate(key_feature, current_frame_id, vtk_area)
82 self.boolean["visibility"] = True
83 return "Show all the references"
84
86 """Deactivate a feature"""
87 for ref in self:
88 ref.desactivate(key_feature, vtk_area)
89 self.boolean["visibility"] = False
90 return "Hide all the references"
91
93 """Create reference frames with VTK attributes instead of
94 reference frames from the L{mbdyn.references} module."""
95 self.set_own_parameters(para)
96 for ref_para in self.ref_paras:
97 ref = ReferenceFrame()
98 ref.set_parameters(ref_para)
99 self.add(ref)
100