From a54acf3eadb5a57883cf24c0264d501c4fd4122b Mon Sep 17 00:00:00 2001 From: Alexey SOZINOV Date: Wed, 17 Aug 2022 13:56:30 +0300 Subject: [PATCH] docs --- doc/salome/examples/check_conformity.py | 45 +++++++++++++++ .../gui/GEOM/input/check_conformity.doc | 55 +++++++++++++++++++ .../gui/GEOM/input/tui_check_conformity.doc | 6 ++ .../gui/GEOM/input/tui_measurement_tools.doc | 1 + .../GEOM/input/using_measurement_tools.doc | 1 + 5 files changed, 108 insertions(+) create mode 100644 doc/salome/examples/check_conformity.py create mode 100644 doc/salome/gui/GEOM/input/check_conformity.doc create mode 100644 doc/salome/gui/GEOM/input/tui_check_conformity.doc diff --git a/doc/salome/examples/check_conformity.py b/doc/salome/examples/check_conformity.py new file mode 100644 index 000000000..f2b8ab91b --- /dev/null +++ b/doc/salome/examples/check_conformity.py @@ -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 index 000000000..5722539a9 --- /dev/null +++ b/doc/salome/gui/GEOM/input/check_conformity.doc @@ -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. + +TUI Commands: + + +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 index 000000000..70513e8b4 --- /dev/null +++ b/doc/salome/gui/GEOM/input/tui_check_conformity.doc @@ -0,0 +1,6 @@ +/*! + +\page tui_check_conformity_page Check Conformity +\tui_script{check_conformity.py} + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_measurement_tools.doc b/doc/salome/gui/GEOM/input/tui_measurement_tools.doc index d9b3fbf6c..42bc78c99 100644 --- a/doc/salome/gui/GEOM/input/tui_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/tui_measurement_tools.doc @@ -22,6 +22,7 @@
  • \subpage tui_check_self_intersections_fast_page
  • \subpage tui_fast_intersection_page
  • \subpage tui_shape_proximity_page
  • +
  • \subpage tui_check_conformity_page
  • */ diff --git a/doc/salome/gui/GEOM/input/using_measurement_tools.doc b/doc/salome/gui/GEOM/input/using_measurement_tools.doc index a688499c4..c30850fd3 100644 --- a/doc/salome/gui/GEOM/input/using_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/using_measurement_tools.doc @@ -30,6 +30,7 @@
  • \subpage boundaries_page "Check Free Boundaries"
  • \subpage free_faces_page "Check Free Faces"
  • \subpage check_shape_page "Check Shape"
  • +
  • \subpage check_conformity_page "Check Conformity"
  • \subpage check_compound_of_blocks_page "Check compound of blocks"
  • \subpage get_non_blocks_page "Get non blocks"
  • \subpage check_self_intersections_page "Detect Self-intersections"