2 child1 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
3 A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1,"AttributeName")
5 raise RuntimeError, "Can't create AttributeName attribute"
6 A = A._narrow(SALOMEDS.AttributeName)
8 N1 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1, "AttributeTreeNode")
10 raise RuntimeError, "Can't create AttributeTreeNode attribute"
12 child2 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
13 A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2,"AttributeName")
15 raise RuntimeError, "Can't create AttributeName attribute"
16 A = A._narrow(SALOMEDS.AttributeName)
18 N2 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2, "AttributeTreeNode")
20 raise RuntimeError, "Can't create AttributeTreeNode attribute"
22 child3 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)
23 A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3,"AttributeName")
25 raise RuntimeError, "Can't create AttributeName attribute"
26 A = A._narrow(SALOMEDS.AttributeName)
28 N3 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3, "AttributeTreeNode")
30 raise RuntimeError, "Can't create AttributeTreeNode attribute"
33 child11 = batchmode_geompy.myBuilder.NewObject(child1)
34 A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11,"AttributeName")
36 raise RuntimeError, "Can't create AttributeName attribute"
37 A = A._narrow(SALOMEDS.AttributeName)
40 N11 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11, "AttributeTreeNode")
43 raise RuntimeError, "Can't create AttributeTreeNode attribute"
45 child111 = batchmode_geompy.myBuilder.NewObject(child11)
46 A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, "AttributeName")
48 raise RuntimeError, "Can't create AttributeName attribute"
49 A = A._narrow(SALOMEDS.AttributeName)
52 N111 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, "AttributeTreeNode")
55 raise RuntimeError, "Can't create AttributeTreeNode attribute"
58 child31 = batchmode_geompy.myBuilder.NewObject(child3)
59 A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31,"AttributeName")
61 raise RuntimeError, "Can't create AttributeName attribute"
62 A = A._narrow(SALOMEDS.AttributeName)
65 N31 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31, "AttributeTreeNode")
67 raise RuntimeError, "Can't create AttributeTreeNode attribute"
69 child32 = batchmode_geompy.myBuilder.NewObject(child3)
70 A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32,"AttributeName")
72 raise RuntimeError, "Can't create AttributeName attribute"
73 A = A._narrow(SALOMEDS.AttributeName)
76 N32 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32, "AttributeTreeNode")
78 raise RuntimeError, "Can't create AttributeTreeNode attribute"
80 child321 = batchmode_geompy.myBuilder.NewObject(child32)
81 A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321,"AttributeName")
83 raise RuntimeError, "Can't create AttributeName attribute"
84 A = A._narrow(SALOMEDS.AttributeName)
87 N321 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321, "AttributeTreeNode")
89 raise RuntimeError, "Can't create AttributeTreeNode attribute"
91 child33 = batchmode_geompy.myBuilder.NewObject(child3)
92 A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33,"AttributeName")
94 raise RuntimeError, "Can't create AttributeName attribute"
95 A = A._narrow(SALOMEDS.AttributeName)
98 N33 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33, "AttributeTreeNode")
100 raise RuntimeError, "Can't create AttributeTreeNode attribute"
102 child34 = batchmode_geompy.myBuilder.NewObject(child3)
103 A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34,"AttributeName")
105 raise RuntimeError, "Can't create AttributeName attribute"
106 A = A._narrow(SALOMEDS.AttributeName)
109 N34 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34, "AttributeTreeNode")
111 raise RuntimeError, "Can't create AttributeTreeNode attribute"
115 #Create links between tree nodes.
138 print("------------- ", N1, " ------------- ")
139 print("N1.Label() = ", N1.Label() , "IsRoot() = ", N1.IsRoot(), "Depth() = ", N1.Depth())
140 print("N11.Label() = ", N11.Label() , "IsRoot() = ", N11.IsRoot(), "Depth() = ", N11.Depth())
141 print("N111.Label() = ", N111.Label() , "IsRoot() = ", N111.IsRoot(), "Depth() = ", N111.Depth())
142 print("N2.Label() = ", N2.Label() , "IsRoot() = ", N2.IsRoot(), "Depth() = ", N2.Depth())
143 print("N3.Label() = ", N3.Label() , "IsRoot() = ", N3.IsRoot(), "Depth() = ", N3.Depth())
144 print("N31.Label() = ", N31.Label() , "IsRoot() = ", N31.IsRoot(), "Depth() = ", N31.Depth())
145 print("N32.Label() = ", N32.Label() , "IsRoot() = ", N32.IsRoot(), "Depth() = ", N32.Depth())
146 print("N321.Label() = ", N321.Label() , "IsRoot() = ", N321.IsRoot(), "Depth() = ", N321.Depth())
147 print("N33.Label() = ", N33.Label() , "IsRoot() = ", N33.IsRoot(), "Depth() = ", N33.Depth())
148 print("N34.Label() = ", N34.Label() , "IsRoot() = ", N34.IsRoot(), "Depth() = ", N34.Depth())
149 print("N1.IsRoot()=", N1.IsRoot())
151 print("N1.HasNext() = ",N1.HasNext())
153 print(N1.Next().Label())
155 print("N32.HasPrevious() = ",N32.HasPrevious())
156 if N32.HasPrevious():
157 print(N32.GetPrevious().Label())
159 print("N111.HasFirst()=",N111.HasFirst())
160 print("N111.HasFather()=",N111.HasFather())
161 if N111.HasFather() :
162 print("N111.GetFather().Label()=",N111.GetFather().Label())