--- /dev/null
+/*!
+
+\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.
+
+*/
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".
\anchor swig_GetSharedShapes
\until "sharedEdge_"
+\anchor swig_TransferData
+\until subBlackWhite[1]
+
\anchor swig_CheckAndImprove
\until "blocksComp"
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)
# @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):
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,
layout->addWidget(myGroup);
/***************************************************************/
- setHelpFileName("transferdata_page.html");
+ setHelpFileName("transfer_data_page.html");
Init();
}