Salome HOME
DCQ:prepare 2.0.0
[modules/kernel.git] / doc / html / INPUT / exemple / Example18.html
diff --git a/doc/html/INPUT/exemple/Example18.html b/doc/html/INPUT/exemple/Example18.html
deleted file mode 100755 (executable)
index a6c00d6..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>\r
-<HEAD>\r
-<!-- hennerik CVSweb $Revision$ -->\r
-<TITLE>Example</TITLE></HEAD>\r
-<BODY BGCOLOR="#eeeeee">\r
-<HR noshade><PRE>#%AttributeTreeNode interface(creations/saving/restoring)%\r
-#%SALOMEDS methods : FindOrCreateAttribute, NewObject%\r
-#%Attribute methods : HasFirst, HasFather, SetPrevious, Next, InsertAfter, GetFather, HasNext, SetValue, Append, NewStudy, Label, IsRoot, Prepend, SetFather, Depth, HasPrevious%\r
-\r
-child1 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1,&quot;AttributeName&quot;)\r
-if A == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeName attribute&quot;\r
-A = A._narrow(SALOMEDS.AttributeName)\r
-A.SetValue(&quot;N1&quot;)\r
-N1 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child1, &quot;AttributeTreeNode&quot;)\r
-if N1 == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeTreeNode attribute&quot;\r
-\r
-child2 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2,&quot;AttributeName&quot;)\r
-if A == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeName attribute&quot;\r
-A = A._narrow(SALOMEDS.AttributeName)\r
-A.SetValue(&quot;N2&quot;)\r
-N2 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child2, &quot;AttributeTreeNode&quot;)\r
-if N2 == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeTreeNode attribute&quot;\r
-\r
-child3 = batchmode_geompy.myBuilder.NewObject(batchmode_geompy.father)\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3,&quot;AttributeName&quot;)\r
-if A == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeName attribute&quot;\r
-A = A._narrow(SALOMEDS.AttributeName)\r
-A.SetValue(&quot;N3&quot;)\r
-N3 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child3, &quot;AttributeTreeNode&quot;)\r
-if N3 == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeTreeNode attribute&quot;\r
-\r
-\r
-child11 = batchmode_geompy.myBuilder.NewObject(child1)\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11,&quot;AttributeName&quot;)\r
-if A == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeName attribute&quot;\r
-A = A._narrow(SALOMEDS.AttributeName)\r
-A.SetValue(&quot;N11&quot;)\r
-\r
-N11 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child11, &quot;AttributeTreeNode&quot;)\r
-\r
-if N11 == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeTreeNode attribute&quot;\r
-\r
-child111 = batchmode_geompy.myBuilder.NewObject(child11)\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, &quot;AttributeName&quot;)\r
-if A == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeName attribute&quot;\r
-A = A._narrow(SALOMEDS.AttributeName)\r
-A.SetValue(&quot;N111&quot;)\r
-\r
-N111 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child111, &quot;AttributeTreeNode&quot;)\r
-\r
-if N111 == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeTreeNode attribute&quot;\r
\r
-\r
-child31 = batchmode_geompy.myBuilder.NewObject(child3)\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31,&quot;AttributeName&quot;)\r
-if A == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeName attribute&quot;\r
-A = A._narrow(SALOMEDS.AttributeName)\r
-A.SetValue(&quot;N31&quot;)\r
-\r
-N31 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child31, &quot;AttributeTreeNode&quot;)\r
-if N31 == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeTreeNode attribute&quot;\r
-\r
-child32 = batchmode_geompy.myBuilder.NewObject(child3)\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32,&quot;AttributeName&quot;)\r
-if A == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeName attribute&quot;\r
-A = A._narrow(SALOMEDS.AttributeName)\r
-A.SetValue(&quot;N32&quot;)\r
-\r
-N32 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child32, &quot;AttributeTreeNode&quot;)\r
-if N32 == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeTreeNode attribute&quot;\r
-\r
-child321 = batchmode_geompy.myBuilder.NewObject(child32)\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321,&quot;AttributeName&quot;)\r
-if A == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeName attribute&quot;\r
-A = A._narrow(SALOMEDS.AttributeName)\r
-A.SetValue(&quot;N321&quot;)\r
-\r
-N321 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child321, &quot;AttributeTreeNode&quot;)\r
-if N321 == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeTreeNode attribute&quot;\r
-\r
-child33 = batchmode_geompy.myBuilder.NewObject(child3)\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33,&quot;AttributeName&quot;)\r
-if A == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeName attribute&quot;\r
-A = A._narrow(SALOMEDS.AttributeName)\r
-A.SetValue(&quot;N33&quot;)\r
-\r
-N33 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child33, &quot;AttributeTreeNode&quot;)\r
-if N33 == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeTreeNode attribute&quot;\r
-\r
-child34 = batchmode_geompy.myBuilder.NewObject(child3)\r
-A = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34,&quot;AttributeName&quot;)\r
-if A == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeName attribute&quot;\r
-A = A._narrow(SALOMEDS.AttributeName)\r
-A.SetValue(&quot;N34&quot;)\r
-\r
-N34 = batchmode_geompy.myBuilder.FindOrCreateAttribute(child34, &quot;AttributeTreeNode&quot;)\r
-if N34 == None :\r
- &nbsp; &nbsp; &nbsp; &nbsp;raise &nbsp;RuntimeError, &quot;Can't create AttributeTreeNode attribute&quot;\r
-\r
-\r
-\r
-#Create links between tree nodes.\r
-# &nbsp;-| root\r
-# &nbsp; --N1 __\r
-# &nbsp; | &nbsp; &nbsp; N11__\r
-# &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; N111\r
-# &nbsp; --N2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \r
-# &nbsp; | &nbsp; \r
-# &nbsp; --N3__\r
-# &nbsp; &nbsp; &nbsp; &nbsp; N31\r
-# &nbsp; &nbsp; &nbsp; &nbsp; N32__\r
-# &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;N321\r
-# &nbsp; &nbsp; &nbsp; &nbsp; N33\r
-# &nbsp; &nbsp; &nbsp; &nbsp; N34\r
- &nbsp; &nbsp; &nbsp; &nbsp;\r
-N11.SetFather(N1)\r
-N11.Append(N111)\r
-N3.SetPrevious(N1)\r
-N3.Prepend(N2)\r
-\r
-N32.SetFather(N3)\r
-N32.Prepend(N31)\r
-N33.InsertAfter(N32)\r
-N33.Append(N34)\r
-print &quot;------------- &nbsp;&quot;, N1, &quot; &nbsp;------------- &nbsp;&quot;\r
-print &quot;N1.Label() = &quot;, N1.Label() , &quot;IsRoot() = &quot;, N1.IsRoot(), &quot;Depth() = &quot;, N1.Depth()\r
-print &quot;N11.Label() = &quot;, N11.Label() , &quot;IsRoot() = &quot;, N11.IsRoot(), &quot;Depth() = &quot;, N11.Depth()\r
-print &quot;N111.Label() = &quot;, N111.Label() , &quot;IsRoot() = &quot;, N111.IsRoot(), &quot;Depth() = &quot;, N111.Depth()\r
-print &quot;N2.Label() = &quot;, N2.Label() , &quot;IsRoot() = &quot;, &nbsp;N2.IsRoot(), &quot;Depth() = &quot;, N2.Depth()\r
-print &quot;N3.Label() = &quot;, N3.Label() , &quot;IsRoot() = &quot;, N3.IsRoot(), &quot;Depth() = &quot;, N3.Depth()\r
-print &quot;N31.Label() = &quot;, N31.Label() , &quot;IsRoot() = &quot;, N31.IsRoot(), &quot;Depth() = &quot;, N31.Depth()\r
-print &quot;N32.Label() = &quot;, N32.Label() , &quot;IsRoot() = &quot;, N32.IsRoot(), &quot;Depth() = &quot;, N32.Depth()\r
-print &quot;N321.Label() = &quot;, N321.Label() , &quot;IsRoot() = &quot;, N321.IsRoot(), &quot;Depth() = &quot;, N321.Depth()\r
-print &quot;N33.Label() = &quot;, N33.Label() , &quot;IsRoot() = &quot;, N33.IsRoot(), &quot;Depth() = &quot;, N33.Depth()\r
-print &quot;N34.Label() = &quot;, N34.Label() , &quot;IsRoot() = &quot;, N34.IsRoot(), &quot;Depth() = &quot;, N34.Depth()\r
-print &quot;N1.IsRoot()=&quot;, N1.IsRoot()\r
-\r
-print &quot;N1.HasNext() = &quot;,N1.HasNext()\r
-if &nbsp;N1.HasNext():\r
- &nbsp; &nbsp; &nbsp; &nbsp;print N1.Next().Label()\r
-\r
-print &quot;N32.HasPrevious() = &quot;,N32.HasPrevious()\r
-if &nbsp;N32.HasPrevious():\r
- &nbsp; &nbsp; &nbsp; &nbsp;print N32.GetPrevious().Label()\r
-\r
-print &quot;N111.HasFirst()=&quot;,N111.HasFirst()\r
-print &quot;N111.HasFather()=&quot;,N111.HasFather()\r
-if N111.HasFather() :\r
- &nbsp; &nbsp; &nbsp; &nbsp;print &quot;N111.GetFather().Label()=&quot;,N111.GetFather().Label()\r
-</PRE>
\ No newline at end of file