From: skv Date: Fri, 27 Nov 2015 08:29:44 +0000 (+0300) Subject: 0023197: [CEA] Extract and rebuild: documentation X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fskv%2F23197;p=modules%2Fgeom.git 0023197: [CEA] Extract and rebuild: documentation --- diff --git a/doc/salome/gui/GEOM/CMakeLists.txt b/doc/salome/gui/GEOM/CMakeLists.txt index f7877081b..b765fe7ae 100644 --- a/doc/salome/gui/GEOM/CMakeLists.txt +++ b/doc/salome/gui/GEOM/CMakeLists.txt @@ -66,6 +66,7 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/GEOM DESTINATION ${SALOME_INSTALL_ INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM) INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM/geompy_doc) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/static/SALOME_BOA_PA.pdf DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/static/ExtractAndRebuild.pdf DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM) INSTALL(FILES input/geompy_migration.doc input/tui_auto_completion_documentation.doc input/tui_execution_distribution.doc DESTINATION ${SALOME_INSTALL_DOC}/gui/GEOM/input) FILE(GLOB tag_files ${CMAKE_CURRENT_BINARY_DIR}/*.tag) diff --git a/doc/salome/gui/GEOM/images/extract_init.png b/doc/salome/gui/GEOM/images/extract_init.png new file mode 100644 index 000000000..d60855104 Binary files /dev/null and b/doc/salome/gui/GEOM/images/extract_init.png differ diff --git a/doc/salome/gui/GEOM/images/extract_rebuild.png b/doc/salome/gui/GEOM/images/extract_rebuild.png new file mode 100644 index 000000000..f553d263d Binary files /dev/null and b/doc/salome/gui/GEOM/images/extract_rebuild.png differ diff --git a/doc/salome/gui/GEOM/images/extract_result.png b/doc/salome/gui/GEOM/images/extract_result.png new file mode 100644 index 000000000..4148d0d97 Binary files /dev/null and b/doc/salome/gui/GEOM/images/extract_result.png differ diff --git a/doc/salome/gui/GEOM/input/extract_and_rebuild.doc b/doc/salome/gui/GEOM/input/extract_and_rebuild.doc new file mode 100644 index 000000000..88a90da3d --- /dev/null +++ b/doc/salome/gui/GEOM/input/extract_and_rebuild.doc @@ -0,0 +1,82 @@ +/*! + +\page extract_and_rebuild_page Extract and Rebuild + + +This operation allows extraction of sub-shapes from a given +shape. + +To use this operation, select in the Main Menu Operations -> Extract and Rebuild. +The following dialog box appears: + +\image html extract_rebuild.png "Extract and Rebuild Dialog" + +In this dialog: + + +TUI Command: geompy.MakeExtraction(theShape, theListOfID), +
where \em theShape is the main shape, \em theListOfID is a list of +sub-shape IDs to be extracted. + +Our TUI Scripts provide you with useful example of the use of +\ref swig_MakeExtraction "Extract and Rebuild" functionality. + +More details + +If a sub-shape is extracted, all its ancestors should be modified. An ancestors +of extracted sub-shapes can be either: +- created anew without extracted sub-shapes, or +- extracted if it is not possible to create a valid shape without extracted +sub-shape. + +E.g. it is necessary to extract the vertex from the box: + +\image html extract_init.png "Extraction of the vertex from the box" + +In this case 3 ancestor edges are removed as they can't be valid without +this vertex. 3 faces that contain these edges are also removed. It is because +the wires without edges are not closed and it is not possible to create +a valid face on not closed wire. These wires should contain two remaining +edges, but they are removed as they are the part of the remaining shell. +So these wires become empty that means that they should be removed as well. + +The shell is replaced by another one that contains 3 not modified faces. As +It is not possible to construct a valid solid from not closed shell the solid +is removed. So the result of the extraction is a shell that contains 3 faces: + +\image html extract_result.png "Result shape" + +Please, refer to this document for a detailed +description of Extract and Rebuild operation. + +*/ diff --git a/doc/salome/gui/GEOM/input/related_docs.doc b/doc/salome/gui/GEOM/input/related_docs.doc index fea4ba010..2f210676c 100644 --- a/doc/salome/gui/GEOM/input/related_docs.doc +++ b/doc/salome/gui/GEOM/input/related_docs.doc @@ -7,4 +7,6 @@ that can be useful for reading. General Fuse Algorithm, Partition Algorithm, Boolean Operations Algorithm. Backgrounds. +Extract and Rebuild algorithm specification. + */ diff --git a/doc/salome/gui/GEOM/input/transforming_geom_objs.doc b/doc/salome/gui/GEOM/input/transforming_geom_objs.doc index 8ded8676a..3a1307360 100644 --- a/doc/salome/gui/GEOM/input/transforming_geom_objs.doc +++ b/doc/salome/gui/GEOM/input/transforming_geom_objs.doc @@ -27,6 +27,8 @@ special case of \b Explode operation. special case of \b Explode operation.
  • \subpage transfer_data_page "Transfer Data" operation, which copies non-topological data from one shape to another.
  • +
  • \subpage extract_and_rebuild_page "Extract and Rebuild" operation, which +extracts sub-shapes from the main shape.
  • \subpage restore_presentation_parameters_page "Restore presentation parameters". diff --git a/doc/salome/gui/GEOM/input/tui_test_all.doc b/doc/salome/gui/GEOM/input/tui_test_all.doc index 5ed1334a0..7c2ddd136 100644 --- a/doc/salome/gui/GEOM/input/tui_test_all.doc +++ b/doc/salome/gui/GEOM/input/tui_test_all.doc @@ -105,6 +105,9 @@ \until geompy.GetSubShapeEdgeSorted(Sketcher3d_2, p3, "OrderedEdges") \anchor swig_GetSubShapesWithTolerance +\until geompy.GetSubShapesWithTolerance(Box, GEOM.FACE, GEOM.CC_LE, 1.e-7, "le") + +\anchor swig_MakeExtraction \until print "DONE" */ diff --git a/doc/salome/gui/GEOM/static/ExtractAndRebuild.pdf b/doc/salome/gui/GEOM/static/ExtractAndRebuild.pdf new file mode 100644 index 000000000..36e411057 Binary files /dev/null and b/doc/salome/gui/GEOM/static/ExtractAndRebuild.pdf differ diff --git a/src/GEOM_SWIG/GEOM_TestAll.py b/src/GEOM_SWIG/GEOM_TestAll.py index ea862293f..a500a67d4 100644 --- a/src/GEOM_SWIG/GEOM_TestAll.py +++ b/src/GEOM_SWIG/GEOM_TestAll.py @@ -590,5 +590,10 @@ def TestAll (geompy, math): geompy.GetSubShapesWithTolerance(Box, GEOM.FACE, GEOM.CC_LT, 2.e-7, "lt") geompy.GetSubShapesWithTolerance(Box, GEOM.FACE, GEOM.CC_LE, 1.e-7, "le") + # MakeExtraction + geompy.MakeExtraction(Box, [13], "Ext_no_face") + geompy.MakeExtraction(Box, [18], "Ext_no_edge") + geompy.MakeExtraction(Box, [16], "Ext_no_vertex") + print "DONE" diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index 03de44164..86e9b9387 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -6665,7 +6665,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen): # @return New GEOM.GEOM_Object, containing the shape without # extracted sub-shapes. # - # @ref tui_multi_transformation "Example" + # @ref swig_MakeExtraction "Example" @ManageTransactions("ShapesOp") def MakeExtraction(self, theShape, theListOfID, theName=None): """