]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
docs 29473
authorAlexey SOZINOV <alexey.sozinov@opencascade.com>
Wed, 17 Aug 2022 10:56:30 +0000 (13:56 +0300)
committerAlexey SOZINOV <alexey.sozinov@opencascade.com>
Fri, 26 Aug 2022 08:04:18 +0000 (11:04 +0300)
doc/salome/examples/check_conformity.py [new file with mode: 0644]
doc/salome/gui/GEOM/input/check_conformity.doc [new file with mode: 0644]
doc/salome/gui/GEOM/input/tui_check_conformity.doc [new file with mode: 0644]
doc/salome/gui/GEOM/input/tui_measurement_tools.doc
doc/salome/gui/GEOM/input/using_measurement_tools.doc

diff --git a/doc/salome/examples/check_conformity.py b/doc/salome/examples/check_conformity.py
new file mode 100644 (file)
index 0000000..f2b8ab9
--- /dev/null
@@ -0,0 +1,45 @@
+# Check Conformity
+
+import salome
+salome.salome_init_without_session()
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New()
+
+O = geompy.MakeVertex(0, 0, 0)
+OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
+OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
+OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
+Vertex_1 = geompy.MakeVertex(-30, -70, 0)
+Vertex_2 = geompy.MakeVertex(-30, 50, 0)
+Line_1 = geompy.MakeLineTwoPnt(Vertex_2, Vertex_1)
+Vertex_3 = geompy.MakeVertex(0, -50, 0)
+Vertex_4 = geompy.MakeVertex(-40, -10, 0)
+Vertex_5 = geompy.MakeVertex(0, 40, 0)
+Arc_1 = geompy.MakeArc(Vertex_5, Vertex_4, Vertex_3)
+Vertex_6 = geompy.MakeVertex(10, -50, 4)
+Vertex_7 = geompy.MakeVertex(10, -50, 10)
+Vertex_8 = geompy.MakeVertex(10, 40, 10)
+Arc_1_vertex_3 = geompy.GetSubShape(Arc_1, [3])
+Line_2 = geompy.MakeLineTwoPnt(Arc_1_vertex_3, Vertex_6)
+Line_3 = geompy.MakeLineTwoPnt(Vertex_6, Vertex_7)
+Line_4 = geompy.MakeLineTwoPnt(Vertex_7, Vertex_8)
+Vertex_9 = geompy.MakeVertex(15, 40, 10)
+Vertex_10 = geompy.MakeVertex(17, 0, 6)
+Vertex_11 = geompy.MakeVertex(17, 0, 3)
+Line_5 = geompy.MakeLineTwoPnt(Vertex_8, Vertex_9)
+Line_6 = geompy.MakeLineTwoPnt(Vertex_9, Vertex_10)
+Line_7 = geompy.MakeLineTwoPnt(Vertex_10, Vertex_11)
+Arc_1_vertex_2 = geompy.GetSubShape(Arc_1, [2])
+Line_8 = geompy.MakeLineTwoPnt(Vertex_11, Arc_1_vertex_2)
+Wire_1 = geompy.MakeWire([Arc_1, Line_2, Line_3, Line_4, Line_5, Line_6, Line_7, Line_8], 1e-07)
+Wire_2 = geompy.MakeWire([Line_1], 1e-07)
+Compound_1 = geompy.MakeCompound([Wire_1, Wire_2])
+
+# Get CheckConformity tool
+cc = geompy.CheckConformity(Compound_1)
+valid = cc.isValid()
+dist = cc.distantShapes()
+small = cc.smallEdges()
+interfer = cc.interferingSubshapes()
+intersect = cc.selfIntersected2D()
diff --git a/doc/salome/gui/GEOM/input/check_conformity.doc b/doc/salome/gui/GEOM/input/check_conformity.doc
new file mode 100644 (file)
index 0000000..5722539
--- /dev/null
@@ -0,0 +1,55 @@
+/*! 
+
+\page check_conformity_page Check Conformity
+
+The Check Conformity tool provides the user with a simple python API to analyze, available shape for Boolean Operations or not. \n
+Also tool provide advanced output to indicate imperfections in the input shape.
+
+This is just a TUI functionality.
+
+<b>TUI Commands:</b>
+
+<UL>
+
+<LI> 
+<em>geompy.CheckConformity(shape),</em> \n
+where \n
+\em shape is the shape checked for validity. \n
+</LI>
+
+The following functionality is available from the tool:
+<LI>
+<em>geompy.isValid()</em> 
+
+</LI>
+
+<LI>
+<em>geompy.selfIntersected2D()</em> 
+</LI>
+
+<LI>
+<em>geompy.interferingSubshapes(shapeType1, shapeType2),</em> 
+where \n
+\em shapeType1 is the first type of subshape. \n
+\em shapeType2 is the second type of subshape. \n 
+</LI>
+
+<LI>
+<em>geompy.smallEdges()</em> 
+</LI>
+
+<LI>
+<em>geompy.distantShapes(shapeType, subShapeType, tolerance),</em> 
+where \n
+\em shapeType is the type of shape. \n
+\em subShapeType is the type of subshape. \n
+\em tolerance is available tolerance, by default used tolerance of sub-shape.
+</LI>
+
+<LI>
+<em>geompy.updateTolerance()</em> 
+</LI>
+</UL>
+See also a \ref tui_check_conformity_page "TUI example".
+
+*/
diff --git a/doc/salome/gui/GEOM/input/tui_check_conformity.doc b/doc/salome/gui/GEOM/input/tui_check_conformity.doc
new file mode 100644 (file)
index 0000000..70513e8
--- /dev/null
@@ -0,0 +1,6 @@
+/*!
+
+\page tui_check_conformity_page Check Conformity
+\tui_script{check_conformity.py}
+
+*/
index d9b3fbf6c9b012521e2a48255036570d11e53c49..42bc78c995e0accb0bc70ec945f2a0c7bb82a8e2 100644 (file)
@@ -22,6 +22,7 @@
 <li>\subpage tui_check_self_intersections_fast_page</li>
 <li>\subpage tui_fast_intersection_page</li>
 <li>\subpage tui_shape_proximity_page</li>
+<li>\subpage tui_check_conformity_page</li>
 </ul>
 
 */
index a688499c47fafb053f0ad1f0cf85299bee853c6c..c30850fd319458bebd6d7fcecf99707559770b64 100644 (file)
@@ -30,6 +30,7 @@
 <li>\subpage boundaries_page "Check Free Boundaries"</li>
 <li>\subpage free_faces_page "Check Free Faces"</li>
 <li>\subpage check_shape_page "Check Shape"</li>
+<li>\subpage check_conformity_page "Check Conformity"</li>
 <li>\subpage check_compound_of_blocks_page "Check compound of blocks"</li>
 <li>\subpage get_non_blocks_page "Get non blocks"</li>
 <li>\subpage check_self_intersections_page "Detect Self-intersections"</li>