]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Documentation creation skv/22766
authorskv <skv@opencascade.com>
Fri, 12 Dec 2014 12:35:24 +0000 (15:35 +0300)
committerskv <skv@opencascade.com>
Fri, 12 Dec 2014 12:35:24 +0000 (15:35 +0300)
doc/salome/gui/GEOM/images/transfer_data1.png [new file with mode: 0644]
doc/salome/gui/GEOM/images/transfer_data2.png [new file with mode: 0644]
doc/salome/gui/GEOM/input/transfer_data.doc [new file with mode: 0644]
doc/salome/gui/GEOM/input/transforming_geom_objs.doc
doc/salome/gui/GEOM/input/tui_test_others.doc
resources/transfer_data.png
src/GEOM_SWIG/GEOM_TestOthers.py
src/GEOM_SWIG/geomBuilder.py [changed mode: 0644->0755]
src/OperationGUI/OperationGUI_TransferDataDlg.cxx [changed mode: 0644->0755]

diff --git a/doc/salome/gui/GEOM/images/transfer_data1.png b/doc/salome/gui/GEOM/images/transfer_data1.png
new file mode 100644 (file)
index 0000000..4cd1961
Binary files /dev/null and b/doc/salome/gui/GEOM/images/transfer_data1.png differ
diff --git a/doc/salome/gui/GEOM/images/transfer_data2.png b/doc/salome/gui/GEOM/images/transfer_data2.png
new file mode 100644 (file)
index 0000000..374147d
Binary files /dev/null and b/doc/salome/gui/GEOM/images/transfer_data2.png differ
diff --git a/doc/salome/gui/GEOM/input/transfer_data.doc b/doc/salome/gui/GEOM/input/transfer_data.doc
new file mode 100644 (file)
index 0000000..b34b34f
--- /dev/null
@@ -0,0 +1,53 @@
+/*!
+
+\page transfer_data_page Transfer Data
+
+This operation performs copying of non-topological data
+from one shape to another. The topology of the destination object
+will not change, only non-topological data will be transferred
+(if it is present in the source object). It is possible to transfer
+the following data with this operation:
+<ul>
+<li> <b>Names</b></li>
+<li> <b>Materials</b></li>
+</ul>
+
+To use this operation, select in the Main Menu <b>Operations -> Transfer Data</b>.
+The following dialog box will appear.
+
+\image html transfer_data1.png "Transfer Data Dialog"
+
+In this dialog:
+<ul>
+<li> <b>Source Shape</b> is an object that is a source of non-topological data.</li>
+<li> <b>Destination Shape</b> is a data destination object. </li>
+<li> <b>Type of detection operation</b> is the method to search sub-shapes of
+     <b>Source Shape</b> in <b>Destination Shape</b>. Data are transferred
+     from these corresponding sub-shapes. This is a combo-box with the following
+     possible values:
+    <ul>
+    <li><b>Get In Place</b> - current implementation of Get In Place algorithm
+        (default value).</li>
+    <li><b>Get In Place (old)</b> - old implementation of Get In Place
+        algorithm.</li>
+    <li><b>Get In Place By History</b> - Get In Place By History algorithm.</li>
+    </ul>
+</li>
+</ul>
+
+To copy data click on \b Apply or <b>Apply and Close</b> button. As the result
+it is possible to see how many names and materials are copied as well as
+maximum number of names and materials available for copying. This information is
+provided on the following message box:
+
+\image html transfer_data2.png "Transfer Data Information"
+
+<b>TUI Command:</b> <em>geompy.TransferData(ObjectFrom, ObjectTo, FindMethod),</em> 
+<br> where \em ObjectFrom is a data source object, \em ObjectTo is a
+destination object and \em FindMethod is a same shape detection method with
+default value \em GEOM.FSM_GetInPlace.
+
+Our <b>TUI Scripts</b> provide you with useful example of the use of
+\ref swig_TransferData "Transfer Data" functionality.
+*/
index 573182a4d63499675156ed2b5894b462b84b350f..8ded8676a235a3b4ddb7d7c0805a202a6141f6b8 100644 (file)
@@ -25,6 +25,8 @@ into water.</li>
 special case of \b Explode operation. </li>
 <li>\subpage shared_shapes_page "Get shared shapes" operation, a
 special case of \b Explode operation. </li>
+<li>\subpage transfer_data_page "Transfer Data" operation, which copies
+non-topological data from one shape to another. </li>
 
 
 <li>\subpage restore_presentation_parameters_page "Restore presentation parameters". 
index 701a1b52be3eb69d8a7493ecb471634c6b000cce..86630b77d506254b406f2d1d62ef18e1e78c8853 100644 (file)
@@ -96,6 +96,9 @@
 \anchor swig_GetSharedShapes
 \until "sharedEdge_"
 
+\anchor swig_TransferData
+\until subBlackWhite[1]
+
 \anchor swig_CheckAndImprove
 \until "blocksComp"
 
index 05ac193523fc68e19b433f0b61d13db23d1fb4a7..275444be81c5cb2e43f778a08b7fbe1f1a13f331 100644 (file)
Binary files a/resources/transfer_data.png and b/resources/transfer_data.png differ
index 2cb39a2bf9e298641dd69e8b34d6e4c1eead5716..548204a6564b459ecc80d658cc98cf6a3ab2288b 100644 (file)
@@ -562,6 +562,18 @@ def TestOtherOperations (geompy, math):
     ind = ind + 1
     pass
 
+  # TransferData
+  path = os.getenv("DATA_DIR")
+  fileName = path + "/Shapes/Step/black_and_white.step"
+  blackWhite = geompy.ImportSTEP(fileName)
+  blackWhiteCopy = geompy.MakeCopy(blackWhite[0])
+  subBlackWhite = geompy.SubShapeAll(blackWhiteCopy, GEOM.SOLID)
+  geompy.TransferData(blackWhite[0], blackWhiteCopy)
+  geompy.addToStudy(blackWhite[0], "blackWhite")
+  geompy.addToStudy(blackWhiteCopy, "blackWhiteCopy")
+  geompy.addToStudyInFather( blackWhiteCopy, subBlackWhite[0], "" )
+  geompy.addToStudyInFather( blackWhiteCopy, subBlackWhite[1], "" )
+
   # CheckAndImprove
   blocksComp = geompy.CheckAndImprove(part)
 
old mode 100644 (file)
new mode 100755 (executable)
index 3106741..4d7d15c
@@ -12869,6 +12869,8 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  @return True in case of success; False otherwise.
         #
         #  @ingroup l1_geomBuilder_auxiliary
+        #
+        #  @ref swig_TransferData "Example"
         @ManageTransactions("InsertOp")
         def TransferData(self, theObjectFrom, theObjectTo,
                          theFindMethod=GEOM.FSM_GetInPlace):
@@ -12887,8 +12889,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             Returns:
                 True in case of success; False otherwise.
 
-            Example of usage: isOk = geompy.TransferData(theObjectFrom, theObjectTo,
-                                                         GEOM.FSM_GetInPlace)
+            # Example: see GEOM_TestOthers.py
             """
             # Example: see GEOM_TestAll.py
             isOk = self.InsertOp.TransferData(theObjectFrom,
old mode 100644 (file)
new mode 100755 (executable)
index 3697c2a..9c5d48f
@@ -71,7 +71,7 @@ OperationGUI_TransferDataDlg::OperationGUI_TransferDataDlg (GeometryGUI* theGeom
   layout->addWidget(myGroup);
   /***************************************************************/
 
-  setHelpFileName("transferdata_page.html");
+  setHelpFileName("transfer_data_page.html");
 
   Init();
 }