diff --git a/build_configure b/build_configure
index 8d2bef16f..dca23c575 100755
--- a/build_configure
+++ b/build_configure
@@ -26,7 +26,6 @@
# Author : Marc Tajchman - CEA
# Date : 10/10/2002
# Modified by : Alexander BORODIN (OCN) - autotools usage
-# $Header$
# 13/03/2007: Alexander BORODIN - OCN
# Reorganization for usage of autotools
#
diff --git a/configure.ac b/configure.ac
index d7a8fb327..d96257fdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ AM_INIT_AUTOMAKE([tar-pax -Wno-portability])
XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
AC_SUBST(XVERSION)
-VERSION_DEV=0
+VERSION_DEV=1
AC_SUBST(VERSION_DEV)
# set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
@@ -476,6 +476,7 @@ AC_OUTPUT([ \
doc/docutils/Makefile \
doc/docutils/conf.py \
doc/salome/Makefile \
+ doc/salome/examples/Makefile \
doc/salome/gui/Makefile \
doc/salome/gui/GEOM/Makefile \
doc/salome/gui/GEOM/doxyfile \
@@ -499,12 +500,14 @@ AC_OUTPUT([ \
src/DlgRef/Makefile \
src/EntityGUI/Makefile \
src/GEOM/Makefile \
+ src/BlockFix/Makefile \
src/GEOMAlgo/Makefile \
src/GEOMBase/Makefile \
src/GEOMClient/Makefile \
src/GEOMFiltersSelection/Makefile \
src/Material/Makefile \
src/GEOMGUI/Makefile \
+ src/GEOMUtils/Makefile \
src/GEOMImpl/Makefile \
src/GEOMToolsGUI/Makefile \
src/GEOM_I/Makefile \
diff --git a/doc/salome/Makefile.am b/doc/salome/Makefile.am
index 8bf9f392d..18bd13960 100644
--- a/doc/salome/Makefile.am
+++ b/doc/salome/Makefile.am
@@ -20,10 +20,9 @@
# -* Makefile *-
# Author : Patrick GOLDBRONN (CEA)
# Date : 30/11/2001
-# Modified by : Alexander BORODIN (OCN) - autotools usage
-# $Header:
+# Modified by : Alexander BORODIN (OCN) - autotools usage
#
-SUBDIRS = tui gui
+SUBDIRS = tui gui examples
SUBDIRSTUI = tui
SUBDIRSGUI = gui
diff --git a/doc/salome/examples/3dsketcher.py b/doc/salome/examples/3dsketcher.py
new file mode 100644
index 000000000..84dc28112
--- /dev/null
+++ b/doc/salome/examples/3dsketcher.py
@@ -0,0 +1,43 @@
+# 3D Sketcher
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# Create a 3D sketcher (wire) on the given points coordinates
+sketcher1 = geompy.Make3DSketcher([ 0,0,0, 50,50,50, 0,50,0, 50,0,50, 10,20,100, 0,0,0 ])
+
+# add object in the study
+id_sketcher1 = geompy.addToStudy(sketcher1, "Sketcher1")
+
+# display the sketcher
+gg.createAndDisplayGO(id_sketcher1)
+
+# Create a 3D sketcher (wire) with Sketcher3D interface
+
+# get the interface instance
+sk = geompy.Sketcher3D()
+
+# add three points with absolute coordinates
+# the first point will be the start point of sketcher
+# two segments will be added by this command
+sk.addPointsAbsolute(1,2,3, 7,0,0, 10,-3.5,-11)
+
+# add one segment, defined by two angles in "OXY" coordinate system and length
+sk.addPointAnglesLength("OXY", 45, 0, 100)
+
+# add three points with relative coordinates
+# three segments will be added by this command
+sk.addPointsRelative(20,0,0, 20,0,100, -40,0,-50)
+
+# set to close the sketcher
+sk.close()
+
+# obtain the sketcher result
+sketcher2 = sk.wire()
+
+# add object in the study
+id_sketcher2 = geompy.addToStudy(sketcher2, "Sketcher2")
+
+# display the sketcher
+gg.createAndDisplayGO(id_sketcher2)
diff --git a/doc/salome/examples/Makefile.am b/doc/salome/examples/Makefile.am
new file mode 100644
index 000000000..1174f0114
--- /dev/null
+++ b/doc/salome/examples/Makefile.am
@@ -0,0 +1,141 @@
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# File : Makefile
+# Author : Alexander KOVALEV (Open Cascade NN)
+# Modified by :
+# Module : doc
+#
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+pyexamplesdir = $(docdir)/examples/GEOM
+
+BAD_TESTS =
+
+GOOD_TESTS = \
+ 3dsketcher.py \
+ advanced_geom_objs_ex01.py \
+ advanced_geom_objs_ex02.py \
+ advanced_geom_objs_ex03.py \
+ angle.py \
+ basic_geom_objs_ex01.py \
+ basic_geom_objs_ex02.py \
+ basic_geom_objs_ex03.py \
+ basic_geom_objs_ex04.py \
+ basic_geom_objs_ex05.py \
+ basic_geom_objs_ex06.py \
+ basic_geom_objs_ex07.py \
+ basic_geom_objs_ex08.py \
+ basic_geom_objs_ex09.py \
+ basic_operations_ex01.py \
+ basic_operations_ex02.py \
+ basic_operations_ex03.py \
+ basic_properties.py \
+ blocks_operations_ex01.py \
+ blocks_operations_ex02.py \
+ blocks_operations_ex03.py \
+ boolean_operations_ex01.py \
+ boolean_operations_ex02.py \
+ boolean_operations_ex03.py \
+ boolean_operations_ex04.py \
+ bounding_box.py \
+ building_by_blocks_ex01.py \
+ building_by_blocks_ex02.py \
+ center_of_mass.py \
+ check_compound_of_blocks.py \
+ check_self_intersections.py \
+ check_shape.py \
+ complex_objs_ex01.py \
+ complex_objs_ex02.py \
+ complex_objs_ex03.py \
+ complex_objs_ex04.py \
+ complex_objs_ex05.py \
+ complex_objs_ex06.py \
+ complex_objs_ex07.py \
+ complex_objs_ex08.py \
+ complex_objs_ex09.py \
+ complex_objs_ex10.py \
+ free_boundaries.py \
+ free_faces.py \
+ get_non_blocks.py \
+ import_export.py \
+ inertia.py \
+ min_distance.py \
+ normal_face.py \
+ notebook_geom.py \
+ point_coordinates.py \
+ primitives_ex01.py \
+ primitives_ex02.py \
+ primitives_ex03.py \
+ primitives_ex04.py \
+ primitives_ex05.py \
+ primitives_ex06.py \
+ primitives_ex07.py \
+ repairing_operations_ex01.py \
+ repairing_operations_ex02.py \
+ repairing_operations_ex03.py \
+ repairing_operations_ex04.py \
+ repairing_operations_ex05.py \
+ repairing_operations_ex06.py \
+ repairing_operations_ex07.py \
+ repairing_operations_ex08.py \
+ repairing_operations_ex09.py \
+ repairing_operations_ex10.py \
+ repairing_operations_ex11.py \
+ sketcher.py \
+ tolerance.py \
+ topological_geom_objs_ex01.py \
+ topological_geom_objs_ex02.py \
+ topological_geom_objs_ex03.py \
+ topological_geom_objs_ex04.py \
+ topological_geom_objs_ex05.py \
+ topological_geom_objs_ex06.py \
+ transformation_operations_ex01.py \
+ transformation_operations_ex02.py \
+ transformation_operations_ex03.py \
+ transformation_operations_ex04.py \
+ transformation_operations_ex05.py \
+ transformation_operations_ex06.py \
+ transformation_operations_ex07.py \
+ transformation_operations_ex08.py \
+ transformation_operations_ex09.py \
+ transformation_operations_ex10.py \
+ transformation_operations_ex11.py \
+ transformation_operations_ex12.py \
+ transformation_operations_ex13.py \
+ viewing_geom_objs_ex01.py \
+ viewing_geom_objs_ex02.py \
+ viewing_geom_objs_ex03.py \
+ viewing_geom_objs_ex04.py \
+ whatis.py \
+ working_with_groups_ex01.py \
+ working_with_groups_ex02.py \
+ working_with_groups_ex03.py \
+ working_with_groups_ex04.py \
+ working_with_groups_ex05.py \
+ working_with_groups_ex06.py
+
+pyexamples_SCRIPTS = $(BAD_TESTS) $(GOOD_TESTS)
+
+EXTRA_DIST += $(pyexamples_SCRIPTS) testme.py
+
+check-local:
+ @for f in $(GOOD_TESTS) ; do \
+ python $(top_srcdir)/doc/salome/examples/testme.py $(top_srcdir)/doc/salome/examples/$$f || exit 1; \
+ done
diff --git a/doc/salome/examples/advanced_geom_objs_ex01.py b/doc/salome/examples/advanced_geom_objs_ex01.py
new file mode 100644
index 000000000..eb3db5fe5
--- /dev/null
+++ b/doc/salome/examples/advanced_geom_objs_ex01.py
@@ -0,0 +1,73 @@
+# Creation of PipeTShape
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create PipeTShape object
+pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
+
+# add object in the study
+id_pipetshape = geompy.addToStudy(pipetshape[0],"PipeTShape")
+# add groups in the study
+for g in pipetshape[1:]:
+ geompy.addToStudyInFather(pipetshape[0], g, g.GetName())
+
+# Create junction vertices
+P1 = geompy.MakeVertex(0.0, 0.0, 0.0)
+P2 = geompy.MakeVertex(400.0, 0.0, 0.0)
+P3 = geompy.MakeVertex(200.0, 0.0, 200.0)
+
+# create PipeTShape object with position
+pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
+
+# add object in the study
+id_pipetshape_position = geompy.addToStudy(pipetshape_position[0],"PipeTShape_position")
+# add groups in the study
+for g in pipetshape_position[1:]:
+ geompy.addToStudyInFather(pipetshape_position[0], g, g.GetName())
+
+# create PipeTShape with chamfer object
+pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
+
+# add object in the study
+id_pipetshapechamfer = geompy.addToStudy(pipetshapechamfer[0],"PipeTShapeChamfer")
+# add groups in the study
+for g in pipetshapechamfer[1:]:
+ geompy.addToStudyInFather(pipetshapechamfer[0], g, g.GetName())
+
+# create PipeTShape with chamfer object with position
+pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
+
+# add object in the study
+id_pipetshapechamfer_position = geompy.addToStudy(pipetshapechamfer_position[0],"PipeTShapeChamfer_position")
+# add groups in the study
+for g in pipetshapechamfer_position[1:]:
+ geompy.addToStudyInFather(pipetshapechamfer_position[0], g, g.GetName())
+
+# create PipeTShape with fillet object
+pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
+
+# add object in the study
+id_pipetshapefillet = geompy.addToStudy(pipetshapefillet[0],"PipeTShapeFillet")
+# add groups in the study
+for g in pipetshapefillet[1:]:
+ geompy.addToStudyInFather(pipetshapefillet[0], g, g.GetName())
+
+# create PipeTShape with fillet object with position
+pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
+
+# add object in the study
+id_pipetshapefillet_position = geompy.addToStudy(pipetshapefillet_position[0],"PipeTShapeFillet_position")
+# add groups in the study
+for g in pipetshapefillet_position[1:]:
+ geompy.addToStudyInFather(pipetshapefillet_position[0], g, g.GetName())
+
+
+# display pipetshapes
+gg.createAndDisplayGO(id_pipetshape)
+gg.createAndDisplayGO(id_pipetshape_position)
+gg.createAndDisplayGO(id_pipetshapechamfer)
+gg.createAndDisplayGO(id_pipetshapechamfer_position)
+gg.createAndDisplayGO(id_pipetshapefillet)
+gg.createAndDisplayGO(id_pipetshapefillet_position)
diff --git a/doc/salome/examples/advanced_geom_objs_ex02.py b/doc/salome/examples/advanced_geom_objs_ex02.py
new file mode 100644
index 000000000..2ee301688
--- /dev/null
+++ b/doc/salome/examples/advanced_geom_objs_ex02.py
@@ -0,0 +1,15 @@
+# Creation of DividedDisk
+
+import geompy
+import salome
+import GEOM
+gg = salome.ImportComponentGUI("GEOM")
+
+# create DividedDisk object
+divideddisk = geompy.MakeDividedDisk(100, 1, GEOM.SQUARE)
+
+# add object in the study
+id_divideddisk = geompy.addToStudy(divideddisk,"DividedDisk")
+
+# display divideddisk
+gg.createAndDisplayGO(id_divideddisk)
diff --git a/doc/salome/examples/advanced_geom_objs_ex03.py b/doc/salome/examples/advanced_geom_objs_ex03.py
new file mode 100644
index 000000000..195cda0dd
--- /dev/null
+++ b/doc/salome/examples/advanced_geom_objs_ex03.py
@@ -0,0 +1,15 @@
+# Creation of DividedCylinder
+
+import geompy
+import salome
+import GEOM
+gg = salome.ImportComponentGUI("GEOM")
+
+# create DividedCylinder object
+dividedcylinder = geompy.MakeDividedCylinder(100, 300, GEOM.SQUARE)
+
+# add object in the study
+id_dividedcylinder = geompy.addToStudy(dividedcylinder,"DividedCylinder")
+
+# display dividedcylinder
+gg.createAndDisplayGO(id_dividedcylinder)
diff --git a/doc/salome/examples/angle.py b/doc/salome/examples/angle.py
new file mode 100644
index 000000000..547db7184
--- /dev/null
+++ b/doc/salome/examples/angle.py
@@ -0,0 +1,60 @@
+# Angle
+
+import salome
+salome.salome_init()
+
+import math
+import geompy
+geompy.init_geom(salome.myStudy)
+
+OX = geompy.MakeVectorDXDYDZ(10, 0,0)
+OXY = geompy.MakeVectorDXDYDZ(10,10,0)
+
+# in one plane
+Angle = geompy.GetAngle(OX, OXY)
+
+print "\nAngle between OX and OXY = ", Angle
+if math.fabs(Angle - 45.0) > 1e-05:
+ print " Error: returned angle is", Angle, "while must be 45.0"
+ pass
+
+Angle = geompy.GetAngleRadians(OX, OXY)
+
+print "\nAngle between OX and OXY in radians = ", Angle
+if math.fabs(Angle - math.pi/4) > 1e-05:
+ print " Error: returned angle is", Angle, "while must be pi/4"
+ pass
+
+Angle = geompy.GetAngleVectors(OX, OXY, True)
+
+print "\nAngle between vectors OX and OXY = ", Angle
+if math.fabs(Angle - 45.0) > 1e-05:
+ print " Error: returned angle is", Angle, "while must be 45.0"
+ pass
+
+Angle = geompy.GetAngleRadiansVectors(OX, OXY, False)
+
+print "\nBig angle between vectors OX and OXY in radians = ", Angle
+if math.fabs(Angle - math.pi*7./4.) > 1e-05:
+ print " Error: returned angle is", Angle, "while must be 7*pi/4"
+ pass
+
+# not in one plane
+OXY_shift = geompy.MakeTranslation(OXY,10,-10,20)
+Angle = geompy.GetAngle(OX, OXY_shift)
+
+print "\nAngle between OX and OXY_shift = ", Angle
+if math.fabs(Angle - 45.0) > 1e-05:
+ print " Error: returned angle is", Angle, "while must be 45.0"
+ pass
+
+# not linear
+pnt1 = geompy.MakeVertex(0, 0, 0)
+pnt2 = geompy.MakeVertex(10, 0, 0)
+pnt3 = geompy.MakeVertex(20, 10, 0)
+arc = geompy.MakeArc(pnt1, pnt2, pnt3)
+Angle = geompy.GetAngle(OX, arc)
+
+if (math.fabs(Angle + 1.0) > 1e-6 or geompy.MeasuOp.IsDone()):
+ print "Error. Angle must not be computed on curvilinear edges"
+ pass
diff --git a/doc/salome/examples/basic_geom_objs_ex01.py b/doc/salome/examples/basic_geom_objs_ex01.py
new file mode 100644
index 000000000..05abb799d
--- /dev/null
+++ b/doc/salome/examples/basic_geom_objs_ex01.py
@@ -0,0 +1,61 @@
+# Creation of a Point
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p0 = geompy.MakeVertex(0., 0., 0.)
+p100 = geompy.MakeVertexWithRef(p0, 100., 100., 100.)
+px = geompy.MakeVertex(100., 0., 0.)
+py = geompy.MakeVertex(0., 100., 0.)
+pz = geompy.MakeVertex(0., 0., 100.)
+p1 = geompy.MakeVertex(50., 50., 30.)
+
+# create a curve and vertices on it
+Arc = geompy.MakeArc(py, pz, px)
+# create a vertex by parameter
+p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
+# create a vertex by length
+p_on_arc2 = geompy.MakeVertexOnCurveByLength(Arc, 50., None)
+#create a vertex by point projection
+p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
+
+# create 2 lines and make a point on its intersection
+line_1 = geompy.MakeLineTwoPnt(p0, p100)
+line_2 = geompy.MakeLineTwoPnt(p1, pz)
+p_inter = geompy.MakeVertexOnLinesIntersection(line_1, line_2)
+
+# create a face and vertices on it
+Add_line = geompy.MakeLineTwoPnt(px, py)
+arc_face = geompy.MakeFaceWires([Arc, Add_line], 1)
+p_on_face1 = geompy.MakeVertexOnSurface(arc_face, 0.5, 0.5)
+p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(arc_face, 35, 35, 35)
+p_on_face3 = geompy.MakeVertexInsideFace(arc_face)
+
+
+# add objects in the study
+id_p0 = geompy.addToStudy(p0, "Vertex 0")
+id_p100 = geompy.addToStudy(p100, "Vertex 100")
+id_px = geompy.addToStudy(px, "Vertex X")
+id_py = geompy.addToStudy(py, "Vertex Y")
+id_pz = geompy.addToStudy(pz, "Vertex Z")
+id_Arc = geompy.addToStudy(Arc, "Arc")
+id_line_1 = geompy.addToStudy(line_1, "Line 1")
+id_line_2 = geompy.addToStudy(line_2, "Line 2")
+id_p_on_arc = geompy.addToStudy(p_on_arc, "Vertex on Arc by parameter")
+id_p_on_arc2 = geompy.addToStudy(p_on_arc2, "Vertex on Arc by length")
+id_p_on_arc3 = geompy.addToStudy(p_on_arc3, "Vertex on Arc by point projection")
+id_p_inter = geompy.addToStudy(p_inter, "Vertex on Lines Intersection")
+id_p_on_face1 = geompy.addToStudy(p_on_face1, "Vertex on face by parameter")
+id_p_on_face2 = geompy.addToStudy(p_on_face2, "Vertex on face by point projection")
+id_p_on_face3 = geompy.addToStudy(p_on_face3, "Vertex inside face")
+
+# display vertices
+gg.createAndDisplayGO(id_p0)
+gg.createAndDisplayGO(id_p100)
+gg.createAndDisplayGO(id_Arc)
+gg.createAndDisplayGO(id_p_inter)
+gg.createAndDisplayGO(id_p_on_arc)
+gg.createAndDisplayGO(id_p_on_arc2)
+gg.createAndDisplayGO(id_p_on_arc3)
diff --git a/doc/salome/examples/basic_geom_objs_ex02.py b/doc/salome/examples/basic_geom_objs_ex02.py
new file mode 100644
index 000000000..02f87e910
--- /dev/null
+++ b/doc/salome/examples/basic_geom_objs_ex02.py
@@ -0,0 +1,31 @@
+# Creation of a Line
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p0 = geompy.MakeVertex(0., 0., 0.)
+p100 = geompy.MakeVertexWithRef(p0, 100., 100., 100.)
+px = geompy.MakeVertex(100., 0. , 0. )
+py = geompy.MakeVertex(0. , 100., 0. )
+pz = geompy.MakeVertex(0. , 0. , 100.)
+
+# create a vector from two points
+vxy = geompy.MakeVector(px, py)
+
+# create a line from a point and a vector
+line1 = geompy.MakeLine(pz, vxy)
+
+#create a line from two points
+line2 = geompy.MakeLineTwoPnt(p0, p100)
+
+# add objects in the study
+id_vxy = geompy.addToStudy(vxy, "Vector")
+id_line1 = geompy.addToStudy(line1,"Line1")
+id_line2 = geompy.addToStudy(line2,"Line2")
+
+# display lines
+gg.createAndDisplayGO(id_vxy)
+gg.createAndDisplayGO(id_line1)
+gg.createAndDisplayGO(id_line2)
diff --git a/doc/salome/examples/basic_geom_objs_ex03.py b/doc/salome/examples/basic_geom_objs_ex03.py
new file mode 100644
index 000000000..510ae18fc
--- /dev/null
+++ b/doc/salome/examples/basic_geom_objs_ex03.py
@@ -0,0 +1,30 @@
+# Creation of a Circle
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p0 = geompy.MakeVertex(0., 0., 0.)
+px = geompy.MakeVertex(100., 0. , 0. )
+py = geompy.MakeVertex(0. , 100., 0. )
+pz = geompy.MakeVertex(0. , 0. , 100.)
+
+# create a vector on two points
+vxy = geompy.MakeVector(px, py)
+
+# create a circle from a point, a vector and a radius
+circle1 = geompy.MakeCircle(pz, vxy, 30)
+
+#create a circle from three points
+circle2 = geompy.MakeCircleThreePnt(p0, px, py)
+
+# add objects in the study
+id_vxy = geompy.addToStudy(vxy, "Vector")
+id_circle1 = geompy.addToStudy(circle1,"Circle1")
+id_circle2 = geompy.addToStudy(circle2,"Circle2")
+
+# display circles
+gg.createAndDisplayGO(id_vxy)
+gg.createAndDisplayGO(id_circle1)
+gg.createAndDisplayGO(id_circle2)
diff --git a/doc/salome/examples/basic_geom_objs_ex04.py b/doc/salome/examples/basic_geom_objs_ex04.py
new file mode 100644
index 000000000..bf7d3e870
--- /dev/null
+++ b/doc/salome/examples/basic_geom_objs_ex04.py
@@ -0,0 +1,34 @@
+# Creation of an Ellipse
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p0 = geompy.MakeVertex(0., 0., 0.)
+p1 = geompy.MakeVertex(50., 50., 50.)
+p2 = geompy.MakeVertex(0., 50., 0.)
+
+# create a normal vector from two points
+normal = geompy.MakeVector(p0, p1)
+
+# create a major axis vector from two points
+major = geompy.MakeVector(p0, p2)
+
+# create an ellipse from a point, a vector and radiuses
+ellipse1 = geompy.MakeEllipse(p1, normal, 50, 25)
+
+# create an ellipse from a point, a normal vector, radiuses and a major axis vector
+ellipse2 = geompy.MakeEllipse(p1, normal, 50, 25, major)
+
+# add objects in the study
+id_normal = geompy.addToStudy(normal, "Normal")
+id_major = geompy.addToStudy(major, "Major Axis")
+id_ellipse1 = geompy.addToStudy(ellipse1, "Ellipse 1")
+id_ellipse2 = geompy.addToStudy(ellipse2, "Ellipse 2")
+
+# display the ellipse and its normal vector
+gg.createAndDisplayGO(id_normal)
+gg.createAndDisplayGO(id_major)
+gg.createAndDisplayGO(id_ellipse1)
+gg.createAndDisplayGO(id_ellipse2)
diff --git a/doc/salome/examples/basic_geom_objs_ex05.py b/doc/salome/examples/basic_geom_objs_ex05.py
new file mode 100644
index 000000000..5a82c3b1b
--- /dev/null
+++ b/doc/salome/examples/basic_geom_objs_ex05.py
@@ -0,0 +1,29 @@
+# Creation of an Arc
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p0 = geompy.MakeVertex(0., 0., 0.)
+p1 = geompy.MakeVertex(100., 0., 0.)
+p2 = geompy.MakeVertex(50., 0., 50.)
+
+# create an arc from a three points
+arc1 = geompy.MakeArc(p0, p1, p2)
+
+# create an arc from a center point, a start point and end point
+arc2 = geompy.MakeArcCenter(p0, p1, p2, 1)
+
+# create an arc from a center point, a major point and minor point
+arc3 = geompy.MakeArcOfEllipse(p0, p1, p2)
+
+# add objects in the study
+id_arc1 = geompy.addToStudy(arc1, "Arc 1")
+id_arc2 = geompy.addToStudy(arc2, "Arc 2")
+id_arc3 = geompy.addToStudy(arc3, "Arc 3")
+
+# display the arcs
+gg.createAndDisplayGO(id_arc1)
+gg.createAndDisplayGO(id_arc2)
+gg.createAndDisplayGO(id_arc3)
diff --git a/doc/salome/examples/basic_geom_objs_ex06.py b/doc/salome/examples/basic_geom_objs_ex06.py
new file mode 100644
index 000000000..ba4940c14
--- /dev/null
+++ b/doc/salome/examples/basic_geom_objs_ex06.py
@@ -0,0 +1,68 @@
+# Creation of a Curve
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices and vectors
+p0 = geompy.MakeVertex(0. , 0. , 0. )
+p1 = geompy.MakeVertex(50. , 100., 200.)
+p2 = geompy.MakeVertex(150., 50., 100.)
+p3 = geompy.MakeVertex(100., 150., 170.)
+p4 = geompy.MakeVertex(200., 200., 150.)
+
+v1 = geompy.MakeVectorDXDYDZ(0, 1, 0)
+v2 = geompy.MakeVectorDXDYDZ(1, 0, 0)
+
+# create a polyline from a list of points
+polyline = geompy.MakePolyline([p0, p1, p2, p3, p4])
+
+# create a bezier curve from a list of points
+bezier = geompy.MakeBezier([p0, p1, p2, p3, p4])
+
+#create a b-spline curve from a list of points
+interpol = geompy.MakeInterpol([p0, p1, p2, p3, p4], False)
+
+#create a b-spline curve with defined directions at the ends
+interpol_tangents = geompy.MakeInterpolWithTangents([p0, p1, p2, p3, p4], v1, v2)
+
+#create a polyline using parametric definition of the basic points
+param_polyline = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, geompy.GEOM.Polyline, theNewMethod=True)
+
+# create a bezier curve using parametric definition of the basic points
+param_bezier = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 20, geompy.GEOM.Bezier, theNewMethod=True)
+
+#create a b-spline curve using parametric definition of the basic points
+param_interpol = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, geompy.GEOM.Interpolation, theNewMethod=True)
+
+
+# add objects in the study
+id_p0 = geompy.addToStudy(p0, "Point1")
+id_p1 = geompy.addToStudy(p1, "Point2")
+id_p2 = geompy.addToStudy(p2, "Point3")
+id_p3 = geompy.addToStudy(p3, "Point4")
+id_p4 = geompy.addToStudy(p4, "Point5")
+id_v1 = geompy.addToStudy(v1, "Vector1")
+id_v2 = geompy.addToStudy(v2, "Vector2")
+id_polyline = geompy.addToStudy(polyline, "Polyline")
+id_bezier = geompy.addToStudy(bezier, "Bezier")
+id_interpol = geompy.addToStudy(interpol, "Interpol")
+id_interpol_tangents = geompy.addToStudy(interpol_tangents, "Interpol Tangents")
+id_param_polyline = geompy.addToStudy(param_polyline, "Polyline Parametric")
+id_param_bezier = geompy.addToStudy(param_bezier, "Bezier Parametric")
+id_param_interpol = geompy.addToStudy(param_interpol, "Interpol Parametric")
+
+
+# display the points and the curves
+gg.createAndDisplayGO(id_p0)
+gg.createAndDisplayGO(id_p1)
+gg.createAndDisplayGO(id_p2)
+gg.createAndDisplayGO(id_p3)
+gg.createAndDisplayGO(id_p4)
+gg.createAndDisplayGO(id_polyline)
+gg.createAndDisplayGO(id_bezier)
+gg.createAndDisplayGO(id_interpol)
+gg.createAndDisplayGO(id_interpol_tangents)
+gg.createAndDisplayGO(id_param_polyline)
+gg.createAndDisplayGO(id_param_bezier)
+gg.createAndDisplayGO(id_param_interpol)
diff --git a/doc/salome/examples/basic_geom_objs_ex07.py b/doc/salome/examples/basic_geom_objs_ex07.py
new file mode 100644
index 000000000..2de687af0
--- /dev/null
+++ b/doc/salome/examples/basic_geom_objs_ex07.py
@@ -0,0 +1,27 @@
+# Creation of a Vector
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p1 = geompy.MakeVertex(10., 50., 20.)
+p2 = geompy.MakeVertex(70., 70., 70.)
+
+# create a vector from two points
+vector1 = geompy.MakeVector(p1, p2)
+
+# create a vector from the given components
+vector2 = geompy.MakeVectorDXDYDZ(30, 30, 100)
+
+# add objects in the study
+id_p1 = geompy.addToStudy(p1, "Point1")
+id_p2 = geompy.addToStudy(p2, "Point2")
+id_vector1 = geompy.addToStudy(vector1,"Vector1")
+id_vector2 = geompy.addToStudy(vector2,"Vector2")
+
+# display the points and the vectors
+gg.createAndDisplayGO(id_p1)
+gg.createAndDisplayGO(id_p2)
+gg.createAndDisplayGO(id_vector1)
+gg.createAndDisplayGO(id_vector2)
diff --git a/doc/salome/examples/basic_geom_objs_ex08.py b/doc/salome/examples/basic_geom_objs_ex08.py
new file mode 100644
index 000000000..81a8745c5
--- /dev/null
+++ b/doc/salome/examples/basic_geom_objs_ex08.py
@@ -0,0 +1,75 @@
+# Creation of a Plane
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p1 = geompy.MakeVertex( 0., 0., 100.)
+p2 = geompy.MakeVertex(100., 0., 0.)
+p3 = geompy.MakeVertex(200., 200., 200.)
+p4 = geompy.MakeVertex(100., 100., 0.)
+p5 = geompy.MakeVertex(0. , 100., 0.)
+
+# create a vectors from the given components
+vector1 = geompy.MakeVectorDXDYDZ(100., 100., 100.)
+vector2 = geompy.MakeVectorDXDYDZ(-100., 0., 100.)
+
+# create a vector from two points
+vector_arc = geompy.MakeVector(p2, p5)
+
+# create an arc from three points
+arc = geompy.MakeArc(p2, p4, p5)
+
+# create a wire
+wire = geompy.MakeWire([vector_arc, arc])
+
+# create a face
+isPlanarWanted = 1
+face = geompy.MakeFace(wire, isPlanarWanted)
+trimsize = 1000.
+
+# create a Local Coordinate System
+
+LCS = geompy.MakeMarker(100., 100., 101., 1, 0, 0, 0, 1, 0)
+
+# create a plane from a point, a vector and a trimsize
+plane1 = geompy.MakePlane(p1, vector1, trimsize)
+
+# create a plane from three points and a trimsize
+plane2 = geompy.MakePlaneThreePnt(p1, p2, p3, trimsize)
+
+# create a plane from the given face
+plane3 = geompy.MakePlaneFace(face, trimsize)
+
+# create a plane from two vectors and a trimsize
+plane4 = geompy.MakePlane2Vec(vector1, vector2, trimsize)
+
+# create a plane with the Local Coordinate System and a trimsize
+plane5 = geompy.MakePlaneLCS(LCS, trimsize, 1)
+
+# add objects in the study
+id_face = geompy.addToStudy(face, "Face")
+id_plane1 = geompy.addToStudy(plane1,"Plane1")
+id_plane2 = geompy.addToStudy(plane2,"Plane2")
+id_plane3 = geompy.addToStudy(plane3,"Plane3")
+id_plane4 = geompy.addToStudy(plane4,"Plane4")
+id_plane5 = geompy.addToStudy(plane5,"Plane5")
+
+# display the points and the vectors
+gg.createAndDisplayGO(id_face)
+gg.createAndDisplayGO(id_plane1)
+gg.createAndDisplayGO(id_plane2)
+gg.createAndDisplayGO(id_plane3)
+gg.createAndDisplayGO(id_plane4)
+gg.createAndDisplayGO(id_plane5)
+gg.setDisplayMode(id_plane1,1)
+gg.setTransparency(id_plane1,0.5)
+gg.setDisplayMode(id_plane2,1)
+gg.setTransparency(id_plane2,0.5)
+gg.setDisplayMode(id_plane3,1)
+gg.setTransparency(id_plane3,0.5)
+gg.setDisplayMode(id_plane4,1)
+gg.setTransparency(id_plane4,0.5)
+gg.setDisplayMode(id_plane5,1)
+gg.setTransparency(id_plane5,0.5)
diff --git a/doc/salome/examples/basic_geom_objs_ex09.py b/doc/salome/examples/basic_geom_objs_ex09.py
new file mode 100644
index 000000000..3934410ee
--- /dev/null
+++ b/doc/salome/examples/basic_geom_objs_ex09.py
@@ -0,0 +1,38 @@
+# Creation of a Local Coordinate System
+
+import GEOM
+import geompy
+import math
+import SALOMEDS
+
+#Create vertexes, vectors and shapes to construct local CS
+Vertex_1 = geompy.MakeVertex(50, 50, 50)
+Vertex_2 = geompy.MakeVertex(70, 70, 70)
+Vertex_3 = geompy.MakeVertex(0, 0, 0)
+Vector_X = geompy.MakeVectorDXDYDZ(50, 0, 0)
+Vector_Y = geompy.MakeVectorDXDYDZ(0, 50, 0)
+Face_1 = geompy.MakeFaceHW(100, 100, 1)
+Box_1 = geompy.MakeBoxTwoPnt(Vertex_1, Vertex_2)
+
+#Construct local CS by manual definition
+LocalCS_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
+
+#Construct local CS by center point and two vectors (X and Y directions)
+LocalCS_2 = geompy.MakeMarkerPntTwoVec(Vertex_3, Vector_X, Vector_Y)
+
+#Construct local CS from shape orientation
+LocalCS_FACE = geompy.MakeMarkerFromShape(Face_1)
+LocalCS_BOX = geompy.MakeMarkerFromShape(Box_1)
+
+#Add created object to study
+geompy.addToStudy( Face_1, "Face_1" )
+geompy.addToStudy( Vertex_1, "Vertex_1" )
+geompy.addToStudy( Vertex_2, "Vertex_2" )
+geompy.addToStudy( Box_1, "Box_1" )
+geompy.addToStudy( Vertex_3, "Vertex_3" )
+geompy.addToStudy( Vector_X, "Vector_X" )
+geompy.addToStudy( Vector_Y, "Vector_Y" )
+geompy.addToStudy( LocalCS_1, "LocalCS_1" )
+geompy.addToStudy( LocalCS_2, "LocalCS_3" )
+geompy.addToStudy( LocalCS_FACE, "LocalCS_FACE" )
+geompy.addToStudy( LocalCS_BOX, "LocalCS_BOX" )
diff --git a/doc/salome/examples/basic_operations_ex01.py b/doc/salome/examples/basic_operations_ex01.py
new file mode 100644
index 000000000..bed9e1c86
--- /dev/null
+++ b/doc/salome/examples/basic_operations_ex01.py
@@ -0,0 +1,41 @@
+# Partition
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p0 = geompy.MakeVertex( 0., 0., 0.)
+p200 = geompy.MakeVertex(200., 200., 200.)
+pz = geompy.MakeVertex( 0., 0., 100.)
+
+# create a vector
+vxyz = geompy.MakeVectorDXDYDZ(100., 100., 100.)
+
+# create a box from two points
+box = geompy.MakeBoxTwoPnt(p0, p200)
+
+# create a plane
+trimsize = 500.
+plane = geompy.MakePlane(pz, vxyz, trimsize)
+
+# create partition objects
+partition1 = geompy.MakePartition([box], [plane])
+partition2 = geompy.Partition([box], [plane])
+partition3 = geompy.MakeHalfPartition(box, plane)
+
+# add objects in the study
+id_box = geompy.addToStudy(box,"Box")
+id_plane = geompy.addToStudy(plane,"Plane")
+id_partition1 = geompy.addToStudy(partition1,"MakePartition")
+id_partition2 = geompy.addToStudy(partition2,"Partition")
+id_partition3 = geompy.addToStudy(partition3,"MakeHalfPartition")
+
+# display the partition objects and the plane
+gg.createAndDisplayGO(id_box)
+gg.setDisplayMode(id_box,1)
+gg.createAndDisplayGO(id_plane)
+gg.setDisplayMode(id_plane,1)
+gg.createAndDisplayGO(id_partition1)
+gg.createAndDisplayGO(id_partition2)
+gg.createAndDisplayGO(id_partition3)
diff --git a/doc/salome/examples/basic_operations_ex02.py b/doc/salome/examples/basic_operations_ex02.py
new file mode 100644
index 000000000..ac9b77b9d
--- /dev/null
+++ b/doc/salome/examples/basic_operations_ex02.py
@@ -0,0 +1,28 @@
+# Archimede
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p0 = geompy.MakeVertex( 0., 0., 0.)
+p200 = geompy.MakeVertex(200., 200., 200.)
+
+# create a box from two points
+box = geompy.MakeBoxTwoPnt(p0, p200)
+
+# perform an Archimede operation on the selected shape with selected parameters
+weight = 1000000.
+waterdensity = 1.
+meshingdeflection = 0.01
+archimede = geompy.Archimede(box, weight, waterdensity, meshingdeflection)
+
+# add objects in the study
+id_box = geompy.addToStudy(box,"Box")
+id_archimede = geompy.addToStudy(archimede,"Archimede")
+
+# display the box and the result of Archimede operation
+gg.createAndDisplayGO(id_box)
+gg.setDisplayMode(id_box,1)
+gg.createAndDisplayGO(id_archimede)
+gg.setDisplayMode(id_archimede,1)
diff --git a/doc/salome/examples/basic_operations_ex03.py b/doc/salome/examples/basic_operations_ex03.py
new file mode 100644
index 000000000..39b1dd22b
--- /dev/null
+++ b/doc/salome/examples/basic_operations_ex03.py
@@ -0,0 +1,55 @@
+# Restore presentation parameters and sub-shapes
+
+import geompy
+import GEOM
+import SALOMEDS
+
+# create a box and a cylinder
+box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+cyl = geompy.MakeCylinderRH(100, 300)
+
+# create translated box
+vec = geompy.MakeVectorDXDYDZ(100, 50, 0)
+tra = geompy.MakeTranslationVector(box, vec)
+
+# create partition objects
+partition1 = geompy.MakePartition([box, cyl])
+partition2 = geompy.MakePartition([box], [cyl])
+partition3 = geompy.MakePartition([box], [tra])
+
+# set colours
+box.SetColor(SALOMEDS.Color(1,0,0))
+cyl.SetColor(SALOMEDS.Color(0,1,0))
+
+# add objects in the study
+geompy.addToStudy(box, "Box")
+geompy.addToStudy(cyl, "Cylinder")
+geompy.addToStudy(vec, "Vector")
+geompy.addToStudy(tra, "Translation")
+geompy.addToStudy(partition1, "Partition_1")
+geompy.addToStudy(partition2, "Partition_2")
+geompy.addToStudy(partition3, "Partition_3")
+
+# Restore presentation parameters and sub-shapes
+# different methods can be used to find the sub-shapes in the result:
+# GetInPlace, GetSame, GetInPlaceByHistory, GetShapesOnShape.
+# By default, GetInPlace method is used (GEOM.FSM_GetInPlace)
+geompy.RestoreSubShapes(partition1)
+
+geompy.RestoreSubShapes(partition2, [], GEOM.FSM_GetInPlace)
+
+# The list of arguments can be used to avoid restoring all arguments,
+# but restore only the passed.
+geompy.RestoreSubShapes(partition3, [tra], GEOM.FSM_GetInPlaceByHistory)
+
+# To find sub-shapes in a transformed shape only one method could be
+# used: pass GEOM.FSM_Transformed for that.
+# True passed for the last argument, means that the transformed shape
+# will inherit colour and sub-shapes from its first argument (see above
+# MakeTranslation).
+geompy.RestoreSubShapes(tra, [], GEOM.FSM_Transformed, True)
+
+# Also we could do this directly with method addToStudy:
+partition4 = geompy.MakePartition([box, tra])
+geompy.addToStudy(partition4, "Partition_4", True, [],
+ GEOM.FSM_GetInPlaceByHistory, False)
diff --git a/doc/salome/examples/basic_properties.py b/doc/salome/examples/basic_properties.py
new file mode 100644
index 000000000..239655901
--- /dev/null
+++ b/doc/salome/examples/basic_properties.py
@@ -0,0 +1,20 @@
+# Basic Properties
+
+import geompy
+import math
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100,30,100)
+props = geompy.BasicProperties(box)
+print "\nBox 100x30x100 Basic Properties:"
+print " Wires length: ", props[0]
+print " Surface area: ", props[1]
+print " Volume : ", props[2]
+length = math.sqrt((props[0] - 1840)*(props[0] - 1840))
+area = math.sqrt((props[1] - 32000)*(props[1] - 32000))
+volume = math.sqrt((props[2] - 300000)*(props[2] - 300000))
+if length > 1e-7 or area > 1e-7 or volume > 1e-7:
+ print "While must be:"
+ print " Wires length: ", 1840
+ print " Surface area: ", 32000
+ print " Volume : ", 300000.
diff --git a/doc/salome/examples/blocks_operations_ex01.py b/doc/salome/examples/blocks_operations_ex01.py
new file mode 100644
index 000000000..5535f121d
--- /dev/null
+++ b/doc/salome/examples/blocks_operations_ex01.py
@@ -0,0 +1,35 @@
+# Multi Transformation
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p_25_25_50 = geompy.MakeVertex(25., 25., 50.)
+p_50_25_25 = geompy.MakeVertex(50., 25., 25.)
+p_25_50_25 = geompy.MakeVertex(25., 50., 25.)
+
+box = geompy.MakeBoxDXDYDZ(50, 50, 50)
+
+top_face = geompy.GetFaceNearPoint(box, p_25_25_50)
+yz_face = geompy.GetFaceNearPoint(box, p_50_25_25)
+xz_face = geompy.GetFaceNearPoint(box, p_25_50_25)
+
+top_face_ind = geompy.GetSubShapeID(box, top_face)
+yz_face_ind = geompy.GetSubShapeID(box, yz_face)
+xz_face_ind = geompy.GetSubShapeID(box, xz_face)
+
+# Multi-transformate block and glue the result
+box_tr1 = geompy.MakeMultiTransformation1D(box, yz_face_ind, top_face_ind, 3)
+box_tr2 = geompy.MakeMultiTransformation2D(box, xz_face_ind, yz_face_ind, 3, top_face_ind, 0, 2)
+
+# add objects in the study
+id_box = geompy.addToStudy(box, "Box")
+id_box_tr1 = geompy.addToStudy(box_tr1, "Multi-transformed Block 1D")
+id_box_tr2 = geompy.addToStudy(box_tr2, "Multi-transformed Block 2D")
+
+# display the results
+gg.createAndDisplayGO(id_box)
+gg.setDisplayMode(id_box,1)
+gg.createAndDisplayGO(id_box_tr1)
+gg.createAndDisplayGO(id_box_tr2)
diff --git a/doc/salome/examples/blocks_operations_ex02.py b/doc/salome/examples/blocks_operations_ex02.py
new file mode 100644
index 000000000..68fbb01a6
--- /dev/null
+++ b/doc/salome/examples/blocks_operations_ex02.py
@@ -0,0 +1,26 @@
+# Explode on Blocks
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a box and a sphere
+box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+sphere = geompy.MakeSphereR(100)
+
+# make a compound
+compound = geompy.MakeCompound([box, sphere])
+
+# get all the blocks of the given compound, by criteria: min_nb_faces <= nb. of faces <= max_nb_faces
+min_nb_faces = 6
+max_nb_faces = 6
+make_block_explode = geompy.MakeBlockExplode(compound, min_nb_faces, max_nb_faces)
+
+# add objects in the study
+id_compound = geompy.addToStudy(compound, "Compound")
+id_make_block_explode = geompy.addToStudyInFather(compound, make_block_explode[0], "MakeBlockExplode")
+
+# display the results
+gg.createAndDisplayGO(id_compound)
+gg.createAndDisplayGO(id_make_block_explode)
+gg.setDisplayMode(id_make_block_explode,1)
diff --git a/doc/salome/examples/blocks_operations_ex03.py b/doc/salome/examples/blocks_operations_ex03.py
new file mode 100644
index 000000000..546bc2274
--- /dev/null
+++ b/doc/salome/examples/blocks_operations_ex03.py
@@ -0,0 +1,20 @@
+# Propagate
+
+import geompy
+import salome
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+
+# build all possible propagation groups
+listChains = geompy.Propagate(check_box)
+
+# add objects in the study
+geompy.addToStudy(check_box, "Box")
+ii = 1
+for chain in listChains:
+ geompy.addToStudyInFather(check_box, chain, "propagation chain " + `ii`)
+ ii = ii + 1
+ pass
+
+salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/boolean_operations_ex01.py b/doc/salome/examples/boolean_operations_ex01.py
new file mode 100644
index 000000000..5f52542c6
--- /dev/null
+++ b/doc/salome/examples/boolean_operations_ex01.py
@@ -0,0 +1,38 @@
+# Fuse
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(25, 55, 0)
+p2 = geompy.MakeVertex( 0, 0, 0)
+v = geompy.MakeVector(p1, p2)
+
+# create a cylinder
+height = 35
+radius1 = 20
+cylinder = geompy.MakeCylinder(p1, v, radius1, height)
+
+# create a sphere
+sphere = geompy.MakeSphereR(40)
+
+# fuse
+fuse1 = geompy.MakeFuse(cylinder, sphere)
+fuse2 = geompy.MakeBoolean(cylinder, sphere, 3)
+
+# add objects in the study
+id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
+id_sphere = geompy.addToStudy(sphere, "Sphere")
+id_fuse1 = geompy.addToStudy(fuse1, "Fuse_1")
+id_fuse2 = geompy.addToStudy(fuse2, "Fuse_2")
+
+# display results
+gg.createAndDisplayGO(id_cylinder)
+gg.setDisplayMode(id_cylinder,1)
+gg.createAndDisplayGO(id_sphere)
+gg.setDisplayMode(id_sphere,1)
+gg.createAndDisplayGO(id_fuse1)
+gg.setDisplayMode(id_fuse1,1)
+gg.createAndDisplayGO(id_fuse2)
+gg.setDisplayMode(id_fuse2,1)
diff --git a/doc/salome/examples/boolean_operations_ex02.py b/doc/salome/examples/boolean_operations_ex02.py
new file mode 100644
index 000000000..b7e73b727
--- /dev/null
+++ b/doc/salome/examples/boolean_operations_ex02.py
@@ -0,0 +1,28 @@
+# Common
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(25, 55, 0)
+p2 = geompy.MakeVertex( 0, 0, 0)
+v = geompy.MakeVector(p1, p2)
+
+# create a cylinder
+height = 35
+radius1 = 20
+cylinder = geompy.MakeCylinder(p1, v, radius1, height)
+
+# create a sphere
+sphere = geompy.MakeSphereR(40)
+
+# make common
+common = geompy.MakeCommon(cylinder, sphere)
+
+# add objects in the study
+id_common = geompy.addToStudy(common, "Common")
+
+# display the results
+gg.createAndDisplayGO(id_common)
+gg.setDisplayMode(id_common,1)
diff --git a/doc/salome/examples/boolean_operations_ex03.py b/doc/salome/examples/boolean_operations_ex03.py
new file mode 100644
index 000000000..44c597405
--- /dev/null
+++ b/doc/salome/examples/boolean_operations_ex03.py
@@ -0,0 +1,28 @@
+# Cut
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(25, 55, 0)
+p2 = geompy.MakeVertex( 0, 0, 0)
+v = geompy.MakeVector(p1, p2)
+
+# create a cylinder
+height = 35
+radius1 = 20
+cylinder = geompy.MakeCylinder(p1, v, radius1, height)
+
+# create a sphere
+sphere = geompy.MakeSphereR(40)
+
+#cut
+cut = geompy.MakeCut(cylinder, sphere)
+
+# add objects in the study
+id_cut = geompy.addToStudy(cut, "Cut")
+
+# display the results
+gg.createAndDisplayGO(id_cut)
+gg.setDisplayMode(id_cut,1)
diff --git a/doc/salome/examples/boolean_operations_ex04.py b/doc/salome/examples/boolean_operations_ex04.py
new file mode 100644
index 000000000..9472f7aa1
--- /dev/null
+++ b/doc/salome/examples/boolean_operations_ex04.py
@@ -0,0 +1,28 @@
+# Section
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(25, 55, 0)
+p2 = geompy.MakeVertex( 0, 0, 0)
+v = geompy.MakeVector(p1, p2)
+
+# create a cylinder
+height = 35
+radius1 = 20
+cylinder = geompy.MakeCylinder(p1, v, radius1, height)
+
+# create a sphere
+sphere = geompy.MakeSphereR(40)
+
+# make a section
+section = geompy.MakeSection(cylinder, sphere)
+
+# add objects in the study
+id_section = geompy.addToStudy(section, "Section")
+
+# display the results
+gg.createAndDisplayGO(id_section)
+gg.setDisplayMode(id_section,1)
diff --git a/doc/salome/examples/bounding_box.py b/doc/salome/examples/bounding_box.py
new file mode 100644
index 000000000..d6480aeac
--- /dev/null
+++ b/doc/salome/examples/bounding_box.py
@@ -0,0 +1,17 @@
+# Bounding Box
+
+import geompy
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100,30,100)
+
+bb = geompy.BoundingBox(box)
+print "\nBounding Box of box 100x30x100:"
+print " Xmin = ", bb[0], ", Xmax = ", bb[1]
+print " Ymin = ", bb[2], ", Ymax = ", bb[3]
+print " Zmin = ", bb[4], ", Zmax = ", bb[5]
+
+aBB = geompy.MakeBoundingBox(box)
+
+geompy.addToStudy(box, "box 100x30x100")
+geompy.addToStudy(aBB, "Bounding box of box 100x30x100")
diff --git a/doc/salome/examples/building_by_blocks_ex01.py b/doc/salome/examples/building_by_blocks_ex01.py
new file mode 100644
index 000000000..16b02d75b
--- /dev/null
+++ b/doc/salome/examples/building_by_blocks_ex01.py
@@ -0,0 +1,55 @@
+# Quadrangle Face
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p1 = geompy.MakeVertex( 0., 0., 0.)
+p2 = geompy.MakeVertex(150., 30., 0.)
+p3 = geompy.MakeVertex( 0., 120., 50.)
+p4 = geompy.MakeVertex( 0., 40., 70.)
+
+# create edges
+edge1 = geompy.MakeEdge(p1, p2)
+edge2 = geompy.MakeEdge(p2, p3)
+edge3 = geompy.MakeEdge(p3, p4)
+edge4 = geompy.MakeEdge(p4, p1)
+
+# create a quadrangle face from four edges
+qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
+
+# create a quadrangle face from two edges
+qface2 = geompy.MakeQuad2Edges(edge1, edge3)
+
+# create a quadrangle from four points in its corners
+qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
+
+# add objects in the study
+id_p1 = geompy.addToStudy(p1,"Point1")
+id_p2 = geompy.addToStudy(p2,"Point2")
+id_p3 = geompy.addToStudy(p3,"Point3")
+id_p4 = geompy.addToStudy(p4,"Point4")
+id_edge1 = geompy.addToStudy(edge1,"Edge1")
+id_edge2 = geompy.addToStudy(edge2,"Edge2")
+id_edge3 = geompy.addToStudy(edge3,"Edge3")
+id_edge4 = geompy.addToStudy(edge4,"Edge4")
+id_qface1 = geompy.addToStudy(qface1,"Qface1")
+id_qface2 = geompy.addToStudy(qface2,"Qface2")
+id_qface3 = geompy.addToStudy(qface3,"Qface3")
+
+# display the vertices, the edges and the quadrangle faces
+gg.createAndDisplayGO(id_p1)
+gg.createAndDisplayGO(id_p2)
+gg.createAndDisplayGO(id_p3)
+gg.createAndDisplayGO(id_p4)
+gg.createAndDisplayGO(id_edge1)
+gg.createAndDisplayGO(id_edge2)
+gg.createAndDisplayGO(id_edge3)
+gg.createAndDisplayGO(id_edge4)
+gg.createAndDisplayGO(id_qface1)
+gg.setDisplayMode(id_qface1,1)
+gg.createAndDisplayGO(id_qface2)
+gg.setDisplayMode(id_qface2,1)
+gg.createAndDisplayGO(id_qface3)
+gg.setDisplayMode(id_qface3,1)
diff --git a/doc/salome/examples/building_by_blocks_ex02.py b/doc/salome/examples/building_by_blocks_ex02.py
new file mode 100644
index 000000000..ed81f4233
--- /dev/null
+++ b/doc/salome/examples/building_by_blocks_ex02.py
@@ -0,0 +1,54 @@
+# Hexagonal Solid
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p0 = geompy.MakeVertex( 0., 0., 0.)
+p1 = geompy.MakeVertex( 0., 0., 40.)
+p2 = geompy.MakeVertex( 70., -15., 0.)
+p3 = geompy.MakeVertex( 70., -15., 70.)
+
+p4 = geompy.MakeVertex( 0., 70., 0.)
+p5 = geompy.MakeVertex( 0., 70., 40.)
+p6 = geompy.MakeVertex( 70., 70., 0.)
+p7 = geompy.MakeVertex( 70., 70., 70.)
+
+p8 = geompy.MakeVertex( 0., -50., 0.)
+p9 = geompy.MakeVertex( 0., -50., 40.)
+p10 = geompy.MakeVertex( 70., -35., 0.)
+p11 = geompy.MakeVertex( 70., -35., 70.)
+
+# create faces
+qface1 = geompy.MakeQuad4Vertices(p0, p1, p2, p3)
+qface2 = geompy.MakeQuad4Vertices(p4, p5, p6, p7)
+qface3 = geompy.MakeQuad4Vertices(p0, p1, p4, p5)
+qface4 = geompy.MakeQuad4Vertices(p2, p3, p6, p7)
+qface5 = geompy.MakeQuad4Vertices(p0, p2, p4, p6)
+qface6 = geompy.MakeQuad4Vertices(p1, p3, p5, p7)
+qface7 = geompy.MakeQuad4Vertices(p8, p9, p10, p11)
+
+# create a hexahedral solid between two given faces
+solid1 = geompy.MakeHexa2Faces(qface1, qface7)
+
+# create a hexahedral solid, bounded by six given faces
+solid2 = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
+
+# add objects in the study
+geompy.addToStudy(qface1,"qface1")
+geompy.addToStudy(qface2,"qface2")
+geompy.addToStudy(qface3,"qface3")
+geompy.addToStudy(qface4,"qface4")
+geompy.addToStudy(qface5,"qface5")
+geompy.addToStudy(qface6,"qface6")
+geompy.addToStudy(qface7,"qface7")
+
+id_solid1 = geompy.addToStudy(solid1,"Solid1")
+id_solid2 = geompy.addToStudy(solid2,"Solid2")
+
+# display solids
+gg.createAndDisplayGO(id_solid1)
+gg.setDisplayMode(id_solid1, 1)
+gg.createAndDisplayGO(id_solid2)
+gg.setDisplayMode(id_solid2, 1)
diff --git a/doc/salome/examples/center_of_mass.py b/doc/salome/examples/center_of_mass.py
new file mode 100644
index 000000000..acf5962ff
--- /dev/null
+++ b/doc/salome/examples/center_of_mass.py
@@ -0,0 +1,19 @@
+# Center of masses
+
+import geompy
+import math
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100,30,100)
+cm = geompy.MakeCDG(box)
+if cm is None:
+ raise RuntimeError, "MakeCDG(box) failed"
+else:
+ print "\nCentre of gravity of box has been successfully obtained:"
+ coords = geompy.PointCoordinates(cm)
+ print "(", coords[0], ", ", coords[1], ", ", coords[2], ")"
+ dx = math.sqrt((coords[0] - 50)*(coords[0] - 50))
+ dy = math.sqrt((coords[1] - 15)*(coords[1] - 15))
+ dz = math.sqrt((coords[2] - 50)*(coords[2] - 50))
+ if dx > 1e-7 or dy > 1e-7 or dz > 1e-7:
+ print "But must be (50, 15, 50)"
diff --git a/doc/salome/examples/check_compound_of_blocks.py b/doc/salome/examples/check_compound_of_blocks.py
new file mode 100644
index 000000000..2f1ba9850
--- /dev/null
+++ b/doc/salome/examples/check_compound_of_blocks.py
@@ -0,0 +1,21 @@
+# Check Compound of Blocks
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create boxes
+box1 = geompy.MakeBox(0,0,0,100,50,100)
+box2 = geompy.MakeBox(100,0,0,250,50,100)
+
+# make a compound
+compound = geompy.MakeCompound([box1, box2])
+
+# glue the faces of the compound
+tolerance = 1e-5
+glue = geompy.MakeGlueFaces(compound, tolerance)
+IsValid = geompy.CheckCompoundOfBlocks(glue)
+if IsValid == 0:
+ raise RuntimeError, "Invalid compound created"
+else:
+ print "\nCompound is valid"
diff --git a/doc/salome/examples/check_self_intersections.py b/doc/salome/examples/check_self_intersections.py
new file mode 100644
index 000000000..44c55d257
--- /dev/null
+++ b/doc/salome/examples/check_self_intersections.py
@@ -0,0 +1,11 @@
+# Detect Self-intersections
+
+import geompy
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100,30,100)
+IsValid = geompy.CheckSelfIntersections(box)
+if IsValid == 0:
+ raise RuntimeError, "Box with self-intersections created"
+else:
+ print "\nBox is valid"
diff --git a/doc/salome/examples/check_shape.py b/doc/salome/examples/check_shape.py
new file mode 100644
index 000000000..b708494b3
--- /dev/null
+++ b/doc/salome/examples/check_shape.py
@@ -0,0 +1,11 @@
+# Check Shape
+
+import geompy
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100,30,100)
+IsValid = geompy.CheckShape(box)
+if IsValid == 0:
+ raise RuntimeError, "Invalid box created"
+else:
+ print "\nBox is valid"
diff --git a/doc/salome/examples/complex_objs_ex01.py b/doc/salome/examples/complex_objs_ex01.py
new file mode 100644
index 000000000..a5cf102c8
--- /dev/null
+++ b/doc/salome/examples/complex_objs_ex01.py
@@ -0,0 +1,61 @@
+# Creation of a Prism
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex( 0., 0., 0.)
+p2 = geompy.MakeVertex( 100., 0., 0.)
+p3 = geompy.MakeVertex( 100., 100., 0.)
+p4 = geompy.MakeVertex( 0., 100., 0.)
+p5 = geompy.MakeVertex( 0., 0., 60.)
+p6 = geompy.MakeVertex(-100., 0., 0.)
+p7 = geompy.MakeVertex(-100.,-100., 0.)
+p8 = geompy.MakeVertex( 0.,-100., 0.)
+
+# create a vector from the given components
+vector = geompy.MakeVectorDXDYDZ(50., 50., 50.)
+
+#create vectors from two points
+vector1_arc1 = geompy.MakeVector(p1, p2)
+vector2_arc1 = geompy.MakeVector(p1, p4)
+vector1_arc2 = geompy.MakeVector(p1, p6)
+vector2_arc2 = geompy.MakeVector(p1, p8)
+
+# create arcs from three points
+arc1 = geompy.MakeArc(p2, p3, p4)
+arc2 = geompy.MakeArc(p6, p7, p8)
+
+# create wires
+wire1 = geompy.MakeWire([vector1_arc1, arc1, vector2_arc1])
+wire2 = geompy.MakeWire([vector1_arc2, arc2, vector2_arc2])
+
+# create faces
+isPlanarWanted = 1
+face1 = geompy.MakeFace(wire1, isPlanarWanted)
+face2 = geompy.MakeFace(wire2, isPlanarWanted)
+
+# create prisms
+prism1 = geompy.MakePrism(face2, p1, p5)
+prism2 = geompy.MakePrismVecH(face1, vector, 50)
+prism3 = geompy.MakePrismVecH2Ways(face1, vector, 50)
+
+# add objects in the study
+id_face1 = geompy.addToStudy(face1,"Face1")
+id_face2 = geompy.addToStudy(face2,"Face2")
+id_prism1 = geompy.addToStudy(prism1,"Prism1")
+id_prism2 = geompy.addToStudy(prism2,"Prism2")
+id_prism3 = geompy.addToStudy(prism3,"Prism3")
+
+# display cylinders
+gg.createAndDisplayGO(id_face1)
+gg.setDisplayMode(id_face1,1)
+gg.createAndDisplayGO(id_face2)
+gg.setDisplayMode(id_face2,1)
+gg.createAndDisplayGO(id_prism1)
+gg.setDisplayMode(id_prism1,1)
+gg.createAndDisplayGO(id_prism2)
+gg.setDisplayMode(id_prism2,1)
+gg.createAndDisplayGO(id_prism3)
+gg.setDisplayMode(id_prism3,1)
diff --git a/doc/salome/examples/complex_objs_ex02.py b/doc/salome/examples/complex_objs_ex02.py
new file mode 100644
index 000000000..e096551fd
--- /dev/null
+++ b/doc/salome/examples/complex_objs_ex02.py
@@ -0,0 +1,34 @@
+# Creation of a Revolution
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex( 10., 10., 10.)
+p2 = geompy.MakeVertex( 15., 15., 50.)
+p3 = geompy.MakeVertex( 40., 40., 0.)
+
+#create vectors from two points
+vector1 = geompy.MakeVector(p1, p2)
+vector2 = geompy.MakeVector(p1, p3)
+
+# create a vector from the given components
+vector3 = geompy.MakeVectorDXDYDZ(-20., -20., 100.)
+
+# create a wire
+wire = geompy.MakeWire([vector1, vector2])
+
+# create a revolution
+revolution = geompy.MakeRevolution(wire, vector3, 2.3)
+
+# add objects in the study
+id_vector3 = geompy.addToStudy(vector3,"Axis")
+id_wire = geompy.addToStudy(wire,"Wire")
+id_revolution = geompy.addToStudy(revolution,"Revolution")
+
+# display the vector, the wire and the revolution
+gg.createAndDisplayGO(id_vector3)
+gg.createAndDisplayGO(id_wire)
+gg.createAndDisplayGO(id_revolution)
+gg.setDisplayMode(id_revolution,1)
diff --git a/doc/salome/examples/complex_objs_ex03.py b/doc/salome/examples/complex_objs_ex03.py
new file mode 100644
index 000000000..ec7767b2a
--- /dev/null
+++ b/doc/salome/examples/complex_objs_ex03.py
@@ -0,0 +1,39 @@
+# Creation of a Filling
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+mindeg = 2
+maxdeg = 5
+tol3d = 0.0001
+tol2d = 0.0001
+nbiter = 5
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex( -30., -30., 50.)
+p2 = geompy.MakeVertex( -60., -60., 30.)
+p3 = geompy.MakeVertex( -30., -30., 10.)
+
+# create an arc from three points
+arc = geompy.MakeArc(p1, p2, p3)
+ShapeListCompound = []
+i = 0
+while i <= 3 :
+ S = geompy.MakeTranslation(arc, i * 50., 0., 0.)
+ ShapeListCompound.append(S)
+ i = i + 1
+
+compound = geompy.MakeCompound(ShapeListCompound)
+
+# create a filling
+filling = geompy.MakeFilling(compound, mindeg, maxdeg, tol3d, tol2d, nbiter)
+
+# add objects in the study
+id_compound = geompy.addToStudy(compound,"Compound")
+id_filling = geompy.addToStudy(filling,"Filling")
+
+# display the compound and the filling
+gg.createAndDisplayGO(id_compound)
+gg.createAndDisplayGO(id_filling)
+gg.setDisplayMode(id_filling,1)
diff --git a/doc/salome/examples/complex_objs_ex04.py b/doc/salome/examples/complex_objs_ex04.py
new file mode 100644
index 000000000..72af08f29
--- /dev/null
+++ b/doc/salome/examples/complex_objs_ex04.py
@@ -0,0 +1,38 @@
+# Creation of a Pipe
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p0 = geompy.MakeVertex(0. , 0. , 0. )
+px = geompy.MakeVertex(100., 0. , 0. )
+py = geompy.MakeVertex(0. , 100., 0. )
+pz = geompy.MakeVertex(0. , 0. , 100.)
+pxyz = geompy.MakeVertex(100., 100., 100.)
+
+# create a vector from two points
+vxy = geompy.MakeVector(px, py)
+
+# create an arc from three points
+arc = geompy.MakeArc(py, pz, px)
+
+# create a wire
+wire = geompy.MakeWire([vxy, arc])
+
+# create an edge
+edge = geompy.MakeEdge(p0, pxyz)
+
+# create a pipe
+pipe = geompy.MakePipe(wire, edge)
+
+# add objects in the study
+id_wire = geompy.addToStudy(wire,"Wire")
+id_edge = geompy.addToStudy(edge,"Edge")
+id_pipe = geompy.addToStudy(pipe,"Pipe")
+
+# display the wire, the edge (path) and the pipe
+gg.createAndDisplayGO(id_wire)
+gg.createAndDisplayGO(id_edge)
+gg.createAndDisplayGO(id_pipe)
+gg.setDisplayMode(id_pipe,1)
diff --git a/doc/salome/examples/complex_objs_ex05.py b/doc/salome/examples/complex_objs_ex05.py
new file mode 100644
index 000000000..724810c58
--- /dev/null
+++ b/doc/salome/examples/complex_objs_ex05.py
@@ -0,0 +1,32 @@
+# Creation of a PipeWithDifferentSections
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+Wire_1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 100 0:R 0:C 100 90:T 0 200", [0, 0, 0, 0, 0, 1, 1, 0, -0])
+edges = geompy.SubShapeAll(Wire_1, geompy.ShapeType["EDGE"])
+vertices = geompy.SubShapeAll(Wire_1, geompy.ShapeType["VERTEX"])
+
+# create sections
+circles=[]
+circles.append(geompy.MakeCircle(vertices[0], edges[0], 20))
+circles.append(geompy.MakeCircle(vertices[1], edges[0], 40))
+circles.append(geompy.MakeCircle(vertices[2], edges[2], 30))
+circles.append(geompy.MakeCircle(vertices[3], edges[2], 20))
+
+# create pipe
+Pipe = geompy.MakePipeWithDifferentSections(circles, vertices, Wire_1, 0, 0)
+
+# add objects in the study
+geompy.addToStudy(circles[0], "circles1")
+geompy.addToStudy(circles[1], "circles2")
+geompy.addToStudy(circles[2], "circles3")
+geompy.addToStudy(circles[3], "circles4")
+id_wire = geompy.addToStudy(Wire_1, "Path")
+id_pipe = geompy.addToStudy(Pipe, "Pipe")
+
+# display the wire(path) and the pipe
+gg.createAndDisplayGO(id_wire)
+gg.createAndDisplayGO(id_pipe)
+gg.setDisplayMode(id_pipe,1)
diff --git a/doc/salome/examples/complex_objs_ex06.py b/doc/salome/examples/complex_objs_ex06.py
new file mode 100644
index 000000000..a836b35fc
--- /dev/null
+++ b/doc/salome/examples/complex_objs_ex06.py
@@ -0,0 +1,192 @@
+# Creation of a PipeWithShellSections
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create path
+WirePath = geompy.MakeSketcher("Sketcher:F 0 0:TT 100 0:R 0:C 100 90:T 0 200", [0, 0, 0, 0, 0, 1, 1, 0, -0])
+
+#=======================================================
+# Create shell sections
+#=======================================================
+ps = [Vertex_1,Vertex_2,Vertex_3,Vertex_4]
+theLocations = [Vertex_1, Vertex_2, Vertex_3, Vertex_4]
+VC = geompy.MakeCompound(theLocations)
+geompy.addToStudy(VC,"VC")
+vs = [Edge_1,Edge_1,Edge_3,Edge_3]
+hs = [20,40,30,20]
+shells = []
+subbases = []
+
+# 1 section
+c0 = geompy.PointCoordinates(ps[0])
+c1 = geompy.PointCoordinates(ps[1])
+nx = c1[0] - c0[0]
+ny = c1[1] - c0[1]
+nz = c1[2] - c0[2]
+
+faces = []
+f1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:TT 20 20:TT 0 20:WF",
+ [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
+f2 = geompy.MakeSketcher("Sketcher:F 0 0:TT 0 20:TT -20 20:TT -20 0:WF",
+ [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
+f3 = geompy.MakeSketcher("Sketcher:F 0 0:TT -20 0:TT -20 -20:TT 0 -20:WF",
+ [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
+f4 = geompy.MakeSketcher("Sketcher:F 0 0:TT 0 -20:TT 20 -20:TT 20 0:WF",
+ [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
+faces.append(f1)
+faces.append(f2)
+faces.append(f3)
+faces.append(f4)
+shell = geompy.MakeSewing(faces,1.e-6)
+shells.append(shell)
+faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
+subbases.append(faces[0])
+
+# 2 section
+faces = []
+
+w = geompy.MakeSketcher("Sketcher:F 20 20:TT 0 20:TT 0 0:TT 20 0",
+ [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
+[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
+arc = MakeArc(w,3,-1)
+w = geompy.MakeWire([e1,e2,e3,arc])
+f1 = geompy.MakeFace(w,1)
+
+w = geompy.MakeSketcher("Sketcher:F -20 0:TT 0 0:TT 0 20:TT -20 20",
+ [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
+[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
+arc = MakeArc(w,3,-1)
+w = geompy.MakeWire([e1,e2,e3,arc])
+f2 = geompy.MakeFace(w,1)
+
+w = geompy.MakeSketcher("Sketcher:F 20 0:TT 0 0:TT 0 -20:TT 20 -20",
+ [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
+[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
+arc = MakeArc(w,3,-1)
+w = geompy.MakeWire([e1,e2,e3,arc])
+f3 = geompy.MakeFace(w,1)
+
+w = geompy.MakeSketcher("Sketcher:F -20 -20:TT 0 -20:TT 0 0:TT -20 0",
+ [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
+[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
+arc = MakeArc(w,3,-1)
+w = geompy.MakeWire([e1,e2,e3,arc])
+f4 = geompy.MakeFace(w,1)
+
+faces.append(f1)
+faces.append(f2)
+faces.append(f3)
+faces.append(f4)
+shell = geompy.MakeSewing(faces,1.e-6)
+shells.append(shell)
+faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
+subbases.append(faces[0])
+
+# 3 section
+faces = []
+c2 = geompy.PointCoordinates(ps[2])
+c3 = geompy.PointCoordinates(ps[3])
+nx = c3[0] - c2[0]
+ny = c3[1] - c2[1]
+nz = c3[2] - c2[2]
+
+w = geompy.MakeSketcher("Sketcher:F 20 20:TT 0 20:TT 0 0:TT 20 0",
+ [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
+[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
+arc = MakeArc(w,3,1)
+w = geompy.MakeWire([e1,e2,e3,arc])
+f1 = geompy.MakeFace(w,1)
+
+w = geompy.MakeSketcher("Sketcher:F -20 0:TT 0 0:TT 0 20:TT -20 20",
+ [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
+[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
+arc = MakeArc(w,3,1)
+w = geompy.MakeWire([e1,e2,e3,arc])
+f2 = geompy.MakeFace(w,1)
+
+w = geompy.MakeSketcher("Sketcher:F 20 0:TT 0 0:TT 0 -20:TT 20 -20",
+ [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
+[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
+arc = MakeArc(w,3,1)
+w = geompy.MakeWire([e1,e2,e3,arc])
+f3 = geompy.MakeFace(w,1)
+
+w = geompy.MakeSketcher("Sketcher:F -20 -20:TT 0 -20:TT 0 0:TT -20 0",
+ [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
+[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
+arc = MakeArc(w,3,1)
+w = geompy.MakeWire([e1,e2,e3,arc])
+f4 = geompy.MakeFace(w,1)
+
+faces.append(f1)
+faces.append(f2)
+faces.append(f3)
+faces.append(f4)
+shell = geompy.MakeSewing(faces,1.e-6)
+shells.append(shell)
+faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
+subbases.append(faces[2])
+
+# 4 section
+faces = []
+
+kk = 4
+dx = c3[0] - nx/kk
+dy = c3[1] - ny/kk
+dz = c3[2] - nz/kk
+rad = math.sqrt(nx*nx+ny*ny+nz*nz)
+vc = geompy.MakeVertex(dx,dy,dz)
+sph = geompy.MakeSpherePntR(vc,rad/kk)
+shellsph = geompy.SubShapeAll(sph, geompy.ShapeType["SHELL"])
+
+fs = []
+vec = geompy.MakeVectorDXDYDZ(0,0,1)
+ff = geompy.MakePlane(ps[3],vec,40)
+fs.append(ff)
+vp = geompy.MakeVertex(c3[0],c3[1],c3[2]+20)
+ff = geompy.MakePlane(vp,vec,40)
+fs.append(ff)
+vp = geompy.MakeVertex(c3[0],c3[1],c3[2]-20)
+ff = geompy.MakePlane(vp,vec,40)
+fs.append(ff)
+vec = geompy.MakeVectorDXDYDZ(1,0,0)
+ff = geompy.MakePlane(ps[3],vec,40)
+fs.append(ff)
+vp = geompy.MakeVertex(c3[0]+20,c3[1],c3[2])
+ff = geompy.MakePlane(vp,vec,40)
+fs.append(ff)
+vp = geompy.MakeVertex(c3[0]-20,c3[1],c3[2])
+ff = geompy.MakePlane(vp,vec,40)
+fs.append(ff)
+aPartition = geompy.MakePartition(shellsph,fs)
+fs = geompy.SubShapeAllSortedCentres(aPartition, geompy.ShapeType["FACE"])
+
+faces.append(fs[0])
+faces.append(fs[1])
+faces.append(fs[2])
+faces.append(fs[3])
+shell = geompy.MakeSewing(faces,1.e-6)
+shells.append(shell)
+faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
+
+
+#===========================================================
+# Create Pipe
+#===========================================================
+subbases = []
+Pipe = geompy.MakePipeWithShellSections(shells, subbases, theLocations, WirePath,
+ theWithContact=0, theWithCorrection=0)
+
+# add objects in the study
+resc = geompy.MakeCompound(shells)
+id_sec = geompy.addToStudy(resc,"sections")
+id_wire = geompy.addToStudy(WirePath,"WirePath")
+id_pipe = geompy.addToStudy(Pipe, "Pipe")
+
+# display the wire(path), sections and the pipe
+gg.createAndDisplayGO(id_wire)
+gg.createAndDisplayGO(id_sec)
+gg.createAndDisplayGO(id_pipe)
+gg.setDisplayMode(id_pipe,1)
diff --git a/doc/salome/examples/complex_objs_ex07.py b/doc/salome/examples/complex_objs_ex07.py
new file mode 100644
index 000000000..1b37a2e39
--- /dev/null
+++ b/doc/salome/examples/complex_objs_ex07.py
@@ -0,0 +1,116 @@
+# Creation of a PipeShellsWithoutPath
+
+import geompy
+import math
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# Add a section based on quadrangles
+# ----------------------------------
+def section(s, p1, p2=None, p3=None, p4=None):
+ if p2==None:
+ q = p1
+ else:
+ q = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
+ pass
+ s.append(q)
+ publish(q, "section")
+ return q
+
+
+# find distance between two points
+# -------------------------------
+def Dist(p1,p2):
+ c1 = geompy.PointCoordinates(p1)
+ c2 = geompy.PointCoordinates(p2)
+ return math.sqrt( (c2[0]-c1[0])*(c2[0]-c1[0]) +
+ (c2[1]-c1[1])*(c2[1]-c1[1]) +
+ (c2[2]-c1[2])*(c2[2]-c1[2]) )
+
+
+# return middle point
+# -------------------------------
+def MiddleVert(p1,p2):
+ c1 = geompy.PointCoordinates(p1)
+ c2 = geompy.PointCoordinates(p2)
+ return geompy.MakeVertex( (c2[0]+c1[0])/2, (c2[1]+c1[1])/2, (c2[2]+c1[2])/2 )
+
+
+# Complex section
+# result - 16 quads from lines
+# pnt - point from path
+# vec - direction from path
+def MakeComplexSect(pnt,vec,rmax,rmin,nb):
+ dang = 1.0/nb/2
+ cmax = geompy.MakeCircle(pnt,vec,rmax)
+ cmin = geompy.MakeCircle(pnt,vec,rmin)
+ faces = []
+ for i in range(0,2*nb,2):
+ p1 = geompy.MakeVertexOnCurve(cmin,dang*i)
+ p2 = geompy.MakeVertexOnCurve(cmax,dang*(i+1))
+ p3 = geompy.MakeVertexOnCurve(cmin,dang*(i+2))
+ f = geompy.MakeQuad4Vertices(pnt,p1,p2,p3)
+ faces.append(f)
+ pass
+ shell = geompy.MakeSewing(faces,1.e-6)
+ return shell
+
+
+#=======================================================
+# Create simple path and recieve points
+# for section creation
+#=======================================================
+WirePath = geompy.MakeSketcher("Sketcher:F 0 0:T 60 0:T 40 0:R 0:C 100 90:",
+ [0, 0, 0, 0, 0, 1, 1, 0, 0])
+vs = geompy.SubShapeAll(WirePath, geompy.ShapeType["VERTEX"])
+
+#=======================================================
+# Create shell sections
+#=======================================================
+shells = []
+subbases = []
+locs = []
+
+# 1 section
+shell = MakeComplexSect(vs[0], geompy.MakeVectorDXDYDZ(1,0,0), 60, 40, 16)
+shells.append(shell)
+vs1 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
+locs.append(vs1[17])
+
+# 2 section
+shell = MakeComplexSect(vs[1], geompy.MakeVectorDXDYDZ(1,0,0), 80, 30, 16)
+shells.append(shell)
+vs2 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
+locs.append(vs2[17])
+
+# 3 section
+shell = MakeComplexSect(vs[2], geompy.MakeVectorDXDYDZ(1,0,0), 60, 40, 16)
+shells.append(shell)
+vs3 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
+locs.append(vs3[17])
+
+# 4 section
+shell = MakeComplexSect(vs[3], geompy.MakeVectorDXDYDZ(0,1,0), 40, 35, 16)
+shells.append(shell)
+vs4 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
+locs.append(vs4[17])
+
+
+#===========================================================
+# Create Pipe
+#===========================================================
+
+Pipe = geompy.MakePipeShellsWithoutPath(shells,locs)
+
+# add objects in the study
+resc = geompy.MakeCompound(shells)
+id_sec = geompy.addToStudy(resc,"sections")
+resl = geompy.MakeCompound(locs)
+id_loc = geompy.addToStudy(resl,"locations")
+id_pipe = geompy.addToStudy(Pipe, "Pipe")
+
+# display the sections, locations and pipe
+gg.createAndDisplayGO(id_sec)
+gg.createAndDisplayGO(id_loc)
+gg.createAndDisplayGO(id_pipe)
+gg.setDisplayMode(id_pipe,1)
diff --git a/doc/salome/examples/complex_objs_ex08.py b/doc/salome/examples/complex_objs_ex08.py
new file mode 100644
index 000000000..4777e071b
--- /dev/null
+++ b/doc/salome/examples/complex_objs_ex08.py
@@ -0,0 +1,76 @@
+# Creation of a PipeBiNormalAlongVector
+
+def MakeHelix(radius, height, rotation, direction):
+ # - create a helix -
+ radius = 1.0 * radius
+ height = 1.0 * height
+ rotation = 1.0 * rotation
+ if direction > 0:
+ direction = +1
+ else:
+ direction = -1
+ pass
+ from math import sqrt
+ length_z = height
+ length_xy = radius*rotation
+ length = sqrt(length_z*length_z + length_xy*length_xy)
+ import geompy
+ nb_steps = 1
+ epsilon = 1.0e-6
+ while 1:
+ z_step = height / nb_steps
+ angle_step = rotation / nb_steps
+ z = 0.0
+ angle = 0.0
+ helix_points = []
+ for n in range(nb_steps+1):
+ from math import cos, sin
+ x = radius * cos(angle)
+ y = radius * sin(angle)
+ p = geompy.MakeVertex(x, y, z)
+ helix_points.append( p )
+ z += z_step
+ angle += direction * angle_step
+ pass
+ helix = geompy.MakeInterpol(helix_points)
+ length_test = geompy.BasicProperties(helix)[0]
+ prec = abs(length-length_test)/length
+ # print nb_steps, length_test, prec
+ if prec < epsilon:
+ break
+ nb_steps *= 2
+ pass
+ return helix
+
+def MakeSpring(radius, height, rotation, direction, thread_radius, base_rotation=0.0):
+ # - create a pipe -
+ thread_radius = 1.0 * thread_radius
+ # create a helix
+ helix = MakeHelix(radius, height, rotation, direction)
+ # base in the (Ox, Oz) plane
+ import geompy
+ p0 = geompy.MakeVertex(radius-3*thread_radius, 0.0, -thread_radius)
+ p1 = geompy.MakeVertex(radius+3*thread_radius, 0.0, -thread_radius)
+ p2 = geompy.MakeVertex(radius+3*thread_radius, 0.0, +thread_radius)
+ p3 = geompy.MakeVertex(radius-3*thread_radius, 0.0, +thread_radius)
+ e0 = geompy.MakeEdge(p0, p1)
+ e1 = geompy.MakeEdge(p1, p2)
+ e2 = geompy.MakeEdge(p2, p3)
+ e3 = geompy.MakeEdge(p3, p0)
+ w = geompy.MakeWire([e0, e1, e2, e3])
+ # create a base face
+ base = geompy.MakeFace(w, True)
+ # create a binormal vector
+ binormal = geompy.MakeVectorDXDYDZ(0.0, 0.0, 10.0)
+ # create a pipe
+ spring = geompy.MakePipeBiNormalAlongVector(base, helix, binormal)
+ # Publish in the study
+ geompy.addToStudy(base, "base")
+ geompy.addToStudy(helix, "helix")
+ geompy.addToStudy(binormal, "binormal")
+ geompy.addToStudy(spring, "spring")
+ return spring
+
+from math import pi
+
+spring = MakeSpring(50, 100, 2*pi, 1, 5, pi/2)
diff --git a/doc/salome/examples/complex_objs_ex09.py b/doc/salome/examples/complex_objs_ex09.py
new file mode 100644
index 000000000..55c347a1f
--- /dev/null
+++ b/doc/salome/examples/complex_objs_ex09.py
@@ -0,0 +1,43 @@
+# Creation of a Middle Path
+
+import salome
+import geompy
+
+# Create a box
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+
+# Get two opposite faces
+[Face_1,Face_2] = geompy.SubShapes(Box_1, [31, 33])
+
+# Get edges
+Box_1_edge_12 = geompy.GetSubShape(Box_1, [12])
+Box_1_edge_22 = geompy.GetSubShape(Box_1, [22])
+Box_1_edge_25 = geompy.GetSubShape(Box_1, [25])
+Box_1_edge_29 = geompy.GetSubShape(Box_1, [29])
+Box_1_edge_8 = geompy.GetSubShape(Box_1, [8])
+Box_1_edge_18 = geompy.GetSubShape(Box_1, [18])
+Box_1_edge_26 = geompy.GetSubShape(Box_1, [26])
+Box_1_edge_30 = geompy.GetSubShape(Box_1, [30])
+
+# These three calls to RestorePath return the same result
+Path_1 = geompy.RestorePath(Box_1, Face_1, Face_2)
+Path_2 = geompy.RestorePathEdges(Box_1, [Face_1], [Face_2])
+Path_3 = geompy.RestorePathEdges(Box_1,
+ [Box_1_edge_12, Box_1_edge_22, Box_1_edge_25, Box_1_edge_29],
+ [Box_1_edge_8, Box_1_edge_18, Box_1_edge_26, Box_1_edge_30])
+
+# Publish created objects
+geompy.addToStudy( Box_1, 'Box_1' )
+geompy.addToStudyInFather( Box_1, Face_1, 'Face_1' )
+geompy.addToStudyInFather( Box_1, Face_2, 'Face_2' )
+geompy.addToStudyInFather( Box_1, Box_1_edge_25, 'Box_1:edge_25' )
+geompy.addToStudyInFather( Box_1, Box_1_edge_22, 'Box_1:edge_22' )
+geompy.addToStudyInFather( Box_1, Box_1_edge_12, 'Box_1:edge_12' )
+geompy.addToStudyInFather( Box_1, Box_1_edge_29, 'Box_1:edge_29' )
+geompy.addToStudyInFather( Box_1, Box_1_edge_18, 'Box_1:edge_18' )
+geompy.addToStudyInFather( Box_1, Box_1_edge_26, 'Box_1:edge_26' )
+geompy.addToStudyInFather( Box_1, Box_1_edge_8, 'Box_1:edge_8' )
+geompy.addToStudyInFather( Box_1, Box_1_edge_30, 'Box_1:edge_30' )
+geompy.addToStudy( Path_1, 'Path_1' )
+geompy.addToStudy( Path_2, 'Path_2' )
+geompy.addToStudy( Path_3, 'Path_3' )
diff --git a/doc/salome/examples/complex_objs_ex10.py b/doc/salome/examples/complex_objs_ex10.py
new file mode 100644
index 000000000..8a14455ef
--- /dev/null
+++ b/doc/salome/examples/complex_objs_ex10.py
@@ -0,0 +1,24 @@
+# Creation of Tangent Plane On Face
+
+import salome
+import geompy
+
+# Create Vertexes for curve
+Vertex_1 = geompy.MakeVertex(0, 0, 0)
+Vertex_2 = geompy.MakeVertex(0, 90, 30)
+Vertex_3 = geompy.MakeVertex(100, 90, 0)
+Vertex_4 = geompy.MakeVertex(-100, 90, 0)
+# Create curve
+Curve_1 = geompy.MakeInterpol([Vertex_4, Vertex_2, Vertex_3, Vertex_1])
+# Create Face by Extrusion of the Curve
+Extrusion_1 = geompy.MakePrismDXDYDZ(Curve_1, 0, 30, -60)
+# Make Tangent on this Extrusion (Face)
+Tangent_1 = geompy.MakeTangentPlaneOnFace(Extrusion_1, 0.7, 0.5, 150)
+# Publish in the study
+geompy.addToStudy( Vertex_1, "Vertex_1" )
+geompy.addToStudy( Vertex_2, "Vertex_2" )
+geompy.addToStudy( Vertex_3, "Vertex_3" )
+geompy.addToStudy( Vertex_4, "Vertex_4" )
+geompy.addToStudy( Curve_1, "Curve_1" )
+geompy.addToStudy( Extrusion_1, "Extrusion_1" )
+geompy.addToStudy( Tangent_1, "Tangent_1" )
diff --git a/doc/salome/examples/free_boundaries.py b/doc/salome/examples/free_boundaries.py
new file mode 100644
index 000000000..7582f79dc
--- /dev/null
+++ b/doc/salome/examples/free_boundaries.py
@@ -0,0 +1,79 @@
+# Check Free Boundaries
+
+import os
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create boxes
+box1 = geompy.MakeBox(0,0,0,100,50,100)
+box2 = geompy.MakeBox(100,0,0,250,50,100)
+
+# make a compound
+compound = geompy.MakeCompound([box1, box2])
+
+# import from *.brep
+ImportFromBREP = geompy.ImportBREP(os.getenv("DATA_DIR")+"/Shapes/Brep/flight_solid.brep")
+
+# get a face
+faces = geompy.SubShapeAllSortedCentres(ImportFromBREP, geompy.ShapeType["FACE"])
+
+# get the free boundary for face 32
+Res = geompy.GetFreeBoundary(faces[32])
+isSuccess = Res[0]
+ClosedWires = Res[1]
+OpenWires = Res[2]
+
+if isSuccess == 1 :
+ print "Checking free boudaries is OK."
+else :
+ print "Checking free boudaries is KO!"
+print "len(ClosedWires) = ", len(ClosedWires)
+
+i = 0
+for wire in ClosedWires :
+ wire_name = "Face 32 -> Close wires : WIRE %d"%(i+1)
+ geompy.addToStudy(ClosedWires[i], wire_name)
+ if i < len(ClosedWires) :
+ i = i+ 1
+
+print "len(OpenWires) = ", len(OpenWires)
+
+i = 0
+for wire in OpenWires :
+ wire_name = "Face 32 -> Open wires : WIRE %d"%(i+1)
+ geompy.addToStudy(OpenWires[i], wire_name)
+ if i < len(OpenWires) :
+ i = i+ 1
+
+# get the free boundary for face 41
+Res = geompy.GetFreeBoundary(faces[41])
+isSuccess = Res[0]
+ClosedWires = Res[1]
+OpenWires = Res[2]
+
+if isSuccess == 1 :
+ print "Checking free boudaries is OK."
+else :
+ print "Checking free boudaries is KO!"
+print "len(ClosedWires) = ", len(ClosedWires)
+
+i = 0
+for wire in ClosedWires :
+ wire_name = "Face 41 -> Close wires : WIRE %d"%(i+1)
+ geompy.addToStudy(ClosedWires[i], wire_name)
+ if i < len(ClosedWires) :
+ i = i+ 1
+
+print "len(OpenWires) = ", len(OpenWires)
+
+i = 0
+for wire in OpenWires :
+ wire_name = "Face 41 -> Open wires : WIRE %d"%(i+1)
+ geompy.addToStudy(OpenWires[i], wire_name)
+ if i < len(OpenWires) :
+ i = i+ 1
+
+# add the imported object to the study
+id_ImportFromBREP = geompy.addToStudy(ImportFromBREP, "ImportFromBREP")
+salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/free_faces.py b/doc/salome/examples/free_faces.py
new file mode 100644
index 000000000..16d705614
--- /dev/null
+++ b/doc/salome/examples/free_faces.py
@@ -0,0 +1,46 @@
+# Check Free Faces
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(35, 35, 0)
+p2 = geompy.MakeVertex(35, 35, 50)
+v = geompy.MakeVector(p1, p2)
+
+# create a cylinder
+cylinder = geompy.MakeCone(p1, v, 30, 20, 20)
+
+# create a cone
+cone = geompy.MakeCone(p1, v, 70, 40, 60)
+
+# make cut
+cut = geompy.MakeCut(cone, cylinder)
+
+# get faces as sub-shapes
+faces = []
+faces = geompy.SubShapeAllSortedCentres(cut, geompy.ShapeType["FACE"])
+f_2 = geompy.GetSubShapeID(cut, faces[0])
+
+# remove one face from the shape
+cut_without_f_2 = geompy.SuppressFaces(cut, [f_2])
+
+# suppress the specified wire
+result = geompy.GetFreeFacesIDs(cut_without_f_2)
+print "A number of free faces is ", len(result)
+
+# add objects in the study
+all_faces = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["FACE"])
+for face in all_faces :
+ sub_shape_id = geompy.GetSubShapeID(cut_without_f_2, face)
+ if result.count(sub_shape_id) > 0 :
+ face_name = "Free face %d"%(sub_shape_id)
+ geompy.addToStudy(face, face_name)
+
+# in this example all faces from cut_without_f_2 are free
+id_cut_without_f_2 = geompy.addToStudy(cut_without_f_2, "Cut without f_2")
+
+# display the results
+gg.createAndDisplayGO(id_cut_without_f_2)
+gg.setDisplayMode(id_cut_without_f_2,1)
diff --git a/doc/salome/examples/get_non_blocks.py b/doc/salome/examples/get_non_blocks.py
new file mode 100644
index 000000000..267fa870a
--- /dev/null
+++ b/doc/salome/examples/get_non_blocks.py
@@ -0,0 +1,26 @@
+# Get Non Blocks
+
+import geompy
+import salome
+
+# create solids
+box = geompy.MakeBoxDXDYDZ(100, 100, 100)
+cyl = geompy.MakeCylinderRH(100, 200)
+
+geompy.addToStudy(box, 'box')
+geompy.addToStudy(cyl, 'cyl')
+
+# make a compound
+compound = geompy.MakeCompound([box, cyl])
+geompy.addToStudy(compound, 'compound')
+
+# explore the compound
+pair = geompy.GetNonBlocks(compound)
+
+if pair[0] is not None:
+ geompy.addToStudyInFather(compound, pair[0], "GrNonBlocks")
+ pass
+
+if pair[1] is not None:
+ geompy.addToStudyInFather(compound, pair[1], "GrNonQuads")
+ pass
diff --git a/doc/salome/examples/import_export.py b/doc/salome/examples/import_export.py
new file mode 100644
index 000000000..ecde2442f
--- /dev/null
+++ b/doc/salome/examples/import_export.py
@@ -0,0 +1,40 @@
+# Import/Export
+
+import geompy
+import salome
+
+# Example of import from IGES using various formats
+
+# get a path to SAMPLES_SRC
+import os
+thePath = os.getenv("DATA_DIR")
+# create filenames
+theFileName1 = thePath + "/Shapes/Iges/boite-3Dipsos_m.igs"
+theFileName2 = thePath + "/Shapes/Iges/boite-3Dipsos_mm.igs"
+#print "thePath = ", thePath
+
+# get units from files
+UnitName1 = geompy.GetIGESUnit(theFileName1)
+UnitName2 = geompy.GetIGESUnit(theFileName2)
+print "UnitName1 = ", UnitName1
+print "UnitName2 = ", UnitName2
+
+# import shapes
+Shape1 = geompy.ImportIGES(theFileName1)
+Shape2 = geompy.ImportIGES(theFileName2)
+Shape3 = geompy.ImportFile(theFileName2,"IGES_SCALE")
+[Xmin1,Xmax1, Ymin1,Ymax1, Zmin1,Zmax1] = geompy.BoundingBox(Shape1)
+[Xmin2,Xmax2, Ymin2,Ymax2, Zmin2,Zmax2] = geompy.BoundingBox(Shape2)
+[Xmin3,Xmax3, Ymin3,Ymax3, Zmin3,Zmax3] = geompy.BoundingBox(Shape3)
+geompy.addToStudy(Shape1, "3Dipsos_m")
+geompy.addToStudy(Shape2, "3Dipsos_mm")
+geompy.addToStudy(Shape3, "3Dipsos_mm_scaled")
+d1 = (Xmax1-Xmin1)*(Xmax1-Xmin1) + (Ymax1-Ymin1)*(Ymax1-Ymin1) + (Zmax1-Zmin1)*(Zmax1-Zmin1)
+d2 = (Xmax2-Xmin2)*(Xmax2-Xmin2) + (Ymax2-Ymin2)*(Ymax2-Ymin2) + (Zmax2-Zmin2)*(Zmax2-Zmin2)
+d3 = (Xmax3-Xmin3)*(Xmax3-Xmin3) + (Ymax3-Ymin3)*(Ymax3-Ymin3) + (Zmax3-Zmin3)*(Zmax3-Zmin3)
+import math
+dd32 = math.sqrt(d3/d2)
+dd12 = math.sqrt(d1/d2)
+dd31 = math.sqrt(d3/d1)
+# values dd31, dd12 and dd31 can be using for checking
+print "dd32 = ",dd32," dd12 = ",dd12," dd31 = ",dd31
diff --git a/doc/salome/examples/inertia.py b/doc/salome/examples/inertia.py
new file mode 100644
index 000000000..203a39436
--- /dev/null
+++ b/doc/salome/examples/inertia.py
@@ -0,0 +1,14 @@
+# Inertia
+
+import geompy
+import math
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100,30,100)
+In = geompy.Inertia(box)
+print "\nInertia matrix of box 100x30x100:"
+print " (", In[0], ", ", In[1], ", ", In[2], ")"
+print " (", In[3], ", ", In[4], ", ", In[5], ")"
+print " (", In[6], ", ", In[7], ", ", In[8], ")"
+print "Main moments of inertia of box 100x30x100:"
+print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11]
diff --git a/doc/salome/examples/min_distance.py b/doc/salome/examples/min_distance.py
new file mode 100644
index 000000000..e6048bba2
--- /dev/null
+++ b/doc/salome/examples/min_distance.py
@@ -0,0 +1,49 @@
+# Minimal Distance
+
+import geompy
+
+# Create two curves with three closest points
+Vertex_1 = geompy.MakeVertex(0, 0, 0)
+Vertex_2 = geompy.MakeVertex(0, 70, 0)
+Vertex_3 = geompy.MakeVertex(30, 100, 0)
+Vertex_4 = geompy.MakeVertex(60, 70, 0)
+Vertex_5 = geompy.MakeVertex(90, 100, 0)
+Vertex_6 = geompy.MakeVertex(120, 70, 0)
+Vertex_7 = geompy.MakeVertex(120, 0, 0)
+Vertex_8 = geompy.MakeVertex(90, -30, 0)
+Vertex_9 = geompy.MakeVertex(60, 0, 0)
+Vertex_10 = geompy.MakeVertex(30, -30, 0)
+
+geompy.addToStudy( Vertex_1, 'Vertex_1' )
+geompy.addToStudy( Vertex_2, 'Vertex_2' )
+geompy.addToStudy( Vertex_3, 'Vertex_3' )
+geompy.addToStudy( Vertex_4, 'Vertex_4' )
+geompy.addToStudy( Vertex_5, 'Vertex_5' )
+geompy.addToStudy( Vertex_6, 'Vertex_6' )
+geompy.addToStudy( Vertex_7, 'Vertex_7' )
+geompy.addToStudy( Vertex_8, 'Vertex_8' )
+geompy.addToStudy( Vertex_9, 'Vertex_9' )
+geompy.addToStudy( Vertex_10, 'Vertex_10' )
+
+Curve_a = geompy.MakeInterpol([Vertex_2, Vertex_3, Vertex_4, Vertex_5, Vertex_6], False, True)
+Curve_b = geompy.MakeInterpol([Vertex_1, Vertex_7, Vertex_8, Vertex_9, Vertex_10], False, True)
+
+geompy.addToStudy( Curve_a, 'Curve_a' )
+geompy.addToStudy( Curve_b, 'Curve_b' )
+
+# Get all closest points
+[nbSols, listCoords] = geompy.ClosestPoints(Curve_a, Curve_b)
+
+for i in range(nbSols):
+ v1 = geompy.MakeVertex(listCoords[i*6 + 0], listCoords[i*6 + 1], listCoords[i*6 + 2])
+ v2 = geompy.MakeVertex(listCoords[i*6 + 3], listCoords[i*6 + 4], listCoords[i*6 + 5])
+
+ geompy.addToStudy(v1, 'MinDist_%d_Curve_a'%(i+1))
+ geompy.addToStudy(v2, 'MinDist_%d_Curve_b'%(i+1))
+
+# Get minimum distance
+print "Minimal distance between Curve_a and Curve_b is", geompy.MinDistance(Curve_a, Curve_b)
+
+# Get minimum distance with components along axes
+[aDist, DX, DY, DZ] = geompy.MinDistanceComponents(Curve_a, Curve_b)
+print "Minimal distance between Curve_a and Curve_b is (", DX, ",", DY, ",", DZ, ")"
diff --git a/doc/salome/examples/normal_face.py b/doc/salome/examples/normal_face.py
new file mode 100644
index 000000000..572b0f9f8
--- /dev/null
+++ b/doc/salome/examples/normal_face.py
@@ -0,0 +1,17 @@
+# Normal to a Face
+
+import geompy
+import math
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100,30,100)
+
+faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
+face0 = faces[0]
+vnorm = geompy.GetNormal(face0)
+if vnorm is None:
+ raise RuntimeError, "GetNormal(face0) failed"
+else:
+ geompy.addToStudy(face0, "Face0")
+ geompy.addToStudy(vnorm, "Normale to Face0")
+ print "\nNormale of face has been successfully obtained"
diff --git a/doc/salome/examples/notebook_geom.py b/doc/salome/examples/notebook_geom.py
new file mode 100644
index 000000000..a84ae87de
--- /dev/null
+++ b/doc/salome/examples/notebook_geom.py
@@ -0,0 +1,21 @@
+# Using SALOME NoteBook
+
+import geompy
+import salome
+import salome_notebook
+gg = salome.ImportComponentGUI("GEOM")
+
+# set variables
+notebook = salome_notebook.notebook
+notebook.set("Length", 150)
+notebook.set("Width", 100)
+
+# create box
+box = geompy.MakeBoxDXDYDZ("Length", "Width", 200)
+
+# add object in the study
+id_box = geompy.addToStudy(box,"Box")
+
+# display the boxes
+gg.createAndDisplayGO(id_box)
+gg.setDisplayMode(id_box,1)
diff --git a/doc/salome/examples/point_coordinates.py b/doc/salome/examples/point_coordinates.py
new file mode 100644
index 000000000..802c88ca5
--- /dev/null
+++ b/doc/salome/examples/point_coordinates.py
@@ -0,0 +1,21 @@
+# Point Coordinates
+
+import math
+import geompy
+
+# create a point
+point = geompy.MakeVertex(15., 23., 80.)
+
+# get the coordinates of the point and check its values
+coords = geompy.PointCoordinates(point)
+
+# check the obtained coordinate values
+tolerance = 1.e-07
+def IsEqual(val1, val2): return (math.fabs(val1 - val2) < tolerance)
+
+if IsEqual(coords[0], 15.) and IsEqual(coords[1], 23.) and IsEqual(coords[2], 80.):
+ print "All values are OK."
+else :
+ print "Coordinates of point must be (15, 23, 80), but returned (",
+ print coords[0], ", ", coords[1], ", ", coords[2], ")"
+ pass
diff --git a/doc/salome/examples/primitives_ex01.py b/doc/salome/examples/primitives_ex01.py
new file mode 100644
index 000000000..77db019cd
--- /dev/null
+++ b/doc/salome/examples/primitives_ex01.py
@@ -0,0 +1,27 @@
+# Creation of a Box
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p0 = geompy.MakeVertex(15, 25, 35)
+p70 = geompy.MakeVertex(70, 70, 70)
+
+# create boxes
+box1 = geompy.MakeBoxDXDYDZ(10, 20, 30)
+box2 = geompy.MakeBox(10,20,30, 15,25,35)
+box3 = geompy.MakeBoxTwoPnt(p0, p70)
+
+# add objects in the study
+id_box1 = geompy.addToStudy(box1,"Box1")
+id_box2 = geompy.addToStudy(box2,"Box2")
+id_box3 = geompy.addToStudy(box3,"Box3")
+
+# display the boxes
+gg.createAndDisplayGO(id_box1)
+gg.setDisplayMode(id_box1,1)
+gg.createAndDisplayGO(id_box2)
+gg.setDisplayMode(id_box2,1)
+gg.createAndDisplayGO(id_box3)
+gg.setDisplayMode(id_box3,1)
diff --git a/doc/salome/examples/primitives_ex02.py b/doc/salome/examples/primitives_ex02.py
new file mode 100644
index 000000000..ed6a6f9a6
--- /dev/null
+++ b/doc/salome/examples/primitives_ex02.py
@@ -0,0 +1,30 @@
+# Creation of a Cylinder
+
+import geompy
+import salome
+
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(25, 35, 45)
+p2 = geompy.MakeVertex(70, 70, 70)
+v = geompy.MakeVector(p1, p2)
+
+# create cylinders
+height = 40
+
+radius1 = 15
+cylinder1 = geompy.MakeCylinder(p1, v, radius1, height)
+
+radius2 = 30
+cylinder2 = geompy.MakeCylinderRH(radius2, height)
+
+# add objects in the study
+id_cylinder1 = geompy.addToStudy(cylinder1,"Cylinder1")
+id_cylinder2 = geompy.addToStudy(cylinder2,"Cylinder2")
+
+# display the cylinders
+gg.createAndDisplayGO(id_cylinder1)
+gg.setDisplayMode(id_cylinder1,1)
+gg.createAndDisplayGO(id_cylinder2)
+gg.setDisplayMode(id_cylinder2,1)
diff --git a/doc/salome/examples/primitives_ex03.py b/doc/salome/examples/primitives_ex03.py
new file mode 100644
index 000000000..21dbc9e7e
--- /dev/null
+++ b/doc/salome/examples/primitives_ex03.py
@@ -0,0 +1,29 @@
+# Creation of a Sphere
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex
+p = geompy.MakeVertex(55, 45, 25)
+
+# create spheres
+radius1 = 20
+sphere1 = geompy.MakeSpherePntR(p, radius1)
+radius2 = 15
+sphere2 = geompy.MakeSphere(0, 0, 45, radius2)
+radius3 = 30
+sphere3 = geompy.MakeSphereR(radius3)
+
+# add objects in the study
+id_sphere1 = geompy.addToStudy(sphere1,"Sphere1")
+id_sphere2 = geompy.addToStudy(sphere2,"Sphere2")
+id_sphere3 = geompy.addToStudy(sphere3,"Sphere3")
+
+# display spheres
+gg.createAndDisplayGO(id_sphere1)
+gg.setDisplayMode(id_sphere1,1)
+gg.createAndDisplayGO(id_sphere2)
+gg.setDisplayMode(id_sphere2,1)
+gg.createAndDisplayGO(id_sphere3)
+gg.setDisplayMode(id_sphere3,1)
diff --git a/doc/salome/examples/primitives_ex04.py b/doc/salome/examples/primitives_ex04.py
new file mode 100644
index 000000000..99a003a4b
--- /dev/null
+++ b/doc/salome/examples/primitives_ex04.py
@@ -0,0 +1,24 @@
+# Creation of a Torus
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(35, 40, 45)
+p2 = geompy.MakeVertex(35, 45, 70)
+v = geompy.MakeVector(p1, p2)
+
+# create toruses
+torus1 = geompy.MakeTorus(p1, v, 20, 10)
+torus2 = geompy.MakeTorusRR(30, 15)
+
+# add objects in the study
+id_torus1 = geompy.addToStudy(torus1,"Torus1")
+id_torus2 = geompy.addToStudy(torus2,"Torus2")
+
+# display toruses
+gg.createAndDisplayGO(id_torus1)
+gg.setDisplayMode(id_torus1,1)
+gg.createAndDisplayGO(id_torus2)
+gg.setDisplayMode(id_torus2,1)
diff --git a/doc/salome/examples/primitives_ex05.py b/doc/salome/examples/primitives_ex05.py
new file mode 100644
index 000000000..b563303b2
--- /dev/null
+++ b/doc/salome/examples/primitives_ex05.py
@@ -0,0 +1,24 @@
+# Creation of a Cone
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(35, 35, 0)
+p2 = geompy.MakeVertex(35, 35, 70)
+v = geompy.MakeVector(p1, p2)
+
+# create cones
+cone1 = geompy.MakeCone(p1, v, 17, 1, 20)
+cone2 = geompy.MakeConeR1R2H(30, 10, 30)
+
+# add objects in the study
+id_cone1 = geompy.addToStudy(cone1,"Cone1")
+id_cone2 = geompy.addToStudy(cone2,"Cone2")
+
+# display cones
+gg.createAndDisplayGO(id_cone1)
+gg.setDisplayMode(id_cone1,1)
+gg.createAndDisplayGO(id_cone2)
+gg.setDisplayMode(id_cone2,1)
diff --git a/doc/salome/examples/primitives_ex06.py b/doc/salome/examples/primitives_ex06.py
new file mode 100644
index 000000000..c558eafb8
--- /dev/null
+++ b/doc/salome/examples/primitives_ex06.py
@@ -0,0 +1,35 @@
+# Creation of a Disk
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p0 = geompy.MakeVertex(0., 0., 0.)
+px = geompy.MakeVertex(100., 0. , 0. )
+py = geompy.MakeVertex(0. , 100., 0. )
+pz = geompy.MakeVertex(0. , 0. , 100.)
+
+# create a vector on two points
+vxy = geompy.MakeVector(px, py)
+
+# create a disk in OXY plane
+disk1 = geompy.MakeDiskR(100, 1)
+
+# create a disk from a point, a vector and a radius
+disk2 = geompy.MakeDiskPntVecR(pz, vxy, 30)
+
+#create a circle from three points
+disk3 = geompy.MakeDiskThreePnt(p0, px, py)
+
+# add objects in the study
+id_vxy = geompy.addToStudy(vxy, "Vector")
+id_disk1 = geompy.addToStudy(disk1,"Disk1")
+id_disk2 = geompy.addToStudy(disk2,"Disk2")
+id_disk3 = geompy.addToStudy(disk3,"Disk3")
+
+# display disks
+gg.createAndDisplayGO(id_vxy)
+gg.createAndDisplayGO(id_disk1)
+gg.createAndDisplayGO(id_diks2)
+gg.createAndDisplayGO(id_diks3)
diff --git a/doc/salome/examples/primitives_ex07.py b/doc/salome/examples/primitives_ex07.py
new file mode 100644
index 000000000..75dad1e94
--- /dev/null
+++ b/doc/salome/examples/primitives_ex07.py
@@ -0,0 +1,31 @@
+# Creation of a Rectangle
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+px = geompy.MakeVertex(100., 0. , 0. )
+py = geompy.MakeVertex(0. , 100., 0. )
+
+# create a vector on two points
+vxy = geompy.MakeVector(px, py)
+
+# create a rectangle in OXY plane
+face1 = geompy.MakeFaceHW(100, 100, 1)
+
+# create a rectangle using normal vector
+face2 = geompy.MakeFaceObjHW(vxy, 50, 150)
+
+# create a rectangle from other face
+face3 = geompy.MakeFaceObjHW(face2, 150, 50)
+
+# add objects in the study
+id_face1 = geompy.addToStudy(face1,"Face1")
+id_face2 = geompy.addToStudy(face2,"Face2")
+id_face3 = geompy.addToStudy(face3,"Face3")
+
+# display rectangles
+gg.createAndDisplayGO(id_face1)
+gg.createAndDisplayGO(id_face2)
+gg.createAndDisplayGO(id_face3)
diff --git a/doc/salome/examples/repairing_operations_ex01.py b/doc/salome/examples/repairing_operations_ex01.py
new file mode 100644
index 000000000..8a57db040
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex01.py
@@ -0,0 +1,46 @@
+# Shape Processing
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices, an edge, an arc, a wire, a face and a prism
+p1 = geompy.MakeVertex(0,0,0)
+p2 = geompy.MakeVertex(200,0,0)
+p3 = geompy.MakeVertex(100,150,0)
+edge = geompy.MakeEdge(p1,p2)
+arc = geompy.MakeArc(p1,p3,p2)
+wire = geompy.MakeWire([edge,arc])
+face = geompy.MakeFace(wire, 1)
+theShape = geompy.MakePrismVecH(face, edge, 130)
+
+# check the shape at the beginning
+print "Before ProcessShape:"
+isValid = geompy.CheckShape(theShape)
+if isValid == 0:
+ print "The shape is not valid"
+else:
+ print "The shape seems to be valid"
+
+# process the Shape
+Operators = ["FixShape"]
+Parameters = ["FixShape.Tolerance3d"]
+Values = ["1e-7"]
+PS = geompy.ProcessShape(theShape, Operators, Parameters, Values)
+
+# check the shape at the end
+print "After ProcessShape:"
+isValid = geompy.CheckShape(PS)
+if isValid == 0:
+ print "The shape is not valid"
+ raise RuntimeError, "It seems, that the ProcessShape() has failed"
+else:
+ print "The shape seems to be valid"
+
+# add in the study and display
+Id_Shape = geompy.addToStudy(theShape, "Invalid Shape")
+Id_PS = geompy.addToStudy(PS, "Processed Shape")
+gg.createAndDisplayGO(Id_Shape)
+gg.setDisplayMode(Id_Shape,1)
+gg.createAndDisplayGO(Id_PS)
+gg.setDisplayMode(Id_PS,1)
diff --git a/doc/salome/examples/repairing_operations_ex02.py b/doc/salome/examples/repairing_operations_ex02.py
new file mode 100644
index 000000000..f5ee65caf
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex02.py
@@ -0,0 +1,28 @@
+# Suppress Faces
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+
+# The list of IDs (IDList) for suppress faces
+sup_faces = []
+sup_faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
+
+# get indices of the sub-shape
+f1_id = geompy.GetSubShapeID(box, sup_faces[3])
+
+# remove faces from the given object (shape)
+result = geompy.SuppressFaces(box, [f1_id])
+
+# add objects in the study
+id_box = geompy.addToStudy(box, "Box")
+id_result = geompy.addToStudy(result, "Result")
+
+# display the results
+gg.createAndDisplayGO(id_box)
+gg.setDisplayMode(id_box,1)
+gg.createAndDisplayGO(id_result)
+gg.setDisplayMode(id_result,1)
diff --git a/doc/salome/examples/repairing_operations_ex03.py b/doc/salome/examples/repairing_operations_ex03.py
new file mode 100644
index 000000000..50eec1126
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex03.py
@@ -0,0 +1,30 @@
+# Close Contour
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices and vectors
+p0 = geompy.MakeVertex( 0., 0., 0.)
+px = geompy.MakeVertex(100., 0., 0.)
+py = geompy.MakeVertex( 0., 100., 0.)
+py1 = geompy.MakeVertex( 0., 140., 0.)
+pz = geompy.MakeVertex( 0., 0., 100.)
+vxy = geompy.MakeVector(px, py)
+
+# create an arc
+arc = geompy.MakeArc(py1, pz, px)
+
+# create a wire
+wire = geompy.MakeWire([vxy, arc])
+
+# close an open wire by creation of an edge between ends
+wire_close = geompy.CloseContour(wire, [1], 0)
+
+# add objects in the study
+id_wire = geompy.addToStudy(wire, "Wire")
+id_wire_close = geompy.addToStudy(wire_close, "Wire close")
+
+# display the results
+gg.createAndDisplayGO(id_wire)
+gg.createAndDisplayGO(id_wire_close)
diff --git a/doc/salome/examples/repairing_operations_ex04.py b/doc/salome/examples/repairing_operations_ex04.py
new file mode 100644
index 000000000..fad69131c
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex04.py
@@ -0,0 +1,34 @@
+# Suppress Internal Wires
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(55, 65, 50)
+p2 = geompy.MakeVertex(55, 0, 50)
+v = geompy.MakeVector(p1, p2)
+
+# create a cylinder
+height = 100
+radius1 = 40
+cylinder = geompy.MakeCylinder(p1, v, radius1, height)
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100, 100, 100)
+
+# make a cut
+cut = geompy.MakeCut(box, cylinder)
+
+# suppress all internal wires
+result = geompy.SuppressInternalWires(cut, [])
+
+# add objects in the study
+id_cut = geompy.addToStudy(cut, "Cut")
+id_result = geompy.addToStudy(result, "Result")
+
+# display the results
+gg.createAndDisplayGO(id_cut)
+gg.setDisplayMode(id_cut,1)
+gg.createAndDisplayGO(id_result)
+gg.setDisplayMode(id_result,1)
diff --git a/doc/salome/examples/repairing_operations_ex05.py b/doc/salome/examples/repairing_operations_ex05.py
new file mode 100644
index 000000000..f6593b3e8
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex05.py
@@ -0,0 +1,50 @@
+# Suppress Holes
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(35, 35, 0)
+p2 = geompy.MakeVertex(35, 35, 50)
+v = geompy.MakeVector(p1, p2)
+
+# create a cylinder
+height = 20
+radius1 = 20
+cylinder = geompy.MakeCylinder(p1, v, radius1, height)
+
+# create a cone
+cone = geompy.MakeCone(p1, v, 70, 0, 80)
+
+# make a cut
+cut = geompy.MakeCut(cone, cylinder)
+
+# get faces as sub-shapes
+faces = []
+faces = geompy.SubShapeAllSortedCentres(cut, geompy.ShapeType["FACE"])
+f_2 = geompy.GetSubShapeID(cut, faces[2])
+
+# remove one face from the shape
+cut_without_f_2 = geompy.SuppressFaces(cut, [f_2])
+
+# get wires as sub-shapes
+wires = []
+wires = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["WIRE"])
+w_0 = geompy.GetSubShapeID(cut_without_f_2, wires[0])
+
+# suppress the selected wire
+result = geompy.SuppressHoles(cut_without_f_2, [w_0])
+
+# add objects in the study
+id_cut = geompy.addToStudy(cut, "Cut")
+id_cut_without_f_2 = geompy.addToStudy(cut_without_f_2, "Cut without f_2")
+id_result = geompy.addToStudy(result, "Result")
+
+# display the results
+gg.createAndDisplayGO(id_cut)
+gg.setDisplayMode(id_cut,1)
+gg.createAndDisplayGO(id_cut_without_f_2)
+gg.setDisplayMode(id_cut_without_f_2,1)
+gg.createAndDisplayGO(id_result)
+gg.setDisplayMode(id_result,1)
diff --git a/doc/salome/examples/repairing_operations_ex06.py b/doc/salome/examples/repairing_operations_ex06.py
new file mode 100644
index 000000000..e6120a7a6
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex06.py
@@ -0,0 +1,39 @@
+# Sewing
+
+import geompy
+import salome
+import math
+gg = salome.ImportComponentGUI("GEOM")
+
+# create base points
+px = geompy.MakeVertex(100., 0., 0.)
+py = geompy.MakeVertex(0., 100., 0.)
+pz = geompy.MakeVertex(0., 0., 100.)
+
+# create base geometry 2D & 3D
+vector = geompy.MakeVector(px, py)
+arc = geompy.MakeArc(py, pz, px)
+
+# create base objects
+angle = 45. * math.pi / 180
+WantPlanarFace = 1 #True
+wire = geompy.MakeWire([vector, arc])
+face = geompy.MakeFace(wire, WantPlanarFace)
+face_rot = geompy.MakeRotation(face, vector, angle)
+
+# make sewing
+precision = 0.00001
+sewing = geompy.MakeSewing([face, face_rot], precision)
+
+# add objects in the study
+id_face = geompy.addToStudy(face, "Face")
+id_face_rot = geompy.addToStudy(face_rot, "Face rotation")
+id_sewing = geompy.addToStudy(sewing, "Sewing")
+
+# display the results
+gg.createAndDisplayGO(id_face)
+gg.setDisplayMode(id_face,1)
+gg.createAndDisplayGO(id_face_rot)
+gg.setDisplayMode(id_face_rot,1)
+gg.createAndDisplayGO(id_sewing)
+gg.setDisplayMode(id_sewing,1)
diff --git a/doc/salome/examples/repairing_operations_ex07.py b/doc/salome/examples/repairing_operations_ex07.py
new file mode 100644
index 000000000..6cc688a4e
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex07.py
@@ -0,0 +1,32 @@
+# Glue Faces
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create boxes
+box1 = geompy.MakeBox(0,0,0,100,50,100)
+box2 = geompy.MakeBox(100,0,0,250,50,100)
+
+# make compound
+compound = geompy.MakeCompound([box1, box2])
+
+# glue compound's faces
+tolerance = 1e-5
+glue = geompy.MakeGlueFaces(compound, tolerance)
+
+# add objects in study
+id_box1 = geompy.addToStudy(box1, "Box1")
+id_box2 = geompy.addToStudy(box2, "Box2")
+id_compound = geompy.addToStudy(compound, "Compound")
+id_glue = geompy.addToStudy(glue, "Glue faces")
+
+# display results
+gg.createAndDisplayGO(id_box1)
+gg.setDisplayMode(id_box1,1)
+gg.createAndDisplayGO(id_box2)
+gg.setDisplayMode(id_box2,1)
+gg.createAndDisplayGO(id_compound)
+gg.setDisplayMode(id_compound,1)
+gg.createAndDisplayGO(id_glue)
+gg.setDisplayMode(id_glue,1)
diff --git a/doc/salome/examples/repairing_operations_ex08.py b/doc/salome/examples/repairing_operations_ex08.py
new file mode 100644
index 000000000..a39d11088
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex08.py
@@ -0,0 +1,30 @@
+# Glue Edges
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create boxes
+box1 = geompy.MakeBox(0,0,0,100,50,100)
+box2 = geompy.MakeBox(100,0,0,250,50,100)
+
+# make compound
+compound = geompy.MakeCompound([box1, box2])
+
+# glue all compound's edges
+tolerance = 1e-5
+glue1 = geompy.MakeGlueEdges(compound, tolerance)
+
+# glue some compound's edges
+list_edges = geompy.GetGlueEdges(compound, tolerance)
+glue2 = geompy.MakeGlueEdgesByList(compound, tolerance, [list_edges[0], list_edges[2]])
+
+# add objects in study
+geompy.addToStudy(box1, "Box1")
+geompy.addToStudy(box2, "Box2")
+geompy.addToStudy(compound, "Compound")
+geompy.addToStudy(glue1, "Glue all edges")
+geompy.addToStudy(glue2, "Glue two edges")
+
+if salome.sg.hasDesktop():
+ salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/repairing_operations_ex09.py b/doc/salome/examples/repairing_operations_ex09.py
new file mode 100644
index 000000000..41807fee4
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex09.py
@@ -0,0 +1,33 @@
+# Limit Tolerance
+
+import geompy
+gg = salome.ImportComponentGUI("GEOM")
+
+# import initial topology
+shape1 = geompy.ImportBREP("my_shape_1.brep")
+shape2 = geompy.ImportBREP("my_shape_2.brep")
+
+geompy.addToStudy(shape1, "Shape 1")
+geompy.addToStudy(shape2, "Shape 2")
+
+# perform partition
+try:
+ part = geompy.MakePartition([shape1, shape2])
+except:
+ # limit tolerance
+ tolerance = 1e-07
+ shape1_lt = geompy.LimitTolerance(shape1, tolerance)
+ shape2_lt = geompy.LimitTolerance(shape2, tolerance)
+
+ # process shape
+ good_shape1 = geompy.ProcessShape(shape1_lt, ["FixShape"], ["FixShape.Tolerance3d"], ["1e-7"])
+ good_shape2 = geompy.ProcessShape(shape2_lt, ["FixShape"], ["FixShape.Tolerance3d"], ["1e-7"])
+
+ geompy.addToStudy(good_shape1, "Shape 1 corrected")
+ geompy.addToStudy(good_shape2, "Shape 2 corrected")
+
+ # perform partition on corrected shapes
+ part = geompy.MakePartition([good_shape1, good_shape2])
+ pass
+
+geompy.addToStudy(part, "Partition")
diff --git a/doc/salome/examples/repairing_operations_ex10.py b/doc/salome/examples/repairing_operations_ex10.py
new file mode 100644
index 000000000..7849a7cf5
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex10.py
@@ -0,0 +1,27 @@
+# Add Point on Edge
+
+import geompy
+import salome
+
+# create vertices
+p1 = geompy.MakeVertex(0,0,50)
+p2 = geompy.MakeVertex(60,0,50)
+
+# make an edge
+edge = geompy.MakeEdge(p1, p2) #geompy.GetSubShape(box, edge_ind)
+
+# divide an edge
+divide = geompy.DivideEdge(edge, -1, 0.5, 0)
+
+# add objects in the study
+id_edge = geompy.addToStudy(edge, "Edge")
+edge_points = geompy.SubShapeAllSortedCentres(edge, geompy.ShapeType["VERTEX"])
+for point in edge_points:
+ geompy.addToStudyInFather(edge, point, "Edge's point")
+
+id_divide = geompy.addToStudy(divide, "Divided edge")
+edge_points = geompy.SubShapeAllSortedCentres(divide, geompy.ShapeType["VERTEX"])
+for point in edge_points:
+ geompy.addToStudyInFather(divide, point, "Edge's point after divide")
+
+salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/repairing_operations_ex11.py b/doc/salome/examples/repairing_operations_ex11.py
new file mode 100644
index 000000000..396881c72
--- /dev/null
+++ b/doc/salome/examples/repairing_operations_ex11.py
@@ -0,0 +1,49 @@
+# Fuse Collinear Edges within a Wire
+
+import geompy
+import salome
+
+# create vertices
+p1 = geompy.MakeVertex(0, 0, 0)
+p2 = geompy.MakeVertex(70, 0, 0)
+p3 = geompy.MakeVertex(70, 50, 0)
+p4 = geompy.MakeVertex(70, 80, 0)
+p5 = geompy.MakeVertex(50, 80, 0)
+p6 = geompy.MakeVertex(20, 80, 0)
+p7 = geompy.MakeVertex(0, 80, 0)
+p8 = geompy.MakeVertex(0, 30, 0)
+
+points = [p1, p2, p3, p4, p5, p6, p7, p8]
+
+# make a wire
+wire_1 = geompy.MakePolyline(points, True)
+
+# suppress some vertices in the wire
+wire_2 = geompy.FuseCollinearEdgesWithinWire(wire_1, [p3])
+wire_3 = geompy.FuseCollinearEdgesWithinWire(wire_1, [p5, p6])
+
+# suppress all suitable vertices in the wire
+wire_4 = geompy.FuseCollinearEdgesWithinWire(wire_1, [])
+
+wires = [wire_1, wire_2, wire_3, wire_4]
+
+# add objects in the study
+ii = 1
+for point in points:
+ geompy.addToStudy(point, "p%d"%ii)
+ ii = ii + 1
+ pass
+
+ii = 1
+for wire in wires:
+ geompy.addToStudy(wire, "wire_%d"%ii)
+ wire_points = geompy.SubShapeAllSortedCentres(wire, geompy.ShapeType["VERTEX"])
+ jj = 1
+ for point in wire_points:
+ geompy.addToStudyInFather(wire, point, "point_%d"%jj)
+ jj = jj + 1
+ pass
+ ii = ii + 1
+ pass
+
+salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/sketcher.py b/doc/salome/examples/sketcher.py
new file mode 100644
index 000000000..8ca1f98ce
--- /dev/null
+++ b/doc/salome/examples/sketcher.py
@@ -0,0 +1,42 @@
+# 2D Sketcher
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p1 = geompy.MakeVertex(70., 0., 0.)
+p2 = geompy.MakeVertex(70., 70., 80.)
+p3 = geompy.MakeVertex( 0., 70., 0.)
+
+#create a vector from two points
+vector_arc = geompy.MakeVector(p1, p3)
+
+# create an arc from three points
+arc = geompy.MakeArc(p1, p2, p3)
+
+# create a wire
+wire = geompy.MakeWire([vector_arc, arc])
+
+# create a planar face
+isPlanarWanted = 1
+face = geompy.MakeFace(wire, isPlanarWanted)
+
+# create a sketcher (face), following the textual description
+sketcher1 = geompy.MakeSketcher("Sketcher:F -100 -100:TT 250 -100:R 0:C 100 150:R 0:L 300:WF",
+ [100,0,0, 1,1,1, -1,1,0])
+
+# create a sketcher (wire) on the given face
+sketcher2 = geompy.MakeSketcherOnPlane("Sketcher:F 10 -30:R 10:C 20 180:R 15:L 50:WW", face)
+
+# add objects in the study
+id_face = geompy.addToStudy(face,"Face")
+id_sketcher1 = geompy.addToStudy(sketcher1,"Sketcher1")
+id_sketcher2 = geompy.addToStudy(sketcher2,"Sketcher2")
+
+# display the first sketcher and the second sketcher with its planar face
+gg.createAndDisplayGO(id_face)
+gg.setDisplayMode(id_face,1)
+gg.setTransparency(id_face,0.5)
+gg.createAndDisplayGO(id_sketcher1)
+gg.createAndDisplayGO(id_sketcher2)
diff --git a/doc/salome/examples/testme.py b/doc/salome/examples/testme.py
new file mode 100755
index 000000000..d8a98200d
--- /dev/null
+++ b/doc/salome/examples/testme.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+
+import unittest, sys
+
+class SalomeSession(object):
+ def __init__(self, script):
+ import runSalome
+ sys.argv = ["runSalome.py"]
+ sys.argv += ["--terminal"]
+ sys.argv += ["--modules=GEOM"]
+ sys.argv += ["--execute=%s" % script]
+ clt, d = runSalome.main()
+ self.port = d['port']
+ return
+
+ def __del__(self):
+ port = self.port
+ import killSalomeWithPort
+ killSalomeWithPort.killMyPort(port)
+ return
+ pass
+
+class MyTest(unittest.TestCase):
+ def testFunction(self):
+ SalomeSession(sys.argv[1])
+ pass
+
+unittest.main(argv=sys.argv[:1])
diff --git a/doc/salome/examples/tolerance.py b/doc/salome/examples/tolerance.py
new file mode 100644
index 000000000..639a676cf
--- /dev/null
+++ b/doc/salome/examples/tolerance.py
@@ -0,0 +1,14 @@
+# Tolerance
+
+import geompy
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100,30,100)
+Toler = geompy.Tolerance(box)
+print "\nBox 100x30x100 tolerance:"
+print " Face min. tolerance: ", Toler[0]
+print " Face max. tolerance: ", Toler[1]
+print " Edge min. tolerance: ", Toler[2]
+print " Edge max. tolerance: ", Toler[3]
+print " Vertex min. tolerance: ", Toler[4]
+print " Vertex max. tolerance: ", Toler[5]
diff --git a/doc/salome/examples/topological_geom_objs_ex01.py b/doc/salome/examples/topological_geom_objs_ex01.py
new file mode 100644
index 000000000..77c1d1807
--- /dev/null
+++ b/doc/salome/examples/topological_geom_objs_ex01.py
@@ -0,0 +1,57 @@
+# Creation of an Edge
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+#
+# create edge by two points
+#
+
+# create vertices
+p0 = geompy.MakeVertex(0. , 0. , 0. )
+pxyz = geompy.MakeVertex(100., 100., 100.)
+
+# create an edge
+edge = geompy.MakeEdge(p0, pxyz)
+
+# add object in the study
+id_edge = geompy.addToStudy(edge,"Edge_1")
+
+# display an edge
+gg.createAndDisplayGO(id_edge)
+
+#
+# create edge from wire
+#
+
+# create a circle
+c = geompy.MakeCircle(None, None, 100)
+
+# create a wire
+w = geompy.MakeWire([c], 1e-07)
+
+# create an edge from wire
+edge = geompy.MakeEdgeWire(w)
+
+# add object in the study
+id_edge = geompy.addToStudy(edge,"Edge_2")
+
+# display an edge
+gg.createAndDisplayGO(id_edge)
+
+#
+# create edge from existing curve and a length
+#
+
+# create a circle
+c = geompy.MakeCircle(None, None, 100)
+
+# create an edge of length 25.0 from the circle
+edge = geompy.MakeEdgeOnCurveByLength(c, 25.0)
+
+# add object in the study
+id_edge = geompy.addToStudy(edge,"Edge_3")
+
+# display an edge
+gg.createAndDisplayGO(id_edge)
diff --git a/doc/salome/examples/topological_geom_objs_ex02.py b/doc/salome/examples/topological_geom_objs_ex02.py
new file mode 100644
index 000000000..62806d770
--- /dev/null
+++ b/doc/salome/examples/topological_geom_objs_ex02.py
@@ -0,0 +1,25 @@
+# Creation of a Wire
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+px = geompy.MakeVertex(100., 0. , 0. )
+py = geompy.MakeVertex(0. , 100., 0. )
+pz = geompy.MakeVertex(0. , 0. , 100.)
+
+# create a vector from two points
+vxy = geompy.MakeVector(px, py)
+
+# create an arc from three points
+arc = geompy.MakeArc(py, pz, px)
+
+# create a wire
+wire = geompy.MakeWire([vxy, arc])
+
+# add an object in the study
+id_wire = geompy.addToStudy(wire,"Wire")
+
+# display the wire
+gg.createAndDisplayGO(id_wire)
diff --git a/doc/salome/examples/topological_geom_objs_ex03.py b/doc/salome/examples/topological_geom_objs_ex03.py
new file mode 100644
index 000000000..7b1600153
--- /dev/null
+++ b/doc/salome/examples/topological_geom_objs_ex03.py
@@ -0,0 +1,51 @@
+# Creation of a Face
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices
+p0 = geompy.MakeVertex(0. , 0. , 0. )
+px = geompy.MakeVertex(100., 0. , 0. )
+py = geompy.MakeVertex(0. , 100., 0. )
+pz = geompy.MakeVertex(0. , 0. , 100.)
+pxyz = geompy.MakeVertex(100., 100., 100.)
+
+# create a vector from two points
+vxy = geompy.MakeVector(px, py)
+
+# create an arc from three points
+arc = geompy.MakeArc(py, pz, px)
+
+# create a wire
+wire = geompy.MakeWire([vxy, arc])
+
+# create sketchers
+sketcher1 = geompy.MakeSketcher("Sketcher:F -100 -100:TT 250 -100:R 0:C 100 150:R 0:L 300:WW",
+ [100,0,0, 1,1,1, -1,1,0])
+sketcher2 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
+sketcher3 = geompy.MakeSketcher("Sketcher:F 20 20:TT 50 20:TT 50 50:TT 20 50:WW")
+isPlanarFace = 1
+
+# create a face from the wire
+face1 = geompy.MakeFace(wire, isPlanarFace)
+
+# create faces from two wires
+face2 = geompy.MakeFaceWires([wire, sketcher1],isPlanarFace)
+face3 = geompy.MakeFaces([sketcher2, sketcher3],isPlanarFace)
+
+# add objects in the study
+id_face1 = geompy.addToStudy(face1,"Face1")
+id_face2 = geompy.addToStudy(face2,"Face2")
+id_face3 = geompy.addToStudy(face3,"Face3")
+
+# display the faces
+gg.createAndDisplayGO(id_face1)
+gg.setDisplayMode(id_face1,1)
+gg.setTransparency(id_face1,0.2)
+gg.createAndDisplayGO(id_face2)
+gg.setDisplayMode(id_face2,1)
+gg.setTransparency(id_face2,0.2)
+gg.createAndDisplayGO(id_face3)
+gg.setDisplayMode(id_face3,1)
+gg.setTransparency(id_face3,0.2)
diff --git a/doc/salome/examples/topological_geom_objs_ex04.py b/doc/salome/examples/topological_geom_objs_ex04.py
new file mode 100644
index 000000000..b85e553f2
--- /dev/null
+++ b/doc/salome/examples/topological_geom_objs_ex04.py
@@ -0,0 +1,34 @@
+# Creation of a Shell
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+#create vertices
+p0 = geompy.MakeVertex( 0., 0., 0.)
+pxyz = geompy.MakeVertex( 5., 5., 40.)
+
+# create sketchers
+sketcher1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
+sketcher2 = geompy.MakeSketcher("Sketcher:F 20 20:TT 50 20:TT 50 50:TT 20 50:WW")
+isPlanarFace = 1
+
+# create a face from two wires
+face = geompy.MakeFaces([sketcher1, sketcher2],isPlanarFace)
+
+# create a prism
+prism = geompy.MakePrism(face, p0, pxyz)
+
+# explode the prism into faces
+prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
+
+# create a shell from a set of faces
+shell = geompy.MakeShell([prism_faces[0], prism_faces[2], prism_faces[3],
+ prism_faces[7], prism_faces[9]])
+
+# add objects in the study
+id_shell = geompy.addToStudy(shell,"Shell")
+
+# display the shell
+gg.createAndDisplayGO(id_shell)
+gg.setDisplayMode(id_shell,1)
diff --git a/doc/salome/examples/topological_geom_objs_ex05.py b/doc/salome/examples/topological_geom_objs_ex05.py
new file mode 100644
index 000000000..700236b03
--- /dev/null
+++ b/doc/salome/examples/topological_geom_objs_ex05.py
@@ -0,0 +1,36 @@
+# Creation of a Solid
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+#create vertices
+p0 = geompy.MakeVertex( 0., 0., 0.)
+pz = geompy.MakeVertex( 0., 0., 40.)
+
+# create sketchers
+sketcher = geompy.MakeSketcher("Sketcher:F -50 -50:TT 100 -50:R 0:C 50 70:R 0:L 100:WW")
+
+# create faces from two wires
+face = geompy.MakeFace(sketcher,1)
+
+# create a prism
+prism = geompy.MakePrism(face, p0, pz)
+
+# explode the prism into faces
+prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
+
+# create a shell from a set of faces
+shell = geompy.MakeShell([prism_faces[0], prism_faces[1],
+ prism_faces[3], prism_faces[4],
+ prism_faces[5], prism_faces[2]])
+
+# create a solid, bounded by the given shells
+solid = geompy.MakeSolid([shell])
+
+# add objects in the study
+id_solid = geompy.addToStudy(solid,"Solid")
+
+# display the solid
+gg.createAndDisplayGO(id_solid)
+gg.setDisplayMode(id_solid,1)
diff --git a/doc/salome/examples/topological_geom_objs_ex06.py b/doc/salome/examples/topological_geom_objs_ex06.py
new file mode 100644
index 000000000..071730b52
--- /dev/null
+++ b/doc/salome/examples/topological_geom_objs_ex06.py
@@ -0,0 +1,28 @@
+# Creation of a Compound
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex( -30., -30., 50.)
+p2 = geompy.MakeVertex( -60., -60., 30.)
+p3 = geompy.MakeVertex( -30., -30., 10.)
+
+# create an arc from three points
+arc = geompy.MakeArc(p1, p2, p3)
+ShapeListCompound = []
+i = 0
+while i <= 3 :
+ S = geompy.MakeTranslation(arc, i * 50., 0., 0.)
+ ShapeListCompound.append(S)
+ i = i + 1
+
+# create a compund of the given shapes
+compound = geompy.MakeCompound(ShapeListCompound)
+
+# add object in the study
+id_compound = geompy.addToStudy(compound,"Compound")
+
+# display the compound
+gg.createAndDisplayGO(id_compound)
diff --git a/doc/salome/examples/transformation_operations_ex01.py b/doc/salome/examples/transformation_operations_ex01.py
new file mode 100644
index 000000000..678afa9e2
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex01.py
@@ -0,0 +1,43 @@
+# Translation
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(10, 40, 0)
+p2 = geompy.MakeVertex( 0, 0, 50)
+p3 = geompy.MakeVertex(50, 80, 0)
+v = geompy.MakeVector(p1, p2)
+vt = geompy.MakeVector(p1, p3)
+
+# create a cylinder
+height = 35
+radius1 = 20
+cylinder = geompy.MakeCylinder(p1, v, radius1, height)
+
+# translate the given object along the vector, specified by its end points
+# (all three functions produce the same result)
+translation1 = geompy.MakeTranslationTwoPoints(cylinder, p1, p3)
+translation2 = geompy.MakeTranslation(cylinder, 40, 40, 0)
+translation3 = geompy.MakeTranslationVector(cylinder, vt)
+translation4 = geompy.MakeTranslationVectorDistance(cylinder, vt, 200)
+
+# add objects in the study
+id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
+id_translation1 = geompy.addToStudy(translation1, "Translation1")
+id_translation2 = geompy.addToStudy(translation2, "Translation2")
+id_translation3 = geompy.addToStudy(translation3, "Translation3")
+id_translation4 = geompy.addToStudy(translation4, "Translation4")
+
+# display the results
+gg.createAndDisplayGO(id_cylinder)
+gg.setDisplayMode(id_cylinder,1)
+gg.createAndDisplayGO(id_translation1)
+gg.setDisplayMode(id_translation1,1)
+gg.createAndDisplayGO(id_translation2)
+gg.setDisplayMode(id_translation2,1)
+gg.createAndDisplayGO(id_translation3)
+gg.setDisplayMode(id_translation3,1)
+gg.createAndDisplayGO(id_translation4)
+gg.setDisplayMode(id_translation4,1)
diff --git a/doc/salome/examples/transformation_operations_ex02.py b/doc/salome/examples/transformation_operations_ex02.py
new file mode 100644
index 000000000..7abbb7873
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex02.py
@@ -0,0 +1,44 @@
+# Rotation
+
+import geompy
+import salome
+import math
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(10, 40, 0)
+p2 = geompy.MakeVertex( 0, 0, 50)
+p3 = geompy.MakeVertex(10, 50,-20)
+p4 = geompy.MakeVertex(10, 50, 60)
+v = geompy.MakeVector(p1, p2)
+vr = geompy.MakeVector(p3, p4)
+
+# create a cylinder
+height = 35
+radius1 = 20
+cylinder = geompy.MakeCylinder(p1, v, radius1, height)
+
+# rotate the given object around the given axis by the given angle
+rotation1 = geompy.MakeRotation(cylinder, vr, math.pi)
+rotation2 = geompy.MakeRotationThreePoints(cylinder, p4, p1, p2)
+
+# add objects in the study
+id_vr = geompy.addToStudy(vr, "Rotation 1 axis")
+id_p4 = geompy.addToStudy(p4, "Rotation 2 center")
+id_p1 = geompy.addToStudy(p1, "Rotation 2 point 1")
+id_p2 = geompy.addToStudy(p2, "Rotation 2 point 2")
+id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
+id_rotation1 = geompy.addToStudy(rotation1, "Rotation 1")
+id_rotation2 = geompy.addToStudy(rotation2, "Rotation 2")
+
+# display the results
+gg.createAndDisplayGO(id_vr)
+gg.createAndDisplayGO(id_p4)
+gg.createAndDisplayGO(id_p1)
+gg.createAndDisplayGO(id_p2)
+gg.createAndDisplayGO(id_cylinder)
+gg.setDisplayMode(id_cylinder,1)
+gg.createAndDisplayGO(id_rotation1)
+gg.createAndDisplayGO(id_rotation2)
+gg.setDisplayMode(id_rotation1,1)
+gg.setDisplayMode(id_rotation2,1)
diff --git a/doc/salome/examples/transformation_operations_ex03.py b/doc/salome/examples/transformation_operations_ex03.py
new file mode 100644
index 000000000..3d250fd48
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex03.py
@@ -0,0 +1,43 @@
+# Modify Location
+
+import geompy
+import salome
+import math
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a vertex and a vector
+p1 = geompy.MakeVertex(10, 40, 0)
+p2 = geompy.MakeVertex( 0, 0, 50)
+v = geompy.MakeVector(p1, p2)
+
+# create a cylinder
+height = 35
+radius1 = 20
+cylinder = geompy.MakeCylinder(p1, v, radius1, height)
+circle = geompy.MakeCircle(p2, v, radius1)
+
+# create local coordinate systems
+cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
+cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
+
+# modify the location of the given object
+position = geompy.MakePosition(cylinder, cs1, cs2)
+position2 = geompy.PositionAlongPath(position, circle, 0.75, 1, 1)
+
+# add objects in the study
+id_cs1 = geompy.addToStudy(cs1, "Coordinate system 1")
+id_cs2 = geompy.addToStudy(cs2, "Coordinate system 2")
+id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
+id_circle = geompy.addToStudy(circle, "Circle")
+id_position = geompy.addToStudy(position, "Position")
+id_position2 = geompy.addToStudy(position2, "PositionAlongPath")
+
+# display the results
+gg.createAndDisplayGO(id_cylinder)
+gg.setDisplayMode(id_cylinder,1)
+gg.createAndDisplayGO(id_position)
+gg.setDisplayMode(id_position,1)
+gg.createAndDisplayGO(id_circle)
+gg.setDisplayMode(id_circle,1)
+gg.createAndDisplayGO(id_position2)
+gg.setDisplayMode(id_position2,1)
diff --git a/doc/salome/examples/transformation_operations_ex04.py b/doc/salome/examples/transformation_operations_ex04.py
new file mode 100644
index 000000000..28e8b308a
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex04.py
@@ -0,0 +1,46 @@
+# Mirror Image
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+
+# create an object, symmetrical to another object through the given plane
+p1 = geompy.MakeVertex( 0, 25, 0)
+p2 = geompy.MakeVertex( 5, 25, 0)
+p3 = geompy.MakeVertex( 0,-30, 40)
+plane = geompy.MakePlaneThreePnt(p1, p2, p3, 1000.)
+mirror1 = geompy.MakeMirrorByPlane(box, plane)
+
+# create an object, symmetrical to another object through the given axis
+p4 = geompy.MakeVertex( 210, 210, -20)
+p5 = geompy.MakeVertex( 210, 210, 220)
+axis = geompy.MakeVector(p4, p5)
+mirror2 = geompy.MakeMirrorByAxis(box, axis)
+
+# create an object, symmetrical to another object through the given point
+mirror3 = geompy.MakeMirrorByPoint(box, p4)
+
+# add objects in the study
+id_box = geompy.addToStudy(box, "Box")
+id_plane = geompy.addToStudy(plane, "Plane")
+id_mirror1 = geompy.addToStudy(mirror1, "Mirror plane")
+id_axis = geompy.addToStudy(axis, "Axis")
+id_mirror2 = geompy.addToStudy(mirror2, "Mirror axis")
+id_p4 = geompy.addToStudy(p4, "Point")
+id_mirror3 = geompy.addToStudy(mirror3, "Mirror point")
+
+# display the results
+gg.createAndDisplayGO(id_box)
+gg.setDisplayMode(id_box,1)
+gg.createAndDisplayGO(id_plane)
+gg.createAndDisplayGO(id_mirror1)
+gg.setDisplayMode(id_mirror1,1)
+gg.createAndDisplayGO(id_axis)
+gg.createAndDisplayGO(id_mirror2)
+gg.setDisplayMode(id_mirror2,1)
+gg.createAndDisplayGO(id_p4)
+gg.createAndDisplayGO(id_mirror3)
+gg.setDisplayMode(id_mirror3,1)
diff --git a/doc/salome/examples/transformation_operations_ex05.py b/doc/salome/examples/transformation_operations_ex05.py
new file mode 100644
index 000000000..7b906b969
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex05.py
@@ -0,0 +1,24 @@
+# Scale Transform
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a box and a sphere
+box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+
+# scale the given object by the factor
+p0 = geompy.MakeVertex(100, 100, 100)
+factor = 0.5
+scale = geompy.MakeScaleTransform(box, p0, factor)
+
+# add objects in the study
+id_box = geompy.addToStudy(box, "Box")
+id_scale = geompy.addToStudy(scale, "Scale")
+
+# display the results
+gg.createAndDisplayGO(id_box)
+gg.setDisplayMode(id_box,1)
+gg.setTransparency(id_box,0.5)
+gg.createAndDisplayGO(id_scale)
+gg.setDisplayMode(id_scale,1)
diff --git a/doc/salome/examples/transformation_operations_ex06.py b/doc/salome/examples/transformation_operations_ex06.py
new file mode 100644
index 000000000..f6c2adfd4
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex06.py
@@ -0,0 +1,20 @@
+# Offset Surface
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a box and a sphere
+box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
+
+# create a new object as offset of the given object
+offset = geompy.MakeOffset(box, 70.)
+
+# add objects in the study
+id_box = geompy.addToStudy(box, "Box")
+id_offset = geompy.addToStudy(offset, "Offset")
+
+# display the results
+gg.createAndDisplayGO(id_box)
+gg.setDisplayMode(id_box,1)
+gg.createAndDisplayGO(id_offset)
diff --git a/doc/salome/examples/transformation_operations_ex07.py b/doc/salome/examples/transformation_operations_ex07.py
new file mode 100644
index 000000000..c1efc39e3
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex07.py
@@ -0,0 +1,31 @@
+# Projection
+
+import geompy
+import salome
+
+# create a cylindric face and a curve(edge)
+cylinder = geompy.MakeCylinderRH(100, 300)
+[face_cyl] = geompy.SubShapes(cylinder, [3])
+
+p1 = geompy.MakeVertex(200, 0, 100)
+p2 = geompy.MakeVertex(200, 80, 100)
+p3 = geompy.MakeVertex(200, 80, 180)
+p4 = geompy.MakeVertex(130, 80, 180)
+p5 = geompy.MakeVertex(90, 80, 240)
+
+curve = geompy.MakeInterpol([p1, p2, p3, p4, p5], False, False)
+
+# create a new object as projection of the
+# given curve on the given cylindric face
+projection = geompy.MakeProjection(curve, face_cyl)
+
+# add objects in the study
+geompy.addToStudy(cylinder, "cylinder")
+geompy.addToStudyInFather(cylinder, face_cyl, "face_cyl")
+geompy.addToStudy(p1, "p1")
+geompy.addToStudy(p2, "p2")
+geompy.addToStudy(p3, "p3")
+geompy.addToStudy(p4, "p4")
+geompy.addToStudy(p5, "p5")
+geompy.addToStudy(curve, "curve")
+geompy.addToStudy(projection, "projection")
diff --git a/doc/salome/examples/transformation_operations_ex08.py b/doc/salome/examples/transformation_operations_ex08.py
new file mode 100644
index 000000000..fb103f950
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex08.py
@@ -0,0 +1,48 @@
+# Multi Translation
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create vertices and vectors
+p0 = geompy.MakeVertex( 0., 0., 0.)
+px = geompy.MakeVertex(20., 0., 0.)
+py = geompy.MakeVertex( 0., 20., 0.)
+pz = geompy.MakeVertex( 0., 0., 20.)
+pxy = geompy.MakeVertex( 50., 0., 0.)
+pxyz = geompy.MakeVertex( 50., 50., 50.)
+vz = geompy.MakeVector(p0, pz)
+vxy = geompy.MakeVector(px, py)
+vtr1d = geompy.MakeVector(p0, pxyz)
+vtr2d = geompy.MakeVector(p0, pxy)
+
+# create an arc
+arc = geompy.MakeArc(py, pz, px)
+
+# create a wire
+wire = geompy.MakeWire([vxy, arc])
+
+# create a planar face
+face = geompy.MakeFace(wire, 1)
+
+# create a prism
+prism = geompy.MakePrismVecH(face, vz, 20.0)
+
+# translate the given object along the given vector a given number of times
+tr1d = geompy.MakeMultiTranslation1D(prism, vtr1d, 20, 4)
+
+# consequently apply two specified translations to the object a given number of times
+tr2d = geompy.MakeMultiTranslation2D(prism, vtr1d, 20, 4, vtr2d, 80, 3)
+
+# add objects in the study
+id_prism = geompy.addToStudy(prism,"Prism")
+id_tr1d = geompy.addToStudy(tr1d,"Translation 1D")
+id_tr2d = geompy.addToStudy(tr2d,"Translation 2D")
+
+# display the prism and the results of fillet operation
+gg.createAndDisplayGO(id_prism)
+gg.setDisplayMode(id_prism,1)
+gg.createAndDisplayGO(id_tr1d)
+gg.setDisplayMode(id_tr1d,1)
+gg.createAndDisplayGO(id_tr2d)
+gg.setDisplayMode(id_tr2d,1)
diff --git a/doc/salome/examples/transformation_operations_ex09.py b/doc/salome/examples/transformation_operations_ex09.py
new file mode 100644
index 000000000..665a2acb3
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex09.py
@@ -0,0 +1,64 @@
+# Multi Rotation
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+import math
+
+# create vertices and vectors
+p0 = geompy.MakeVertex( 0., 0., 0.)
+px = geompy.MakeVertex(20., 0., 0.)
+py = geompy.MakeVertex( 0., 20., 0.)
+pz = geompy.MakeVertex( 0., 0., 20.)
+pxyz = geompy.MakeVertex( 50., 50., 10.)
+vz = geompy.MakeVector(p0, pz)
+vxy = geompy.MakeVector(px, py)
+vrot = geompy.MakeVector(p0, pxyz)
+
+# create an arc
+arc = geompy.MakeArc(py, pz, px)
+
+# create a wire
+wire = geompy.MakeWire([vxy, arc])
+
+# create a planar face
+face = geompy.MakeFace(wire, 1)
+
+# create a prism
+prism = geompy.MakePrismVecH(face, vz, 20.0)
+
+# 1. Rotate the prism around the axis vrot 4 times
+
+# rotation angle = 2 * PI / 4
+rot1da = geompy.MultiRotate1DNbTimes(prism, vrot, 4)
+
+# by the given angle of 30 degrees
+rot1db = geompy.MultiRotate1DByStep(prism, vrot, math.pi/6., 4)
+
+# 2. Rotate the prism around the axis vrot 4 times
+# and translate the result of each rotation 5 times on distance 50
+
+# rotation angle = 2 * PI / 4
+rot2da = geompy.MultiRotate2DNbTimes(prism, vrot, 4, 50, 5)
+
+# by the given angle of 60 degrees
+rot2db = geompy.MultiRotate2DByStep(prism, vrot, math.pi/3., 4, 50, 5)
+
+# add objects in the study
+id_prism = geompy.addToStudy(prism,"Prism")
+id_rot1da = geompy.addToStudy(rot1da,"Rotation 1D Nb.Times")
+id_rot1db = geompy.addToStudy(rot1db,"Rotation 1D By Step")
+id_rot2da = geompy.addToStudy(rot2da,"Rotation 2D Nb.Times")
+id_rot2db = geompy.addToStudy(rot2db,"Rotation 2D By Step")
+
+# display the prism and the results of fillet operation
+gg.createAndDisplayGO(id_prism)
+gg.setDisplayMode(id_prism,1)
+gg.createAndDisplayGO(id_rot1da)
+gg.setDisplayMode(id_rot1da,1)
+gg.createAndDisplayGO(id_rot1db)
+gg.setDisplayMode(id_rot1db,1)
+gg.createAndDisplayGO(id_rot2da)
+gg.setDisplayMode(id_rot2da,1)
+gg.createAndDisplayGO(id_rot2db)
+gg.setDisplayMode(id_rot2db,1)
diff --git a/doc/salome/examples/transformation_operations_ex10.py b/doc/salome/examples/transformation_operations_ex10.py
new file mode 100644
index 000000000..cd2527331
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex10.py
@@ -0,0 +1,17 @@
+# Fillet 2D
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create a face in OXY plane
+face = geompy.MakeFaceHW(100, 100, 1)
+fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
+
+# add objects in the study
+id_face = geompy.addToStudy(face,"Face_1")
+id_fillet2d = geompy.addToStudy(fillet2d,"Fillet 2D_1")
+
+# display disks
+gg.createAndDisplayGO(id_face)
+gg.createAndDisplayGO(id_fillet2d)
diff --git a/doc/salome/examples/transformation_operations_ex11.py b/doc/salome/examples/transformation_operations_ex11.py
new file mode 100644
index 000000000..f3b4bd095
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex11.py
@@ -0,0 +1,19 @@
+# Fillet 1D
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create box
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+# take box edges to create custom complex wire
+[Edge_1,Edge_2,Edge_3,Edge_4,Edge_5,Edge_6,Edge_7,Edge_8,Edge_9,Edge_10,Edge_11,Edge_12] = geompy.SubShapeAllSortedCentres(Box_1, geompy.ShapeType["EDGE"])
+# create wire
+Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
+# make fillet at given wire vertices with giver radius
+Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
+
+
+# display disks
+gg.createAndDisplayGO(Wire_1)
+gg.createAndDisplayGO(Fillet_1D_1)
diff --git a/doc/salome/examples/transformation_operations_ex12.py b/doc/salome/examples/transformation_operations_ex12.py
new file mode 100644
index 000000000..1f0f31c97
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex12.py
@@ -0,0 +1,53 @@
+# Fillet
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+radius = 10.
+ShapeTypeEdge = geompy.ShapeType["EDGE"]
+
+# create vertices and vectors
+p0 = geompy.MakeVertex( 0., 0., 0.)
+px = geompy.MakeVertex(100., 0., 0.)
+py = geompy.MakeVertex( 0., 100., 0.)
+pz = geompy.MakeVertex( 0., 0., 100.)
+vz = geompy.MakeVector(p0, pz)
+vxy = geompy.MakeVector(px, py)
+
+# create an arc
+arc = geompy.MakeArc(py, pz, px)
+
+# create a wire
+wire = geompy.MakeWire([vxy, arc])
+
+# create a planar face
+face = geompy.MakeFace(wire, 1)
+
+# create a prism
+prism = geompy.MakePrismVecH(face, vz, 100.0)
+
+# get the list of IDs (IDList) for the fillet
+prism_edges = geompy.SubShapeAllSortedCentres(prism, ShapeTypeEdge)
+IDlist_e = []
+IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
+IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
+IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
+
+# make a fillet on the specified edges of the given shape
+fillet = geompy.MakeFillet(prism, radius, ShapeTypeEdge, IDlist_e)
+
+# make a fillet on all edges of the given shape
+filletall = geompy.MakeFilletAll(prism, radius)
+
+# add objects in the study
+id_prism = geompy.addToStudy(prism,"Prism")
+id_fillet = geompy.addToStudy(fillet,"Fillet")
+id_filletall = geompy.addToStudy(filletall,"Fillet all")
+
+# display the prism and the results of fillet operation
+gg.createAndDisplayGO(id_prism)
+gg.setDisplayMode(id_prism,1)
+gg.createAndDisplayGO(id_fillet)
+gg.setDisplayMode(id_fillet,1)
+gg.createAndDisplayGO(id_filletall)
+gg.setDisplayMode(id_filletall,1)
diff --git a/doc/salome/examples/transformation_operations_ex13.py b/doc/salome/examples/transformation_operations_ex13.py
new file mode 100644
index 000000000..ecc896e2b
--- /dev/null
+++ b/doc/salome/examples/transformation_operations_ex13.py
@@ -0,0 +1,63 @@
+# Chamfer
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+d1 = 10.
+d2 = 10.
+ShapeTypeFace = geompy.ShapeType["FACE"]
+
+# create vertices and vectors
+p0 = geompy.MakeVertex( 0., 0., 0.)
+px = geompy.MakeVertex(100., 0., 0.)
+py = geompy.MakeVertex( 0., 100., 0.)
+pz = geompy.MakeVertex( 0., 0., 100.)
+vz = geompy.MakeVector(p0, pz)
+vxy = geompy.MakeVector(px, py)
+
+# create an arc
+arc = geompy.MakeArc(py, pz, px)
+
+# create a wire
+wire = geompy.MakeWire([vxy, arc])
+
+# create a planar face
+face = geompy.MakeFace(wire, 1)
+
+# create a prism
+prism = geompy.MakePrismVecH(face, vz, 100.0)
+
+# get the list of IDs (IDList) for the chamfer
+prism_faces = geompy.SubShapeAllSortedCentres(prism, ShapeTypeFace)
+f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
+f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
+IDlist_f = [f_ind_1, f_ind_2]
+
+# perform a chamfer on the edges common to the specified faces
+chamfer_e = geompy.MakeChamferEdge(prism, d1, d2, f_ind_1, f_ind_2)
+
+# perform a chamfer on all edges of the specified faces
+chamfer_f = geompy.MakeChamferFaces(prism, d1, d2, IDlist_f)
+chamfer_f1 = geompy.MakeChamfer(prism, d1, d2, ShapeTypeFace, IDlist_f)
+
+# perform a symmetric chamfer on all edges of the given shape
+chamfer_all = geompy.MakeChamferAll(prism, d1)
+
+# add objects in the study
+id_prism = geompy.addToStudy(prism,"Prism")
+id_chamfer_e = geompy.addToStudy(chamfer_e,"Chamfer edge")
+id_chamfer_f = geompy.addToStudy(chamfer_f,"Chamfer faces")
+id_chamfer_f1 = geompy.addToStudy(chamfer_f1,"Chamfer faces 1")
+id_chamfer_all = geompy.addToStudy(chamfer_all,"Chamfer all")
+
+# display the prism and the results of chamfer operation
+gg.createAndDisplayGO(id_prism)
+gg.setDisplayMode(id_prism,1)
+gg.createAndDisplayGO(id_chamfer_e)
+gg.setDisplayMode(id_chamfer_e,1)
+gg.createAndDisplayGO(id_chamfer_f)
+gg.setDisplayMode(id_chamfer_f,1)
+gg.createAndDisplayGO(id_chamfer_f1)
+gg.setDisplayMode(id_chamfer_f1,1)
+gg.createAndDisplayGO(id_chamfer_all)
+gg.setDisplayMode(id_chamfer_all,1)
diff --git a/doc/salome/examples/viewing_geom_objs_ex01.py b/doc/salome/examples/viewing_geom_objs_ex01.py
new file mode 100644
index 000000000..473c7f15a
--- /dev/null
+++ b/doc/salome/examples/viewing_geom_objs_ex01.py
@@ -0,0 +1,17 @@
+# Changing Display Mode
+
+import salome
+import geompy
+box = geompy.MakeBox(0,0,0, 50,50,50)
+box2 = geompy.MakeBox(-50,-50,-50, 0,0,0)
+
+sphere = geompy.MakeSphere(50,50,50, 30)
+fuse = geompy.MakeBoolean(box,sphere,3)
+fuse_id = geompy.addToStudy(fuse,"Fuse")
+box_id = geompy.addToStudy(box2, "Box")
+
+gg = salome.ImportComponentGUI("GEOM")
+gg.createAndDisplayGO(fuse_id)
+gg.setDisplayMode(fuse_id,1)
+gg.createAndDisplayGO(box_id)
+gg.setVectorsMode(box_id, 1)
diff --git a/doc/salome/examples/viewing_geom_objs_ex02.py b/doc/salome/examples/viewing_geom_objs_ex02.py
new file mode 100644
index 000000000..fd8243d2f
--- /dev/null
+++ b/doc/salome/examples/viewing_geom_objs_ex02.py
@@ -0,0 +1,14 @@
+# Changing Color
+
+import salome
+import geompy
+box = geompy.MakeBox(0,0,0, 50,50,50)
+
+sphere = geompy.MakeSphere(50,50,50, 30)
+fuse = geompy.MakeBoolean(box,sphere,3)
+fuse_id = geompy.addToStudy(fuse,"Fuse")
+
+gg = salome.ImportComponentGUI("GEOM")
+gg.createAndDisplayGO(fuse_id)
+gg.setDisplayMode(fuse_id,1)
+gg.setColor(fuse_id,218,165,31)
diff --git a/doc/salome/examples/viewing_geom_objs_ex03.py b/doc/salome/examples/viewing_geom_objs_ex03.py
new file mode 100644
index 000000000..381f0e9ae
--- /dev/null
+++ b/doc/salome/examples/viewing_geom_objs_ex03.py
@@ -0,0 +1,16 @@
+# Changing Transparency
+
+import salome
+import geompy
+
+box = geompy.MakeBox(0,0,0, 50,50,50)
+sphere = geompy.MakeSphere(50,50,50, 30)
+
+fuse = geompy.MakeBoolean(box,sphere,3)
+fuse_id = geompy.addToStudy(fuse,"Fuse")
+
+gg = salome.ImportComponentGUI("GEOM")
+gg.createAndDisplayGO(fuse_id)
+gg.setDisplayMode(fuse_id,1)
+gg.setColor(fuse_id,218,165,31)
+gg.setTransparency(fuse_id,0.5)
diff --git a/doc/salome/examples/viewing_geom_objs_ex04.py b/doc/salome/examples/viewing_geom_objs_ex04.py
new file mode 100644
index 000000000..cf521f407
--- /dev/null
+++ b/doc/salome/examples/viewing_geom_objs_ex04.py
@@ -0,0 +1,14 @@
+# Set Point Marker
+
+import salome
+import geompy
+
+texture = geompy.LoadTexture("/users/user/mytexture.dat")
+
+v1 = geompy.MakeVertex(0, 0, 0)
+v2 = geompy.MakeVertex(100, 0, 0)
+v3 = geompy.MakeVertex(0, 100, 0)
+
+v1.SetMarkerStd(GEOM.MT_O_PLUS, GEOM.MS_25)
+v2.SetMarkerStd(GEOM.MT_BALL, GEOM.MS_40)
+v3.SetMarkerTexture(texture)
diff --git a/doc/salome/examples/whatis.py b/doc/salome/examples/whatis.py
new file mode 100644
index 000000000..42e7e4e4d
--- /dev/null
+++ b/doc/salome/examples/whatis.py
@@ -0,0 +1,9 @@
+# What Is
+
+import geompy
+
+# create a box
+box = geompy.MakeBoxDXDYDZ(100,30,100)
+Descr = geompy.WhatIs(box)
+print "\nBox 100x30x100 description:"
+print Descr
diff --git a/doc/salome/examples/working_with_groups_ex01.py b/doc/salome/examples/working_with_groups_ex01.py
new file mode 100644
index 000000000..821862f4a
--- /dev/null
+++ b/doc/salome/examples/working_with_groups_ex01.py
@@ -0,0 +1,37 @@
+# Creation of a group
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create two vertices
+p0 = geompy.MakeVertex(0. , 0. , 0. )
+p200 = geompy.MakeVertex(200., 200., 200.)
+
+# create a box from two points
+Box = geompy.MakeBoxTwoPnt(p0, p200)
+
+# create a group from the faces of the box
+group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
+
+# add objects to the group
+SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
+for i in [0, 3, 5] :
+ FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
+ geompy.AddObject(group, FaceID)
+
+# add all selected shapes from the list to the group
+# (the program doesn't raise error, if some shapes are already included)
+geompy.UnionList(group, [SubFaceList[0], SubFaceList[2], SubFaceList[5]])
+
+# remove an object from the group
+geompy.RemoveObject(group, FaceID)
+
+# remove all selected shapes from the group
+# (the program doesn't raise error, if some shapes are not included)
+geompy.DifferenceList(group, [SubFaceList[2], SubFaceList[3], SubFaceList[4]])
+id_group1 = geompy.addToStudy(group, "Group1")
+
+# display the contents of the group
+gg.createAndDisplayGO(id_group1)
+salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/working_with_groups_ex02.py b/doc/salome/examples/working_with_groups_ex02.py
new file mode 100644
index 000000000..4c415babe
--- /dev/null
+++ b/doc/salome/examples/working_with_groups_ex02.py
@@ -0,0 +1,26 @@
+# Adding an object to the group
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create two vertices
+p0 = geompy.MakeVertex(0. , 0. , 0. )
+p200 = geompy.MakeVertex(200., 200., 200.)
+
+# create a box from two points
+Box = geompy.MakeBoxTwoPnt(p0, p200)
+
+# create a group from the faces of the box
+group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
+
+# add objects to the group
+SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
+for i in [0, 3, 5] :
+ FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
+ geompy.AddObject(group, FaceID)
+id_group1 = geompy.addToStudy(group, "Group1")
+
+# display the contents of the group
+gg.createAndDisplayGO(id_group1)
+salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/working_with_groups_ex03.py b/doc/salome/examples/working_with_groups_ex03.py
new file mode 100644
index 000000000..2c8a3d5f3
--- /dev/null
+++ b/doc/salome/examples/working_with_groups_ex03.py
@@ -0,0 +1,33 @@
+# Removing an object from the group
+
+import geompy
+import salome
+gg = salome.ImportComponentGUI("GEOM")
+
+# create two vertices
+p0 = geompy.MakeVertex(0. , 0. , 0. )
+p200 = geompy.MakeVertex(200., 200., 200.)
+
+# create a box from two points
+Box = geompy.MakeBoxTwoPnt(p0, p200)
+
+# create a group from the faces of the box
+group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
+
+# add objects to the group
+SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
+for i in [0, 3, 5] :
+ FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
+ geompy.AddObject(group, FaceID)
+
+# add all selected shapes from the list to the group
+# (the program doesn't raise errors, if some shapes are already included)
+geompy.UnionList(group, [SubFaceList[0], SubFaceList[2], SubFaceList[5]])
+
+# remove an object from the group
+geompy.RemoveObject(group, FaceID)
+id_group1 = geompy.addToStudy(group, "Group1")
+
+# display the contents of the group
+gg.createAndDisplayGO(id_group1)
+salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/working_with_groups_ex04.py b/doc/salome/examples/working_with_groups_ex04.py
new file mode 100644
index 000000000..945ae61fc
--- /dev/null
+++ b/doc/salome/examples/working_with_groups_ex04.py
@@ -0,0 +1,29 @@
+# Union Groups
+
+import geompy
+import salome
+
+# create a box and some groups of faces on it
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+Group_1 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_1, [13, 23])
+Group_2 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_2, [3, 27])
+Group_3 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_3, [33, 23])
+Group_4 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_4, [31, 27])
+
+# union groups
+Group_U_1_2 = geompy.UnionGroups(Group_1, Group_2)
+Group_UL_3_4 = geompy.UnionListOfGroups([Group_3, Group_4])
+
+# publish shapes
+geompy.addToStudy(Box_1, 'Box_1')
+geompy.addToStudyInFather(Box_1, Group_1, 'Group_1')
+geompy.addToStudyInFather(Box_1, Group_2, 'Group_2')
+geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
+geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
+geompy.addToStudyInFather(Box_1, Group_U_1_2, 'Group_U_1_2')
+geompy.addToStudyInFather(Box_1, Group_UL_3_4, 'Group_UL_3_4')
+salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/working_with_groups_ex05.py b/doc/salome/examples/working_with_groups_ex05.py
new file mode 100644
index 000000000..422c67274
--- /dev/null
+++ b/doc/salome/examples/working_with_groups_ex05.py
@@ -0,0 +1,29 @@
+# Intersect Groups
+
+import geompy
+import salome
+
+# create a box and some groups of faces on it
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+Group_1 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_1, [13, 23])
+Group_2 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_2, [3, 27])
+Group_3 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_3, [33, 23])
+Group_4 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_4, [31, 27])
+
+# intersect groups
+Group_I_1_3 = geompy.IntersectGroups(Group_1, Group_3)
+Group_IL_1_3 = geompy.IntersectListOfGroups([Group_1, Group_3])
+
+# publish shapes
+geompy.addToStudy(Box_1, 'Box_1')
+geompy.addToStudyInFather(Box_1, Group_1, 'Group_1')
+geompy.addToStudyInFather(Box_1, Group_2, 'Group_2')
+geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
+geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
+geompy.addToStudyInFather(Box_1, Group_I_1_3, 'Group_I_1_3')
+geompy.addToStudyInFather(Box_1, Group_IL_1_3, 'Group_IL_1_3')
+salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/examples/working_with_groups_ex06.py b/doc/salome/examples/working_with_groups_ex06.py
new file mode 100644
index 000000000..65c4fe21e
--- /dev/null
+++ b/doc/salome/examples/working_with_groups_ex06.py
@@ -0,0 +1,29 @@
+# Cut Groups
+
+import geompy
+import salome
+
+# create a box and some groups of faces on it
+Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
+Group_1 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_1, [13, 23])
+Group_2 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_2, [3, 27])
+Group_3 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_3, [33, 23])
+Group_4 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
+geompy.UnionIDs(Group_4, [31, 27])
+
+# cut groups
+Group_C_2_4 = geompy.CutGroups(Group_2, Group_4)
+Group_CL_2_4 = geompy.CutListOfGroups([Group_2], [Group_4])
+
+# publish shapes
+geompy.addToStudy(Box_1, 'Box_1')
+geompy.addToStudyInFather(Box_1, Group_1, 'Group_1')
+geompy.addToStudyInFather(Box_1, Group_2, 'Group_2')
+geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
+geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
+geompy.addToStudyInFather(Box_1, Group_C_2_4, 'Group_C_2_4')
+geompy.addToStudyInFather(Box_1, Group_CL_2_4, 'Group_CL_2_4')
+salome.sg.updateObjBrowser(1)
diff --git a/doc/salome/gui/GEOM/doxyfile.in b/doc/salome/gui/GEOM/doxyfile.in
index 06d9bfd86..267b71c24 100755
--- a/doc/salome/gui/GEOM/doxyfile.in
+++ b/doc/salome/gui/GEOM/doxyfile.in
@@ -43,7 +43,7 @@ FILE_PATTERNS = *.doc
EXCLUDE_PATTERNS = creating_adv_obj.doc
EXCLUDE =
IMAGE_PATH = @srcdir@/images
-EXAMPLE_PATH = @top_srcdir@/src/GEOM_SWIG
+EXAMPLE_PATH = @top_srcdir@/src/GEOM_SWIG @top_srcdir@/doc/salome/examples
#---------------------------------------------------------------------------
#HTML related options
diff --git a/doc/salome/gui/GEOM/images/curve4.png b/doc/salome/gui/GEOM/images/curve4.png
index cbb60924d..2fe0db0ae 100644
Binary files a/doc/salome/gui/GEOM/images/curve4.png and b/doc/salome/gui/GEOM/images/curve4.png differ
diff --git a/doc/salome/gui/GEOM/images/distance.png b/doc/salome/gui/GEOM/images/distance.png
index 594bef905..31fa829fd 100755
Binary files a/doc/salome/gui/GEOM/images/distance.png and b/doc/salome/gui/GEOM/images/distance.png differ
diff --git a/doc/salome/gui/GEOM/images/editgroup.png b/doc/salome/gui/GEOM/images/editgroup.png
index 935fabeac..d0a3c314b 100755
Binary files a/doc/salome/gui/GEOM/images/editgroup.png and b/doc/salome/gui/GEOM/images/editgroup.png differ
diff --git a/doc/salome/gui/GEOM/images/hide_predef_material.PNG b/doc/salome/gui/GEOM/images/hide_predef_material.PNG
new file mode 100755
index 000000000..a9516fd00
Binary files /dev/null and b/doc/salome/gui/GEOM/images/hide_predef_material.PNG differ
diff --git a/doc/salome/gui/GEOM/images/material.png b/doc/salome/gui/GEOM/images/material.png
index 085921468..bcdd1db22 100644
Binary files a/doc/salome/gui/GEOM/images/material.png and b/doc/salome/gui/GEOM/images/material.png differ
diff --git a/doc/salome/gui/GEOM/images/materials_library.png b/doc/salome/gui/GEOM/images/materials_library.png
new file mode 100755
index 000000000..9ff8c390e
Binary files /dev/null and b/doc/salome/gui/GEOM/images/materials_library.png differ
diff --git a/doc/salome/gui/GEOM/images/measures5.png b/doc/salome/gui/GEOM/images/measures5.png
index 13af1afdf..d2180be63 100755
Binary files a/doc/salome/gui/GEOM/images/measures5.png and b/doc/salome/gui/GEOM/images/measures5.png differ
diff --git a/doc/salome/gui/GEOM/images/mtrans1.png b/doc/salome/gui/GEOM/images/mtrans1.png
index f5752e4b1..2e9685574 100755
Binary files a/doc/salome/gui/GEOM/images/mtrans1.png and b/doc/salome/gui/GEOM/images/mtrans1.png differ
diff --git a/doc/salome/gui/GEOM/images/mtrans2.png b/doc/salome/gui/GEOM/images/mtrans2.png
index c61b1c3c1..8f051425b 100755
Binary files a/doc/salome/gui/GEOM/images/mtrans2.png and b/doc/salome/gui/GEOM/images/mtrans2.png differ
diff --git a/doc/salome/gui/GEOM/images/neo-mrot1.png b/doc/salome/gui/GEOM/images/neo-mrot1.png
index e94b5ab73..269fccc70 100755
Binary files a/doc/salome/gui/GEOM/images/neo-mrot1.png and b/doc/salome/gui/GEOM/images/neo-mrot1.png differ
diff --git a/doc/salome/gui/GEOM/images/neo-mrot2.png b/doc/salome/gui/GEOM/images/neo-mrot2.png
index f3f3c347e..b17098a75 100755
Binary files a/doc/salome/gui/GEOM/images/neo-mrot2.png and b/doc/salome/gui/GEOM/images/neo-mrot2.png differ
diff --git a/doc/salome/gui/GEOM/images/pref15.png b/doc/salome/gui/GEOM/images/pref15.png
index 3d9e5f628..f58d73091 100755
Binary files a/doc/salome/gui/GEOM/images/pref15.png and b/doc/salome/gui/GEOM/images/pref15.png differ
diff --git a/doc/salome/gui/GEOM/images/repair9.png b/doc/salome/gui/GEOM/images/repair9.png
index 72b7d32af..04c3035f2 100755
Binary files a/doc/salome/gui/GEOM/images/repair9.png and b/doc/salome/gui/GEOM/images/repair9.png differ
diff --git a/doc/salome/gui/GEOM/images/show_predef_material.PNG b/doc/salome/gui/GEOM/images/show_predef_material.PNG
new file mode 100755
index 000000000..922abce5a
Binary files /dev/null and b/doc/salome/gui/GEOM/images/show_predef_material.PNG differ
diff --git a/doc/salome/gui/GEOM/input/boudaries.doc b/doc/salome/gui/GEOM/input/boudaries.doc
index 65acdc06a..de1e84a73 100644
--- a/doc/salome/gui/GEOM/input/boudaries.doc
+++ b/doc/salome/gui/GEOM/input/boudaries.doc
@@ -2,8 +2,10 @@
\page boundaries_page Check Free Boundaries
-Detects and highlights wires and edges that are not shared between
+Detects and highlights wires and edges that are not shared between
two faces and are considered a shape's boundary.
+
Creates corresponding objects and publishes them into the study on
+"Apply" or "Apply and Close".
TUI Command: (NoError, ClosedWires, OpenWires) =
geompy.GetFreeBoundary(Shape), where \em Shape is a shape to be
@@ -15,4 +17,4 @@ See also a \ref tui_free_boundaries_page "TUI example".
\image html repair9.png
-*/
\ No newline at end of file
+*/
diff --git a/doc/salome/gui/GEOM/input/bounding_box.doc b/doc/salome/gui/GEOM/input/bounding_box.doc
index eeb16c4ff..75b7c7eaf 100644
--- a/doc/salome/gui/GEOM/input/bounding_box.doc
+++ b/doc/salome/gui/GEOM/input/bounding_box.doc
@@ -2,8 +2,10 @@
\page bounding_box_page Bounding Box
-Returns the dimensions of the bounding box for the selected
-geometrical object.
+Shows the dimensions of the bounding box for the selected
+geometrical object. Creates corresponding shape (box) on "Apply".
+
+\image html measures5.png
\note To take into account any possible shape distortion
that affects the resulting bounding box, the algorithm enlarges
@@ -12,14 +14,10 @@ faces (by iterating through all faces of a shape).
This functionallity is implemented in such a way to have
a satisfactory performance.
-Result: Displays the bounding box dimensions of a
-geometrical object in form of a Python Tuple (Xmin, Xmax, Ymin,
-Ymax, Zmin, Zmax).
-\n TUI Command: geompy.BoundingBox(Shape), where \em Shape
+\n TUI Commands: [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax] = geompy.BoundingBox(Shape),
+BBox = geompy.MakeBoundingBox(Shape), where \em Shape
is the shape for which a bounding box is computed.
See also a \ref tui_bounding_box_page "TUI example".
-\image html measures5.png
-
*/
diff --git a/doc/salome/gui/GEOM/input/creating_curve.doc b/doc/salome/gui/GEOM/input/creating_curve.doc
index 9c3371826..29cbbc8d1 100644
--- a/doc/salome/gui/GEOM/input/creating_curve.doc
+++ b/doc/salome/gui/GEOM/input/creating_curve.doc
@@ -70,10 +70,15 @@ closed edge.
If Reorder vertices taking into account distances is
checked, the interpolation algorithm does not follow the order of
vertices but searches for the closest vertex.
+Tangents are two vectors, defining direction of curve at
+its ends. Both or none vectors must be set. This option available only
+if two above check boxes are not checked.
+
\n TUI Command:
-geompy.MakeInterpol(ListOfShapes,isClosed,doReordering)
+
geompy.MakeInterpol(ListOfShapes,isClosed,doReordering)
+
geompy.MakeInterpolWithTangents(ListOfShapes,Vector1,Vector2)
Analytical Definition
diff --git a/doc/salome/gui/GEOM/input/geometry_preferences.doc b/doc/salome/gui/GEOM/input/geometry_preferences.doc
index 00301daf9..d0c94768d 100644
--- a/doc/salome/gui/GEOM/input/geometry_preferences.doc
+++ b/doc/salome/gui/GEOM/input/geometry_preferences.doc
@@ -36,8 +36,10 @@ of values set in spin boxes.
Deflection coefficient - allows to define default deflection
coefficient for lines and surfaces. A smaller coefficient provides
better quality of a shape in the viewer.
-Default front material - allows to define default front face material.
-Default back material - allows to define default back face material.
+Show predefined materials in popup menu - allows to customize the displaying of popup menu with list of
+predefined materials.
+Default material - allows to define default material.
+Subshapes color for editing a group - allows to select default color for subshapes in a group.
Edges width - allows to define default width of the edges.
Isolines width - allows to define default width of the isolines.
Preview edges width - allows to define width of the edges for preview.
diff --git a/doc/salome/gui/GEOM/input/geompy.doc b/doc/salome/gui/GEOM/input/geompy.doc
index 1ab9a5b9d..f34f87fe1 100644
--- a/doc/salome/gui/GEOM/input/geompy.doc
+++ b/doc/salome/gui/GEOM/input/geompy.doc
@@ -40,6 +40,7 @@ provided by Geometry module.
\ref tui_test_others_page
\ref tui_test_spanner_page
\ref tui_test_all_page
+ \ref tui_test_measures_page
diff --git a/doc/salome/gui/GEOM/input/material.doc b/doc/salome/gui/GEOM/input/material.doc
index 4960e06f3..09791f2f7 100644
--- a/doc/salome/gui/GEOM/input/material.doc
+++ b/doc/salome/gui/GEOM/input/material.doc
@@ -12,7 +12,21 @@ be changed in the future versions of SALOME Geometry module.
\n You can change the material properties of the selected shape(s) in
the dedicated dialog box. This dialog box can be invoked from the
-context popup menu using "Material properties" item:
+context popup menu.
+
+\n Appearance of popup menu can be customizable via
+"Show predefined materials in popup menu" option from preferences.
+If this option is switched off, only "Material properties" item will
+be shown in popup menu. If this option is on (by default), "Material
+properties" item in popup menu will open submenu listing predefined
+materials and additionally "Custom..." item.
+
+\n "Show predefined materials in popup menu" option is switched off:
+\image html hide_predef_material.PNG
+\n "Show predefined materials in popup menu" option is switched on
+\image html show_predef_material.PNG
+
+\n"Custom..." or "Material properties" item will open dialog box:
\image html material.png
@@ -22,6 +36,12 @@ shape presentation;
- assign one of predefined global materials to the shape;
- create a custom material model and apply it to the shape.
+\n You also can work with custom materials in the "Materials library" dialog box.
+This dialog box can be invoked from the "Tools" main menu using
+"Materials library" item:
+
+\image html materials_library.png
+
\note This functionality is available in both OCC and VTK 3D
viewers. However, note that due to the differencies between underlying API
of OCC and VTK libraries the behaviour of the functionality related to
@@ -80,8 +100,7 @@ scattered light tends to be red, although the light directly striking
objects is white. OpenGL allows you to set the red, green, and blue
values for each component of light independently.
-\section material Material properties dialog box
-
+\section material_lib Materials library dialog box
The dialog box consists of two parts:
- The list box at the left shows all available material models, both
predefined by the application and custom one specified by the user.
@@ -98,22 +117,8 @@ it simulates light originating from an object.
- \b Shininess
- \b Type of material model: \em physical or \em artificial.
-If the material model is specified as a \em physical one (like \em Gold,
-for instance), this means that the color of the shape (more precisely
-its \em ambient color) can not be modified. If you assign a physical
-material model to the shape, the "Color" menu item will not be
-available in the popup menu.
-
-If the model is non-physical (\em artificial), the color can be changed
-to any appopriate one, only other attributes will be constant. In the
-dialog box you will be able to modify the color of the shape via the
-"Color" button. "Ambient color" button becomes disabled to signalize
-that this attribute of the model is ignored. Also, it will be possible
-to modify the color of the shape via the
-\ref color_page "corresponding popup menu command".
-
All available predefined material models are shown in the list box of
-the Color and Material Properties dialog:
+the Materials dialog dialog:
- [Current] item in the list corresponds to the material model
currently assigned to the selected shape(s). This model can be
freely modified by the user.
@@ -130,6 +135,26 @@ is shown if the user presses right mouse button in the materials list
box. An additional "Rename material" command, available in popup menu,
can be used to change the name of material model.
+\section material Material properties dialog box
+
+The dialog box looks like "Materials library" dialog box but has
+some additions in the form of selection objects mechanizm and "Color"
+property.
+
+If the material model is specified as a \em physical one (like \em Gold,
+for instance), this means that the color of the shape (more precisely
+its \em ambient color) can not be modified. If you assign a physical
+material model to the shape, the "Color" menu item will not be
+available in the popup menu.
+
+If the model is non-physical (\em artificial), the color can be changed
+to any appopriate one, only other attributes will be constant. In the
+dialog box you will be able to modify the color of the shape via the
+"Color" button. "Ambient color" button becomes disabled to signalize
+that this attribute of the model is ignored. Also, it will be possible
+to modify the color of the shape via the
+\ref color_page "corresponding popup menu command".
+
Examples:
\image html material_OCC.png
diff --git a/doc/salome/gui/GEOM/input/min_distance.doc b/doc/salome/gui/GEOM/input/min_distance.doc
index 690a17f3a..9653e2210 100644
--- a/doc/salome/gui/GEOM/input/min_distance.doc
+++ b/doc/salome/gui/GEOM/input/min_distance.doc
@@ -3,14 +3,33 @@
\page min_distance_page Min. Distance
Returns the minimum distance between two geometrical objects and
-the coordinates of the vector of distance and shows the vector in the viewer.
+the coordinates of the vector of distance and shows the distance in
+the viewer.
-TUI Command: geompy.MinDistance(Shape1, Shape2),
-where \em Shape1 and \em Shape2 are shapes between which the minimal
+\note The minimal distance searching task can have one or more
+solutions, and also it can have an infinite set of solutions. All
+found solutions are listed in dedicated combobox. When the user
+selects any one of found solutions, presentation is displayed in the
+OCC viewer and fields "Length", "DX", "DY" and "DZ" are filled with
+corresponding values. If there are no solutions found, text "No
+solution found" will be shown instead of solutions list; this could
+mean what the task has an infinite number of solutions.
+
+\n \note Currently used OCCT functionality finds finite number of
+solutions even in cases, where an infinite set of solutions exists.
+
+\n On \b Apply or Apply and Close it creates a set of closest
+points of the shapes, corresponding to all found solutions.
+
+TUI Commands:
+\naDist = geompy.MinDistance(Shape1, Shape2),
+\n[aDist, DX, DY, DZ] = geompy.MinDistanceComponents(Shape1, Shape2),
+\n[nbSols, (x11, y11, z11, x21, y21, z21, ...)] = geompy.ClosestPoints(Shape1, Shape2),
+\n where \em Shape1 and \em Shape2 are shapes between which the minimal
distance is computed.
See also a \ref tui_min_distance_page "TUI example".
\image html distance.png
-*/
\ No newline at end of file
+*/
diff --git a/doc/salome/gui/GEOM/input/multi_rotation_operation.doc b/doc/salome/gui/GEOM/input/multi_rotation_operation.doc
index cdc6234a1..0238f6334 100644
--- a/doc/salome/gui/GEOM/input/multi_rotation_operation.doc
+++ b/doc/salome/gui/GEOM/input/multi_rotation_operation.doc
@@ -5,24 +5,28 @@
\n To produce a Multi Rotation in the Main Menu select
Operations - > Transformation - > Multi Rotation
-\n This operation creates several geometrical objects rotated in one
-or two dimensions basing on the initial geometrical object.
-\n The \b Result will be one or several \b GEOM_Objects (compound).
+\n This operation creates a compound of several shapes rotated in one
+or two dimensions basing on the initial shape.
+\n The \b Result will be one \b GEOM_Object (compound).
\n To produce a Simple Multi Rotation (in one dimension) you
-need to define a \b Shape to be rotated, an \b Axis of rotation and a
-Number of Times the shape must be rotated. Rotation Angle will
-be 2 * \a PI / \a NbTimes. Number of shapes in the resulting compound will be equal
-to \a NbTimes (if \a NbTimes = 1, the result will contain only the initial
-non-transformed shape).
-\n TUI Command: geompy.MultiRotate1D(Shape, Axis, NbTimes)
-\n Arguments: Name + 1 shape + 1 vector for direction + 1 value
-(repetition).
+need to define a \b Shape to be rotated, an \b Axis of rotation (DZ by
+default), Angle of rotation (optionally) and a Number of Times
+the shape must be rotated. If Angular step is not defined
+(checkbox is not checked), it will be 2 * \a PI / \a NbTimes. Number
+of shape's copies in the resulting compound will be equal to
+\a NbTimes (if \a NbTimes = 1, the result will contain only the
+initial non-transformed shape).
+
+\n TUI Commands:
+\n geompy.MultiRotate1DNbTimes(Shape, Axis, NbTimes)
+\n geompy.MultiRotate1DByStep(Shape, Axis, AngleStep, NbTimes)
\b NB! There is another way to execute a Multi-rotation
operation, which is currently accessible only via TUI commands:
-geompy.MakeMultiRotation1D(Shape, Dir, Point, NbTimes) which works in
-the same way, but the Axis is defined by direction and point.
+geompy.MakeMultiRotation1DNbTimes(Shape, Dir, Point, NbTimes),
+geompy.MakeMultiRotation1DByStep(Shape, Dir, Point, AngleStep, NbTimes),
+which works in the same way, but the Axis is defined by direction and point.
\image html neo-mrot1.png
@@ -31,23 +35,27 @@ the same way, but the Axis is defined by direction and point.
\image html multi_rotation1d2.png "The result of a simple multi-rotation"
\n Double Multi Rotation (in two dimensions) rotates the given
-\b Object around the given \b Axis on the given \b Angle a given
-Number of Times and multi-translates each rotation
-result. Translation direction passes through the center of gravity of
-the rotated shape and its projection on the rotation axis. Number of
-shapes in the resulting compound will be equal to \a NbTimes1 x \a NbTimes2 (if
-both \a NbTimes1 and \a NbTimes2 are equal to 1, the result will contain
+\b Object around the given \b Axis (DZ by default) on the given
+\b Angle (optional) a given Number of Times and
+multi-translates each rotation result.
+If Angular step is not defined (checkbox is not checked), it
+will be 2 * \a PI / \a NbTimes.
+Translation direction passes through the center of gravity of the
+initial shape and its projection on the rotation axis. Number of
+shape's copies in the resulting compound will be equal to \a NbTimes1 x \a NbTimes2
+(if both \a NbTimes1 and \a NbTimes2 are equal to 1, the result will contain
only the initial non-transformed shape).
\b Reverse checkbox allows to set the direction of rotation.
-\n TUI Command: geompy.MultiRotate2D(Shape, Axis, Angle, NbTimes1, Step, NbTimes2)
-\n Arguments: Name + 1 shape + 1 vector for direction + 1 angle
-+ 1 value (repetition) + 1 step value + 1 value (repetition).
+
+\n TUI Commands:
+\n geompy.MultiRotate2DNbTimes(Shape, Axis, NbTimes1, RadialStep, NbTimes2)
+\n geompy.MultiRotate2DByStep(Shape, Axis, AngleStep, NbTimes1, RadialStep, NbTimes2)
NB! There is another way to execute a Double Multi-rotation
operation, which is currently accessible only via TUI commands:
-geompy.MakeMultiRotation2D(Shape, Dir, Point, Angle, nbtimes1, Step,nbtimes2)
-which works in the same way,
-but the Axis is defined by direction and point.
+geompy.MakeMultiRotation2DNbTimes(Shape, Dir, Point, NbTimes1, RadialStep, NbTimes2),
+geompy.MakeMultiRotation2DByStep(Shape, Dir, Point, AngleStep, NbTimes1, RadialStep, NbTimes2),
+which works in the same way, but the Axis is defined by direction and point.
\image html neo-mrot2.png
diff --git a/doc/salome/gui/GEOM/input/multi_translation_operation.doc b/doc/salome/gui/GEOM/input/multi_translation_operation.doc
index 0d084f3c1..6274ad9b4 100644
--- a/doc/salome/gui/GEOM/input/multi_translation_operation.doc
+++ b/doc/salome/gui/GEOM/input/multi_translation_operation.doc
@@ -7,9 +7,8 @@ select Operations - > Transformation - > Multi Translation
\n This operation makes several translations of a shape in \b one or \b
two directions.
-\n The \b Result will be one or several \b GEOM_Objects
-(compound). The total number of shapes in the resulting compound (for
-a single initial selected shape) will be equal to:
+\n The \b Result will be one \b GEOM_Object (compound). The total
+number of shape copies in the resulting compound will be equal to:
- in case of \ref single_multi_translation "Single multi translation":
\a NbTimes (if \a NbTimes parameter is equal to 1, the result will
contain only the initial non-translated shape).
@@ -21,14 +20,11 @@ initial shape).
\anchor single_multi_translation
\n To produce a Simple Multi Translation (in one direction) you
need to indicate an \b Object to be translated, a \b Vector of
-translation, a \b Step of translation and a Number of Times the
-Object should be duplicated. If a curve has been selected instead of
-the Vector, only its first and last vertices will be used to get the vector direction
-and the dialog preview will display the vector along which the object will be translated.
-\n TUI Command: geompy.MakeMultiTranslation1D(Shape, Dir,
-Step, NbTimes)
-\n Arguments: Name + 1 shape + 1 vector (for direction) + 1
-step value + 1 value (repetition).
+translation (DX by default), a \b Step of translation and a Number
+of Times the Object should be duplicated. If a curve has been
+selected instead of the Vector, only its first and last vertices will
+be used to get the vector direction and the dialog preview will
+display the vector along which the object will be translated.
\image html mtrans1.png
@@ -36,12 +32,26 @@ step value + 1 value (repetition).
\image html multi_translation1dsn.png "The result of a simple multi-translation"
+\n TUI Command: geompy.MakeMultiTranslation1D(Shape, Dir,
+Step, NbTimes)
+\n Arguments: Name + 1 shape + 1 vector (for direction) + 1
+step value + 1 value (repetition).
+
\anchor double_multi_translation
\n To produce a Double Multi Translation (in two directions) you need to
indicate an \b Object to be translated, and, for both axes, a \b
-Vector of translation, a \b Step of translation and a Number of Times the shape must be duplicated.
-If a curve has been selected instead of the Vector, only its first and last vertices will be used to get the vector direction
-and the dialog preview will display the vector along which the object will be translated.
+Vector of translation (DX and DY by default), a \b Step of translation
+and a Number of Times the shape must be duplicated.
+If a curve has been selected instead of the Vector, only its first and
+last vertices will be used to get the vector direction and the dialog
+preview will display the vector along which the object will be
+translated.
+
+\image html mtrans2.png
+
+\image html multi_translation_initialsn.png "The initial object"
+
+\image html multi_translation2dsn.png "The result of a double multi-translation"
\n TUI Command: geompy.MakeMultiTranslation2D(Shape, Dir1,
Step1, NbTimes1, Dir2, Step2, NbTimes2), where \em Shape is a shape
@@ -53,12 +63,6 @@ along \em Dir2.
\n Arguments: Name + 1 shape + 2 vectors defining the direction
+ 2 step values + 2 values (repetitions).
-\image html mtrans2.png
-
-\image html multi_translation_initialsn.png "The initial object"
-
-\image html multi_translation2dsn.png "The result of a double multi-translation"
-
Our TUI Scripts provide you with useful examples of the use of
\ref tui_multi_translation "Transformation Operations".
diff --git a/doc/salome/gui/GEOM/input/tui_3dsketcher.doc b/doc/salome/gui/GEOM/input/tui_3dsketcher.doc
index 4916dfce2..9afadc9ca 100755
--- a/doc/salome/gui/GEOM/input/tui_3dsketcher.doc
+++ b/doc/salome/gui/GEOM/input/tui_3dsketcher.doc
@@ -1,49 +1,7 @@
/*!
\page tui_3dsketcher_page 3D Sketcher
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# Create a 3D sketcher (wire) on the given points coordinates
-sketcher1 = geompy.Make3DSketcher([ 0,0,0, 50,50,50, 0,50,0, 50,0,50, 10,20,100, 0,0,0 ])
-
-# add object in the study
-id_sketcher1 = geompy.addToStudy(sketcher1, "Sketcher1")
-
-# display the sketcher
-gg.createAndDisplayGO(id_sketcher1)
-
-# Create a 3D sketcher (wire) with Sketcher3D interface
-
-# get the interface instance
-sk = geompy.Sketcher3D()
-
-# add three points with absolute coordinates
-# the first point will be the start point of sketcher
-# two segments will be added by this command
-sk.addPointsAbsolute(1,2,3, 7,0,0, 10,-3.5,-11)
-
-# add one segment, defined by two angles in "OXY" coordinate system and length
-sk.addPointAnglesLength("OXY", 45, 0, 100)
-
-# add three points with relative coordinates
-# three segments will be added by this command
-sk.addPointsRelative(20,0,0, 20,0,100, -40,0,-50)
-
-# set to close the sketcher
-sk.close()
-
-# obtain the sketcher result
-sketcher2 = sk.wire()
-
-# add object in the study
-id_sketcher2 = geompy.addToStudy(sketcher2, "Sketcher2")
-
-# display the sketcher
-gg.createAndDisplayGO(id_sketcher2)
-\endcode
+\include 3dsketcher.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc b/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc
index 1d469e9e8..1f513a496 100644
--- a/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc
+++ b/doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc
@@ -4,119 +4,18 @@
\anchor tui_creation_pipetshape
Creation of PipeTShape
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create PipeTShape object
-pipetshape = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0)
-
-# add object in the study
-id_pipetshape = geompy.addToStudy(pipetshape[0],"PipeTShape")
-# add groups in the study
-for g in pipetshape[1:]:
- geompy.addToStudyInFather(pipetshape[0], g, g.GetName())
-
-# Create junction vertices
-P1 = geompy.MakeVertex(0.0, 0.0, 0.0)
-P2 = geompy.MakeVertex(400.0, 0.0, 0.0)
-P3 = geompy.MakeVertex(200.0, 0.0, 200.0)
-
-# create PipeTShape object with position
-pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
-
-# add object in the study
-id_pipetshape_position = geompy.addToStudy(pipetshape_position[0],"PipeTShape_position")
-# add groups in the study
-for g in pipetshape_position[1:]:
- geompy.addToStudyInFather(pipetshape_position[0], g, g.GetName())
-
-# create PipeTShape with chamfer object
-pipetshapechamfer = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0)
-
-# add object in the study
-id_pipetshapechamfer = geompy.addToStudy(pipetshapechamfer[0],"PipeTShapeChamfer")
-# add groups in the study
-for g in pipetshapechamfer[1:]:
- geompy.addToStudyInFather(pipetshapechamfer[0], g, g.GetName())
-
-# create PipeTShape with chamfer object with position
-pipetshapechamfer_position = geompy.MakePipeTShapeChamfer(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 20.0, 20.0, True, P1, P2, P3)
-
-# add object in the study
-id_pipetshapechamfer_position = geompy.addToStudy(pipetshapechamfer_position[0],"PipeTShapeChamfer_position")
-# add groups in the study
-for g in pipetshapechamfer_position[1:]:
- geompy.addToStudyInFather(pipetshapechamfer_position[0], g, g.GetName())
-
-# create PipeTShape with fillet object
-pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
-
-# add object in the study
-id_pipetshapefillet = geompy.addToStudy(pipetshapefillet[0],"PipeTShapeFillet")
-# add groups in the study
-for g in pipetshapefillet[1:]:
- geompy.addToStudyInFather(pipetshapefillet[0], g, g.GetName())
-
-# create PipeTShape with fillet object with position
-pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
-
-# add object in the study
-id_pipetshapefillet_position = geompy.addToStudy(pipetshapefillet_position[0],"PipeTShapeFillet_position")
-# add groups in the study
-for g in pipetshapefillet_position[1:]:
- geompy.addToStudyInFather(pipetshapefillet_position[0], g, g.GetName())
-
-
-# display pipetshapes
-gg.createAndDisplayGO(id_pipetshape)
-gg.createAndDisplayGO(id_pipetshape_position)
-gg.createAndDisplayGO(id_pipetshapechamfer)
-gg.createAndDisplayGO(id_pipetshapechamfer_position)
-gg.createAndDisplayGO(id_pipetshapefillet)
-gg.createAndDisplayGO(id_pipetshapefillet_position)
-
-\endcode
+\include advanced_geom_objs_ex01.py
+Download this script
\anchor tui_creation_divideddisk
Creation of DividedDisk
-
-\code
-import geompy
-import salome
-import GEOM
-gg = salome.ImportComponentGUI("GEOM")
-
-# create DividedDisk object
-divideddisk = geompy.MakeDividedDisk(100, 1, GEOM.SQUARE)
-
-# add object in the study
-id_divideddisk = geompy.addToStudy(divideddisk,"DividedDisk")
-
-# display divideddisk
-gg.createAndDisplayGO(id_divideddisk)
-\endcode
+\include advanced_geom_objs_ex02.py
+Download this script
\anchor tui_creation_dividedcylinder
Creation of DividedCylinder
-
-\code
-import geompy
-import salome
-import GEOM
-gg = salome.ImportComponentGUI("GEOM")
-
-# create DividedCylinder object
-dividedcylinder = geompy.MakeDividedCylinder(100, 300, GEOM.SQUARE)
-
-# add object in the study
-id_dividedcylinder = geompy.addToStudy(dividedcylinder,"DividedCylinder")
-
-# display dividedcylinder
-gg.createAndDisplayGO(id_dividedcylinder)
-\endcode
+\include advanced_geom_objs_ex03.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_angle.doc b/doc/salome/gui/GEOM/input/tui_angle.doc
index fa459d31e..e1618fb30 100644
--- a/doc/salome/gui/GEOM/input/tui_angle.doc
+++ b/doc/salome/gui/GEOM/input/tui_angle.doc
@@ -1,67 +1,7 @@
/*!
\page tui_angle_page Angle
-
-\code
-import salome
-salome.salome_init()
-
-import math
-import geompy
-geompy.init_geom(salome.myStudy)
-
-OX = geompy.MakeVectorDXDYDZ(10, 0,0)
-OXY = geompy.MakeVectorDXDYDZ(10,10,0)
-
-# in one plane
-Angle = geompy.GetAngle(OX, OXY)
-
-print "\nAngle between OX and OXY = ", Angle
-if math.fabs(Angle - 45.0) > 1e-05:
- print " Error: returned angle is", Angle, "while must be 45.0"
- pass
-
-Angle = geompy.GetAngleRadians(OX, OXY)
-
-print "\nAngle between OX and OXY in radians = ", Angle
-if math.fabs(Angle - math.pi/4) > 1e-05:
- print " Error: returned angle is", Angle, "while must be pi/4"
- pass
-
-Angle = geompy.GetAngleVectors(OX, OXY, True)
-
-print "\nAngle between vectors OX and OXY = ", Angle
-if math.fabs(Angle - 45.0) > 1e-05:
- print " Error: returned angle is", Angle, "while must be 45.0"
- pass
-
-Angle = geompy.GetAngleRadiansVectors(OX, OXY, False)
-
-print "\nBig angle between vectors OX and OXY in radians = ", Angle
-if math.fabs(Angle - math.pi*7./4.) > 1e-05:
- print " Error: returned angle is", Angle, "while must be 7*pi/4"
- pass
-
-# not in one plane
-OXY_shift = geompy.MakeTranslation(OXY,10,-10,20)
-Angle = geompy.GetAngle(OX, OXY_shift)
-
-print "\nAngle between OX and OXY_shift = ", Angle
-if math.fabs(Angle - 45.0) > 1e-05:
- print " Error: returned angle is", Angle, "while must be 45.0"
- pass
-
-# not linear
-pnt1 = geompy.MakeVertex(0, 0, 0)
-pnt2 = geompy.MakeVertex(10, 0, 0)
-pnt3 = geompy.MakeVertex(20, 10, 0)
-arc = geompy.MakeArc(pnt1, pnt2, pnt3)
-Angle = geompy.GetAngle(OX, arc)
-
-if (math.fabs(Angle + 1.0) > 1e-6 or geompy.MeasuOp.IsDone()):
- print "Error. Angle must not be computed on curvilinear edges"
- pass
-
-\endcode
+\include angle.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc b/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc
index 7f230b142..fcb21c268 100644
--- a/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc
+++ b/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc
@@ -4,423 +4,47 @@
\anchor tui_creation_point
Creation of a Point
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex(0., 0., 0.)
-p100 = geompy.MakeVertexWithRef(p0, 100., 100., 100.)
-px = geompy.MakeVertex(100., 0., 0.)
-py = geompy.MakeVertex(0., 100., 0.)
-pz = geompy.MakeVertex(0., 0., 100.)
-p1 = geompy.MakeVertex(50., 50., 30.)
-
-# create a curve and vertices on it
-Arc = geompy.MakeArc(py, pz, px)
-# create a vertex by parameter
-p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25)
-# create a vertex by length
-p_on_arc2 = geompy.MakeVertexOnCurveByLength(Arc, 50., None)
-#create a vertex by point projection
-p_on_arc3 = geompy.MakeVertexOnCurveByCoord(Arc, 100, -10, 10)
-
-# create 2 lines and make a point on its intersection
-line_1 = geompy.MakeLineTwoPnt(p0, p100)
-line_2 = geompy.MakeLineTwoPnt(p1, pz)
-p_inter = geompy.MakeVertexOnLinesIntersection(line_1, line_2)
-
-# create a face and vertices on it
-Add_line = geompy.MakeLineTwoPnt(px, py)
-arc_face = geompy.MakeFaceWires([Arc, Add_line], 1)
-p_on_face1 = geompy.MakeVertexOnSurface(arc_face, 0.5, 0.5)
-p_on_face2 = geompy.MakeVertexOnSurfaceByCoord(arc_face, 35, 35, 35)
-p_on_face3 = geompy.MakeVertexInsideFace(arc_face)
-
-
-# add objects in the study
-id_p0 = geompy.addToStudy(p0, "Vertex 0")
-id_p100 = geompy.addToStudy(p100, "Vertex 100")
-id_px = geompy.addToStudy(px, "Vertex X")
-id_py = geompy.addToStudy(py, "Vertex Y")
-id_pz = geompy.addToStudy(pz, "Vertex Z")
-id_Arc = geompy.addToStudy(Arc, "Arc")
-id_line_1 = geompy.addToStudy(line_1, "Line 1")
-id_line_2 = geompy.addToStudy(line_2, "Line 2")
-id_p_on_arc = geompy.addToStudy(p_on_arc, "Vertex on Arc by parameter")
-id_p_on_arc2 = geompy.addToStudy(p_on_arc2, "Vertex on Arc by length")
-id_p_on_arc3 = geompy.addToStudy(p_on_arc3, "Vertex on Arc by point projection")
-id_p_inter = geompy.addToStudy(p_inter, "Vertex on Lines Intersection")
-id_p_on_face1 = geompy.addToStudy(p_on_face1, "Vertex on face by parameter")
-id_p_on_face2 = geompy.addToStudy(p_on_face2, "Vertex on face by point projection")
-id_p_on_face3 = geompy.addToStudy(p_on_face3, "Vertex inside face")
-
-# display vertices
-gg.createAndDisplayGO(id_p0)
-gg.createAndDisplayGO(id_p100)
-gg.createAndDisplayGO(id_Arc)
-gg.createAndDisplayGO(id_p_inter)
-gg.createAndDisplayGO(id_p_on_arc)
-gg.createAndDisplayGO(id_p_on_arc2)
-gg.createAndDisplayGO(id_p_on_arc3)
-\endcode
+\include basic_geom_objs_ex01.py
+Download this script
\anchor tui_creation_line
Creation of a Line
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex(0., 0., 0.)
-p100 = geompy.MakeVertexWithRef(p0, 100., 100., 100.)
-px = geompy.MakeVertex(100., 0. , 0. )
-py = geompy.MakeVertex(0. , 100., 0. )
-pz = geompy.MakeVertex(0. , 0. , 100.)
-
-# create a vector from two points
-vxy = geompy.MakeVector(px, py)
-
-# create a line from a point and a vector
-line1 = geompy.MakeLine(pz, vxy)
-
-#create a line from two points
-line2 = geompy.MakeLineTwoPnt(p0, p100)
-
-# add objects in the study
-id_vxy = geompy.addToStudy(vxy, "Vector")
-id_line1 = geompy.addToStudy(line1,"Line1")
-id_line2 = geompy.addToStudy(line2,"Line2")
-
-# display lines
-gg.createAndDisplayGO(id_vxy)
-gg.createAndDisplayGO(id_line1)
-gg.createAndDisplayGO(id_line2)
-\endcode
+\include basic_geom_objs_ex02.py
+Download this script
\anchor tui_creation_circle
Creation of a Circle
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex(0., 0., 0.)
-px = geompy.MakeVertex(100., 0. , 0. )
-py = geompy.MakeVertex(0. , 100., 0. )
-pz = geompy.MakeVertex(0. , 0. , 100.)
-
-# create a vector on two points
-vxy = geompy.MakeVector(px, py)
-
-# create a circle from a point, a vector and a radius
-circle1 = geompy.MakeCircle(pz, vxy, 30)
-
-#create a circle from three points
-circle2 = geompy.MakeCircleThreePnt(p0, px, py)
-
-# add objects in the study
-id_vxy = geompy.addToStudy(vxy, "Vector")
-id_circle1 = geompy.addToStudy(circle1,"Circle1")
-id_circle2 = geompy.addToStudy(circle2,"Circle2")
-
-# display circles
-gg.createAndDisplayGO(id_vxy)
-gg.createAndDisplayGO(id_circle1)
-gg.createAndDisplayGO(id_circle2)
-\endcode
+\include basic_geom_objs_ex03.py
+Download this script
\anchor tui_creation_ellipse
Creation of an Ellipse
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex(0., 0., 0.)
-p1 = geompy.MakeVertex(50., 50., 50.)
-p2 = geompy.MakeVertex(0., 50., 0.)
-
-# create a normal vector from two points
-normal = geompy.MakeVector(p0, p1)
-
-# create a major axis vector from two points
-major = geompy.MakeVector(p0, p2)
-
-# create an ellipse from a point, a vector and radiuses
-ellipse1 = geompy.MakeEllipse(p1, normal, 50, 25)
-
-# create an ellipse from a point, a normal vector, radiuses and a major axis vector
-ellipse2 = geompy.MakeEllipse(p1, normal, 50, 25, major)
-
-# add objects in the study
-id_normal = geompy.addToStudy(normal, "Normal")
-id_major = geompy.addToStudy(major, "Major Axis")
-id_ellipse1 = geompy.addToStudy(ellipse1, "Ellipse 1")
-id_ellipse2 = geompy.addToStudy(ellipse2, "Ellipse 2")
-
-# display the ellipse and its normal vector
-gg.createAndDisplayGO(id_normal)
-gg.createAndDisplayGO(id_major)
-gg.createAndDisplayGO(id_ellipse1)
-gg.createAndDisplayGO(id_ellipse2)
-\endcode
+\include basic_geom_objs_ex04.py
+Download this script
\anchor tui_creation_arc
Creation of an Arc
+\include basic_geom_objs_ex05.py
+Download this script
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex(0., 0., 0.)
-p1 = geompy.MakeVertex(100., 0., 0.)
-p2 = geompy.MakeVertex(50., 0., 50.)
-
-# create an arc from a three points
-arc1 = geompy.MakeArc(p0, p1, p2)
-
-# create an arc from a center point, a start point and end point
-arc2 = geompy.MakeArcCenter(p0, p1, p2, 1)
-
-# create an arc from a center point, a major point and minor point
-arc3 = geompy.MakeArcOfEllipse(p0, p1, p2)
-
-# add objects in the study
-id_arc1 = geompy.addToStudy(arc1, "Arc 1")
-id_arc2 = geompy.addToStudy(arc2, "Arc 2")
-id_arc3 = geompy.addToStudy(arc3, "Arc 3")
-
-# display the arcs
-gg.createAndDisplayGO(id_arc1)
-gg.createAndDisplayGO(id_arc2)
-gg.createAndDisplayGO(id_arc3)
-\endcode
-
\anchor tui_creation_curve
Creation of a Curve
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex(0. , 0. , 0. )
-p1 = geompy.MakeVertex(50. , 100., 200.)
-p2 = geompy.MakeVertex(150., 50., 100.)
-p3 = geompy.MakeVertex(100., 150., 170.)
-p4 = geompy.MakeVertex(200., 200., 150.)
-
-# create a polyline from a list of points
-polyline = geompy.MakePolyline([p0, p1, p2, p3, p4])
-
-# create a bezier curve from a list of points
-bezier = geompy.MakeBezier([p0, p1, p2, p3, p4])
-
-#create a b-spline curve from a list of points
-interpol = geompy.MakeInterpol([p0, p1, p2, p3, p4], False)
-
-#create a polyline using parametric definition of the basic points
-param_polyline = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, geompy.GEOM.Polyline, theNewMethod=True)
-
-# create a bezier curve using parametric definition of the basic points
-param_bezier = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, geompy.GEOM.Bezier, theNewMethod=True)
-
-#create a b-spline curve using parametric definition of the basic points
-param_interpol = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, geompy.GEOM.Interpolation, theNewMethod=True)
-
-
-
-# add objects in the study
-id_p0 = geompy.addToStudy(p0, "Point1")
-id_p1 = geompy.addToStudy(p1, "Point2")
-id_p2 = geompy.addToStudy(p2, "Point3")
-id_p3 = geompy.addToStudy(p3, "Point4")
-id_p4 = geompy.addToStudy(p4, "Point5")
-id_polyline = geompy.addToStudy(polyline, "Polyline")
-id_bezier = geompy.addToStudy(bezier, "Bezier")
-id_interpol = geompy.addToStudy(interpol, "Interpol")
-id_param_polyline = geompy.addToStudy(param_polyline, "Polyline Parametric")
-id_param_bezier = geompy.addToStudy(param_bezier, "Bezier Parametric")
-id_param_interpol = geompy.addToStudy(param_interpol, "Interpol Parametric")
-
-
-
-# display the points and the curves
-gg.createAndDisplayGO(id_p0)
-gg.createAndDisplayGO(id_p1)
-gg.createAndDisplayGO(id_p2)
-gg.createAndDisplayGO(id_p3)
-gg.createAndDisplayGO(id_p4)
-gg.createAndDisplayGO(id_polyline)
-gg.createAndDisplayGO(id_bezier)
-gg.createAndDisplayGO(id_interpol)
-gg.createAndDisplayGO(id_param_polyline)
-gg.createAndDisplayGO(id_param_bezier)
-gg.createAndDisplayGO(id_param_interpol)
-
-\endcode
+\include basic_geom_objs_ex06.py
+Download this script
\anchor tui_creation_vector
Creation of a Vector
-
-\code
-mport geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p1 = geompy.MakeVertex(10., 50., 20.)
-p2 = geompy.MakeVertex(70., 70., 70.)
-
-# create a vector from two points
-vector1 = geompy.MakeVector(p1, p2)
-
-# create a vector from the given components
-vector2 = geompy.MakeVectorDXDYDZ(30, 30, 100)
-
-# add objects in the study
-id_p1 = geompy.addToStudy(p1, "Point1")
-id_p2 = geompy.addToStudy(p2, "Point2")
-id_vector1 = geompy.addToStudy(vector1,"Vector1")
-id_vector2 = geompy.addToStudy(vector2,"Vector2")
-
-# display the points and the vectors
-gg.createAndDisplayGO(id_p1)
-gg.createAndDisplayGO(id_p2)
-gg.createAndDisplayGO(id_vector1)
-gg.createAndDisplayGO(id_vector2)
-\endcode
+\include basic_geom_objs_ex07.py
+Download this script
\anchor tui_creation_plane
Creation of a Plane
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p1 = geompy.MakeVertex( 0., 0., 100.)
-p2 = geompy.MakeVertex(100., 0., 0.)
-p3 = geompy.MakeVertex(200., 200., 200.)
-p4 = geompy.MakeVertex(100., 100., 0.)
-p5 = geompy.MakeVertex(0. , 100., 0.)
-
-# create a vectors from the given components
-vector1 = geompy.MakeVectorDXDYDZ(100., 100., 100.)
-vector2 = geompy.MakeVectorDXDYDZ(-100., 0., 100.)
-
-# create a vector from two points
-vector_arc = geompy.MakeVector(p2, p5)
-
-# create an arc from three points
-arc = geompy.MakeArc(p2, p4, p5)
-
-# create a wire
-wire = geompy.MakeWire([vector_arc, arc])
-
-# create a face
-isPlanarWanted = 1
-face = geompy.MakeFace(wire, isPlanarWanted)
-trimsize = 1000.
-
-# create a Local Coordinate System
-
-LCS = geompy.MakeMarker(100., 100., 101., 1, 0, 0, 0, 1, 0)
-
-# create a plane from a point, a vector and a trimsize
-plane1 = geompy.MakePlane(p1, vector1, trimsize)
-
-# create a plane from three points and a trimsize
-plane2 = geompy.MakePlaneThreePnt(p1, p2, p3, trimsize)
-
-# create a plane from the given face
-plane3 = geompy.MakePlaneFace(face, trimsize)
-
-# create a plane from two vectors and a trimsize
-plane4 = geompy.MakePlane2Vec(vector1, vector2, trimsize)
-
-# create a plane with the Local Coordinate System and a trimsize
-plane5 = geompy.MakePlaneLCS(LCS, trimsize, 1)
-
-# add objects in the study
-id_face = geompy.addToStudy(face, "Face")
-id_plane1 = geompy.addToStudy(plane1,"Plane1")
-id_plane2 = geompy.addToStudy(plane2,"Plane2")
-id_plane3 = geompy.addToStudy(plane3,"Plane3")
-id_plane4 = geompy.addToStudy(plane4,"Plane4")
-id_plane5 = geompy.addToStudy(plane5,"Plane5")
-
-# display the points and the vectors
-gg.createAndDisplayGO(id_face)
-gg.createAndDisplayGO(id_plane1)
-gg.createAndDisplayGO(id_plane2)
-gg.createAndDisplayGO(id_plane3)
-gg.createAndDisplayGO(id_plane4)
-gg.createAndDisplayGO(id_plane5)
-gg.setDisplayMode(id_plane1,1)
-gg.setTransparency(id_plane1,0.5)
-gg.setDisplayMode(id_plane2,1)
-gg.setTransparency(id_plane2,0.5)
-gg.setDisplayMode(id_plane3,1)
-gg.setTransparency(id_plane3,0.5)
-gg.setDisplayMode(id_plane4,1)
-gg.setTransparency(id_plane4,0.5)
-gg.setDisplayMode(id_plane5,1)
-gg.setTransparency(id_plane5,0.5)
-\endcode
+\include basic_geom_objs_ex08.py
+Download this script
\anchor tui_creation_lcs
Creation of a Local Coordinate System
-\code
-import GEOM
-import geompy
-import math
-import SALOMEDS
-
-#Create vertexes, vectors and shapes to construct local CS
-Vertex_1 = geompy.MakeVertex(50, 50, 50)
-Vertex_2 = geompy.MakeVertex(70, 70, 70)
-Vertex_3 = geompy.MakeVertex(0, 0, 0)
-Vector_X = geompy.MakeVectorDXDYDZ(50, 0, 0)
-Vector_Y = geompy.MakeVectorDXDYDZ(0, 50, 0)
-Face_1 = geompy.MakeFaceHW(100, 100, 1)
-Box_1 = geompy.MakeBoxTwoPnt(Vertex_1, Vertex_2)
-
-#Construct local CS by manual definition
-LocalCS_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
-
-#Construct local CS by center point and two vectors (X and Y directions)
-LocalCS_2 = geompy.MakeMarkerPntTwoVec(Vertex_3, Vector_X, Vector_Y)
-
-#Construct local CS from shape orientation
-LocalCS_FACE = geompy.MakeMarkerFromShape(Face_1)
-LocalCS_BOX = geompy.MakeMarkerFromShape(Box_1)
-
-#Add created object to study
-geompy.addToStudy( Face_1, "Face_1" )
-geompy.addToStudy( Vertex_1, "Vertex_1" )
-geompy.addToStudy( Vertex_2, "Vertex_2" )
-geompy.addToStudy( Box_1, "Box_1" )
-geompy.addToStudy( Vertex_3, "Vertex_3" )
-geompy.addToStudy( Vector_X, "Vector_X" )
-geompy.addToStudy( Vector_Y, "Vector_Y" )
-geompy.addToStudy( LocalCS_1, "LocalCS_1" )
-geompy.addToStudy( LocalCS_2, "LocalCS_3" )
-geompy.addToStudy( LocalCS_FACE, "LocalCS_FACE" )
-geompy.addToStudy( LocalCS_BOX, "LocalCS_BOX" )
-\endcode
+\include basic_geom_objs_ex09.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_basic_operations.doc b/doc/salome/gui/GEOM/input/tui_basic_operations.doc
index aec3a7465..3899255b1 100644
--- a/doc/salome/gui/GEOM/input/tui_basic_operations.doc
+++ b/doc/salome/gui/GEOM/input/tui_basic_operations.doc
@@ -4,138 +4,17 @@
\anchor tui_partition
Partition
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p0 = geompy.MakeVertex( 0., 0., 0.)
-p200 = geompy.MakeVertex(200., 200., 200.)
-pz = geompy.MakeVertex( 0., 0., 100.)
-
-# create a vector
-vxyz = geompy.MakeVectorDXDYDZ(100., 100., 100.)
-
-# create a box from two points
-box = geompy.MakeBoxTwoPnt(p0, p200)
-
-# create a plane
-trimsize = 500.
-plane = geompy.MakePlane(pz, vxyz, trimsize)
-
-# create partition objects
-partition1 = geompy.MakePartition([box], [plane])
-partition2 = geompy.Partition([box], [plane])
-partition3 = geompy.MakeHalfPartition(box, plane)
-
-# add objects in the study
-id_box = geompy.addToStudy(box,"Box")
-id_plane = geompy.addToStudy(plane,"Plane")
-id_partition1 = geompy.addToStudy(partition1,"MakePartition")
-id_partition2 = geompy.addToStudy(partition2,"Partition")
-id_partition3 = geompy.addToStudy(partition3,"MakeHalfPartition")
-
-# display the partition objects and the plane
-gg.createAndDisplayGO(id_box)
-gg.setDisplayMode(id_box,1)
-gg.createAndDisplayGO(id_plane)
-gg.setDisplayMode(id_plane,1)
-gg.createAndDisplayGO(id_partition1)
-gg.createAndDisplayGO(id_partition2)
-gg.createAndDisplayGO(id_partition3)
-\endcode
+\include basic_operations_ex01.py
+Download this script
\anchor tui_archimede
Archimede
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p0 = geompy.MakeVertex( 0., 0., 0.)
-p200 = geompy.MakeVertex(200., 200., 200.)
-
-# create a box from two points
-box = geompy.MakeBoxTwoPnt(p0, p200)
-
-# perform an Archimede operation on the selected shape with selected parameters
-weight = 1000000.
-waterdensity = 1.
-meshingdeflection = 0.01
-archimede = geompy.Archimede(box, weight, waterdensity, meshingdeflection)
-
-# add objects in the study
-id_box = geompy.addToStudy(box,"Box")
-id_archimede = geompy.addToStudy(archimede,"Archimede")
-
-# display the box and the result of Archimede operation
-gg.createAndDisplayGO(id_box)
-gg.setDisplayMode(id_box,1)
-gg.createAndDisplayGO(id_archimede)
-gg.setDisplayMode(id_archimede,1)
-\endcode
+\include basic_operations_ex02.py
+Download this script
\anchor tui_restore_prs_params
Restore presentation parameters and sub-shapes
-
-\code
-import geompy
-import GEOM
-import SALOMEDS
-
-# create a box and a cylinder
-box = geompy.MakeBoxDXDYDZ(200, 200, 200)
-cyl = geompy.MakeCylinderRH(100, 300)
-
-# create translated box
-vec = geompy.MakeVectorDXDYDZ(100, 50, 0)
-tra = geompy.MakeTranslationVector(box, vec)
-
-# create partition objects
-partition1 = geompy.MakePartition([box, cyl])
-partition2 = geompy.MakePartition([box], [cyl])
-partition3 = geompy.MakePartition([box], [tra])
-
-# set colours
-box.SetColor(SALOMEDS.Color(1,0,0))
-cyl.SetColor(SALOMEDS.Color(0,1,0))
-
-# add objects in the study
-geompy.addToStudy(box, "Box")
-geompy.addToStudy(cyl, "Cylinder")
-geompy.addToStudy(vec, "Vector")
-geompy.addToStudy(tra, "Translation")
-geompy.addToStudy(partition1, "Partition_1")
-geompy.addToStudy(partition2, "Partition_2")
-geompy.addToStudy(partition3, "Partition_3")
-
-# Restore presentation parameters and sub-shapes
-# different methods can be used to find the sub-shapes in the result:
-# GetInPlace, GetSame, GetInPlaceByHistory, GetShapesOnShape.
-# By default, GetInPlace method is used (GEOM.FSM_GetInPlace)
-geompy.RestoreSubShapes(partition1)
-
-geompy.RestoreSubShapes(partition2, [], GEOM.FSM_GetInPlace)
-
-# The list of arguments can be used to avoid restoring all arguments,
-# but restore only the passed.
-geompy.RestoreSubShapes(partition3, [tra], GEOM.FSM_GetInPlaceByHistory)
-
-# To find sub-shapes in a transformed shape only one method could be
-# used: pass GEOM.FSM_Transformed for that.
-# True passed for the last argument, means that the transformed shape
-# will inherit colour and sub-shapes from its first argument (see above
-# MakeTranslation).
-geompy.RestoreSubShapes(tra, [], GEOM.FSM_Transformed, True)
-
-# Also we could do this directly with method addToStudy:
-partition4 = geompy.MakePartition([box, tra])
-geompy.addToStudy(partition4, "Partition_4", True, [],
- GEOM.FSM_GetInPlaceByHistory, False)
-\endcode
+\include basic_operations_ex03.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_basic_properties.doc b/doc/salome/gui/GEOM/input/tui_basic_properties.doc
index 4c01ec438..dad8e828b 100644
--- a/doc/salome/gui/GEOM/input/tui_basic_properties.doc
+++ b/doc/salome/gui/GEOM/input/tui_basic_properties.doc
@@ -1,26 +1,7 @@
/*!
\page tui_basic_properties_page Basic Properties
-
-\code
-import geompy
-import math
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100,30,100)
-props = geompy.BasicProperties(box)
-print "\nBox 100x30x100 Basic Properties:"
-print " Wires length: ", props[0]
-print " Surface area: ", props[1]
-print " Volume : ", props[2]
-length = math.sqrt((props[0] - 1840)*(props[0] - 1840))
-area = math.sqrt((props[1] - 32000)*(props[1] - 32000))
-volume = math.sqrt((props[2] - 300000)*(props[2] - 300000))
-if length > 1e-7 or area > 1e-7 or volume > 1e-7:
- print "While must be:"
- print " Wires length: ", 1840
- print " Surface area: ", 32000
- print " Volume : ", 300000.
-\endcode
+\include basic_properties.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_blocks_operations.doc b/doc/salome/gui/GEOM/input/tui_blocks_operations.doc
index 8544667f1..4acb44f80 100644
--- a/doc/salome/gui/GEOM/input/tui_blocks_operations.doc
+++ b/doc/salome/gui/GEOM/input/tui_blocks_operations.doc
@@ -4,95 +4,17 @@
\anchor tui_multi_transformation
Multi Transformation
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p_25_25_50 = geompy.MakeVertex(25., 25., 50.)
-p_50_25_25 = geompy.MakeVertex(50., 25., 25.)
-p_25_50_25 = geompy.MakeVertex(25., 50., 25.)
-
-box = geompy.MakeBoxDXDYDZ(50, 50, 50)
-
-top_face = geompy.GetFaceNearPoint(box, p_25_25_50)
-yz_face = geompy.GetFaceNearPoint(box, p_50_25_25)
-xz_face = geompy.GetFaceNearPoint(box, p_25_50_25)
-
-top_face_ind = geompy.GetSubShapeID(box, top_face)
-yz_face_ind = geompy.GetSubShapeID(box, yz_face)
-xz_face_ind = geompy.GetSubShapeID(box, xz_face)
-
-# Multi-transformate block and glue the result
-box_tr1 = geompy.MakeMultiTransformation1D(box, yz_face_ind, top_face_ind, 3)
-box_tr2 = geompy.MakeMultiTransformation2D(box, xz_face_ind, yz_face_ind, 3, top_face_ind, 0, 2)
-
-# add objects in the study
-id_box = geompy.addToStudy(box, "Box")
-id_box_tr1 = geompy.addToStudy(box_tr1, "Multi-transformed Block 1D")
-id_box_tr2 = geompy.addToStudy(box_tr2, "Multi-transformed Block 2D")
-
-# display the results
-gg.createAndDisplayGO(id_box)
-gg.setDisplayMode(id_box,1)
-gg.createAndDisplayGO(id_box_tr1)
-gg.createAndDisplayGO(id_box_tr2)
-\endcode
+\include blocks_operations_ex01.py
+Download this script
\anchor tui_explode_on_blocks
Explode on Blocks
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a box and a sphere
-box = geompy.MakeBoxDXDYDZ(200, 200, 200)
-sphere = geompy.MakeSphereR(100)
-
-# make a compound
-compound = geompy.MakeCompound([box, sphere])
-
-# get all the blocks of the given compound, by criteria: min_nb_faces <= nb. of faces <= max_nb_faces
-min_nb_faces = 6
-max_nb_faces = 6
-make_block_explode = geompy.MakeBlockExplode(compound, min_nb_faces, max_nb_faces)
-
-# add objects in the study
-id_compound = geompy.addToStudy(compound, "Compound")
-id_make_block_explode = geompy.addToStudyInFather(compound, make_block_explode[0], "MakeBlockExplode")
-
-# display the results
-gg.createAndDisplayGO(id_compound)
-gg.createAndDisplayGO(id_make_block_explode)
-gg.setDisplayMode(id_make_block_explode,1)
-\endcode
+\include blocks_operations_ex02.py
+Download this script
\anchor tui_propagate
Propagate
+\include blocks_operations_ex03.py
+Download this script
-\code
-import geompy
-import salome
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(200, 200, 200)
-
-# build all possible propagation groups
-listChains = geompy.Propagate(check_box)
-
-# add objects in the study
-geompy.addToStudy(check_box, "Box")
-ii = 1
-for chain in listChains:
- geompy.addToStudyInFather(check_box, chain, "propagation chain " + `ii`)
- ii = ii + 1
- pass
-
-salome.sg.updateObjBrowser(1)
-\endcode
-
-*/
\ No newline at end of file
+*/
diff --git a/doc/salome/gui/GEOM/input/tui_boolean_operations.doc b/doc/salome/gui/GEOM/input/tui_boolean_operations.doc
index 60563757c..0ab8db001 100644
--- a/doc/salome/gui/GEOM/input/tui_boolean_operations.doc
+++ b/doc/salome/gui/GEOM/input/tui_boolean_operations.doc
@@ -4,140 +4,22 @@
\anchor tui_fuse
Fuse
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(25, 55, 0)
-p2 = geompy.MakeVertex( 0, 0, 0)
-v = geompy.MakeVector(p1, p2)
-
-# create a cylinder
-height = 35
-radius1 = 20
-cylinder = geompy.MakeCylinder(p1, v, radius1, height)
-
-# create a sphere
-sphere = geompy.MakeSphereR(40)
-
-# fuse
-fuse1 = geompy.MakeFuse(cylinder, sphere)
-fuse2 = geompy.MakeBoolean(cylinder, sphere, 3)
-
-# add objects in the study
-id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
-id_sphere = geompy.addToStudy(sphere, "Sphere")
-id_fuse1 = geompy.addToStudy(fuse1, "Fuse_1")
-id_fuse2 = geompy.addToStudy(fuse2, "Fuse_2")
-
-# display results
-gg.createAndDisplayGO(id_cylinder)
-gg.setDisplayMode(id_cylinder,1)
-gg.createAndDisplayGO(id_sphere)
-gg.setDisplayMode(id_sphere,1)
-gg.createAndDisplayGO(id_fuse1)
-gg.setDisplayMode(id_fuse1,1)
-gg.createAndDisplayGO(id_fuse2)
-gg.setDisplayMode(id_fuse2,1)
-\endcode
+\include boolean_operations_ex01.py
+Download this script
\anchor tui_common
Common
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(25, 55, 0)
-p2 = geompy.MakeVertex( 0, 0, 0)
-v = geompy.MakeVector(p1, p2)
-
-# create a cylinder
-height = 35
-radius1 = 20
-cylinder = geompy.MakeCylinder(p1, v, radius1, height)
-
-# create a sphere
-sphere = geompy.MakeSphereR(40)
-
-# make common
-common = geompy.MakeCommon(cylinder, sphere)
-
-# add objects in the study
-id_common = geompy.addToStudy(common, "Common")
-
-# display the results
-gg.createAndDisplayGO(id_common)
-gg.setDisplayMode(id_common,1)
-\endcode
+\include boolean_operations_ex02.py
+Download this script
\anchor tui_cut
Cut
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(25, 55, 0)
-p2 = geompy.MakeVertex( 0, 0, 0)
-v = geompy.MakeVector(p1, p2)
-
-# create a cylinder
-height = 35
-radius1 = 20
-cylinder = geompy.MakeCylinder(p1, v, radius1, height)
-
-# create a sphere
-sphere = geompy.MakeSphereR(40)
-
-#cut
-cut = geompy.MakeCut(cylinder, sphere)
-
-# add objects in the study
-id_cut = geompy.addToStudy(cut, "Cut")
-
-# display the results
-gg.createAndDisplayGO(id_cut)
-gg.setDisplayMode(id_cut,1)
-\endcode
+\include boolean_operations_ex03.py
+Download this script
\anchor tui_section
Section
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(25, 55, 0)
-p2 = geompy.MakeVertex( 0, 0, 0)
-v = geompy.MakeVector(p1, p2)
-
-# create a cylinder
-height = 35
-radius1 = 20
-cylinder = geompy.MakeCylinder(p1, v, radius1, height)
-
-# create a sphere
-sphere = geompy.MakeSphereR(40)
-
-# make a section
-section = geompy.MakeSection(cylinder, sphere)
-
-# add objects in the study
-id_section = geompy.addToStudy(section, "Section")
-
-# display the results
-gg.createAndDisplayGO(id_section)
-gg.setDisplayMode(id_section,1)
-\endcode
+\include boolean_operations_ex04.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_bounding_box.doc b/doc/salome/gui/GEOM/input/tui_bounding_box.doc
index 232ab13b4..76d4b4347 100644
--- a/doc/salome/gui/GEOM/input/tui_bounding_box.doc
+++ b/doc/salome/gui/GEOM/input/tui_bounding_box.doc
@@ -1,17 +1,7 @@
/*!
\page tui_bounding_box_page Bounding Box
-
-\code
-import geompy
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100,30,100)
-bb = geompy.BoundingBox(box)
-print "\nBounding Box of box 100x30x100:"
-print " Xmin = ", bb[0], ", Xmax = ", bb[1]
-print " Ymin = ", bb[2], ", Ymax = ", bb[3]
-print " Zmin = ", bb[4], ", Zmax = ", bb[5]
-\endcode
+\include bounding_box.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_building_by_blocks.doc b/doc/salome/gui/GEOM/input/tui_building_by_blocks.doc
index 3584c7ef5..77f8e363b 100644
--- a/doc/salome/gui/GEOM/input/tui_building_by_blocks.doc
+++ b/doc/salome/gui/GEOM/input/tui_building_by_blocks.doc
@@ -3,118 +3,11 @@
\page tui_building_by_blocks_page Building by Blocks
Quadrangle Face
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p1 = geompy.MakeVertex( 0., 0., 0.)
-p2 = geompy.MakeVertex(150., 30., 0.)
-p3 = geompy.MakeVertex( 0., 120., 50.)
-p4 = geompy.MakeVertex( 0., 40., 70.)
-
-# create edges
-edge1 = geompy.MakeEdge(p1, p2)
-edge2 = geompy.MakeEdge(p2, p3)
-edge3 = geompy.MakeEdge(p3, p4)
-edge4 = geompy.MakeEdge(p4, p1)
-
-# create a quadrangle face from four edges
-qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
-
-# create a quadrangle face from two edges
-qface2 = geompy.MakeQuad2Edges(edge1, edge3)
-
-# create a quadrangle from four points in its corners
-qface3 = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
-
-# add objects in the study
-id_p1 = geompy.addToStudy(p1,"Point1")
-id_p2 = geompy.addToStudy(p2,"Point2")
-id_p3 = geompy.addToStudy(p3,"Point3")
-id_p4 = geompy.addToStudy(p4,"Point4")
-id_edge1 = geompy.addToStudy(edge1,"Edge1")
-id_edge2 = geompy.addToStudy(edge2,"Edge2")
-id_edge3 = geompy.addToStudy(edge3,"Edge3")
-id_edge4 = geompy.addToStudy(edge4,"Edge4")
-id_qface1 = geompy.addToStudy(qface1,"Qface1")
-id_qface2 = geompy.addToStudy(qface2,"Qface2")
-id_qface3 = geompy.addToStudy(qface3,"Qface3")
-
-# display the vertices, the edges and the quadrangle faces
-gg.createAndDisplayGO(id_p1)
-gg.createAndDisplayGO(id_p2)
-gg.createAndDisplayGO(id_p3)
-gg.createAndDisplayGO(id_p4)
-gg.createAndDisplayGO(id_edge1)
-gg.createAndDisplayGO(id_edge2)
-gg.createAndDisplayGO(id_edge3)
-gg.createAndDisplayGO(id_edge4)
-gg.createAndDisplayGO(id_qface1)
-gg.setDisplayMode(id_qface1,1)
-gg.createAndDisplayGO(id_qface2)
-gg.setDisplayMode(id_qface2,1)
-gg.createAndDisplayGO(id_qface3)
-gg.setDisplayMode(id_qface3,1)
-\endcode
+\include building_by_blocks_ex01.py
+Download this script
Hexagonal Solid
+\include building_by_blocks_ex02.py
+Download this script
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex( 0., 0., 0.)
-p1 = geompy.MakeVertex( 0., 0., 40.)
-p2 = geompy.MakeVertex( 70., -15., 0.)
-p3 = geompy.MakeVertex( 70., -15., 70.)
-
-p4 = geompy.MakeVertex( 0., 70., 0.)
-p5 = geompy.MakeVertex( 0., 70., 40.)
-p6 = geompy.MakeVertex( 70., 70., 0.)
-p7 = geompy.MakeVertex( 70., 70., 70.)
-
-p8 = geompy.MakeVertex( 0., -50., 0.)
-p9 = geompy.MakeVertex( 0., -50., 40.)
-p10 = geompy.MakeVertex( 70., -35., 0.)
-p11 = geompy.MakeVertex( 70., -35., 70.)
-
-# create faces
-qface1 = geompy.MakeQuad4Vertices(p0, p1, p2, p3)
-qface2 = geompy.MakeQuad4Vertices(p4, p5, p6, p7)
-qface3 = geompy.MakeQuad4Vertices(p0, p1, p4, p5)
-qface4 = geompy.MakeQuad4Vertices(p2, p3, p6, p7)
-qface5 = geompy.MakeQuad4Vertices(p0, p2, p4, p6)
-qface6 = geompy.MakeQuad4Vertices(p1, p3, p5, p7)
-qface7 = geompy.MakeQuad4Vertices(p8, p9, p10, p11)
-
-# create a hexahedral solid between two given faces
-solid1 = geompy.MakeHexa2Faces(qface1, qface7)
-
-# create a hexahedral solid, bounded by six given faces
-solid2 = geompy.MakeHexa(qface1, qface2, qface3, qface4, qface5, qface6)
-
-# add objects in the study
-geompy.addToStudy(qface1,"qface1")
-geompy.addToStudy(qface2,"qface2")
-geompy.addToStudy(qface3,"qface3")
-geompy.addToStudy(qface4,"qface4")
-geompy.addToStudy(qface5,"qface5")
-geompy.addToStudy(qface6,"qface6")
-geompy.addToStudy(qface7,"qface7")
-
-id_solid1 = geompy.addToStudy(solid1,"Solid1")
-id_solid2 = geompy.addToStudy(solid2,"Solid2")
-
-# display solids
-gg.createAndDisplayGO(id_solid1)
-gg.setDisplayMode(id_solid1, 1)
-gg.createAndDisplayGO(id_solid2)
-gg.setDisplayMode(id_solid2, 1)
-\endcode
-
-*/
\ No newline at end of file
+*/
diff --git a/doc/salome/gui/GEOM/input/tui_center_of_mass.doc b/doc/salome/gui/GEOM/input/tui_center_of_mass.doc
index 9c9b6f659..49eb49538 100644
--- a/doc/salome/gui/GEOM/input/tui_center_of_mass.doc
+++ b/doc/salome/gui/GEOM/input/tui_center_of_mass.doc
@@ -1,25 +1,7 @@
/*!
\page tui_center_of_mass_page Center of masses
-
-\code
-import geompy
-import math
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100,30,100)
-cm = geompy.MakeCDG(box)
-if cm is None:
- raise RuntimeError, "MakeCDG(box) failed"
-else:
- print "\nCentre of gravity of box has been successfully obtained:"
- coords = geompy.PointCoordinates(cm)
- print "(", coords[0], ", ", coords[1], ", ", coords[2], ")"
- dx = math.sqrt((coords[0] - 50)*(coords[0] - 50))
- dy = math.sqrt((coords[1] - 15)*(coords[1] - 15))
- dz = math.sqrt((coords[2] - 50)*(coords[2] - 50))
- if dx > 1e-7 or dy > 1e-7 or dz > 1e-7:
- print "But must be (50, 15, 50)"
-\endcode
+\include center_of_mass.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_check_compound_of_blocks.doc b/doc/salome/gui/GEOM/input/tui_check_compound_of_blocks.doc
index 1bd2fe9bb..eeb9d92a1 100644
--- a/doc/salome/gui/GEOM/input/tui_check_compound_of_blocks.doc
+++ b/doc/salome/gui/GEOM/input/tui_check_compound_of_blocks.doc
@@ -1,27 +1,7 @@
/*!
\page tui_check_compound_of_blocks_page Check Compound of Blocks
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create boxes
-box1 = geompy.MakeBox(0,0,0,100,50,100)
-box2 = geompy.MakeBox(100,0,0,250,50,100)
-
-# make a compound
-compound = geompy.MakeCompound([box1, box2])
-
-# glue the faces of the compound
-tolerance = 1e-5
-glue = geompy.MakeGlueFaces(compound, tolerance)
-IsValid = geompy.CheckCompoundOfBlocks(glue)
-if IsValid == 0:
- raise RuntimeError, "Invalid compound created"
-else:
- print "\nCompound is valid"
-\endcode
+\include check_compound_of_blocks.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_check_self_intersections.doc b/doc/salome/gui/GEOM/input/tui_check_self_intersections.doc
index e49de0a30..346de0c2b 100644
--- a/doc/salome/gui/GEOM/input/tui_check_self_intersections.doc
+++ b/doc/salome/gui/GEOM/input/tui_check_self_intersections.doc
@@ -1,17 +1,7 @@
/*!
\page tui_check_self_intersections_page Detect Self-intersections
-
-\code
-import geompy
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100,30,100)
-IsValid = geompy.CheckSelfIntersections(box)
-if IsValid == 0:
- raise RuntimeError, "Box with self-intersections created"
-else:
- print "\nBox is valid"
-\endcode
+\include check_self_intersections.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_check_shape.doc b/doc/salome/gui/GEOM/input/tui_check_shape.doc
index f9ca32c97..5e11279ef 100644
--- a/doc/salome/gui/GEOM/input/tui_check_shape.doc
+++ b/doc/salome/gui/GEOM/input/tui_check_shape.doc
@@ -1,17 +1,7 @@
/*!
\page tui_check_shape_page Check Shape
-
-\code
-import geompy
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100,30,100)
-IsValid = geompy.CheckShape(box)
-if IsValid == 0:
- raise RuntimeError, "Invalid box created"
-else:
- print "\nBox is valid"
-\endcode
+\include check_shape.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_complex_objs.doc b/doc/salome/gui/GEOM/input/tui_complex_objs.doc
index 2cdcf156a..030943956 100644
--- a/doc/salome/gui/GEOM/input/tui_complex_objs.doc
+++ b/doc/salome/gui/GEOM/input/tui_complex_objs.doc
@@ -4,697 +4,51 @@
\anchor tui_creation_prism
Creation of a Prism
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex( 0., 0., 0.)
-p2 = geompy.MakeVertex( 100., 0., 0.)
-p3 = geompy.MakeVertex( 100., 100., 0.)
-p4 = geompy.MakeVertex( 0., 100., 0.)
-p5 = geompy.MakeVertex( 0., 0., 60.)
-p6 = geompy.MakeVertex(-100., 0., 0.)
-p7 = geompy.MakeVertex(-100.,-100., 0.)
-p8 = geompy.MakeVertex( 0.,-100., 0.)
-
-# create a vector from the given components
-vector = geompy.MakeVectorDXDYDZ(50., 50., 50.)
-
-#create vectors from two points
-vector1_arc1 = geompy.MakeVector(p1, p2)
-vector2_arc1 = geompy.MakeVector(p1, p4)
-vector1_arc2 = geompy.MakeVector(p1, p6)
-vector2_arc2 = geompy.MakeVector(p1, p8)
-
-# create arcs from three points
-arc1 = geompy.MakeArc(p2, p3, p4)
-arc2 = geompy.MakeArc(p6, p7, p8)
-
-# create wires
-wire1 = geompy.MakeWire([vector1_arc1, arc1, vector2_arc1])
-wire2 = geompy.MakeWire([vector1_arc2, arc2, vector2_arc2])
-
-# create faces
-isPlanarWanted = 1
-face1 = geompy.MakeFace(wire1, isPlanarWanted)
-face2 = geompy.MakeFace(wire2, isPlanarWanted)
-
-# create prisms
-prism1 = geompy.MakePrism(face2, p1, p5)
-prism2 = geompy.MakePrismVecH(face1, vector, 50)
-prism3 = geompy.MakePrismVecH2Ways(face1, vector, 50)
-
-# add objects in the study
-id_face1 = geompy.addToStudy(face1,"Face1")
-id_face2 = geompy.addToStudy(face2,"Face2")
-id_prism1 = geompy.addToStudy(prism1,"Prism1")
-id_prism2 = geompy.addToStudy(prism2,"Prism2")
-id_prism3 = geompy.addToStudy(prism3,"Prism3")
-
-# display cylinders
-gg.createAndDisplayGO(id_face1)
-gg.setDisplayMode(id_face1,1)
-gg.createAndDisplayGO(id_face2)
-gg.setDisplayMode(id_face2,1)
-gg.createAndDisplayGO(id_prism1)
-gg.setDisplayMode(id_prism1,1)
-gg.createAndDisplayGO(id_prism2)
-gg.setDisplayMode(id_prism2,1)
-gg.createAndDisplayGO(id_prism3)
-gg.setDisplayMode(id_prism3,1)
-\endcode
+\include complex_objs_ex01.py
+Download this script
\anchor tui_creation_revolution
Creation of a Revolution
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex( 10., 10., 10.)
-p2 = geompy.MakeVertex( 15., 15., 50.)
-p3 = geompy.MakeVertex( 40., 40., 0.)
-
-#create vectors from two points
-vector1 = geompy.MakeVector(p1, p2)
-vector2 = geompy.MakeVector(p1, p3)
-
-# create a vector from the given components
-vector3 = geompy.MakeVectorDXDYDZ(-20., -20., 100.)
-
-# create a wire
-wire = geompy.MakeWire([vector1, vector2])
-
-# create a revolution
-revolution = geompy.MakeRevolution(wire, vector3, 2.3)
-
-# add objects in the study
-id_vector3 = geompy.addToStudy(vector3,"Axis")
-id_wire = geompy.addToStudy(wire,"Wire")
-id_revolution = geompy.addToStudy(revolution,"Revolution")
-
-# display the vector, the wire and the revolution
-gg.createAndDisplayGO(id_vector3)
-gg.createAndDisplayGO(id_wire)
-gg.createAndDisplayGO(id_revolution)
-gg.setDisplayMode(id_revolution,1)
-\endcode
+\include complex_objs_ex02.py
+Download this script
\anchor tui_creation_filling
Creation of a Filling
+\include complex_objs_ex03.py
+Download this script
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-mindeg = 2
-maxdeg = 5
-tol3d = 0.0001
-tol2d = 0.0001
-nbiter = 5
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex( -30., -30., 50.)
-p2 = geompy.MakeVertex( -60., -60., 30.)
-p3 = geompy.MakeVertex( -30., -30., 10.)
-
-# create an arc from three points
-arc = geompy.MakeArc(p1, p2, p3)
-ShapeListCompound = []
-i = 0
-while i <= 3 :
- S = geompy.MakeTranslation(arc, i * 50., 0., 0.)
- ShapeListCompound.append(S)
- i = i + 1
-
-compound = geompy.MakeCompound(ShapeListCompound)
-
-# create a filling
-filling = geompy.MakeFilling(compound, mindeg, maxdeg, tol3d, tol2d, nbiter)
-
-# add objects in the study
-id_compound = geompy.addToStudy(compound,"Compound")
-id_filling = geompy.addToStudy(filling,"Filling")
-
-# display the compound and the filling
-gg.createAndDisplayGO(id_compound)
-gg.createAndDisplayGO(id_filling)
-gg.setDisplayMode(id_filling,1)
-\endcode
-
\anchor tui_creation_pipe
Creation of a Pipe
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex(0. , 0. , 0. )
-px = geompy.MakeVertex(100., 0. , 0. )
-py = geompy.MakeVertex(0. , 100., 0. )
-pz = geompy.MakeVertex(0. , 0. , 100.)
-pxyz = geompy.MakeVertex(100., 100., 100.)
-
-# create a vector from two points
-vxy = geompy.MakeVector(px, py)
-
-# create an arc from three points
-arc = geompy.MakeArc(py, pz, px)
-
-# create a wire
-wire = geompy.MakeWire([vxy, arc])
-
-# create an edge
-edge = geompy.MakeEdge(p0, pxyz)
-
-# create a pipe
-pipe = geompy.MakePipe(wire, edge)
-
-# add objects in the study
-id_wire = geompy.addToStudy(wire,"Wire")
-id_edge = geompy.addToStudy(edge,"Edge")
-id_pipe = geompy.addToStudy(pipe,"Pipe")
-
-# display the wire, the edge (path) and the pipe
-gg.createAndDisplayGO(id_wire)
-gg.createAndDisplayGO(id_edge)
-gg.createAndDisplayGO(id_pipe)
-gg.setDisplayMode(id_pipe,1)
-\endcode
+\include complex_objs_ex04.py
+Download this script
\anchor tui_creation_pipe_with_diff_sec
Creation of a PipeWithDifferentSections
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-Wire_1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 100 0:R 0:C 100 90:T 0 200", [0, 0, 0, 0, 0, 1, 1, 0, -0])
-edges = geompy.SubShapeAll(Wire_1, geompy.ShapeType["EDGE"])
-vertices = geompy.SubShapeAll(Wire_1, geompy.ShapeType["VERTEX"])
-
-# create sections
-circles=[]
-circles.append(geompy.MakeCircle(vertices[0], edges[0], 20))
-circles.append(geompy.MakeCircle(vertices[1], edges[0], 40))
-circles.append(geompy.MakeCircle(vertices[2], edges[2], 30))
-circles.append(geompy.MakeCircle(vertices[3], edges[2], 20))
-
-# create pipe
-Pipe = geompy.MakePipeWithDifferentSections(circles, vertices, Wire_1, 0, 0)
-
-# add objects in the study
-geompy.addToStudy(circles[0], "circles1")
-geompy.addToStudy(circles[1], "circles2")
-geompy.addToStudy(circles[2], "circles3")
-geompy.addToStudy(circles[3], "circles4")
-id_wire = geompy.addToStudy(Wire_1, "Path")
-id_pipe = geompy.addToStudy(Pipe, "Pipe")
-
-# display the wire(path) and the pipe
-gg.createAndDisplayGO(id_wire)
-gg.createAndDisplayGO(id_pipe)
-gg.setDisplayMode(id_pipe,1)
-\endcode
+\include complex_objs_ex05.py
+Download this script
\anchor tui_creation_pipe_with_shell_sec
Creation of a PipeWithShellSections
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create path
-WirePath = geompy.MakeSketcher("Sketcher:F 0 0:TT 100 0:R 0:C 100 90:T 0 200", [0, 0, 0, 0, 0, 1, 1, 0, -0])
-
-#=======================================================
-# Create shell sections
-#=======================================================
-ps = [Vertex_1,Vertex_2,Vertex_3,Vertex_4]
-theLocations = [Vertex_1, Vertex_2, Vertex_3, Vertex_4]
-VC = geompy.MakeCompound(theLocations)
-geompy.addToStudy(VC,"VC")
-vs = [Edge_1,Edge_1,Edge_3,Edge_3]
-hs = [20,40,30,20]
-shells = []
-subbases = []
-
-# 1 section
-c0 = geompy.PointCoordinates(ps[0])
-c1 = geompy.PointCoordinates(ps[1])
-nx = c1[0] - c0[0]
-ny = c1[1] - c0[1]
-nz = c1[2] - c0[2]
-
-faces = []
-f1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:TT 20 20:TT 0 20:WF",
- [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
-f2 = geompy.MakeSketcher("Sketcher:F 0 0:TT 0 20:TT -20 20:TT -20 0:WF",
- [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
-f3 = geompy.MakeSketcher("Sketcher:F 0 0:TT -20 0:TT -20 -20:TT 0 -20:WF",
- [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
-f4 = geompy.MakeSketcher("Sketcher:F 0 0:TT 0 -20:TT 20 -20:TT 20 0:WF",
- [c0[0], c0[1], c0[2], nx, ny, nz, 0, 0, 1])
-faces.append(f1)
-faces.append(f2)
-faces.append(f3)
-faces.append(f4)
-shell = geompy.MakeSewing(faces,1.e-6)
-shells.append(shell)
-faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
-subbases.append(faces[0])
-
-# 2 section
-faces = []
-
-w = geompy.MakeSketcher("Sketcher:F 20 20:TT 0 20:TT 0 0:TT 20 0",
- [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
-[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
-arc = MakeArc(w,3,-1)
-w = geompy.MakeWire([e1,e2,e3,arc])
-f1 = geompy.MakeFace(w,1)
-
-w = geompy.MakeSketcher("Sketcher:F -20 0:TT 0 0:TT 0 20:TT -20 20",
- [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
-[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
-arc = MakeArc(w,3,-1)
-w = geompy.MakeWire([e1,e2,e3,arc])
-f2 = geompy.MakeFace(w,1)
-
-w = geompy.MakeSketcher("Sketcher:F 20 0:TT 0 0:TT 0 -20:TT 20 -20",
- [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
-[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
-arc = MakeArc(w,3,-1)
-w = geompy.MakeWire([e1,e2,e3,arc])
-f3 = geompy.MakeFace(w,1)
-
-w = geompy.MakeSketcher("Sketcher:F -20 -20:TT 0 -20:TT 0 0:TT -20 0",
- [c1[0], c1[1], c1[2], nx, ny, nz, 0, 0, 1])
-[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
-arc = MakeArc(w,3,-1)
-w = geompy.MakeWire([e1,e2,e3,arc])
-f4 = geompy.MakeFace(w,1)
-
-faces.append(f1)
-faces.append(f2)
-faces.append(f3)
-faces.append(f4)
-shell = geompy.MakeSewing(faces,1.e-6)
-shells.append(shell)
-faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
-subbases.append(faces[0])
-
-# 3 section
-faces = []
-c2 = geompy.PointCoordinates(ps[2])
-c3 = geompy.PointCoordinates(ps[3])
-nx = c3[0] - c2[0]
-ny = c3[1] - c2[1]
-nz = c3[2] - c2[2]
-
-w = geompy.MakeSketcher("Sketcher:F 20 20:TT 0 20:TT 0 0:TT 20 0",
- [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
-[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
-arc = MakeArc(w,3,1)
-w = geompy.MakeWire([e1,e2,e3,arc])
-f1 = geompy.MakeFace(w,1)
-
-w = geompy.MakeSketcher("Sketcher:F -20 0:TT 0 0:TT 0 20:TT -20 20",
- [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
-[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
-arc = MakeArc(w,3,1)
-w = geompy.MakeWire([e1,e2,e3,arc])
-f2 = geompy.MakeFace(w,1)
-
-w = geompy.MakeSketcher("Sketcher:F 20 0:TT 0 0:TT 0 -20:TT 20 -20",
- [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
-[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
-arc = MakeArc(w,3,1)
-w = geompy.MakeWire([e1,e2,e3,arc])
-f3 = geompy.MakeFace(w,1)
-
-w = geompy.MakeSketcher("Sketcher:F -20 -20:TT 0 -20:TT 0 0:TT -20 0",
- [c2[0], c2[1], c2[2], nx, ny, nz, 0, 0, 1])
-[e1,e2,e3] = geompy.SubShapeAll(w, geompy.ShapeType["EDGE"])
-arc = MakeArc(w,3,1)
-w = geompy.MakeWire([e1,e2,e3,arc])
-f4 = geompy.MakeFace(w,1)
-
-faces.append(f1)
-faces.append(f2)
-faces.append(f3)
-faces.append(f4)
-shell = geompy.MakeSewing(faces,1.e-6)
-shells.append(shell)
-faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
-subbases.append(faces[2])
-
-# 4 section
-faces = []
-
-kk = 4
-dx = c3[0] - nx/kk
-dy = c3[1] - ny/kk
-dz = c3[2] - nz/kk
-rad = math.sqrt(nx*nx+ny*ny+nz*nz)
-vc = geompy.MakeVertex(dx,dy,dz)
-sph = geompy.MakeSpherePntR(vc,rad/kk)
-shellsph = geompy.SubShapeAll(sph, geompy.ShapeType["SHELL"])
-
-fs = []
-vec = geompy.MakeVectorDXDYDZ(0,0,1)
-ff = geompy.MakePlane(ps[3],vec,40)
-fs.append(ff)
-vp = geompy.MakeVertex(c3[0],c3[1],c3[2]+20)
-ff = geompy.MakePlane(vp,vec,40)
-fs.append(ff)
-vp = geompy.MakeVertex(c3[0],c3[1],c3[2]-20)
-ff = geompy.MakePlane(vp,vec,40)
-fs.append(ff)
-vec = geompy.MakeVectorDXDYDZ(1,0,0)
-ff = geompy.MakePlane(ps[3],vec,40)
-fs.append(ff)
-vp = geompy.MakeVertex(c3[0]+20,c3[1],c3[2])
-ff = geompy.MakePlane(vp,vec,40)
-fs.append(ff)
-vp = geompy.MakeVertex(c3[0]-20,c3[1],c3[2])
-ff = geompy.MakePlane(vp,vec,40)
-fs.append(ff)
-aPartition = geompy.MakePartition(shellsph,fs)
-fs = geompy.SubShapeAllSortedCentres(aPartition, geompy.ShapeType["FACE"])
-
-faces.append(fs[0])
-faces.append(fs[1])
-faces.append(fs[2])
-faces.append(fs[3])
-shell = geompy.MakeSewing(faces,1.e-6)
-shells.append(shell)
-faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
-
-
-#===========================================================
-# Create Pipe
-#===========================================================
-subbases = []
-Pipe = geompy.MakePipeWithShellSections(shells, subbases, theLocations, WirePath,
- theWithContact=0, theWithCorrection=0)
-
-# add objects in the study
-resc = geompy.MakeCompound(shells)
-id_sec = geompy.addToStudy(resc,"sections")
-id_wire = geompy.addToStudy(WirePath,"WirePath")
-id_pipe = geompy.addToStudy(Pipe, "Pipe")
-
-# display the wire(path), sections and the pipe
-gg.createAndDisplayGO(id_wire)
-gg.createAndDisplayGO(id_sec)
-gg.createAndDisplayGO(id_pipe)
-gg.setDisplayMode(id_pipe,1)
-\endcode
-
+\include complex_objs_ex06.py
+Download this script
\anchor tui_creation_pipe_without_path
Creation of a PipeShellsWithoutPath
-
-\code
-import geompy
-import math
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# Add a section based on quadrangles
-# ----------------------------------
-def section(s, p1, p2=None, p3=None, p4=None):
- if p2==None:
- q = p1
- else:
- q = geompy.MakeQuad4Vertices(p1, p2, p3, p4)
- pass
- s.append(q)
- publish(q, "section")
- return q
-
-
-# find distance between two points
-# -------------------------------
-def Dist(p1,p2):
- c1 = geompy.PointCoordinates(p1)
- c2 = geompy.PointCoordinates(p2)
- return math.sqrt( (c2[0]-c1[0])*(c2[0]-c1[0]) +
- (c2[1]-c1[1])*(c2[1]-c1[1]) +
- (c2[2]-c1[2])*(c2[2]-c1[2]) )
-
-
-# return middle point
-# -------------------------------
-def MiddleVert(p1,p2):
- c1 = geompy.PointCoordinates(p1)
- c2 = geompy.PointCoordinates(p2)
- return geompy.MakeVertex( (c2[0]+c1[0])/2, (c2[1]+c1[1])/2, (c2[2]+c1[2])/2 )
-
-
-# Complex section
-# result - 16 quads from lines
-# pnt - point from path
-# vec - direction from path
-def MakeComplexSect(pnt,vec,rmax,rmin,nb):
- dang = 1.0/nb/2
- cmax = geompy.MakeCircle(pnt,vec,rmax)
- cmin = geompy.MakeCircle(pnt,vec,rmin)
- faces = []
- for i in range(0,2*nb,2):
- p1 = geompy.MakeVertexOnCurve(cmin,dang*i)
- p2 = geompy.MakeVertexOnCurve(cmax,dang*(i+1))
- p3 = geompy.MakeVertexOnCurve(cmin,dang*(i+2))
- f = geompy.MakeQuad4Vertices(pnt,p1,p2,p3)
- faces.append(f)
- pass
- shell = geompy.MakeSewing(faces,1.e-6)
- return shell
-
-
-#=======================================================
-# Create simple path and recieve points
-# for section creation
-#=======================================================
-WirePath = geompy.MakeSketcher("Sketcher:F 0 0:T 60 0:T 40 0:R 0:C 100 90:",
- [0, 0, 0, 0, 0, 1, 1, 0, 0])
-vs = geompy.SubShapeAll(WirePath, geompy.ShapeType["VERTEX"])
-
-#=======================================================
-# Create shell sections
-#=======================================================
-shells = []
-subbases = []
-locs = []
-
-# 1 section
-shell = MakeComplexSect(vs[0], geompy.MakeVectorDXDYDZ(1,0,0), 60, 40, 16)
-shells.append(shell)
-vs1 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
-locs.append(vs1[17])
-
-# 2 section
-shell = MakeComplexSect(vs[1], geompy.MakeVectorDXDYDZ(1,0,0), 80, 30, 16)
-shells.append(shell)
-vs2 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
-locs.append(vs2[17])
-
-# 3 section
-shell = MakeComplexSect(vs[2], geompy.MakeVectorDXDYDZ(1,0,0), 60, 40, 16)
-shells.append(shell)
-vs3 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
-locs.append(vs3[17])
-
-# 4 section
-shell = MakeComplexSect(vs[3], geompy.MakeVectorDXDYDZ(0,1,0), 40, 35, 16)
-shells.append(shell)
-vs4 = geompy.SubShapeAllSortedCentres(shell,geompy.ShapeType["VERTEX"])
-locs.append(vs4[17])
-
-
-#===========================================================
-# Create Pipe
-#===========================================================
-
-Pipe = geompy.MakePipeShellsWithoutPath(shells,locs)
-
-# add objects in the study
-resc = geompy.MakeCompound(shells)
-id_sec = geompy.addToStudy(resc,"sections")
-resl = geompy.MakeCompound(locs)
-id_loc = geompy.addToStudy(resl,"locations")
-id_pipe = geompy.addToStudy(Pipe, "Pipe")
-
-# display the sections, locations and pipe
-gg.createAndDisplayGO(id_sec)
-gg.createAndDisplayGO(id_loc)
-gg.createAndDisplayGO(id_pipe)
-gg.setDisplayMode(id_pipe,1)
-\endcode
+\include complex_objs_ex07.py
+Download this script
\anchor tui_creation_pipe_binormal_along_vector
Creation of a PipeBiNormalAlongVector
-
-\code
-def MakeHelix(radius, height, rotation, direction):
- # - create a helix -
- radius = 1.0 * radius
- height = 1.0 * height
- rotation = 1.0 * rotation
- if direction > 0:
- direction = +1
- else:
- direction = -1
- pass
- from math import sqrt
- length_z = height
- length_xy = radius*rotation
- length = sqrt(length_z*length_z + length_xy*length_xy)
- import geompy
- nb_steps = 1
- epsilon = 1.0e-6
- while 1:
- z_step = height / nb_steps
- angle_step = rotation / nb_steps
- z = 0.0
- angle = 0.0
- helix_points = []
- for n in range(nb_steps+1):
- from math import cos, sin
- x = radius * cos(angle)
- y = radius * sin(angle)
- p = geompy.MakeVertex(x, y, z)
- helix_points.append( p )
- z += z_step
- angle += direction * angle_step
- pass
- helix = geompy.MakeInterpol(helix_points)
- length_test = geompy.BasicProperties(helix)[0]
- prec = abs(length-length_test)/length
- # print nb_steps, length_test, prec
- if prec < epsilon:
- break
- nb_steps *= 2
- pass
- return helix
-
-def MakeSpring(radius, height, rotation, direction, thread_radius, base_rotation=0.0):
- # - create a pipe -
- thread_radius = 1.0 * thread_radius
- # create a helix
- helix = MakeHelix(radius, height, rotation, direction)
- # base in the (Ox, Oz) plane
- import geompy
- p0 = geompy.MakeVertex(radius-3*thread_radius, 0.0, -thread_radius)
- p1 = geompy.MakeVertex(radius+3*thread_radius, 0.0, -thread_radius)
- p2 = geompy.MakeVertex(radius+3*thread_radius, 0.0, +thread_radius)
- p3 = geompy.MakeVertex(radius-3*thread_radius, 0.0, +thread_radius)
- e0 = geompy.MakeEdge(p0, p1)
- e1 = geompy.MakeEdge(p1, p2)
- e2 = geompy.MakeEdge(p2, p3)
- e3 = geompy.MakeEdge(p3, p0)
- w = geompy.MakeWire([e0, e1, e2, e3])
- # create a base face
- base = geompy.MakeFace(w, True)
- # create a binormal vector
- binormal = geompy.MakeVectorDXDYDZ(0.0, 0.0, 10.0)
- # create a pipe
- spring = geompy.MakePipeBiNormalAlongVector(base, helix, binormal)
- # Publish in the study
- geompy.addToStudy(base, "base")
- geompy.addToStudy(helix, "helix")
- geompy.addToStudy(binormal, "binormal")
- geompy.addToStudy(spring, "spring")
- return spring
-
-from math import pi
-
-spring = MakeSpring(50, 100, 2*pi, 1, 5, pi/2)
-\endcode
-
+\include complex_objs_ex08.py
+Download this script
\anchor tui_creation_pipe_path
Creation of a Middle Path
-
-\code
-import salome
-import geompy
-
-# Create a box
-Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
-
-# Get two opposite faces
-[Face_1,Face_2] = geompy.SubShapes(Box_1, [31, 33])
-
-# Get edges
-Box_1_edge_12 = geompy.GetSubShape(Box_1, [12])
-Box_1_edge_22 = geompy.GetSubShape(Box_1, [22])
-Box_1_edge_25 = geompy.GetSubShape(Box_1, [25])
-Box_1_edge_29 = geompy.GetSubShape(Box_1, [29])
-Box_1_edge_8 = geompy.GetSubShape(Box_1, [8])
-Box_1_edge_18 = geompy.GetSubShape(Box_1, [18])
-Box_1_edge_26 = geompy.GetSubShape(Box_1, [26])
-Box_1_edge_30 = geompy.GetSubShape(Box_1, [30])
-
-# These three calls to RestorePath return the same result
-Path_1 = geompy.RestorePath(Box_1, Face_1, Face_2)
-Path_2 = geompy.RestorePathEdges(Box_1, [Face_1], [Face_2])
-Path_3 = geompy.RestorePathEdges(Box_1,
- [Box_1_edge_12, Box_1_edge_22, Box_1_edge_25, Box_1_edge_29],
- [Box_1_edge_8, Box_1_edge_18, Box_1_edge_26, Box_1_edge_30])
-
-# Publish created objects
-geompy.addToStudy( Box_1, 'Box_1' )
-geompy.addToStudyInFather( Box_1, Face_1, 'Face_1' )
-geompy.addToStudyInFather( Box_1, Face_2, 'Face_2' )
-geompy.addToStudyInFather( Box_1, Box_1_edge_25, 'Box_1:edge_25' )
-geompy.addToStudyInFather( Box_1, Box_1_edge_22, 'Box_1:edge_22' )
-geompy.addToStudyInFather( Box_1, Box_1_edge_12, 'Box_1:edge_12' )
-geompy.addToStudyInFather( Box_1, Box_1_edge_29, 'Box_1:edge_29' )
-geompy.addToStudyInFather( Box_1, Box_1_edge_18, 'Box_1:edge_18' )
-geompy.addToStudyInFather( Box_1, Box_1_edge_26, 'Box_1:edge_26' )
-geompy.addToStudyInFather( Box_1, Box_1_edge_8, 'Box_1:edge_8' )
-geompy.addToStudyInFather( Box_1, Box_1_edge_30, 'Box_1:edge_30' )
-geompy.addToStudy( Path_1, 'Path_1' )
-geompy.addToStudy( Path_2, 'Path_2' )
-geompy.addToStudy( Path_3, 'Path_3' )
-\endcode
+\include complex_objs_ex09.py
+Download this script
Creation of Tangent Plane On Face
-\code
-import salome
-import geompy
-
-# Create Vertexes for curve
-Vertex_1 = geompy.MakeVertex(0, 0, 0)
-Vertex_2 = geompy.MakeVertex(0, 90, 30)
-Vertex_3 = geompy.MakeVertex(100, 90, 0)
-Vertex_4 = geompy.MakeVertex(-100, 90, 0)
-# Create curve
-Curve_1 = geompy.MakeInterpol([Vertex_4, Vertex_2, Vertex_3, Vertex_1])
-# Create Face by Extrusion of the Curve
-Extrusion_1 = geompy.MakePrismDXDYDZ(Curve_1, 0, 30, -60)
-# Make Tangent on this Extrusion (Face)
-Tangent_1 = geompy.MakeTangentPlaneOnFace(Extrusion_1, 0.7, 0.5, 150)
-# Publish in the study
-geompy.addToStudy( Vertex_1, "Vertex_1" )
-geompy.addToStudy( Vertex_2, "Vertex_2" )
-geompy.addToStudy( Vertex_3, "Vertex_3" )
-geompy.addToStudy( Vertex_4, "Vertex_4" )
-geompy.addToStudy( Curve_1, "Curve_1" )
-geompy.addToStudy( Extrusion_1, "Extrusion_1" )
-geompy.addToStudy( Tangent_1, "Tangent_1" )
-\endcode
+\include complex_objs_ex10.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_free_boundaries.doc b/doc/salome/gui/GEOM/input/tui_free_boundaries.doc
index b764df1b2..fb0420c6d 100644
--- a/doc/salome/gui/GEOM/input/tui_free_boundaries.doc
+++ b/doc/salome/gui/GEOM/input/tui_free_boundaries.doc
@@ -1,85 +1,7 @@
/*!
\page tui_free_boundaries_page Check Free Boundaries
-
-\code
-import os
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create boxes
-box1 = geompy.MakeBox(0,0,0,100,50,100)
-box2 = geompy.MakeBox(100,0,0,250,50,100)
-
-# make a compound
-compound = geompy.MakeCompound([box1, box2])
-
-# import from *.brep
-ImportFromBREP = geompy.ImportBREP(os.getenv("DATA_DIR")+"/Shapes/Brep/flight_solid.brep")
-
-# get a face
-faces = geompy.SubShapeAllSortedCentres(ImportFromBREP, geompy.ShapeType["FACE"])
-
-# get the free boundary for face 32
-Res = geompy.GetFreeBoundary(faces[32])
-isSuccess = Res[0]
-ClosedWires = Res[1]
-OpenWires = Res[2]
-
-if isSuccess == 1 :
- print "Checking free boudaries is OK."
-else :
- print "Checking free boudaries is KO!"
-print "len(ClosedWires) = ", len(ClosedWires)
-
-i = 0
-for wire in ClosedWires :
- wire_name = "Face 32 -> Close wires : WIRE %d"%(i+1)
- geompy.addToStudy(ClosedWires[i], wire_name)
- if i < len(ClosedWires) :
- i = i+ 1
-
-print "len(OpenWires) = ", len(OpenWires)
-
-i = 0
-for wire in OpenWires :
- wire_name = "Face 32 -> Open wires : WIRE %d"%(i+1)
- geompy.addToStudy(OpenWires[i], wire_name)
- if i < len(OpenWires) :
- i = i+ 1
-
-# get the free boundary for face 41
-Res = geompy.GetFreeBoundary(faces[41])
-isSuccess = Res[0]
-ClosedWires = Res[1]
-OpenWires = Res[2]
-
-if isSuccess == 1 :
- print "Checking free boudaries is OK."
-else :
- print "Checking free boudaries is KO!"
-print "len(ClosedWires) = ", len(ClosedWires)
-
-i = 0
-for wire in ClosedWires :
- wire_name = "Face 41 -> Close wires : WIRE %d"%(i+1)
- geompy.addToStudy(ClosedWires[i], wire_name)
- if i < len(ClosedWires) :
- i = i+ 1
-
-print "len(OpenWires) = ", len(OpenWires)
-
-i = 0
-for wire in OpenWires :
- wire_name = "Face 41 -> Open wires : WIRE %d"%(i+1)
- geompy.addToStudy(OpenWires[i], wire_name)
- if i < len(OpenWires) :
- i = i+ 1
-
-# add the imported object to the study
-id_ImportFromBREP = geompy.addToStudy(ImportFromBREP, "ImportFromBREP")
-salome.sg.updateObjBrowser(1)
-\endcode
+\include free_boundaries.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_free_faces.doc b/doc/salome/gui/GEOM/input/tui_free_faces.doc
index 7fd302288..00ae5bd23 100644
--- a/doc/salome/gui/GEOM/input/tui_free_faces.doc
+++ b/doc/salome/gui/GEOM/input/tui_free_faces.doc
@@ -1,52 +1,7 @@
/*!
\page tui_free_faces_page Check Free Faces
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(35, 35, 0)
-p2 = geompy.MakeVertex(35, 35, 50)
-v = geompy.MakeVector(p1, p2)
-
-# create a cylinder
-cylinder = geompy.MakeCone(p1, v, 30, 20, 20)
-
-# create a cone
-cone = geompy.MakeCone(p1, v, 70, 40, 60)
-
-# make cut
-cut = geompy.MakeCut(cone, cylinder)
-
-# get faces as sub-shapes
-faces = []
-faces = geompy.SubShapeAllSortedCentres(cut, geompy.ShapeType["FACE"])
-f_2 = geompy.GetSubShapeID(cut, faces[0])
-
-# remove one face from the shape
-cut_without_f_2 = geompy.SuppressFaces(cut, [f_2])
-
-# suppress the specified wire
-result = geompy.GetFreeFacesIDs(cut_without_f_2)
-print "A number of free faces is ", len(result)
-
-# add objects in the study
-all_faces = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["FACE"])
-for face in all_faces :
- sub_shape_id = geompy.GetSubShapeID(cut_without_f_2, face)
- if result.count(sub_shape_id) > 0 :
- face_name = "Free face %d"%(sub_shape_id)
- geompy.addToStudy(face, face_name)
-
-# in this example all faces from cut_without_f_2 are free
-id_cut_without_f_2 = geompy.addToStudy(cut_without_f_2, "Cut without f_2")
-
-# display the results
-gg.createAndDisplayGO(id_cut_without_f_2)
-gg.setDisplayMode(id_cut_without_f_2,1)
-\endcode
+\include free_faces.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_get_non_blocks.doc b/doc/salome/gui/GEOM/input/tui_get_non_blocks.doc
index b83ea9647..ca7a98d8f 100644
--- a/doc/salome/gui/GEOM/input/tui_get_non_blocks.doc
+++ b/doc/salome/gui/GEOM/input/tui_get_non_blocks.doc
@@ -1,32 +1,7 @@
/*!
\page tui_get_non_blocks_page Get Non Blocks
-
-\code
-import geompy
-import salome
-
-# create solids
-box = geompy.MakeBoxDXDYDZ(100, 100, 100)
-cyl = geompy.MakeCylinderRH(100, 200)
-
-geompy.addToStudy(box, 'box')
-geompy.addToStudy(cyl, 'cyl')
-
-# make a compound
-compound = geompy.MakeCompound([box, cyl])
-geompy.addToStudy(compound, 'compound')
-
-# explore the compound
-pair = geompy.GetNonBlocks(compound)
-
-if pair[0] is not None:
- geompy.addToStudyInFather(compound, pair[0], "GrNonBlocks")
- pass
-
-if pair[1] is not None:
- geompy.addToStudyInFather(compound, pair[1], "GrNonQuads")
- pass
-\endcode
+\include get_non_blocks.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_import_export.doc b/doc/salome/gui/GEOM/input/tui_import_export.doc
index cdd8c4ea0..52adf987e 100644
--- a/doc/salome/gui/GEOM/input/tui_import_export.doc
+++ b/doc/salome/gui/GEOM/input/tui_import_export.doc
@@ -1,45 +1,7 @@
/*!
\page tui_import_export_page Import/Export
-\code
-import geompy
-import salome
-
-# Example of import from IGES using various formats
-
-# get a path to SAMPLES_SRC
-import os
-thePath = os.getenv("DATA_DIR")
-# create filenames
-theFileName1 = thePath + "/Shapes/Iges/boite-3Dipsos_m.igs"
-theFileName2 = thePath + "/Shapes/Iges/boite-3Dipsos_mm.igs"
-#print "thePath = ", thePath
-
-# get units from files
-UnitName1 = geompy.GetIGESUnit(theFileName1)
-UnitName2 = geompy.GetIGESUnit(theFileName2)
-print "UnitName1 = ", UnitName1
-print "UnitName2 = ", UnitName2
-
-# import shapes
-Shape1 = geompy.ImportIGES(theFileName1)
-Shape2 = geompy.ImportIGES(theFileName2)
-Shape3 = geompy.ImportFile(theFileName2,"IGES_SCALE")
-[Xmin1,Xmax1, Ymin1,Ymax1, Zmin1,Zmax1] = geompy.BoundingBox(Shape1)
-[Xmin2,Xmax2, Ymin2,Ymax2, Zmin2,Zmax2] = geompy.BoundingBox(Shape2)
-[Xmin3,Xmax3, Ymin3,Ymax3, Zmin3,Zmax3] = geompy.BoundingBox(Shape3)
-geompy.addToStudy(Shape1, "3Dipsos_m")
-geompy.addToStudy(Shape2, "3Dipsos_mm")
-geompy.addToStudy(Shape3, "3Dipsos_mm_scaled")
-d1 = (Xmax1-Xmin1)*(Xmax1-Xmin1) + (Ymax1-Ymin1)*(Ymax1-Ymin1) + (Zmax1-Zmin1)*(Zmax1-Zmin1)
-d2 = (Xmax2-Xmin2)*(Xmax2-Xmin2) + (Ymax2-Ymin2)*(Ymax2-Ymin2) + (Zmax2-Zmin2)*(Zmax2-Zmin2)
-d3 = (Xmax3-Xmin3)*(Xmax3-Xmin3) + (Ymax3-Ymin3)*(Ymax3-Ymin3) + (Zmax3-Zmin3)*(Zmax3-Zmin3)
-import math
-dd32 = math.sqrt(d3/d2)
-dd12 = math.sqrt(d1/d2)
-dd31 = math.sqrt(d3/d1)
-# values dd31, dd12 and dd31 can be using for checking
-print "dd32 = ",dd32," dd12 = ",dd12," dd31 = ",dd31
-\endcode
+\include import_export.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_inertia.doc b/doc/salome/gui/GEOM/input/tui_inertia.doc
index 29530e292..a62b20784 100644
--- a/doc/salome/gui/GEOM/input/tui_inertia.doc
+++ b/doc/salome/gui/GEOM/input/tui_inertia.doc
@@ -1,20 +1,7 @@
/*!
\page tui_inertia_page Inertia
-
-\code
-import geompy
-import math
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100,30,100)
-In = geompy.Inertia(box)
-print "\nInertia matrix of box 100x30x100:"
-print " (", In[0], ", ", In[1], ", ", In[2], ")"
-print " (", In[3], ", ", In[4], ", ", In[5], ")"
-print " (", In[6], ", ", In[7], ", ", In[8], ")"
-print "Main moments of inertia of box 100x30x100:"
-print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11]
-\endcode
+\include inertia.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_min_distance.doc b/doc/salome/gui/GEOM/input/tui_min_distance.doc
index e26e219f9..db024ca4b 100644
--- a/doc/salome/gui/GEOM/input/tui_min_distance.doc
+++ b/doc/salome/gui/GEOM/input/tui_min_distance.doc
@@ -1,15 +1,7 @@
/*!
\page tui_min_distance_page Minimal Distance
-
-\code
-import geompy
-
-# create boxes
-box1 = geompy.MakeBoxDXDYDZ(100,30,100)
-box2 = geompy.MakeBox(105,0,0,200,30,100)
-min_dist = geompy.MinDistance(box1,box2)
-print "\nMinimal distance between box1 and box2 = ", min_dist
-\endcode
+\include min_distance.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_normal_face.doc b/doc/salome/gui/GEOM/input/tui_normal_face.doc
index 0c81116a8..7d31fcc26 100644
--- a/doc/salome/gui/GEOM/input/tui_normal_face.doc
+++ b/doc/salome/gui/GEOM/input/tui_normal_face.doc
@@ -1,23 +1,7 @@
/*!
\page tui_normal_face_page Normal to a Face
-
-\code
-import geompy
-import math
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100,30,100)
-
-faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
-face0 = faces[0]
-vnorm = geompy.GetNormal(face0)
-if vnorm is None:
- raise RuntimeError, "GetNormal(face0) failed"
-else:
- geompy.addToStudy(face0, "Face0")
- geompy.addToStudy(vnorm, "Normale to Face0")
- print "\nNormale of face has been successfully obtained"
-\endcode
+\include normal_face.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_notebook_geom.doc b/doc/salome/gui/GEOM/input/tui_notebook_geom.doc
index 629ce6329..8db9c59d2 100644
--- a/doc/salome/gui/GEOM/input/tui_notebook_geom.doc
+++ b/doc/salome/gui/GEOM/input/tui_notebook_geom.doc
@@ -3,27 +3,7 @@
\page tui_notebook_geom_page Using SALOME NoteBook
\anchor tui_notebook_geom
-
-\code
-import geompy
-import salome
-import salome_notebook
-gg = salome.ImportComponentGUI("GEOM")
-
-# set variables
-notebook = salome_notebook.notebook
-notebook.set("Length", 150)
-notebook.set("Width", 100)
-
-# create box
-box = geompy.MakeBoxDXDYDZ("Length", "Width", 200)
-
-# add object in the study
-id_box = geompy.addToStudy(box,"Box")
-
-# display the boxes
-gg.createAndDisplayGO(id_box)
-gg.setDisplayMode(id_box,1)
-\endcode
+\include notebook_geom.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_point_coordinates.doc b/doc/salome/gui/GEOM/input/tui_point_coordinates.doc
index 0f138367b..6fbb9c9a6 100644
--- a/doc/salome/gui/GEOM/input/tui_point_coordinates.doc
+++ b/doc/salome/gui/GEOM/input/tui_point_coordinates.doc
@@ -1,27 +1,7 @@
/*!
\page tui_point_coordinates_page Point Coordinates
+\include point_coordinates.py
+Download this script
-\code
-import math
-import geompy
-
-# create a point
-point = geompy.MakeVertex(15., 23., 80.)
-
-# get the coordinates of the point and check its values
-coords = geompy.PointCoordinates(point)
-
-# check the obtained coordinate values
-tolerance = 1.e-07
-def IsEqual(val1, val2): return (math.fabs(val1 - val2) < tolerance)
-
-if IsEqual(coords[0], 15.) and IsEqual(coords[1], 23.) and IsEqual(coords[2], 80.):
- print "All values are OK."
-else :
- print "Coordinates of point must be (15, 23, 80), but returned (",
- print coords[0], ", ", coords[1], ", ", coords[2], ")"
- pass
-\endcode
-
-*/
\ No newline at end of file
+*/
diff --git a/doc/salome/gui/GEOM/input/tui_primitives.doc b/doc/salome/gui/GEOM/input/tui_primitives.doc
index af7670ea8..9c4f49d55 100644
--- a/doc/salome/gui/GEOM/input/tui_primitives.doc
+++ b/doc/salome/gui/GEOM/input/tui_primitives.doc
@@ -4,230 +4,37 @@
\anchor tui_creation_box
Creation of a Box
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex(15, 25, 35)
-p70 = geompy.MakeVertex(70, 70, 70)
-
-# create boxes
-box1 = geompy.MakeBoxDXDYDZ(10, 20, 30)
-box2 = geompy.MakeBox(10,20,30, 15,25,35)
-box3 = geompy.MakeBoxTwoPnt(p0, p70)
-
-# add objects in the study
-id_box1 = geompy.addToStudy(box1,"Box1")
-id_box2 = geompy.addToStudy(box2,"Box2")
-id_box3 = geompy.addToStudy(box3,"Box3")
-
-# display the boxes
-gg.createAndDisplayGO(id_box1)
-gg.setDisplayMode(id_box1,1)
-gg.createAndDisplayGO(id_box2)
-gg.setDisplayMode(id_box2,1)
-gg.createAndDisplayGO(id_box3)
-gg.setDisplayMode(id_box3,1)
-\endcode
+\include primitives_ex01.py
+Download this script
\anchor tui_creation_cylinder
Creation of a Cylinder
-
-\code
-import geompy
-import salome
-
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(25, 35, 45)
-p2 = geompy.MakeVertex(70, 70, 70)
-v = geompy.MakeVector(p1, p2)
-
-# create cylinders
-height = 40
-
-radius1 = 15
-cylinder1 = geompy.MakeCylinder(p1, v, radius1, height)
-
-radius2 = 30
-cylinder2 = geompy.MakeCylinderRH(radius2, height)
-
-# add objects in the study
-id_cylinder1 = geompy.addToStudy(cylinder1,"Cylinder1")
-id_cylinder2 = geompy.addToStudy(cylinder2,"Cylinder2")
-
-# display the cylinders
-gg.createAndDisplayGO(id_cylinder1)
-gg.setDisplayMode(id_cylinder1,1)
-gg.createAndDisplayGO(id_cylinder2)
-gg.setDisplayMode(id_cylinder2,1)
-\endcode
+\include primitives_ex02.py
+Download this script
\anchor tui_creation_sphere
Creation of a Sphere
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex
-p = geompy.MakeVertex(55, 45, 25)
-
-# create spheres
-radius1 = 20
-sphere1 = geompy.MakeSpherePntR(p, radius1)
-radius2 = 15
-sphere2 = geompy.MakeSphere(0, 0, 45, radius2)
-radius3 = 30
-sphere3 = geompy.MakeSphereR(radius3)
-
-# add objects in the study
-id_sphere1 = geompy.addToStudy(sphere1,"Sphere1")
-id_sphere2 = geompy.addToStudy(sphere2,"Sphere2")
-id_sphere3 = geompy.addToStudy(sphere3,"Sphere3")
-
-# display spheres
-gg.createAndDisplayGO(id_sphere1)
-gg.setDisplayMode(id_sphere1,1)
-gg.createAndDisplayGO(id_sphere2)
-gg.setDisplayMode(id_sphere2,1)
-gg.createAndDisplayGO(id_sphere3)
-gg.setDisplayMode(id_sphere3,1)
-\endcode
+\include primitives_ex03.py
+Download this script
\anchor tui_creation_torus
Creation of a Torus
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(35, 40, 45)
-p2 = geompy.MakeVertex(35, 45, 70)
-v = geompy.MakeVector(p1, p2)
-
-# create toruses
-torus1 = geompy.MakeTorus(p1, v, 20, 10)
-torus2 = geompy.MakeTorusRR(30, 15)
-
-# add objects in the study
-id_torus1 = geompy.addToStudy(torus1,"Torus1")
-id_torus2 = geompy.addToStudy(torus2,"Torus2")
-
-# display toruses
-gg.createAndDisplayGO(id_torus1)
-gg.setDisplayMode(id_torus1,1)
-gg.createAndDisplayGO(id_torus2)
-gg.setDisplayMode(id_torus2,1)
-\endcode
+\include primitives_ex04.py
+Download this script
\anchor tui_creation_cone
Creation of a Cone
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(35, 35, 0)
-p2 = geompy.MakeVertex(35, 35, 70)
-v = geompy.MakeVector(p1, p2)
-
-# create cones
-cone1 = geompy.MakeCone(p1, v, 17, 1, 20)
-cone2 = geompy.MakeConeR1R2H(30, 10, 30)
-
-# add objects in the study
-id_cone1 = geompy.addToStudy(cone1,"Cone1")
-id_cone2 = geompy.addToStudy(cone2,"Cone2")
-
-# display cones
-gg.createAndDisplayGO(id_cone1)
-gg.setDisplayMode(id_cone1,1)
-gg.createAndDisplayGO(id_cone2)
-gg.setDisplayMode(id_cone2,1)
-\endcode
+\include primitives_ex05.py
+Download this script
\anchor tui_creation_disk
Creation of a Disk
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex(0., 0., 0.)
-px = geompy.MakeVertex(100., 0. , 0. )
-py = geompy.MakeVertex(0. , 100., 0. )
-pz = geompy.MakeVertex(0. , 0. , 100.)
-
-# create a vector on two points
-vxy = geompy.MakeVector(px, py)
-
-# create a disk in OXY plane
-disk1 = geompy.MakeDiskR(100, 1)
-
-# create a disk from a point, a vector and a radius
-disk2 = geompy.MakeDiskPntVecR(pz, vxy, 30)
-
-#create a circle from three points
-disk3 = geompy.MakeDiskThreePnt(p0, px, py)
-
-# add objects in the study
-id_vxy = geompy.addToStudy(vxy, "Vector")
-id_disk1 = geompy.addToStudy(disk1,"Disk1")
-id_disk2 = geompy.addToStudy(disk2,"Disk2")
-id_disk3 = geompy.addToStudy(disk3,"Disk3")
-
-# display disks
-gg.createAndDisplayGO(id_vxy)
-gg.createAndDisplayGO(id_disk1)
-gg.createAndDisplayGO(id_diks2)
-gg.createAndDisplayGO(id_diks3)
-\endcode
+\include primitives_ex06.py
+Download this script
\anchor tui_creation_squareface
Creation of a Rectangle
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-px = geompy.MakeVertex(100., 0. , 0. )
-py = geompy.MakeVertex(0. , 100., 0. )
-
-# create a vector on two points
-vxy = geompy.MakeVector(px, py)
-
-# create a rectangle in OXY plane
-face1 = geompy.MakeFaceHW(100, 100, 1)
-
-# create a rectangle using normal vector
-face2 = geompy.MakeFaceObjHW(vxy, 50, 150)
-
-# create a rectangle from other face
-face3 = geompy.MakeFaceObjHW(face2, 150, 50)
-
-# add objects in the study
-id_face1 = geompy.addToStudy(face1,"Face1")
-id_face2 = geompy.addToStudy(face2,"Face2")
-id_face3 = geompy.addToStudy(face3,"Face3")
-
-# display rectangles
-gg.createAndDisplayGO(id_face1)
-gg.createAndDisplayGO(id_face2)
-gg.createAndDisplayGO(id_face3)
-\endcode
+\include primitives_ex07.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_repairing_operations.doc b/doc/salome/gui/GEOM/input/tui_repairing_operations.doc
index 0ce8b63db..286731970 100644
--- a/doc/salome/gui/GEOM/input/tui_repairing_operations.doc
+++ b/doc/salome/gui/GEOM/input/tui_repairing_operations.doc
@@ -4,444 +4,57 @@
\anchor tui_shape_processing
Shape Processing
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices, an edge, an arc, a wire, a face and a prism
-p1 = geompy.MakeVertex(0,0,0)
-p2 = geompy.MakeVertex(200,0,0)
-p3 = geompy.MakeVertex(100,150,0)
-edge = geompy.MakeEdge(p1,p2)
-arc = geompy.MakeArc(p1,p3,p2)
-wire = geompy.MakeWire([edge,arc])
-face = geompy.MakeFace(wire, 1)
-theShape = geompy.MakePrismVecH(face, edge, 130)
-
-# check the shape at the beginning
-print "Before ProcessShape:"
-isValid = geompy.CheckShape(theShape)
-if isValid == 0:
- print "The shape is not valid"
-else:
- print "The shape seems to be valid"
-
-# process the Shape
-Operators = ["FixShape"]
-Parameters = ["FixShape.Tolerance3d"]
-Values = ["1e-7"]
-PS = geompy.ProcessShape(theShape, Operators, Parameters, Values)
-
-# check the shape at the end
-print "After ProcessShape:"
-isValid = geompy.CheckShape(PS)
-if isValid == 0:
- print "The shape is not valid"
- raise RuntimeError, "It seems, that the ProcessShape() has failed"
-else:
- print "The shape seems to be valid"
-
-# add in the study and display
-Id_Shape = geompy.addToStudy(theShape, "Invalid Shape")
-Id_PS = geompy.addToStudy(PS, "Processed Shape")
-gg.createAndDisplayGO(Id_Shape)
-gg.setDisplayMode(Id_Shape,1)
-gg.createAndDisplayGO(Id_PS)
-gg.setDisplayMode(Id_PS,1)
-\endcode
+\include repairing_operations_ex01.py
+Download this script
\anchor tui_suppress_faces
Suppress Faces
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(200, 200, 200)
-
-# The list of IDs (IDList) for suppress faces
-sup_faces = []
-sup_faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
-
-# get indices of the sub-shape
-f1_id = geompy.GetSubShapeID(box, sup_faces[3])
-
-# remove faces from the given object (shape)
-result = geompy.SuppressFaces(box, [f1_id])
-
-# add objects in the study
-id_box = geompy.addToStudy(box, "Box")
-id_result = geompy.addToStudy(result, "Result")
-
-# display the results
-gg.createAndDisplayGO(id_box)
-gg.setDisplayMode(id_box,1)
-gg.createAndDisplayGO(id_result)
-gg.setDisplayMode(id_result,1)
-\endcode
+\include repairing_operations_ex02.py
+Download this script
\anchor tui_close_contour
Close Contour
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices and vectors
-p0 = geompy.MakeVertex( 0., 0., 0.)
-px = geompy.MakeVertex(100., 0., 0.)
-py = geompy.MakeVertex( 0., 100., 0.)
-py1 = geompy.MakeVertex( 0., 140., 0.)
-pz = geompy.MakeVertex( 0., 0., 100.)
-vxy = geompy.MakeVector(px, py)
-
-# create an arc
-arc = geompy.MakeArc(py1, pz, px)
-
-# create a wire
-wire = geompy.MakeWire([vxy, arc])
-
-# close an open wire by creation of an edge between ends
-wire_close = geompy.CloseContour(wire, [1], 0)
-
-# add objects in the study
-id_wire = geompy.addToStudy(wire, "Wire")
-id_wire_close = geompy.addToStudy(wire_close, "Wire close")
-
-# display the results
-gg.createAndDisplayGO(id_wire)
-gg.createAndDisplayGO(id_wire_close)
-\endcode
+\include repairing_operations_ex03.py
+Download this script
\anchor tui_suppress_internal_wires
Suppress Internal Wires
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(55, 65, 50)
-p2 = geompy.MakeVertex(55, 0, 50)
-v = geompy.MakeVector(p1, p2)
-
-# create a cylinder
-height = 100
-radius1 = 40
-cylinder = geompy.MakeCylinder(p1, v, radius1, height)
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100, 100, 100)
-
-# make a cut
-cut = geompy.MakeCut(box, cylinder)
-
-# suppress all internal wires
-result = geompy.SuppressInternalWires(cut, [])
-
-# add objects in the study
-id_cut = geompy.addToStudy(cut, "Cut")
-id_result = geompy.addToStudy(result, "Result")
-
-# display the results
-gg.createAndDisplayGO(id_cut)
-gg.setDisplayMode(id_cut,1)
-gg.createAndDisplayGO(id_result)
-gg.setDisplayMode(id_result,1)
-\endcode
+\include repairing_operations_ex04.py
+Download this script
\anchor tui_suppress_holes
Suppress Holes
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(35, 35, 0)
-p2 = geompy.MakeVertex(35, 35, 50)
-v = geompy.MakeVector(p1, p2)
-
-# create a cylinder
-height = 20
-radius1 = 20
-cylinder = geompy.MakeCylinder(p1, v, radius1, height)
-
-# create a cone
-cone = geompy.MakeCone(p1, v, 70, 0, 80)
-
-# make a cut
-cut = geompy.MakeCut(cone, cylinder)
-
-# get faces as sub-shapes
-faces = []
-faces = geompy.SubShapeAllSortedCentres(cut, geompy.ShapeType["FACE"])
-f_2 = geompy.GetSubShapeID(cut, faces[2])
-
-# remove one face from the shape
-cut_without_f_2 = geompy.SuppressFaces(cut, [f_2])
-
-# get wires as sub-shapes
-wires = []
-wires = geompy.SubShapeAllSortedCentres(cut_without_f_2, geompy.ShapeType["WIRE"])
-w_0 = geompy.GetSubShapeID(cut_without_f_2, wires[0])
-
-# suppress the selected wire
-result = geompy.SuppressHoles(cut_without_f_2, [w_0])
-
-# add objects in the study
-id_cut = geompy.addToStudy(cut, "Cut")
-id_cut_without_f_2 = geompy.addToStudy(cut_without_f_2, "Cut without f_2")
-id_result = geompy.addToStudy(result, "Result")
-
-# display the results
-gg.createAndDisplayGO(id_cut)
-gg.setDisplayMode(id_cut,1)
-gg.createAndDisplayGO(id_cut_without_f_2)
-gg.setDisplayMode(id_cut_without_f_2,1)
-gg.createAndDisplayGO(id_result)
-gg.setDisplayMode(id_result,1)
-\endcode
+\include repairing_operations_ex05.py
+Download this script
\anchor tui_sewing
Sewing
-
-\code
-import geompy
-import salome
-import math
-gg = salome.ImportComponentGUI("GEOM")
-
-# create base points
-px = geompy.MakeVertex(100., 0., 0.)
-py = geompy.MakeVertex(0., 100., 0.)
-pz = geompy.MakeVertex(0., 0., 100.)
-
-# create base geometry 2D & 3D
-vector = geompy.MakeVector(px, py)
-arc = geompy.MakeArc(py, pz, px)
-
-# create base objects
-angle = 45. * math.pi / 180
-WantPlanarFace = 1 #True
-wire = geompy.MakeWire([vector, arc])
-face = geompy.MakeFace(wire, WantPlanarFace)
-face_rot = geompy.MakeRotation(face, vector, angle)
-
-# make sewing
-precision = 0.00001
-sewing = geompy.MakeSewing([face, face_rot], precision)
-
-# add objects in the study
-id_face = geompy.addToStudy(face, "Face")
-id_face_rot = geompy.addToStudy(face_rot, "Face rotation")
-id_sewing = geompy.addToStudy(sewing, "Sewing")
-
-# display the results
-gg.createAndDisplayGO(id_face)
-gg.setDisplayMode(id_face,1)
-gg.createAndDisplayGO(id_face_rot)
-gg.setDisplayMode(id_face_rot,1)
-gg.createAndDisplayGO(id_sewing)
-gg.setDisplayMode(id_sewing,1)
-\endcode
+\include repairing_operations_ex06.py
+Download this script
\anchor tui_glue_faces
Glue Faces
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create boxes
-box1 = geompy.MakeBox(0,0,0,100,50,100)
-box2 = geompy.MakeBox(100,0,0,250,50,100)
-
-# make compound
-compound = geompy.MakeCompound([box1, box2])
-
-# glue compound's faces
-tolerance = 1e-5
-glue = geompy.MakeGlueFaces(compound, tolerance)
-
-# add objects in study
-id_box1 = geompy.addToStudy(box1, "Box1")
-id_box2 = geompy.addToStudy(box2, "Box2")
-id_compound = geompy.addToStudy(compound, "Compound")
-id_glue = geompy.addToStudy(glue, "Glue faces")
-
-# display results
-gg.createAndDisplayGO(id_box1)
-gg.setDisplayMode(id_box1,1)
-gg.createAndDisplayGO(id_box2)
-gg.setDisplayMode(id_box2,1)
-gg.createAndDisplayGO(id_compound)
-gg.setDisplayMode(id_compound,1)
-gg.createAndDisplayGO(id_glue)
-gg.setDisplayMode(id_glue,1)
-\endcode
+\include repairing_operations_ex07.py
+Download this script
\anchor tui_glue_edges
Glue Edges
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create boxes
-box1 = geompy.MakeBox(0,0,0,100,50,100)
-box2 = geompy.MakeBox(100,0,0,250,50,100)
-
-# make compound
-compound = geompy.MakeCompound([box1, box2])
-
-# glue all compound's edges
-tolerance = 1e-5
-glue1 = geompy.MakeGlueEdges(compound, tolerance)
-
-# glue some compound's edges
-list_edges = geompy.GetGlueEdges(compound, tolerance)
-glue2 = geompy.MakeGlueEdgesByList(compound, tolerance, [list_edges[0], list_edges[2]])
-
-# add objects in study
-geompy.addToStudy(box1, "Box1")
-geompy.addToStudy(box2, "Box2")
-geompy.addToStudy(compound, "Compound")
-geompy.addToStudy(glue1, "Glue all edges")
-geompy.addToStudy(glue2, "Glue two edges")
-
-if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(1)
-\endcode
+\include repairing_operations_ex08.py
+Download this script
\anchor tui_limit_tolerance
Limit Tolerance
-
-\code
-import geompy
-gg = salome.ImportComponentGUI("GEOM")
-
-# import initial topology
-shape1 = geompy.ImportBREP("my_shape_1.brep")
-shape2 = geompy.ImportBREP("my_shape_2.brep")
-
-geompy.addToStudy(shape1, "Shape 1")
-geompy.addToStudy(shape2, "Shape 2")
-
-# perform partition
-try:
- part = geompy.MakePartition([shape1, shape2])
-except:
- # limit tolerance
- tolerance = 1e-07
- shape1_lt = geompy.LimitTolerance(shape1, tolerance)
- shape2_lt = geompy.LimitTolerance(shape2, tolerance)
-
- # process shape
- good_shape1 = geompy.ProcessShape(shape1_lt, ["FixShape"], ["FixShape.Tolerance3d"], ["1e-7"])
- good_shape2 = geompy.ProcessShape(shape2_lt, ["FixShape"], ["FixShape.Tolerance3d"], ["1e-7"])
-
- geompy.addToStudy(good_shape1, "Shape 1 corrected")
- geompy.addToStudy(good_shape2, "Shape 2 corrected")
-
- # perform partition on corrected shapes
- part = geompy.MakePartition([good_shape1, good_shape2])
- pass
-
-geompy.addToStudy(part, "Partition")
-\endcode
+\include repairing_operations_ex09.py
+Download this script
\anchor tui_add_point_on_edge
Add Point on Edge
-
-\code
-import geompy
-import salome
-
-# create vertices
-p1 = geompy.MakeVertex(0,0,50)
-p2 = geompy.MakeVertex(60,0,50)
-
-# make an edge
-edge = geompy.MakeEdge(p1, p2) #geompy.GetSubShape(box, edge_ind)
-
-# divide an edge
-divide = geompy.DivideEdge(edge, -1, 0.5, 0)
-
-# add objects in the study
-id_edge = geompy.addToStudy(edge, "Edge")
-edge_points = geompy.SubShapeAllSortedCentres(edge, geompy.ShapeType["VERTEX"])
-for point in edge_points:
- geompy.addToStudyInFather(edge, point, "Edge's point")
-
-id_divide = geompy.addToStudy(divide, "Divided edge")
-edge_points = geompy.SubShapeAllSortedCentres(divide, geompy.ShapeType["VERTEX"])
-for point in edge_points:
- geompy.addToStudyInFather(divide, point, "Edge's point after divide")
-
-salome.sg.updateObjBrowser(1)
-\endcode
+\include repairing_operations_ex10.py
+Download this script
\anchor tui_fuse_collinear_edges
Fuse Collinear Edges within a Wire
-
-\code
-import geompy
-import salome
-
-# create vertices
-p1 = geompy.MakeVertex(0, 0, 0)
-p2 = geompy.MakeVertex(70, 0, 0)
-p3 = geompy.MakeVertex(70, 50, 0)
-p4 = geompy.MakeVertex(70, 80, 0)
-p5 = geompy.MakeVertex(50, 80, 0)
-p6 = geompy.MakeVertex(20, 80, 0)
-p7 = geompy.MakeVertex(0, 80, 0)
-p8 = geompy.MakeVertex(0, 30, 0)
-
-points = [p1, p2, p3, p4, p5, p6, p7, p8]
-
-# make a wire
-wire_1 = geompy.MakePolyline(points, True)
-
-# suppress some vertices in the wire
-wire_2 = geompy.FuseCollinearEdgesWithinWire(wire_1, [p3])
-wire_3 = geompy.FuseCollinearEdgesWithinWire(wire_1, [p5, p6])
-
-# suppress all suitable vertices in the wire
-wire_4 = geompy.FuseCollinearEdgesWithinWire(wire_1, [])
-
-wires = [wire_1, wire_2, wire_3, wire_4]
-
-# add objects in the study
-ii = 1
-for point in points:
- geompy.addToStudy(point, "p%d"%ii)
- ii = ii + 1
- pass
-
-ii = 1
-for wire in wires:
- geompy.addToStudy(wire, "wire_%d"%ii)
- wire_points = geompy.SubShapeAllSortedCentres(wire, geompy.ShapeType["VERTEX"])
- jj = 1
- for point in wire_points:
- geompy.addToStudyInFather(wire, point, "point_%d"%jj)
- jj = jj + 1
- pass
- ii = ii + 1
- pass
-
-salome.sg.updateObjBrowser(1)
-\endcode
+\include repairing_operations_ex11.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_sketcher.doc b/doc/salome/gui/GEOM/input/tui_sketcher.doc
index e344eae27..be24fd763 100644
--- a/doc/salome/gui/GEOM/input/tui_sketcher.doc
+++ b/doc/salome/gui/GEOM/input/tui_sketcher.doc
@@ -1,48 +1,7 @@
/*!
\page tui_sketcher_page 2D Sketcher
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p1 = geompy.MakeVertex(70., 0., 0.)
-p2 = geompy.MakeVertex(70., 70., 80.)
-p3 = geompy.MakeVertex( 0., 70., 0.)
-
-#create a vector from two points
-vector_arc = geompy.MakeVector(p1, p3)
-
-# create an arc from three points
-arc = geompy.MakeArc(p1, p2, p3)
-
-# create a wire
-wire = geompy.MakeWire([vector_arc, arc])
-
-# create a planar face
-isPlanarWanted = 1
-face = geompy.MakeFace(wire, isPlanarWanted)
-
-# create a sketcher (face), following the textual description
-sketcher1 = geompy.MakeSketcher("Sketcher:F -100 -100:TT 250 -100:R 0:C 100 150:R 0:L 300:WF",
- [100,0,0, 1,1,1, -1,1,0])
-
-# create a sketcher (wire) on the given face
-sketcher2 = geompy.MakeSketcherOnPlane("Sketcher:F 10 -30:R 10:C 20 180:R 15:L 50:WW", face)
-
-# add objects in the study
-id_face = geompy.addToStudy(face,"Face")
-id_sketcher1 = geompy.addToStudy(sketcher1,"Sketcher1")
-id_sketcher2 = geompy.addToStudy(sketcher2,"Sketcher2")
-
-# display the first sketcher and the second sketcher with its planar face
-gg.createAndDisplayGO(id_face)
-gg.setDisplayMode(id_face,1)
-gg.setTransparency(id_face,0.5)
-gg.createAndDisplayGO(id_sketcher1)
-gg.createAndDisplayGO(id_sketcher2)
-\endcode
+\include sketcher.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_tolerance.doc b/doc/salome/gui/GEOM/input/tui_tolerance.doc
index 55151302a..4da20b249 100644
--- a/doc/salome/gui/GEOM/input/tui_tolerance.doc
+++ b/doc/salome/gui/GEOM/input/tui_tolerance.doc
@@ -1,20 +1,7 @@
/*!
\page tui_tolerance_page Tolerance
-
-\code
-import geompy
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100,30,100)
-Toler = geompy.Tolerance(box)
-print "\nBox 100x30x100 tolerance:"
-print " Face min. tolerance: ", Toler[0]
-print " Face max. tolerance: ", Toler[1]
-print " Edge min. tolerance: ", Toler[2]
-print " Edge max. tolerance: ", Toler[3]
-print " Vertex min. tolerance: ", Toler[4]
-print " Vertex max. tolerance: ", Toler[5]
-\endcode
+\include tolerance.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_topological_geom_objs.doc b/doc/salome/gui/GEOM/input/tui_topological_geom_objs.doc
index e314abc85..2b9f5d1c2 100644
--- a/doc/salome/gui/GEOM/input/tui_topological_geom_objs.doc
+++ b/doc/salome/gui/GEOM/input/tui_topological_geom_objs.doc
@@ -4,258 +4,32 @@
\anchor tui_creation_edge
Creation of an Edge
+\include topological_geom_objs_ex01.py
+Download this script
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-#
-# create edge by two points
-#
-
-# create vertices
-p0 = geompy.MakeVertex(0. , 0. , 0. )
-pxyz = geompy.MakeVertex(100., 100., 100.)
-
-# create an edge
-edge = geompy.MakeEdge(p0, pxyz)
-
-# add object in the study
-id_edge = geompy.addToStudy(edge,"Edge_1")
-
-# display an edge
-gg.createAndDisplayGO(id_edge)
-
-#
-# create edge from wire
-#
-
-# create a circle
-c = geompy.MakeCircle(None, None, 100)
-
-# create a wire
-w = geompy.MakeWire([c], 1e-07)
-
-# create an edge from wire
-edge = geompy.MakeEdgeWire(w)
-
-# add object in the study
-id_edge = geompy.addToStudy(edge,"Edge_2")
-
-# display an edge
-gg.createAndDisplayGO(id_edge)
-
-#
-# create edge from existing curve and a length
-#
-
-# create a circle
-c = geompy.MakeCircle(None, None, 100)
-
-# create an edge of length 25.0 from the circle
-edge = geompy.MakeEdgeOnCurveByLength(c, 25.0)
-
-# add object in the study
-id_edge = geompy.addToStudy(edge,"Edge_3")
-
-# display an edge
-gg.createAndDisplayGO(id_edge)
-
-\endcode
-
\anchor tui_creation_wire
Creation of a Wire
+\include topological_geom_objs_ex02.py
+Download this script
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-px = geompy.MakeVertex(100., 0. , 0. )
-py = geompy.MakeVertex(0. , 100., 0. )
-pz = geompy.MakeVertex(0. , 0. , 100.)
-
-# create a vector from two points
-vxy = geompy.MakeVector(px, py)
-
-# create an arc from three points
-arc = geompy.MakeArc(py, pz, px)
-
-# create a wire
-wire = geompy.MakeWire([vxy, arc])
-
-# add an object in the study
-id_wire = geompy.addToStudy(wire,"Wire")
-
-# display the wire
-gg.createAndDisplayGO(id_wire)
-\endcode
-
\anchor tui_creation_face
Creation of a Face
+\include topological_geom_objs_ex03.py
+Download this script
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices
-p0 = geompy.MakeVertex(0. , 0. , 0. )
-px = geompy.MakeVertex(100., 0. , 0. )
-py = geompy.MakeVertex(0. , 100., 0. )
-pz = geompy.MakeVertex(0. , 0. , 100.)
-pxyz = geompy.MakeVertex(100., 100., 100.)
-
-# create a vector from two points
-vxy = geompy.MakeVector(px, py)
-
-# create an arc from three points
-arc = geompy.MakeArc(py, pz, px)
-
-# create a wire
-wire = geompy.MakeWire([vxy, arc])
-
-# create sketchers
-sketcher1 = geompy.MakeSketcher("Sketcher:F -100 -100:TT 250 -100:R 0:C 100 150:R 0:L 300:WW",
- [100,0,0, 1,1,1, -1,1,0])
-sketcher2 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
-sketcher3 = geompy.MakeSketcher("Sketcher:F 20 20:TT 50 20:TT 50 50:TT 20 50:WW")
-isPlanarFace = 1
-
-# create a face from the wire
-face1 = geompy.MakeFace(wire, isPlanarFace)
-
-# create faces from two wires
-face2 = geompy.MakeFaceWires([wire, sketcher1],isPlanarFace)
-face3 = geompy.MakeFaces([sketcher2, sketcher3],isPlanarFace)
-
-# add objects in the study
-id_face1 = geompy.addToStudy(face1,"Face1")
-id_face2 = geompy.addToStudy(face2,"Face2")
-id_face3 = geompy.addToStudy(face3,"Face3")
-
-# display the faces
-gg.createAndDisplayGO(id_face1)
-gg.setDisplayMode(id_face1,1)
-gg.setTransparency(id_face1,0.2)
-gg.createAndDisplayGO(id_face2)
-gg.setDisplayMode(id_face2,1)
-gg.setTransparency(id_face2,0.2)
-gg.createAndDisplayGO(id_face3)
-gg.setDisplayMode(id_face3,1)
-gg.setTransparency(id_face3,0.2)
-\endcode
-
\anchor tui_creation_shell
Creation of a Shell
+\include topological_geom_objs_ex04.py
+Download this script
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-#create vertices
-p0 = geompy.MakeVertex( 0., 0., 0.)
-pxyz = geompy.MakeVertex( 5., 5., 40.)
-
-# create sketchers
-sketcher1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
-sketcher2 = geompy.MakeSketcher("Sketcher:F 20 20:TT 50 20:TT 50 50:TT 20 50:WW")
-isPlanarFace = 1
-
-# create a face from two wires
-face = geompy.MakeFaces([sketcher1, sketcher2],isPlanarFace)
-
-# create a prism
-prism = geompy.MakePrism(face, p0, pxyz)
-
-# explode the prism into faces
-prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
-
-# create a shell from a set of faces
-shell = geompy.MakeShell([prism_faces[0], prism_faces[2], prism_faces[3],
- prism_faces[7], prism_faces[9]])
-
-# add objects in the study
-id_shell = geompy.addToStudy(shell,"Shell")
-
-# display the shell
-gg.createAndDisplayGO(id_shell)
-gg.setDisplayMode(id_shell,1)
-\endcode
-
\anchor tui_creation_solid
Creation of a Solid
+\include topological_geom_objs_ex05.py
+Download this script
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-#create vertices
-p0 = geompy.MakeVertex( 0., 0., 0.)
-pz = geompy.MakeVertex( 0., 0., 40.)
-
-# create sketchers
-sketcher = geompy.MakeSketcher("Sketcher:F -50 -50:TT 100 -50:R 0:C 50 70:R 0:L 100:WW")
-
-# create faces from two wires
-face = geompy.MakeFace(sketcher,1)
-
-# create a prism
-prism = geompy.MakePrism(face, p0, pz)
-
-# explode the prism into faces
-prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
-
-# create a shell from a set of faces
-shell = geompy.MakeShell([prism_faces[0], prism_faces[1],
- prism_faces[3], prism_faces[4],
- prism_faces[5], prism_faces[2]])
-
-# create a solid, bounded by the given shells
-solid = geompy.MakeSolid([shell])
-
-# add objects in the study
-id_solid = geompy.addToStudy(solid,"Solid")
-
-# display the solid
-gg.createAndDisplayGO(id_solid)
-gg.setDisplayMode(id_solid,1)
-\endcode
-
\anchor tui_creation_compound
Creation of a Compound
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex( -30., -30., 50.)
-p2 = geompy.MakeVertex( -60., -60., 30.)
-p3 = geompy.MakeVertex( -30., -30., 10.)
-
-# create an arc from three points
-arc = geompy.MakeArc(p1, p2, p3)
-ShapeListCompound = []
-i = 0
-while i <= 3 :
- S = geompy.MakeTranslation(arc, i * 50., 0., 0.)
- ShapeListCompound.append(S)
- i = i + 1
-
-# create a compund of the given shapes
-compound = geompy.MakeCompound(ShapeListCompound)
-
-# add object in the study
-id_compound = geompy.addToStudy(compound,"Compound")
-
-# display the compound
-gg.createAndDisplayGO(id_compound)
-\endcode
+\include topological_geom_objs_ex06.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_transformation_operations.doc b/doc/salome/gui/GEOM/input/tui_transformation_operations.doc
index 09744cddf..10e392ec0 100644
--- a/doc/salome/gui/GEOM/input/tui_transformation_operations.doc
+++ b/doc/salome/gui/GEOM/input/tui_transformation_operations.doc
@@ -4,552 +4,67 @@
\anchor tui_translation
Translation
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(10, 40, 0)
-p2 = geompy.MakeVertex( 0, 0, 50)
-p3 = geompy.MakeVertex(50, 80, 0)
-v = geompy.MakeVector(p1, p2)
-vt = geompy.MakeVector(p1, p3)
-
-# create a cylinder
-height = 35
-radius1 = 20
-cylinder = geompy.MakeCylinder(p1, v, radius1, height)
-
-# translate the given object along the vector, specified by its end points
-# (all three functions produce the same result)
-translation1 = geompy.MakeTranslationTwoPoints(cylinder, p1, p3)
-translation2 = geompy.MakeTranslation(cylinder, 40, 40, 0)
-translation3 = geompy.MakeTranslationVector(cylinder, vt)
-translation4 = geompy.MakeTranslationVectorDistance(cylinder, vt, 200)
-
-# add objects in the study
-id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
-id_translation1 = geompy.addToStudy(translation1, "Translation1")
-id_translation2 = geompy.addToStudy(translation2, "Translation2")
-id_translation3 = geompy.addToStudy(translation3, "Translation3")
-id_translation4 = geompy.addToStudy(translation4, "Translation4")
-
-# display the results
-gg.createAndDisplayGO(id_cylinder)
-gg.setDisplayMode(id_cylinder,1)
-gg.createAndDisplayGO(id_translation1)
-gg.setDisplayMode(id_translation1,1)
-gg.createAndDisplayGO(id_translation2)
-gg.setDisplayMode(id_translation2,1)
-gg.createAndDisplayGO(id_translation3)
-gg.setDisplayMode(id_translation3,1)
-gg.createAndDisplayGO(id_translation4)
-gg.setDisplayMode(id_translation4,1)
-\endcode
+\include transformation_operations_ex01.py
+Download this script
\anchor tui_rotation
Rotation
-
-\code
-import geompy
-import salome
-import math
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(10, 40, 0)
-p2 = geompy.MakeVertex( 0, 0, 50)
-p3 = geompy.MakeVertex(10, 50,-20)
-p4 = geompy.MakeVertex(10, 50, 60)
-v = geompy.MakeVector(p1, p2)
-vr = geompy.MakeVector(p3, p4)
-
-# create a cylinder
-height = 35
-radius1 = 20
-cylinder = geompy.MakeCylinder(p1, v, radius1, height)
-
-# rotate the given object around the given axis by the given angle
-rotation1 = geompy.MakeRotation(cylinder, vr, math.pi)
-rotation2 = geompy.MakeRotationThreePoints(cylinder, p4, p1, p2)
-
-# add objects in the study
-id_vr = geompy.addToStudy(vr, "Rotation 1 axis")
-id_p4 = geompy.addToStudy(p4, "Rotation 2 center")
-id_p1 = geompy.addToStudy(p1, "Rotation 2 point 1")
-id_p2 = geompy.addToStudy(p2, "Rotation 2 point 2")
-id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
-id_rotation1 = geompy.addToStudy(rotation1, "Rotation 1")
-id_rotation2 = geompy.addToStudy(rotation2, "Rotation 2")
-
-# display the results
-gg.createAndDisplayGO(id_vr)
-gg.createAndDisplayGO(id_p4)
-gg.createAndDisplayGO(id_p1)
-gg.createAndDisplayGO(id_p2)
-gg.createAndDisplayGO(id_cylinder)
-gg.setDisplayMode(id_cylinder,1)
-gg.createAndDisplayGO(id_rotation1)
-gg.createAndDisplayGO(id_rotation2)
-gg.setDisplayMode(id_rotation1,1)
-gg.setDisplayMode(id_rotation2,1)
-\endcode
+\include transformation_operations_ex02.py
+Download this script
\anchor tui_modify_location
Modify Location
-
-\code
-import geompy
-import salome
-import math
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a vertex and a vector
-p1 = geompy.MakeVertex(10, 40, 0)
-p2 = geompy.MakeVertex( 0, 0, 50)
-v = geompy.MakeVector(p1, p2)
-
-# create a cylinder
-height = 35
-radius1 = 20
-cylinder = geompy.MakeCylinder(p1, v, radius1, height)
-circle = geompy.MakeCircle(p2, v, radius1)
-
-# create local coordinate systems
-cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0)
-cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0)
-
-# modify the location of the given object
-position = geompy.MakePosition(cylinder, cs1, cs2)
-position2 = geompy.PositionAlongPath(position, circle, 0.75, 1, 1)
-
-# add objects in the study
-id_cs1 = geompy.addToStudy(cs1, "Coordinate system 1")
-id_cs2 = geompy.addToStudy(cs2, "Coordinate system 2")
-id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
-id_circle = geompy.addToStudy(circle, "Circle")
-id_position = geompy.addToStudy(position, "Position")
-id_position2 = geompy.addToStudy(position2, "PositionAlongPath")
-
-# display the results
-gg.createAndDisplayGO(id_cylinder)
-gg.setDisplayMode(id_cylinder,1)
-gg.createAndDisplayGO(id_position)
-gg.setDisplayMode(id_position,1)
-gg.createAndDisplayGO(id_circle)
-gg.setDisplayMode(id_circle,1)
-gg.createAndDisplayGO(id_position2)
-gg.setDisplayMode(id_position2,1)
-\endcode
+\include transformation_operations_ex03.py
+Download this script
\anchor tui_mirror
Mirror Image
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(200, 200, 200)
-
-# create an object, symmetrical to another object through the given plane
-p1 = geompy.MakeVertex( 0, 25, 0)
-p2 = geompy.MakeVertex( 5, 25, 0)
-p3 = geompy.MakeVertex( 0,-30, 40)
-plane = geompy.MakePlaneThreePnt(p1, p2, p3, 1000.)
-mirror1 = geompy.MakeMirrorByPlane(box, plane)
-
-# create an object, symmetrical to another object through the given axis
-p4 = geompy.MakeVertex( 210, 210, -20)
-p5 = geompy.MakeVertex( 210, 210, 220)
-axis = geompy.MakeVector(p4, p5)
-mirror2 = geompy.MakeMirrorByAxis(box, axis)
-
-# create an object, symmetrical to another object through the given point
-mirror3 = geompy.MakeMirrorByPoint(box, p4)
-
-# add objects in the study
-id_box = geompy.addToStudy(box, "Box")
-id_plane = geompy.addToStudy(plane, "Plane")
-id_mirror1 = geompy.addToStudy(mirror1, "Mirror plane")
-id_axis = geompy.addToStudy(axis, "Axis")
-id_mirror2 = geompy.addToStudy(mirror2, "Mirror axis")
-id_p4 = geompy.addToStudy(p4, "Point")
-id_mirror3 = geompy.addToStudy(mirror3, "Mirror point")
-
-# display the results
-gg.createAndDisplayGO(id_box)
-gg.setDisplayMode(id_box,1)
-gg.createAndDisplayGO(id_plane)
-gg.createAndDisplayGO(id_mirror1)
-gg.setDisplayMode(id_mirror1,1)
-gg.createAndDisplayGO(id_axis)
-gg.createAndDisplayGO(id_mirror2)
-gg.setDisplayMode(id_mirror2,1)
-gg.createAndDisplayGO(id_p4)
-gg.createAndDisplayGO(id_mirror3)
-gg.setDisplayMode(id_mirror3,1)
-\endcode
+\include transformation_operations_ex04.py
+Download this script
\anchor tui_scale
Scale Transform
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a box and a sphere
-box = geompy.MakeBoxDXDYDZ(200, 200, 200)
-
-# scale the given object by the factor
-p0 = geompy.MakeVertex(100, 100, 100)
-factor = 0.5
-scale = geompy.MakeScaleTransform(box, p0, factor)
-
-# add objects in the study
-id_box = geompy.addToStudy(box, "Box")
-id_scale = geompy.addToStudy(scale, "Scale")
-
-# display the results
-gg.createAndDisplayGO(id_box)
-gg.setDisplayMode(id_box,1)
-gg.setTransparency(id_box,0.5)
-gg.createAndDisplayGO(id_scale)
-gg.setDisplayMode(id_scale,1)
-\endcode
+\include transformation_operations_ex05.py
+Download this script
\anchor tui_offset
Offset Surface
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a box and a sphere
-box = geompy.MakeBox(20, 20, 20, 200, 200, 200)
-
-# create a new object as offset of the given object
-offset = geompy.MakeOffset(box, 70.)
-
-# add objects in the study
-id_box = geompy.addToStudy(box, "Box")
-id_offset = geompy.addToStudy(offset, "Offset")
-
-# display the results
-gg.createAndDisplayGO(id_box)
-gg.setDisplayMode(id_box,1)
-gg.createAndDisplayGO(id_offset)
-\endcode
+\include transformation_operations_ex06.py
+Download this script
\anchor tui_projection
Projection
-
-\code
-import geompy
-import salome
-
-# create a cylindric face and a curve(edge)
-cylinder = geompy.MakeCylinderRH(100, 300)
-[face_cyl] = geompy.SubShapes(cylinder, [3])
-
-p1 = geompy.MakeVertex(200, 0, 100)
-p2 = geompy.MakeVertex(200, 80, 100)
-p3 = geompy.MakeVertex(200, 80, 180)
-p4 = geompy.MakeVertex(130, 80, 180)
-p5 = geompy.MakeVertex(90, 80, 240)
-
-curve = geompy.MakeInterpol([p1, p2, p3, p4, p5], False, False)
-
-# create a new object as projection of the
-# given curve on the given cylindric face
-projection = geompy.MakeProjection(curve, face_cyl)
-
-# add objects in the study
-geompy.addToStudy(cylinder, "cylinder")
-geompy.addToStudyInFather(cylinder, face_cyl, "face_cyl")
-geompy.addToStudy(p1, "p1")
-geompy.addToStudy(p2, "p2")
-geompy.addToStudy(p3, "p3")
-geompy.addToStudy(p4, "p4")
-geompy.addToStudy(p5, "p5")
-geompy.addToStudy(curve, "curve")
-geompy.addToStudy(projection, "projection")
-\endcode
+\include transformation_operations_ex07.py
+Download this script
\anchor tui_multi_translation
Multi Translation
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices and vectors
-p0 = geompy.MakeVertex( 0., 0., 0.)
-px = geompy.MakeVertex(20., 0., 0.)
-py = geompy.MakeVertex( 0., 20., 0.)
-pz = geompy.MakeVertex( 0., 0., 20.)
-pxy = geompy.MakeVertex( 50., 0., 0.)
-pxyz = geompy.MakeVertex( 50., 50., 50.)
-vz = geompy.MakeVector(p0, pz)
-vxy = geompy.MakeVector(px, py)
-vtr1d = geompy.MakeVector(p0, pxyz)
-vtr2d = geompy.MakeVector(p0, pxy)
-
-# create an arc
-arc = geompy.MakeArc(py, pz, px)
-
-# create a wire
-wire = geompy.MakeWire([vxy, arc])
-
-# create a planar face
-face = geompy.MakeFace(wire, 1)
-
-# create a prism
-prism = geompy.MakePrismVecH(face, vz, 20.0)
-
-# translate the given object along the given vector a given number of times
-tr1d = geompy.MakeMultiTranslation1D(prism, vtr1d, 20, 4)
-
-# consequently apply two specified translations to the object a given number of times
-tr2d = geompy.MakeMultiTranslation2D(prism, vtr1d, 20, 4, vtr2d, 80, 3)
-
-# add objects in the study
-id_prism = geompy.addToStudy(prism,"Prism")
-id_tr1d = geompy.addToStudy(tr1d,"Translation 1D")
-id_tr2d = geompy.addToStudy(tr2d,"Translation 2D")
-
-# display the prism and the results of fillet operation
-gg.createAndDisplayGO(id_prism)
-gg.setDisplayMode(id_prism,1)
-gg.createAndDisplayGO(id_tr1d)
-gg.setDisplayMode(id_tr1d,1)
-gg.createAndDisplayGO(id_tr2d)
-gg.setDisplayMode(id_tr2d,1)
-\endcode
+\include transformation_operations_ex08.py
+Download this script
\anchor tui_multi_rotation
Multi Rotation
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create vertices and vectors
-p0 = geompy.MakeVertex( 0., 0., 0.)
-px = geompy.MakeVertex(20., 0., 0.)
-py = geompy.MakeVertex( 0., 20., 0.)
-pz = geompy.MakeVertex( 0., 0., 20.)
-pxyz = geompy.MakeVertex( 50., 50., 10.)
-vz = geompy.MakeVector(p0, pz)
-vxy = geompy.MakeVector(px, py)
-vrot1d = geompy.MakeVector(p0, pxyz)
-
-# create an arc
-arc = geompy.MakeArc(py, pz, px)
-
-# create a wire
-wire = geompy.MakeWire([vxy, arc])
-
-# create a planar face
-face = geompy.MakeFace(wire, 1)
-
-# create a prism
-prism = geompy.MakePrismVecH(face, vz, 20.0)
-
-# rotate the given object around the given axis by the given angle a given number of times
-rot1d = geompy.MultiRotate1D(prism, vrot1d, 4)
-
-# rotate the given object around the given axis by the given angle a given number of times
-# and multi-translate the result of each rotation
-rot2d = geompy.MultiRotate2D(prism, vrot1d, 60, 4, 50, 5)
-
-# add objects in the study
-id_prism = geompy.addToStudy(prism,"Prism")
-id_rot1d = geompy.addToStudy(rot1d,"Rotation 1D")
-id_rot2d = geompy.addToStudy(rot2d,"Rotation 2D")
-
-# display the prism and the results of fillet operation
-gg.createAndDisplayGO(id_prism)
-gg.setDisplayMode(id_prism,1)
-gg.createAndDisplayGO(id_rot1d)
-gg.setDisplayMode(id_rot1d,1)
-gg.createAndDisplayGO(id_rot2d)
-gg.setDisplayMode(id_rot2d,1)
-\endcode
+\include transformation_operations_ex09.py
+Download this script
\anchor tui_fillet2d
Fillet 2D
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create a face in OXY plane
-face = geompy.MakeFaceHW(100, 100, 1)
-fillet2d = geompy.MakeFillet2D(face, 30, [7, 9])
-
-# add objects in the study
-id_face = geompy.addToStudy(face,"Face_1")
-id_fillet2d = geompy.addToStudy(fillet2d,"Fillet 2D_1")
-
-# display disks
-gg.createAndDisplayGO(id_face)
-gg.createAndDisplayGO(id_fillet2d)
-\endcode
+\include transformation_operations_ex10.py
+Download this script
\anchor tui_fillet1d
Fillet 1D
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create box
-Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
-# take box edges to create custom complex wire
-[Edge_1,Edge_2,Edge_3,Edge_4,Edge_5,Edge_6,Edge_7,Edge_8,Edge_9,Edge_10,Edge_11,Edge_12] = geompy.SubShapeAllSortedCentres(Box_1, geompy.ShapeType["EDGE"])
-# create wire
-Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
-# make fillet at given wire vertices with giver radius
-Fillet_1D_1 = geompy.MakeFillet1D(Wire_1, 55, [3, 4, 6, 8, 10])
-
-
-# display disks
-gg.createAndDisplayGO(Wire_1)
-gg.createAndDisplayGO(Fillet_1D_1)
-\endcode
+\include transformation_operations_ex11.py
+Download this script
\anchor tui_fillet
Fillet
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-radius = 10.
-ShapeTypeEdge = geompy.ShapeType["EDGE"]
-
-# create vertices and vectors
-p0 = geompy.MakeVertex( 0., 0., 0.)
-px = geompy.MakeVertex(100., 0., 0.)
-py = geompy.MakeVertex( 0., 100., 0.)
-pz = geompy.MakeVertex( 0., 0., 100.)
-vz = geompy.MakeVector(p0, pz)
-vxy = geompy.MakeVector(px, py)
-
-# create an arc
-arc = geompy.MakeArc(py, pz, px)
-
-# create a wire
-wire = geompy.MakeWire([vxy, arc])
-
-# create a planar face
-face = geompy.MakeFace(wire, 1)
-
-# create a prism
-prism = geompy.MakePrismVecH(face, vz, 100.0)
-
-# get the list of IDs (IDList) for the fillet
-prism_edges = geompy.SubShapeAllSortedCentres(prism, ShapeTypeEdge)
-IDlist_e = []
-IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[0]))
-IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[1]))
-IDlist_e.append(geompy.GetSubShapeID(prism, prism_edges[2]))
-
-# make a fillet on the specified edges of the given shape
-fillet = geompy.MakeFillet(prism, radius, ShapeTypeEdge, IDlist_e)
-
-# make a fillet on all edges of the given shape
-filletall = geompy.MakeFilletAll(prism, radius)
-
-# add objects in the study
-id_prism = geompy.addToStudy(prism,"Prism")
-id_fillet = geompy.addToStudy(fillet,"Fillet")
-id_filletall = geompy.addToStudy(filletall,"Fillet all")
-
-# display the prism and the results of fillet operation
-gg.createAndDisplayGO(id_prism)
-gg.setDisplayMode(id_prism,1)
-gg.createAndDisplayGO(id_fillet)
-gg.setDisplayMode(id_fillet,1)
-gg.createAndDisplayGO(id_filletall)
-gg.setDisplayMode(id_filletall,1)
-\endcode
+\include transformation_operations_ex12.py
+Download this script
\anchor tui_chamfer
Chamfer
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-d1 = 10.
-d2 = 10.
-ShapeTypeFace = geompy.ShapeType["FACE"]
-
-# create vertices and vectors
-p0 = geompy.MakeVertex( 0., 0., 0.)
-px = geompy.MakeVertex(100., 0., 0.)
-py = geompy.MakeVertex( 0., 100., 0.)
-pz = geompy.MakeVertex( 0., 0., 100.)
-vz = geompy.MakeVector(p0, pz)
-vxy = geompy.MakeVector(px, py)
-
-# create an arc
-arc = geompy.MakeArc(py, pz, px)
-
-# create a wire
-wire = geompy.MakeWire([vxy, arc])
-
-# create a planar face
-face = geompy.MakeFace(wire, 1)
-
-# create a prism
-prism = geompy.MakePrismVecH(face, vz, 100.0)
-
-# get the list of IDs (IDList) for the chamfer
-prism_faces = geompy.SubShapeAllSortedCentres(prism, ShapeTypeFace)
-f_ind_1 = geompy.GetSubShapeID(prism, prism_faces[0])
-f_ind_2 = geompy.GetSubShapeID(prism, prism_faces[1])
-IDlist_f = [f_ind_1, f_ind_2]
-
-# perform a chamfer on the edges common to the specified faces
-chamfer_e = geompy.MakeChamferEdge(prism, d1, d2, f_ind_1, f_ind_2)
-
-# perform a chamfer on all edges of the specified faces
-chamfer_f = geompy.MakeChamferFaces(prism, d1, d2, IDlist_f)
-chamfer_f1 = geompy.MakeChamfer(prism, d1, d2, ShapeTypeFace, IDlist_f)
-
-# perform a symmetric chamfer on all edges of the given shape
-chamfer_all = geompy.MakeChamferAll(prism, d1)
-
-# add objects in the study
-id_prism = geompy.addToStudy(prism,"Prism")
-id_chamfer_e = geompy.addToStudy(chamfer_e,"Chamfer edge")
-id_chamfer_f = geompy.addToStudy(chamfer_f,"Chamfer faces")
-id_chamfer_f1 = geompy.addToStudy(chamfer_f1,"Chamfer faces 1")
-id_chamfer_all = geompy.addToStudy(chamfer_all,"Chamfer all")
-
-# display the prism and the results of chamfer operation
-gg.createAndDisplayGO(id_prism)
-gg.setDisplayMode(id_prism,1)
-gg.createAndDisplayGO(id_chamfer_e)
-gg.setDisplayMode(id_chamfer_e,1)
-gg.createAndDisplayGO(id_chamfer_f)
-gg.setDisplayMode(id_chamfer_f,1)
-gg.createAndDisplayGO(id_chamfer_f1)
-gg.setDisplayMode(id_chamfer_f1,1)
-gg.createAndDisplayGO(id_chamfer_all)
-gg.setDisplayMode(id_chamfer_all,1)
-\endcode
+\include transformation_operations_ex13.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_viewing_geom_objs.doc b/doc/salome/gui/GEOM/input/tui_viewing_geom_objs.doc
index 2573c0fa5..8505548d3 100644
--- a/doc/salome/gui/GEOM/input/tui_viewing_geom_objs.doc
+++ b/doc/salome/gui/GEOM/input/tui_viewing_geom_objs.doc
@@ -4,78 +4,22 @@
\anchor tui_change_disp_mode
Changing Display Mode
-
-\code
-import salome
-import geompy
-box = geompy.MakeBox(0,0,0, 50,50,50)
-box2 = geompy.MakeBox(-50,-50,-50, 0,0,0)
-
-sphere = geompy.MakeSphere(50,50,50, 30)
-fuse = geompy.MakeBoolean(box,sphere,3)
-fuse_id = geompy.addToStudy(fuse,"Fuse")
-box_id = geompy.addToStudy(box2, "Box")
-
-gg = salome.ImportComponentGUI("GEOM")
-gg.createAndDisplayGO(fuse_id)
-gg.setDisplayMode(fuse_id,1)
-gg.createAndDisplayGO(box_id)
-gg.setVectorsMode(box_id, 1)
-\endcode
+\include viewing_geom_objs_ex01.py
+Download this script
\anchor tui_change_color
Changing Color
-
-\code
-import salome
-import geompy
-box = geompy.MakeBox(0,0,0, 50,50,50)
-
-sphere = geompy.MakeSphere(50,50,50, 30)
-fuse = geompy.MakeBoolean(box,sphere,3)
-fuse_id = geompy.addToStudy(fuse,"Fuse")
-
-gg = salome.ImportComponentGUI("GEOM")
-gg.createAndDisplayGO(fuse_id)
-gg.setDisplayMode(fuse_id,1)
-gg.setColor(fuse_id,218,165,31)
-\endcode
+\include viewing_geom_objs_ex02.py
+Download this script
\anchor tui_change_transparency
Changing Transparency
-
-\code
-import salome
-import geompy
-
-box = geompy.MakeBox(0,0,0, 50,50,50)
-sphere = geompy.MakeSphere(50,50,50, 30)
-
-fuse = geompy.MakeBoolean(box,sphere,3)
-fuse_id = geompy.addToStudy(fuse,"Fuse")
-
-gg = salome.ImportComponentGUI("GEOM")
-gg.createAndDisplayGO(fuse_id)
-gg.setDisplayMode(fuse_id,1)
-gg.setColor(fuse_id,218,165,31)
-gg.setTransparency(fuse_id,0.5)
-\endcode
+\include viewing_geom_objs_ex03.py
+Download this script
\anchor tui_point_marker
Set Point Marker
+\include viewing_geom_objs_ex04.py
+Download this script
-\code
-import salome
-import geompy
-
-texture = geompy.LoadTexture("/users/user/mytexture.dat")
-
-v1 = geompy.MakeVertex(0, 0, 0)
-v2 = geompy.MakeVertex(100, 0, 0)
-v3 = geompy.MakeVertex(0, 100, 0)
-
-v1.SetMarkerStd(GEOM.MT_O_PLUS, GEOM.MS_25)
-v2.SetMarkerStd(GEOM.MT_BALL, GEOM.MS_40)
-v3.SetMarkerTexture(texture)
-\endcode
*/
diff --git a/doc/salome/gui/GEOM/input/tui_whatis.doc b/doc/salome/gui/GEOM/input/tui_whatis.doc
index e89e8bf18..d1c8fc911 100644
--- a/doc/salome/gui/GEOM/input/tui_whatis.doc
+++ b/doc/salome/gui/GEOM/input/tui_whatis.doc
@@ -1,15 +1,7 @@
/*!
\page tui_whatis_page What Is
-
-\code
-import geompy
-
-# create a box
-box = geompy.MakeBoxDXDYDZ(100,30,100)
-Descr = geompy.WhatIs(box)
-print "\nBox 100x30x100 description:"
-print Descr
-\endcode
+\include whatis.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/tui_working_with_groups.doc b/doc/salome/gui/GEOM/input/tui_working_with_groups.doc
index 37813417c..4f252c2e9 100644
--- a/doc/salome/gui/GEOM/input/tui_working_with_groups.doc
+++ b/doc/salome/gui/GEOM/input/tui_working_with_groups.doc
@@ -5,214 +5,35 @@
\anchor tui_create_groups_anchor
Creation of a group
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create two vertices
-p0 = geompy.MakeVertex(0. , 0. , 0. )
-p200 = geompy.MakeVertex(200., 200., 200.)
-
-# create a box from two points
-Box = geompy.MakeBoxTwoPnt(p0, p200)
-
-# create a group from the faces of the box
-group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
-
-# add objects to the group
-SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
-for i in [0, 3, 5] :
- FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
- geompy.AddObject(group, FaceID)
-
-# add all selected shapes from the list to the group
-# (the program doesn't raise error, if some shapes are already included)
-geompy.UnionList(group, [SubFaceList[0], SubFaceList[2], SubFaceList[5]])
-
-# remove an object from the group
-geompy.RemoveObject(group, FaceID)
-
-# remove all selected shapes from the group
-# (the program doesn't raise error, if some shapes are not included)
-geompy.DifferenceList(group, [SubFaceList[2], SubFaceList[3], SubFaceList[4]])
-id_group1 = geompy.addToStudy(group, "Group1")
-
-# display the contents of the group
-gg.createAndDisplayGO(id_group1)
-salome.sg.updateObjBrowser(1)
-\endcode
+\include working_with_groups_ex01.py
+Download this script
\anchor tui_edit_groups_anchor
Adding an object to the group
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create two vertices
-p0 = geompy.MakeVertex(0. , 0. , 0. )
-p200 = geompy.MakeVertex(200., 200., 200.)
-
-# create a box from two points
-Box = geompy.MakeBoxTwoPnt(p0, p200)
-
-# create a group from the faces of the box
-group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
-
-# add objects to the group
-SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
-for i in [0, 3, 5] :
- FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
- geompy.AddObject(group, FaceID)
-id_group1 = geompy.addToStudy(group, "Group1")
-
-# display the contents of the group
-gg.createAndDisplayGO(id_group1)
-salome.sg.updateObjBrowser(1)
-\endcode
+\include working_with_groups_ex02.py
+Download this script
Removing an object from the group
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create two vertices
-p0 = geompy.MakeVertex(0. , 0. , 0. )
-p200 = geompy.MakeVertex(200., 200., 200.)
-
-# create a box from two points
-Box = geompy.MakeBoxTwoPnt(p0, p200)
-
-# create a group from the faces of the box
-group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
-
-# add objects to the group
-SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType["FACE"])
-for i in [0, 3, 5] :
- FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
- geompy.AddObject(group, FaceID)
-
-# add all selected shapes from the list to the group
-# (the program doesn't raise errors, if some shapes are already included)
-geompy.UnionList(group, [SubFaceList[0], SubFaceList[2], SubFaceList[5]])
-
-# remove an object from the group
-geompy.RemoveObject(group, FaceID)
-id_group1 = geompy.addToStudy(group, "Group1")
-
-# display the contents of the group
-gg.createAndDisplayGO(id_group1)
-salome.sg.updateObjBrowser(1)
-\endcode
+\include working_with_groups_ex03.py
+Download this script
\anchor tui_union_groups_anchor
Union Groups
-
-\code
-import geompy
-import salome
-
-# create a box and some groups of faces on it
-Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
-Group_1 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_1, [13, 23])
-Group_2 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_2, [3, 27])
-Group_3 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_3, [33, 23])
-Group_4 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_4, [31, 27])
-
-# union groups
-Group_U_1_2 = geompy.UnionGroups(Group_1, Group_2)
-Group_UL_3_4 = geompy.UnionListOfGroups([Group_3, Group_4])
-
-# publish shapes
-geompy.addToStudy(Box_1, 'Box_1')
-geompy.addToStudyInFather(Box_1, Group_1, 'Group_1')
-geompy.addToStudyInFather(Box_1, Group_2, 'Group_2')
-geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
-geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
-geompy.addToStudyInFather(Box_1, Group_U_1_2, 'Group_U_1_2')
-geompy.addToStudyInFather(Box_1, Group_UL_3_4, 'Group_UL_3_4')
-salome.sg.updateObjBrowser(1)
-\endcode
+\include working_with_groups_ex04.py
+Download this script
\anchor tui_intersect_groups_anchor
Intersect Groups
-
-\code
-import geompy
-import salome
-
-# create a box and some groups of faces on it
-Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
-Group_1 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_1, [13, 23])
-Group_2 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_2, [3, 27])
-Group_3 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_3, [33, 23])
-Group_4 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_4, [31, 27])
-
-# intersect groups
-Group_I_1_3 = geompy.IntersectGroups(Group_1, Group_3)
-Group_IL_1_3 = geompy.IntersectListOfGroups([Group_1, Group_3])
-
-# publish shapes
-geompy.addToStudy(Box_1, 'Box_1')
-geompy.addToStudyInFather(Box_1, Group_1, 'Group_1')
-geompy.addToStudyInFather(Box_1, Group_2, 'Group_2')
-geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
-geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
-geompy.addToStudyInFather(Box_1, Group_I_1_3, 'Group_I_1_3')
-geompy.addToStudyInFather(Box_1, Group_IL_1_3, 'Group_IL_1_3')
-salome.sg.updateObjBrowser(1)
-
-\endcode
+\include working_with_groups_ex05.py
+Download this script
\anchor tui_cut_groups_anchor
Cut Groups
-
-\code
-import geompy
-import salome
-
-# create a box and some groups of faces on it
-Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
-Group_1 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_1, [13, 23])
-Group_2 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_2, [3, 27])
-Group_3 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_3, [33, 23])
-Group_4 = geompy.CreateGroup(Box_1, geompy.ShapeType["FACE"])
-geompy.UnionIDs(Group_4, [31, 27])
-
-# cut groups
-Group_C_2_4 = geompy.CutGroups(Group_2, Group_4)
-Group_CL_2_4 = geompy.CutListOfGroups([Group_2], [Group_4])
-
-# publish shapes
-geompy.addToStudy(Box_1, 'Box_1')
-geompy.addToStudyInFather(Box_1, Group_1, 'Group_1')
-geompy.addToStudyInFather(Box_1, Group_2, 'Group_2')
-geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
-geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
-geompy.addToStudyInFather(Box_1, Group_C_2_4, 'Group_C_2_4')
-geompy.addToStudyInFather(Box_1, Group_CL_2_4, 'Group_CL_2_4')
-salome.sg.updateObjBrowser(1)
-
-\endcode
+\include working_with_groups_ex06.py
+Download this script
*/
diff --git a/doc/salome/gui/GEOM/input/working_with_groups.doc b/doc/salome/gui/GEOM/input/working_with_groups.doc
index 99b98bac9..6b9d85c1c 100644
--- a/doc/salome/gui/GEOM/input/working_with_groups.doc
+++ b/doc/salome/gui/GEOM/input/working_with_groups.doc
@@ -103,10 +103,19 @@ To \b Edit an existing group in the main menu select New entity >
Group > Edit. This menu is designed in the same way as the
Create a group menu.
-\n Dialog Box:
+\n When a GEOM group is edited, the main shape appears in the 3D viewer in the same mode
+as it is displayed in the viewer. If the main shape was not displayed in the viewer, then
+the default mode defined in the preferences will be used.
+
+\n Working with Dialog Box:
\image html editgroup.png
+\n The subshapes already in the group are displayed in the 3D viewer with a specific color,
+defined via preferences. The IDs of the subshapes already in the group also are displayed in
+a specific color in the dialog box. When user adds some subshapes, the new IDs are
+displayed in the other color.
+
\n The \b Result of the operation will be a \b GEOM_Object.
\n TUI Command:
diff --git a/doc/salome/gui/Makefile.am b/doc/salome/gui/Makefile.am
index 03e3efc6e..fff0e9b64 100644
--- a/doc/salome/gui/Makefile.am
+++ b/doc/salome/gui/Makefile.am
@@ -20,8 +20,7 @@
# -* Makefile *-
# Author : Patrick GOLDBRONN (CEA)
# Date : 30/11/2001
-# Modified by : Alexander BORODIN (OCN) - autotools usage
-# $Header:
+# Modified by : Alexander BORODIN (OCN) - autotools usage
#
SUBDIRS = GEOM
diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl
index f35c7935e..b7bcf45e2 100644
--- a/idl/GEOM_Gen.idl
+++ b/idl/GEOM_Gen.idl
@@ -804,7 +804,7 @@ module GEOM
/*!
* \brief Translate the given object along the given vector a given number times
* \param theObject The object to be translated.
- * \param theVector Direction of the translation.
+ * \param theVector Direction of the translation. DX if None.
* \param theStep Distance to translate on.
* \param theNbTimes Quantity of translations to be done.
* \return New GEOM_Object, containing compound of all
@@ -818,10 +818,10 @@ module GEOM
/*!
* \brief Conseqently apply two specified translations to theObject specified number of times.
* \param theObject The object to be translated.
- * \param theVector1 Direction of the first translation.
+ * \param theVector1 Direction of the first translation. DX if None.
* \param theStep1 Step of the first translation.
* \param theNbTimes1 Quantity of translations to be done along theVector1.
- * \param theVector2 Direction of the second translation.
+ * \param theVector2 Direction of the second translation. DY if None.
* \param theStep2 Step of the second translation.
* \param theNbTimes2 Quantity of translations to be done along theVector2.
* \return New GEOM_Object, containing compound of all
@@ -888,20 +888,56 @@ module GEOM
in GEOM_Object theAxis,
in double theAngle);
-
/*!
* \brief Rotate the given object around the given axis a given number times.
*
- * Rotation angle will be 2*PI/theNbTimes.
+ * Rotation angle will be 2*PI/theNbObjects.
* \param theObject The object to be rotated.
- * \param theAxis The rotation axis.
- * \param theNbTimes Quantity of rotations to be done.
+ * \param theAxis The rotation axis. DZ if None.
+ * \param theNbObjects Quantity of rotations to be done.
* \return New GEOM_Object, containing compound of all the
* shapes, obtained after each rotation.
*/
GEOM_Object MultiRotate1D (in GEOM_Object theObject,
in GEOM_Object theAxis,
- in long theNbTimes);
+ in long theNbObjects);
+
+ /*!
+ * \brief Rotate the given object around the given axis
+ * a given number times on the given angle.
+ *
+ * \param theObject The object to be rotated.
+ * \param theAxis The rotation axis. DZ if None.
+ * \param theAngleStep Rotation angle in radians.
+ * \param theNbSteps Quantity of rotations to be done.
+ * \return New GEOM_Object, containing compound of all the
+ * shapes, obtained after each rotation.
+ */
+ GEOM_Object MultiRotate1DByStep (in GEOM_Object theObject,
+ in GEOM_Object theAxis,
+ in double theAngleStep,
+ in long theNbSteps);
+
+ /*!
+ * \brief Rotate the given object around the given axis
+ * a given number times and multi-translate each rotation result.
+ *
+ * Rotation angle will be 2*PI/theNbObjects.
+ * Translation direction passes through center of gravity
+ * of rotated shape and its projection on the rotation axis.
+ * \param theObject The object to be rotated.
+ * \param theAxis Rotation axis. DZ if None.
+ * \param theNbObjects Quantity of rotations to be done.
+ * \param theRadialStep Translation distance.
+ * \param theNbSteps Quantity of translations to be done.
+ * \return New GEOM_Object, containing compound of all the
+ * shapes, obtained after each transformation.
+ */
+ GEOM_Object MultiRotate2DNbTimes (in GEOM_Object theObject,
+ in GEOM_Object theAxis,
+ in long theNbObjects,
+ in double theRadialStep,
+ in long theNbSteps);
/*!
* \brief Rotate the given object around the
@@ -911,20 +947,43 @@ module GEOM
* Translation direction passes through center of gravity
* of rotated shape and its projection on the rotation axis.
* \param theObject The object to be rotated.
- * \param theAxis Rotation axis.
- * \param theAngle Rotation angle in graduces.
- * \param theNbTimes1 Quantity of rotations to be done.
- * \param theStep Translation distance.
- * \param theNbTimes2 Quantity of translations to be done.
+ * \param theAxis Rotation axis. DZ if None.
+ * \param theAngleStep Rotation angle in radians.
+ * \param theNbSteps1 Quantity of rotations to be done.
+ * \param theRadialStep Translation distance.
+ * \param theNbSteps2 Quantity of translations to be done.
+ * \return New GEOM_Object, containing compound of all the
+ * shapes, obtained after each transformation.
+ */
+ GEOM_Object MultiRotate2DByStep (in GEOM_Object theObject,
+ in GEOM_Object theAxis,
+ in double theAngleStep,
+ in long theNbSteps1,
+ in double theRadialStep,
+ in long theNbSteps2);
+
+ /*!
+ * \brief Rotate the given object around the
+ * given axis on the given angle a given number
+ * times and multi-translate each rotation result.
+ *
+ * Translation direction passes through center of gravity
+ * of rotated shape and its projection on the rotation axis.
+ * \param theObject The object to be rotated.
+ * \param theAxis Rotation axis. DZ if None.
+ * \param theAngleStep Rotation angle in degrees.
+ * \param theNbSteps1 Quantity of rotations to be done.
+ * \param theRadialStep Translation distance.
+ * \param theNbSteps2 Quantity of translations to be done.
* \return New GEOM_Object, containing compound of all the
* shapes, obtained after each transformation.
*/
GEOM_Object MultiRotate2D (in GEOM_Object theObject,
in GEOM_Object theAxis,
- in double theAngle,
- in long theNbTimes1,
- in double theStep,
- in long theNbTimes2);
+ in double theAngleStep,
+ in long theNbSteps1,
+ in double theRadialStep,
+ in long theNbSteps2);
/*!
* \brief Replace the given object by an object,
@@ -1095,17 +1154,6 @@ module GEOM
in boolean theCopy,
in boolean theReverse);
- /*!
- * \brief Transform the shape in the same way what was used for the sample shape creation.
- * \param theObject The object to be transformed.
- * \param theSample The object containing information about required transformation.
- * \note Implementation of this method is limited by multi-transformations now.
- * \note Internal method.
- * \return New GEOM_Object, containing the transformed shape.
- */
- GEOM_Object TransformLikeOtherCopy (in GEOM_Object theObject,
- in GEOM_Object theSample);
-
/*!
* \brief Recompute the shape from its arguments.
* \param theObject The object to be recomputed.
@@ -1793,6 +1841,14 @@ module GEOM
*/
long GetSubShapeIndex (in GEOM_Object theMainShape, in GEOM_Object theSubShape);
+ /*!
+ * Get global indices of \a theSubShapes in \a theMainShape.
+ * \param theMainShape Main shape.
+ * \param theSubShapes List of sub-shapes of the main shape.
+ * \return list of global indices of \a theSubShapes in \a theMainShape.
+ */
+ ListOfLong GetSubShapesIndices (in GEOM_Object theMainShape, in ListOfGO theSubShapes);
+
/*!
* \brief Get index of \a theSubShape in \a theMainShape, unique among sub-shapes of the same type.
*
@@ -2804,6 +2860,17 @@ module GEOM
in boolean theIsClosed,
in boolean theDoReordering);
+ /*!
+ * \brief Create B-Spline curve on the set of points.
+ * \param thePoints Sequence of points for the B-Spline curve.
+ * \param theFirstVec Vector object, defining the curve direction at its first point.
+ * \param theLastVec Vector object, defining the curve direction at its last point.
+ * \return New GEOM_Object, containing the created B-Spline curve.
+ */
+ GEOM_Object MakeSplineInterpolWithTangents (in ListOfGO thePoints,
+ in GEOM_Object theFirstVec,
+ in GEOM_Object theLastVec);
+
/*!
* \brief Creates a curve using the parametric definition of the basic points.
* \param thexExpr parametric equation of the coordinates X.
@@ -3547,6 +3614,13 @@ module GEOM
out double Ymin, out double Ymax,
out double Zmin, out double Zmax);
+ /*!
+ * \brief Get bounding box of the given shape
+ * \param theShape Shape to obtain bounding box of.
+ * \return New GEOM_Object, containing the created bounding box.
+ */
+ GEOM_Object MakeBoundingBox (in GEOM_Object theShape);
+
/*!
* \brief Get min and max tolerances of sub-shapes of theShape
* \param theShape Shape, to get tolerances of.
@@ -3622,6 +3696,16 @@ module GEOM
out double X1, out double Y1, out double Z1,
out double X2, out double Y2, out double Z2);
+ /*!
+ * \brief Get closest points of the given shapes.
+ * \param theShape1,theShape2 Shapes to find closest points of.
+ * \param theCoords Output. List of (X, Y, Z) coordinates for all couples of points.
+ * \return The number of found solutions (-1 in case of infinite number of solutions).
+ */
+ long ClosestPoints (in GEOM_Object theShape1,
+ in GEOM_Object theShape2,
+ out ListOfDouble theCoords);
+
/*!
* \brief Get angle between the given lines or linear edges.
* \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in
index 6fb716e5a..2925e464d 100644
--- a/resources/SalomeApp.xml.in
+++ b/resources/SalomeApp.xml.in
@@ -51,6 +51,7 @@
+
@@ -58,10 +59,13 @@
+
+
+
diff --git a/src/ARCHIMEDE/Archimede_VolumeSection.cxx b/src/ARCHIMEDE/Archimede_VolumeSection.cxx
index 0aee99aad..2d62cdc5e 100644
--- a/src/ARCHIMEDE/Archimede_VolumeSection.cxx
+++ b/src/ARCHIMEDE/Archimede_VolumeSection.cxx
@@ -24,7 +24,6 @@
// File : Archimede_VolumeSection.cxx
// Author : Nicolas REJNERI
// Module : GEOM
-// $Header$
//
#include "Archimede_VolumeSection.hxx"
#include "utilities.h"
diff --git a/src/ARCHIMEDE/Archimede_VolumeSection.hxx b/src/ARCHIMEDE/Archimede_VolumeSection.hxx
index 183443788..158a26d15 100644
--- a/src/ARCHIMEDE/Archimede_VolumeSection.hxx
+++ b/src/ARCHIMEDE/Archimede_VolumeSection.hxx
@@ -24,7 +24,6 @@
// File : Archimede_VolumeSection.hxx
// Author : Nicolas REJNERI
// Module : GEOM
-// $Header$
//
#ifndef ARCHIMEDE_VOLUMESECTION_HXX
#define ARCHIMEDE_VOLUMESECTION_HXX
diff --git a/src/ARCHIMEDE/Makefile.am b/src/ARCHIMEDE/Makefile.am
index 84d1a3560..35fcf539d 100644
--- a/src/ARCHIMEDE/Makefile.am
+++ b/src/ARCHIMEDE/Makefile.am
@@ -22,7 +22,6 @@
# Author : Nicolas REJNERI
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : GEOM
-# $Header$
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
diff --git a/src/BREPExport/BREPExport.cxx b/src/BREPExport/BREPExport.cxx
index 6c125cac0..7bd879a3a 100644
--- a/src/BREPExport/BREPExport.cxx
+++ b/src/BREPExport/BREPExport.cxx
@@ -58,8 +58,9 @@
extern "C"
{
-BREPEXPORT_EXPORT
- int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName)
+ BREPEXPORT_EXPORT int Export (const TopoDS_Shape& theShape,
+ const TCollection_AsciiString& theFileName,
+ const TCollection_AsciiString& /*theFormatName*/)
{
MESSAGE("Export BREP into file " << theFileName.ToCString());
diff --git a/src/BREPExport/Makefile.am b/src/BREPExport/Makefile.am
index 94f4ed160..675fe466e 100644
--- a/src/BREPExport/Makefile.am
+++ b/src/BREPExport/Makefile.am
@@ -21,7 +21,6 @@
# Author : Pavel TELKOV
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : GEOM
-# $Header$
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
diff --git a/src/BREPImport/Makefile.am b/src/BREPImport/Makefile.am
index f531040e4..083bc7dc0 100644
--- a/src/BREPImport/Makefile.am
+++ b/src/BREPImport/Makefile.am
@@ -21,7 +21,6 @@
# Author : Pavel TELKOV
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : GEOM
-# $Header$
#
include $(top_srcdir)/adm_local/unix/make_common_starter.am
diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx
index b69c3660c..90488fa74 100644
--- a/src/BasicGUI/BasicGUI_CircleDlg.cxx
+++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx
@@ -280,7 +280,6 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
qApp->processEvents();
updateGeometry();
resize( minimumSizeHint() );
- SelectionIntoArgument();
myEditCurrentArgument->setFocus();
globalSelection(); // close local contexts, if any
@@ -289,7 +288,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId )
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ),
this, SLOT( SelectionIntoArgument() ) );
- displayPreview(true);
+ SelectionIntoArgument();
}
//=================================================================================
diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx
index c964983ae..14b23a858 100644
--- a/src/BasicGUI/BasicGUI_CurveDlg.cxx
+++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx
@@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// GEOM GEOMGUI : GUI for Geometry component
// File : BasicGUI_CurveDlg.cxx
@@ -59,66 +58,101 @@ BasicGUI_CurveDlg::BasicGUI_CurveDlg( GeometryGUI* theGeometryGUI, QWidget* pare
bool modal, Qt::WindowFlags fl )
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
{
- QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POLYLINE" ) ) );
- QPixmap image2( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_SPLINE" ) ) );
- QPixmap image3( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_BEZIER" ) ) );
- QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
+ QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_POLYLINE")));
+ QPixmap image2 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_SPLINE")));
+ QPixmap image3 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_BEZIER")));
+ QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
- setWindowTitle( tr( "GEOM_CURVE_TITLE" ) );
+ setWindowTitle(tr("GEOM_CURVE_TITLE"));
/***************************************************************/
- mainFrame()->RadioButton1->setIcon( image0 );
- mainFrame()->RadioButton2->setIcon( image3 );
- mainFrame()->RadioButton3->setIcon( image2 );
+ mainFrame()->RadioButton1->setIcon(image0);
+ mainFrame()->RadioButton2->setIcon(image3);
+ mainFrame()->RadioButton3->setIcon(image2);
- QGroupBox* creationModeCroup = new QGroupBox(this);
- QButtonGroup* bg = new QButtonGroup(this);
+ // Creation mode
+ QGroupBox* creationModeGroup = new QGroupBox (this);
+ QButtonGroup* bg = new QButtonGroup (this);
- creationModeCroup->setTitle( tr( "GEOM_CURVE_CRMODE" ) );
- QHBoxLayout * creationModeLayout = new QHBoxLayout(creationModeCroup);
- myBySelectionBtn = new QRadioButton( tr( "GEOM_CURVE_SELECTION" ) ,creationModeCroup );
- myAnaliticalBtn = new QRadioButton( tr( "GEOM_CURVE_ANALITICAL" ) ,creationModeCroup );
+ creationModeGroup->setTitle(tr("GEOM_CURVE_CRMODE"));
+ QHBoxLayout * creationModeLayout = new QHBoxLayout (creationModeGroup);
+ myBySelectionBtn = new QRadioButton (tr("GEOM_CURVE_SELECTION") ,creationModeGroup);
+ myAnaliticalBtn = new QRadioButton (tr("GEOM_CURVE_ANALITICAL") ,creationModeGroup);
bg->addButton(myBySelectionBtn);
bg->addButton(myAnaliticalBtn);
-
+
creationModeLayout->addWidget(myBySelectionBtn);
creationModeLayout->addWidget(myAnaliticalBtn);
- GroupPoints = new DlgRef_1Sel3Check( centralWidget() );
+ // Points and flags
+ myGroupPoints = new DlgRef_1Sel3Check (centralWidget());
- GroupPoints->GroupBox1->setTitle( tr( "GEOM_NODES" ) );
- GroupPoints->TextLabel1->setText( tr( "GEOM_POINTS" ) );
- GroupPoints->PushButton1->setIcon( image1 );
- GroupPoints->PushButton1->setDown( true );
+ myGroupPoints->GroupBox1->setTitle(tr("GEOM_NODES"));
+ myGroupPoints->TextLabel1->setText(tr("GEOM_POINTS"));
+ myGroupPoints->PushButton1->setIcon(image1);
+ myGroupPoints->PushButton1->setDown(true);
- GroupPoints->LineEdit1->setReadOnly( true );
+ myGroupPoints->LineEdit1->setReadOnly( true );
- GroupPoints->CheckButton1->setText( tr( "GEOM_IS_CLOSED" ) );
- GroupPoints->CheckButton1->setChecked(false);
- //GroupPoints->CheckButton1->hide();
+ myGroupPoints->CheckButton1->setText( tr( "GEOM_IS_CLOSED" ) );
+ myGroupPoints->CheckButton1->setChecked(false);
+ //myGroupPoints->CheckButton1->hide();
- GroupPoints->CheckButton2->setText( tr( "GEOM_IS_REORDER" ) );
- GroupPoints->CheckButton2->setChecked(false);
- GroupPoints->CheckButton2->hide();
+ myGroupPoints->CheckButton2->setText( tr( "GEOM_IS_REORDER" ) );
+ myGroupPoints->CheckButton2->setChecked(false);
+ myGroupPoints->CheckButton2->hide();
- GroupPoints->CheckButton3->hide();
+ myGroupPoints->CheckButton3->hide();
- myParams = new BasicGUI_ParamCurveWidget( centralWidget() );
+ // Parametrical mode
+ myGroupParams = new BasicGUI_ParamCurveWidget( centralWidget() );
- QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
- layout->setMargin( 0 ); layout->setSpacing( 6 );
- layout->addWidget( creationModeCroup );
- layout->addWidget( GroupPoints );
- layout->addWidget( myParams );
+ // Tangents (only for Interpolation constructor and only not closed and no reordering)
+ myGroupTangents = new QGroupBox (this);
+ myGroupTangents->setCheckable(true);
+ myGroupTangents->setChecked(false);
+ myGroupTangents->setTitle(tr("GEOM_INTERPOL_TANGENTS"));
+
+ QGridLayout* tangentsLayout = new QGridLayout (myGroupTangents);
+
+ myPushBtnV1 = new QPushButton (myGroupTangents);
+ myPushBtnV2 = new QPushButton (myGroupTangents);
+ myPushBtnV1->setIcon(image1);
+ myPushBtnV2->setIcon(image1);
+
+ myLineEditV1 = new QLineEdit (myGroupTangents);
+ myLineEditV2 = new QLineEdit (myGroupTangents);
+ myLineEditV1->setReadOnly(true);
+ myLineEditV2->setReadOnly(true);
+
+ QLabel* aTextLabelV1 = new QLabel (myGroupTangents);
+ QLabel* aTextLabelV2 = new QLabel (myGroupTangents);
+ aTextLabelV1->setText(tr("GEOM_INTERPOL_FIRST_VEC"));
+ aTextLabelV2->setText(tr("GEOM_INTERPOL_LAST_VEC"));
+
+ tangentsLayout->addWidget(aTextLabelV1, 0, 0);
+ tangentsLayout->addWidget(myPushBtnV1 , 0, 1);
+ tangentsLayout->addWidget(myLineEditV1, 0, 2);
+ tangentsLayout->addWidget(aTextLabelV2, 1, 0);
+ tangentsLayout->addWidget(myPushBtnV2 , 1, 1);
+ tangentsLayout->addWidget(myLineEditV2, 1, 2);
+
+ // Layout
+ QVBoxLayout* layout = new QVBoxLayout (centralWidget());
+ layout->setMargin(0);
+ layout->setSpacing(6);
+ layout->addWidget(creationModeGroup);
+ layout->addWidget(myGroupPoints);
+ layout->addWidget(myGroupParams);
+ layout->addWidget(myGroupTangents);
/***************************************************************/
- setHelpFileName( "create_curve_page.html" );
+ setHelpFileName("create_curve_page.html");
Init();
}
-
//=================================================================================
// function : ~BasicGUI_CurveDlg()
// purpose : Destroys the object and frees any allocated resources
@@ -127,7 +161,6 @@ BasicGUI_CurveDlg::~BasicGUI_CurveDlg()
{
}
-
//=================================================================================
// function : Init()
// purpose :
@@ -135,13 +168,6 @@ BasicGUI_CurveDlg::~BasicGUI_CurveDlg()
void BasicGUI_CurveDlg::Init()
{
/* init variables */
- myEditCurrentArgument = GroupPoints->LineEdit1;
-
- myPoints.clear();
-
- globalSelection(); // close local contexts, if any
- localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
-
showOnlyPreviewControl();
myBySelectionBtn->setChecked(true);
@@ -152,87 +178,95 @@ void BasicGUI_CurveDlg::Init()
double aMax( 100. ), aMin( 0.0 );
/* min, max, step and decimals for spin boxes & initial values */
- initSpinBox( myParams->myPMin, COORD_MIN, COORD_MAX, step, "length_precision" );
- initSpinBox( myParams->myPMax, COORD_MIN, COORD_MAX, step, "length_precision" );
- myParams->myPStep->setValue( 10 );
- myParams->myPStep->setMaximum( 999 );
- myParams->myPStep->setSingleStep( 10 );
- myParams->myPMin->setValue( aMin );
- myParams->myPMax->setValue( aMax );
- myParams->myPStep->setValue( step );
- myParams->myXExpr->setText("t");
- myParams->myYExpr->setText("t");
- myParams->myZExpr->setText("t");
-
- myParams->hide();
+ initSpinBox( myGroupParams->myPMin, COORD_MIN, COORD_MAX, step, "length_precision" );
+ initSpinBox( myGroupParams->myPMax, COORD_MIN, COORD_MAX, step, "length_precision" );
+ myGroupParams->myPStep->setValue( 10 );
+ myGroupParams->myPStep->setMaximum( 999 );
+ myGroupParams->myPStep->setSingleStep( 10 );
+ myGroupParams->myPMin->setValue( aMin );
+ myGroupParams->myPMax->setValue( aMax );
+ myGroupParams->myPStep->setValue( step );
+ myGroupParams->myXExpr->setText("t");
+ myGroupParams->myYExpr->setText("t");
+ myGroupParams->myZExpr->setText("t");
+
+ myGroupParams->hide();
/* signals and slots connections */
- connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog( ) ) );
- connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) );
+ connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
+ connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
- connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
- connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
+ connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+ connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
- connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
+ connect(this, SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int)));
- connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
+ connect(myGroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(myPushBtnV1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+ connect(myPushBtnV2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
- connect( GroupPoints->CheckButton1, SIGNAL( toggled(bool) ), this, SLOT( CheckButtonToggled() ) );
- connect( GroupPoints->CheckButton2, SIGNAL( toggled(bool) ), this, SLOT( CheckButtonToggled() ) );
+ connect(myGroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CheckButtonToggled()));
+ connect(myGroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(CheckButtonToggled()));
+ connect(myGroupTangents, SIGNAL(toggled(bool)), this, SLOT(CheckButtonToggled()));
- connect( myGeomGUI->getApp()->selectionMgr(),
- SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+ connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()));
- connect( myBySelectionBtn, SIGNAL( clicked() ), this, SLOT( CreationModeChanged() ) );
- connect( myAnaliticalBtn, SIGNAL( clicked() ), this, SLOT( CreationModeChanged() ) );
+ connect(myBySelectionBtn, SIGNAL(clicked()), this, SLOT(CreationModeChanged()));
+ connect(myAnaliticalBtn, SIGNAL(clicked()), this, SLOT(CreationModeChanged()));
- connect(myParams->myPMin, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
- connect(myParams->myPMax, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
- connect(myParams->myPStep, SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int)));
+ connect(myGroupParams->myPMin, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(myGroupParams->myPMax, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+ connect(myGroupParams->myPStep, SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int)));
- connect(myParams->myXExpr, SIGNAL(editingFinished()), this, SLOT(OnEditingFinished()));
- connect(myParams->myYExpr, SIGNAL(editingFinished()), this, SLOT(OnEditingFinished()));
- connect(myParams->myZExpr, SIGNAL(editingFinished()), this, SLOT(OnEditingFinished()));
+ connect(myGroupParams->myXExpr, SIGNAL(editingFinished()), this, SLOT(OnEditingFinished()));
+ connect(myGroupParams->myYExpr, SIGNAL(editingFinished()), this, SLOT(OnEditingFinished()));
+ connect(myGroupParams->myZExpr, SIGNAL(editingFinished()), this, SLOT(OnEditingFinished()));
- initName( tr( "GEOM_CURVE" ) );
- resize(100,100);
- ConstructorsClicked( 0 );
+ initName(tr("GEOM_CURVE"));
+ //resize(100, 100);
+ ConstructorsClicked(0);
}
//=================================================================================
// function : ConstructorsClicked()
// purpose :
//=================================================================================
-void BasicGUI_CurveDlg::ConstructorsClicked( int id )
+void BasicGUI_CurveDlg::ConstructorsClicked (int id)
{
- QString aTitle = tr( id == 0 ? "GEOM_POLYLINE" : id == 1 ? "GEOM_BEZIER" : "GEOM_INTERPOL" );
- mainFrame()->GroupConstructors->setTitle( aTitle );
+ QString aTitle = tr(id == 0 ? "GEOM_POLYLINE" : id == 1 ? "GEOM_BEZIER" : "GEOM_INTERPOL");
+ mainFrame()->GroupConstructors->setTitle(aTitle);
if (id == 0) { // polyline (wire)
- //GroupPoints->CheckButton1->hide();
- GroupPoints->CheckButton1->setText( tr( "GEOM_BUILD_CLOSED_WIRE" ) );
- GroupPoints->CheckButton2->hide();
+ myGroupPoints->CheckButton1->setText( tr( "GEOM_BUILD_CLOSED_WIRE" ) );
+ myGroupPoints->CheckButton2->hide();
+ myGroupTangents->hide();
}
else if (id == 1) { // bezier
- //GroupPoints->CheckButton1->hide();
- GroupPoints->CheckButton1->setText( tr( "GEOM_IS_CLOSED" ) );
- GroupPoints->CheckButton2->hide();
+ myGroupPoints->CheckButton1->setText( tr( "GEOM_IS_CLOSED" ) );
+ myGroupPoints->CheckButton2->hide();
+ myGroupTangents->hide();
}
else { // b-spline
- //GroupPoints->CheckButton1->show();
- GroupPoints->CheckButton1->setText( tr( "GEOM_IS_CLOSED" ) );
- GroupPoints->CheckButton2->show();
+ myGroupPoints->CheckButton1->setText( tr( "GEOM_IS_CLOSED" ) );
+ myGroupPoints->CheckButton2->show();
+ myGroupTangents->setVisible(myBySelectionBtn->isChecked());
}
myPoints.clear();
+ myVec1.nullify();
+ myVec2.nullify();
+
+ myGroupPoints->LineEdit1->setText("");
+ myLineEditV1->setText("");
+ myLineEditV2->setText("");
- myEditCurrentArgument->setText( "" );
qApp->processEvents();
updateGeometry();
- resize( minimumSizeHint() );
- SelectionIntoArgument();
-}
+ resize(minimumSizeHint());
+ myGroupPoints->PushButton1->click();
+}
//=================================================================================
// function : SetEditCurrentArgument()
@@ -240,9 +274,28 @@ void BasicGUI_CurveDlg::ConstructorsClicked( int id )
//=================================================================================
void BasicGUI_CurveDlg::SetEditCurrentArgument()
{
- if ( sender() == GroupPoints->PushButton1 )
- myEditCurrentArgument = GroupPoints->LineEdit1;
+ disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
+
+ globalSelection(); // close local contexts, if any
+
+ if (sender() == myGroupPoints->PushButton1) {
+ myEditCurrentArgument = myGroupPoints->LineEdit1;
+ localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+ }
+ else if (sender() == myPushBtnV1) {
+ myEditCurrentArgument = myLineEditV1;
+ localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+ }
+ else if (sender() == myPushBtnV2) {
+ myEditCurrentArgument = myLineEditV2;
+ localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+ }
+
myEditCurrentArgument->setFocus();
+
+ connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()));
+
SelectionIntoArgument();
}
@@ -252,7 +305,20 @@ void BasicGUI_CurveDlg::SetEditCurrentArgument()
//=================================================================================
void BasicGUI_CurveDlg::CheckButtonToggled()
{
- processPreview();
+ if (sender() == myGroupTangents) {
+ if (myGroupTangents->isChecked())
+ myPushBtnV1->click();
+ else
+ myGroupPoints->PushButton1->click();
+ }
+ else {
+ if (getConstructorId() == 2) { // Interpolation
+ bool disableTangents = (myGroupPoints->CheckButton1->isChecked() ||
+ myGroupPoints->CheckButton2->isChecked());
+ myGroupTangents->setEnabled(!disableTangents);
+ }
+ processPreview();
+ }
}
//=================================================================================
@@ -261,8 +327,8 @@ void BasicGUI_CurveDlg::CheckButtonToggled()
//=================================================================================
void BasicGUI_CurveDlg::ClickOnOk()
{
- setIsApplyAndClose( true );
- if ( ClickOnApply() )
+ setIsApplyAndClose(true);
+ if (ClickOnApply())
ClickOnCancel();
}
@@ -272,20 +338,23 @@ void BasicGUI_CurveDlg::ClickOnOk()
//=================================================================================
bool BasicGUI_CurveDlg::ClickOnApply()
{
- if ( !onAccept() )
+ if (!onAccept())
return false;
initName();
- globalSelection(); // close local contexts, if any
- localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
+ ConstructorsClicked(getConstructorId());
return true;
}
-static void synchronize( QList& left, QList& right )
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose : Called when selection as changed or other case
+//=================================================================================
+static void synchronize (QList& left, QList& right)
{
// 1. remove items from the "left" list that are not in the "right" list
- QMutableListIterator it1( left );
- while ( it1.hasNext() ) {
+ QMutableListIterator it1 (left);
+ while (it1.hasNext()) {
GEOM::GeomObjPtr o1 = it1.next();
bool found = false;
QMutableListIterator it2( right );
@@ -307,22 +376,38 @@ static void synchronize( QList& left, QList&
}
}
-//=================================================================================
-// function : SelectionIntoArgument()
-// purpose : Called when selection as changed or other case
-//=================================================================================
void BasicGUI_CurveDlg::SelectionIntoArgument()
{
- QList points = getSelected( TopAbs_VERTEX, -1 );
- synchronize( myPoints, points );
- if ( !myPoints.isEmpty() )
- GroupPoints->LineEdit1->setText( QString::number( myPoints.count() ) + "_" + tr( "GEOM_POINT" ) + tr( "_S_" ) );
- else
- GroupPoints->LineEdit1->setText( "" );
+ myEditCurrentArgument->setText("");
+
+ if (myEditCurrentArgument == myGroupPoints->LineEdit1) {
+ QList points = getSelected(TopAbs_VERTEX, -1);
+ synchronize(myPoints, points);
+ if (!myPoints.isEmpty())
+ myGroupPoints->LineEdit1->setText(QString::number(myPoints.count()) + "_" +
+ tr("GEOM_POINT") + tr("_S_"));
+ }
+ else {
+ QList vecs = getSelected(TopAbs_EDGE, -1);
+ if (vecs.count() != 1) {
+ if (myEditCurrentArgument == myLineEditV1) myVec1.nullify();
+ else if (myEditCurrentArgument == myLineEditV2) myVec2.nullify();
+ }
+ else {
+ if (myEditCurrentArgument == myLineEditV1) {
+ myVec1 = vecs.first();
+ }
+ else if (myEditCurrentArgument == myLineEditV2) {
+ myVec2 = vecs.first();
+ }
+ QString aName = GEOMBase::GetName(vecs.first().get());
+ myEditCurrentArgument->setText(aName);
+ }
+ }
+
processPreview();
}
-
//=================================================================================
// function : ActivateThisDialog()
// purpose :
@@ -330,13 +415,11 @@ void BasicGUI_CurveDlg::SelectionIntoArgument()
void BasicGUI_CurveDlg::ActivateThisDialog()
{
GEOMBase_Skeleton::ActivateThisDialog();
- connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
- this, SLOT( SelectionIntoArgument() ) );
- globalSelection(); // close local contexts, if any
- localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX );
+ connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
+ this, SLOT(SelectionIntoArgument()));
- ConstructorsClicked( getConstructorId() );
+ ConstructorsClicked(getConstructorId());
}
//=================================================================================
@@ -353,9 +436,9 @@ void BasicGUI_CurveDlg::DeactivateActiveDialog()
// function : enterEvent()
// purpose :
//=================================================================================
-void BasicGUI_CurveDlg::enterEvent( QEvent* )
+void BasicGUI_CurveDlg::enterEvent (QEvent*)
{
- if ( !mainFrame()->GroupConstructors->isEnabled() )
+ if (!mainFrame()->GroupConstructors->isEnabled())
ActivateThisDialog();
}
@@ -365,24 +448,34 @@ void BasicGUI_CurveDlg::enterEvent( QEvent* )
//=================================================================================
GEOM::GEOM_IOperations_ptr BasicGUI_CurveDlg::createOperation()
{
- return myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() );
+ return myGeomGUI->GetGeomGen()->GetICurvesOperations(getStudyId());
}
//=================================================================================
// function : isValid
// purpose :
//=================================================================================
-bool BasicGUI_CurveDlg::isValid( QString& msg )
+bool BasicGUI_CurveDlg::isValid (QString& msg)
{
- if( myBySelectionBtn->isChecked() )
- return myPoints.count() > 1;
+ if (myBySelectionBtn->isChecked()) {
+ bool ok = true;
+ if (getConstructorId() == 2) { // Interpolation
+ bool disableTangents = (myGroupPoints->CheckButton1->isChecked() ||
+ myGroupPoints->CheckButton2->isChecked());
+ if (!disableTangents && myGroupTangents->isChecked()) {
+ ok = (myVec1 && myVec2);
+ if (!ok) msg = tr("GEOM_BOTH_TANGENTS_REQUIRED");
+ }
+ }
+ return ok && myPoints.count() > 1;
+ }
else {
- bool ok = myParams->myPMin->isValid( msg, !IsPreview() ) &&
- myParams->myPMax->isValid( msg, !IsPreview() ) &&
- myParams->myPStep->isValid( msg, !IsPreview() );
- ok &= !myParams->myXExpr->text().isEmpty();
- ok &= !myParams->myYExpr->text().isEmpty();
- ok &= !myParams->myZExpr->text().isEmpty();
+ bool ok = myGroupParams->myPMin->isValid( msg, !IsPreview() ) &&
+ myGroupParams->myPMax->isValid( msg, !IsPreview() ) &&
+ myGroupParams->myPStep->isValid( msg, !IsPreview() );
+ ok &= !myGroupParams->myXExpr->text().isEmpty();
+ ok &= !myGroupParams->myYExpr->text().isEmpty();
+ ok &= !myGroupParams->myZExpr->text().isEmpty();
return ok;
}
}
@@ -391,79 +484,85 @@ bool BasicGUI_CurveDlg::isValid( QString& msg )
// function : execute
// purpose :
//=================================================================================
-bool BasicGUI_CurveDlg::execute( ObjectList& objects )
+bool BasicGUI_CurveDlg::execute (ObjectList& objects)
{
bool res = false;
GEOM::GEOM_Object_var anObj;
- GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() );
+ GEOM::GEOM_ICurvesOperations_var anOper = GEOM::GEOM_ICurvesOperations::_narrow(getOperation());
GEOM::ListOfGO_var points = new GEOM::ListOfGO();
- points->length( myPoints.count() );
- for ( int i = 0; i < myPoints.count(); i++ )
+ points->length(myPoints.count());
+ for (int i = 0; i < myPoints.count(); i++)
points[i] = myPoints[i].copy();
- switch ( getConstructorId() ) {
+ switch (getConstructorId()) {
case 0 :
- if( myBySelectionBtn->isChecked() )
- anObj = anOper->MakePolyline( points.in(), GroupPoints->CheckButton1->isChecked() );
+ if (myBySelectionBtn->isChecked())
+ anObj = anOper->MakePolyline(points.in(), myGroupPoints->CheckButton1->isChecked());
else
- anObj = anOper->MakeCurveParametricNew(qPrintable(myParams->myXExpr->text()),
- qPrintable(myParams->myYExpr->text()),
- qPrintable(myParams->myZExpr->text()),
- myParams->myPMin->value(),
- myParams->myPMax->value(),
- myParams->myPStep->value(),
- GEOM::Polyline);
+ anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()),
+ qPrintable(myGroupParams->myYExpr->text()),
+ qPrintable(myGroupParams->myZExpr->text()),
+ myGroupParams->myPMin->value(),
+ myGroupParams->myPMax->value(),
+ myGroupParams->myPStep->value(),
+ GEOM::Polyline);
res = true;
break;
case 1 :
- if( myBySelectionBtn->isChecked() )
- anObj = anOper->MakeSplineBezier( points.in(), GroupPoints->CheckButton1->isChecked() );
+ if (myBySelectionBtn->isChecked())
+ anObj = anOper->MakeSplineBezier(points.in(), myGroupPoints->CheckButton1->isChecked());
else
- anObj = anOper->MakeCurveParametricNew(qPrintable(myParams->myXExpr->text()),
- qPrintable(myParams->myYExpr->text()),
- qPrintable(myParams->myZExpr->text()),
- myParams->myPMin->value(),
- myParams->myPMax->value(),
- myParams->myPStep->value(),
- GEOM::Bezier);
-
+ anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()),
+ qPrintable(myGroupParams->myYExpr->text()),
+ qPrintable(myGroupParams->myZExpr->text()),
+ myGroupParams->myPMin->value(),
+ myGroupParams->myPMax->value(),
+ myGroupParams->myPStep->value(),
+ GEOM::Bezier);
res = true;
break;
case 2 :
- if( myBySelectionBtn->isChecked() )
- anObj = anOper->MakeSplineInterpolation( points.in(), GroupPoints->CheckButton1->isChecked(),
- GroupPoints->CheckButton2->isChecked() );
+ if (myBySelectionBtn->isChecked()) {
+ bool disableTangents = (myGroupPoints->CheckButton1->isChecked() ||
+ myGroupPoints->CheckButton2->isChecked());
+ if (!disableTangents && myGroupTangents->isChecked()) {
+ anObj = anOper->MakeSplineInterpolWithTangents(points.in(), myVec1.get(), myVec2.get());
+ }
+ else
+ anObj = anOper->MakeSplineInterpolation(points.in(), myGroupPoints->CheckButton1->isChecked(),
+ myGroupPoints->CheckButton2->isChecked());
+ }
else
- anObj = anOper->MakeCurveParametricNew(qPrintable(myParams->myXExpr->text()),
- qPrintable(myParams->myYExpr->text()),
- qPrintable(myParams->myZExpr->text()),
- myParams->myPMin->value(),
- myParams->myPMax->value(),
- myParams->myPStep->value(),
- GEOM::Interpolation);
+ anObj = anOper->MakeCurveParametricNew(qPrintable(myGroupParams->myXExpr->text()),
+ qPrintable(myGroupParams->myYExpr->text()),
+ qPrintable(myGroupParams->myZExpr->text()),
+ myGroupParams->myPMin->value(),
+ myGroupParams->myPMax->value(),
+ myGroupParams->myPStep->value(),
+ GEOM::Interpolation);
res = true;
break;
}
- if ( !anObj->_is_nil() ) {
- if(myAnaliticalBtn->isChecked() && !IsPreview()) {
+ if (!anObj->_is_nil()) {
+ if (myAnaliticalBtn->isChecked() && !IsPreview()) {
QStringList aParameters;
- aParameters<myPMin->text();
- aParameters<myPMax->text();
- aParameters<myPStep->text();
+ aParameters<myPMin->text();
+ aParameters<myPMax->text();
+ aParameters<myPStep->text();
anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
- objects.push_back( anObj._retn() );
+ objects.push_back(anObj._retn());
}
-
+
return res;
}
//=================================================================================
-// function : addSubshapeToStudy
+// function : addSubshapesToStudy
// purpose : virtual method to add new SubObjects if local selection
//=================================================================================
void BasicGUI_CurveDlg::addSubshapesToStudy()
@@ -476,19 +575,20 @@ void BasicGUI_CurveDlg::addSubshapesToStudy()
// function : CreationModeChanged
// purpose :
//=================================================================================
-void BasicGUI_CurveDlg::CreationModeChanged() {
+void BasicGUI_CurveDlg::CreationModeChanged()
+{
const QObject* s = sender();
- GroupPoints->setVisible(myBySelectionBtn == s);
- myParams->setVisible(myBySelectionBtn != s);
-
- ConstructorsClicked( getConstructorId() );
+ myGroupPoints->setVisible(myBySelectionBtn == s);
+ myGroupParams->setVisible(myBySelectionBtn != s);
+
+ ConstructorsClicked(getConstructorId());
}
//=================================================================================
// function : ValueChangedInSpinBox()
// purpose :
//=================================================================================
-void BasicGUI_CurveDlg::ValueChangedInSpinBox(double/*theValue*/)
+void BasicGUI_CurveDlg::ValueChangedInSpinBox (double/*theValue*/)
{
processPreview();
}
@@ -497,15 +597,16 @@ void BasicGUI_CurveDlg::ValueChangedInSpinBox(double/*theValue*/)
// function : ValueChangedInSpinBox()
// purpose :
//=================================================================================
-void BasicGUI_CurveDlg::ValueChangedInSpinBox(int/*theValue*/)
+void BasicGUI_CurveDlg::ValueChangedInSpinBox (int/*theValue*/)
{
processPreview();
}
//=================================================================================
-// function : ValueChangedInSpinBox()
+// function : OnEditingFinished()
// purpose :
//=================================================================================
-void BasicGUI_CurveDlg::OnEditingFinished() {
+void BasicGUI_CurveDlg::OnEditingFinished()
+{
processPreview();
}
diff --git a/src/BasicGUI/BasicGUI_CurveDlg.h b/src/BasicGUI/BasicGUI_CurveDlg.h
index ce9a6a9e7..8d6751b5e 100644
--- a/src/BasicGUI/BasicGUI_CurveDlg.h
+++ b/src/BasicGUI/BasicGUI_CurveDlg.h
@@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// GEOM GEOMGUI : GUI for Geometry component
// File : BasicGUI_CurveDlg.h
@@ -34,6 +33,9 @@
class DlgRef_1Sel3Check;
class QRadioButton;
+class QPushButton;
+class QLineEdit;
+class QGroupBox;
class BasicGUI_ParamCurveWidget;
//=================================================================================
@@ -45,26 +47,34 @@ class BasicGUI_CurveDlg : public GEOMBase_Skeleton
Q_OBJECT
public:
- BasicGUI_CurveDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
+ BasicGUI_CurveDlg (GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0);
~BasicGUI_CurveDlg();
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
- virtual bool isValid( QString& );
- virtual bool execute( ObjectList& );
+ virtual bool isValid (QString&);
+ virtual bool execute (ObjectList&);
virtual void addSubshapesToStudy();
private:
void Init();
- void enterEvent( QEvent* );
+ void enterEvent (QEvent*);
private:
- DlgRef_1Sel3Check* GroupPoints;
- QList myPoints;
QRadioButton* myAnaliticalBtn;
QRadioButton* myBySelectionBtn;
- BasicGUI_ParamCurveWidget* myParams;
+ DlgRef_1Sel3Check* myGroupPoints;
+ BasicGUI_ParamCurveWidget* myGroupParams;
+ QGroupBox* myGroupTangents;
+
+ QPushButton* myPushBtnV1;
+ QPushButton* myPushBtnV2;
+ QLineEdit* myLineEditV1;
+ QLineEdit* myLineEditV2;
+
+ QList myPoints;
+ GEOM::GeomObjPtr myVec1, myVec2;
private slots:
void ClickOnOk();
@@ -73,13 +83,13 @@ private slots:
void ActivateThisDialog();
void DeactivateActiveDialog();
- void ConstructorsClicked( int );
+ void ConstructorsClicked (int);
void CheckButtonToggled();
void SelectionIntoArgument();
void SetEditCurrentArgument();
void CreationModeChanged();
- void ValueChangedInSpinBox(double/*theValue*/);
- void ValueChangedInSpinBox(int /*theValue*/);
+ void ValueChangedInSpinBox (double/*theValue*/);
+ void ValueChangedInSpinBox (int /*theValue*/);
void OnEditingFinished();
};
diff --git a/src/GEOMAlgo/BlockFix.cxx b/src/BlockFix/BlockFix.cxx
similarity index 100%
rename from src/GEOMAlgo/BlockFix.cxx
rename to src/BlockFix/BlockFix.cxx
diff --git a/src/GEOMAlgo/BlockFix.hxx b/src/BlockFix/BlockFix.hxx
similarity index 78%
rename from src/GEOMAlgo/BlockFix.hxx
rename to src/BlockFix/BlockFix.hxx
index 34007be5c..70d37df65 100644
--- a/src/GEOMAlgo/BlockFix.hxx
+++ b/src/BlockFix/BlockFix.hxx
@@ -18,14 +18,11 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _BlockFix_HeaderFile
#define _BlockFix_HeaderFile
-#ifndef _Standard_Real_HeaderFile
#include
-#endif
class TopoDS_Shape;
class BlockFix_SphereSpaceModifier;
@@ -35,36 +32,16 @@ class BlockFix_BlockFixAPI;
class BlockFix_PeriodicSurfaceModifier;
class BlockFix_CheckTool;
-#ifndef _Standard_HeaderFile
#include
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include
-#endif
-class BlockFix {
+class BlockFix {
public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-
Standard_EXPORT static TopoDS_Shape RotateSphereSpace(const TopoDS_Shape& S,const Standard_Real Tol);
Standard_EXPORT static TopoDS_Shape RefillProblemFaces(const TopoDS_Shape& S);
Standard_EXPORT static TopoDS_Shape FixRanges(const TopoDS_Shape& S,const Standard_Real Tol);
-protected:
-
private:
friend class BlockFix_SphereSpaceModifier;
@@ -76,6 +53,4 @@ friend class BlockFix_CheckTool;
};
-// other Inline functions and methods (like "C++: function call" methods)
-
#endif
diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.cxx b/src/BlockFix/BlockFix_BlockFixAPI.cxx
similarity index 85%
rename from src/GEOMAlgo/BlockFix_BlockFixAPI.cxx
rename to src/BlockFix/BlockFix_BlockFixAPI.cxx
index 3c82e4a84..376632b4f 100644
--- a/src/GEOMAlgo/BlockFix_BlockFixAPI.cxx
+++ b/src/BlockFix/BlockFix_BlockFixAPI.cxx
@@ -23,7 +23,7 @@
// Created: Tue Dec 7 11:59:05 2004
// Author: Pavel DURANDIN
-#include
+#include
#include
#include
@@ -35,22 +35,29 @@
#include
+IMPLEMENT_STANDARD_HANDLE(BlockFix_BlockFixAPI, MMgt_TShared);
+IMPLEMENT_STANDARD_RTTIEXT(BlockFix_BlockFixAPI, MMgt_TShared);
+
//=======================================================================
-//function : ShapeConvert_CanonicAPI
+//function : BlockFix_BlockFixAPI
//purpose :
//=======================================================================
-
BlockFix_BlockFixAPI::BlockFix_BlockFixAPI()
{
myTolerance = Precision::Confusion();
myOptimumNbFaces = 6;
}
+//=======================================================================
+//function : ~BlockFix_BlockFixAPI
+//purpose :
+//=======================================================================
+BlockFix_BlockFixAPI::~BlockFix_BlockFixAPI() {}
+
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
-
void BlockFix_BlockFixAPI::Perform()
{
// processing spheres with degenerativities
diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.lxx b/src/BlockFix/BlockFix_BlockFixAPI.hxx
similarity index 72%
rename from src/GEOMAlgo/BlockFix_BlockFixAPI.lxx
rename to src/BlockFix/BlockFix_BlockFixAPI.hxx
index 5992e1794..84140aff5 100644
--- a/src/GEOMAlgo/BlockFix_BlockFixAPI.lxx
+++ b/src/BlockFix/BlockFix_BlockFixAPI.hxx
@@ -18,15 +18,46 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-#include
+#ifndef _BlockFix_BlockFixAPI_HeaderFile
+#define _BlockFix_BlockFixAPI_HeaderFile
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+DEFINE_STANDARD_HANDLE(BlockFix_BlockFixAPI, MMgt_TShared);
+
+class BlockFix_BlockFixAPI : public MMgt_TShared
+{
+public:
+ Standard_EXPORT BlockFix_BlockFixAPI();
+ Standard_EXPORT ~BlockFix_BlockFixAPI();
+
+ void SetShape(const TopoDS_Shape& Shape);
+ TopoDS_Shape Shape() const;
+ Handle_ShapeBuild_ReShape& Context();
+ Standard_Real& Tolerance();
+ Standard_Integer& OptimumNbFaces();
+ Standard_EXPORT void Perform();
+
+ DEFINE_STANDARD_RTTI(BlockFix_BlockFixAPI);
+
+private:
+ Handle_ShapeBuild_ReShape myContext;
+ TopoDS_Shape myShape;
+ Standard_Real myTolerance;
+ Standard_Integer myOptimumNbFaces;
+};
//=======================================================================
//function : SetShape
//purpose :
//=======================================================================
-
inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
{
myShape = Shape;
@@ -36,7 +67,6 @@ inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape)
//function : Shape
//purpose :
//=======================================================================
-
inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
{
return myShape;
@@ -46,7 +76,6 @@ inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const
//function : Context
//purpose :
//=======================================================================
-
inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
{
return myContext;
@@ -56,7 +85,6 @@ inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context()
//function : Tolerance
//purpose :
//=======================================================================
-
inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
{
return myTolerance;
@@ -66,8 +94,9 @@ inline Standard_Real& BlockFix_BlockFixAPI::Tolerance()
//function : OptimumNbFaces
//purpose :
//=======================================================================
-
inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces()
{
return myOptimumNbFaces;
}
+
+#endif
diff --git a/src/GEOMAlgo/BlockFix_CheckTool.cxx b/src/BlockFix/BlockFix_CheckTool.cxx
similarity index 98%
rename from src/GEOMAlgo/BlockFix_CheckTool.cxx
rename to src/BlockFix/BlockFix_CheckTool.cxx
index 674ef69dd..ba1c5c6af 100644
--- a/src/GEOMAlgo/BlockFix_CheckTool.cxx
+++ b/src/BlockFix/BlockFix_CheckTool.cxx
@@ -18,48 +18,43 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File: BlockFix_CheckTool.cxx
// Created: 17.12.04 11:15:25
// Author: Sergey KUUL
-//
-#include
-//#include
-//#include
+#include
#include
#include
#include
+
#include
#include
#include
#include
+#include
+
#include
#include
#include
#include
-
//=======================================================================
//function : BlockFix_CheckTool()
//purpose : Constructor
//=======================================================================
-
BlockFix_CheckTool::BlockFix_CheckTool( )
{
myHasCheck = Standard_False;
myPossibleBlocks.Clear();
}
-
//=======================================================================
//function : SetShape
//purpose :
//=======================================================================
-
void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape)
{
myHasCheck = Standard_False;
@@ -67,12 +62,10 @@ void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape)
myPossibleBlocks.Clear();
}
-
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
-
void BlockFix_CheckTool::Perform()
{
myNbSolids=0;
@@ -229,23 +222,19 @@ void BlockFix_CheckTool::Perform()
myHasCheck = Standard_True;
}
-
//=======================================================================
//function : NbPossibleBlocks
//purpose :
//=======================================================================
-
Standard_Integer BlockFix_CheckTool::NbPossibleBlocks() const
{
return myPossibleBlocks.Length();
}
-
//=======================================================================
//function : PossibleBlock
//purpose :
//=======================================================================
-
TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const
{
TopoDS_Shape res;
@@ -254,12 +243,10 @@ TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const
return res;
}
-
//=======================================================================
//function : DumpCheckResult
//purpose :
//=======================================================================
-
void BlockFix_CheckTool::DumpCheckResult(Standard_OStream& S) const
{
if(!myHasCheck)
diff --git a/src/GEOMAlgo/BlockFix_CheckTool.jxx b/src/BlockFix/BlockFix_CheckTool.hxx
similarity index 52%
rename from src/GEOMAlgo/BlockFix_CheckTool.jxx
rename to src/BlockFix/BlockFix_CheckTool.hxx
index 7574af057..9378b25d1 100644
--- a/src/GEOMAlgo/BlockFix_CheckTool.jxx
+++ b/src/BlockFix/BlockFix_CheckTool.hxx
@@ -18,11 +18,42 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-#ifndef _TopoDS_Shape_HeaderFile
-#include
-#endif
#ifndef _BlockFix_CheckTool_HeaderFile
-#include
+#define _BlockFix_CheckTool_HeaderFile
+
+#include
+#include
+#include
+#include
+#include
+
+class TopoDS_Shape;
+
+#include
+#include
+
+class BlockFix_CheckTool {
+
+public:
+ Standard_EXPORT BlockFix_CheckTool();
+ Standard_EXPORT void SetShape(const TopoDS_Shape& aShape) ;
+ Standard_EXPORT void Perform() ;
+ Standard_EXPORT Standard_Integer NbPossibleBlocks() const;
+ Standard_EXPORT TopoDS_Shape PossibleBlock(const Standard_Integer num) const;
+ Standard_EXPORT void DumpCheckResult(Standard_OStream& S) const;
+
+private:
+ TopoDS_Shape myShape;
+ Standard_Boolean myHasCheck;
+ Standard_Integer myNbSolids;
+ Standard_Integer myNbBlocks;
+ TopTools_SequenceOfShape myPossibleBlocks;
+ Standard_Integer myNbDegen;
+ Standard_Integer myNbUF;
+ Standard_Integer myNbUE;
+ Standard_Integer myNbUFUE;
+ Standard_Integer myBadRanges;
+};
+
#endif
diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cxx b/src/BlockFix/BlockFix_PeriodicSurfaceModifier.cxx
similarity index 92%
rename from src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cxx
rename to src/BlockFix/BlockFix_PeriodicSurfaceModifier.cxx
index 1e9f33ca0..3894c353f 100644
--- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cxx
+++ b/src/BlockFix/BlockFix_PeriodicSurfaceModifier.cxx
@@ -18,51 +18,71 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File: BlockFix_PeriodicSurfaceModifier.cxx
// Created: 15.12.04 10:08:50
// Author: Sergey KUUL
-#include
+#include
+
+#include
+
+#include
+
+#include
+#include
+#include
+
+#include
#include
#include
+
#include
+
#include
#include
-#include
-#include
+#include
+#include
+#include
+
+#include
+
+IMPLEMENT_STANDARD_HANDLE(BlockFix_PeriodicSurfaceModifier, BRepTools_Modification);
+IMPLEMENT_STANDARD_RTTIEXT(BlockFix_PeriodicSurfaceModifier, BRepTools_Modification);
//=======================================================================
//function : BlockFix_PeriodicSurfaceModifier()
//purpose : Constructor
//=======================================================================
-
-BlockFix_PeriodicSurfaceModifier::BlockFix_PeriodicSurfaceModifier ( )
+BlockFix_PeriodicSurfaceModifier::BlockFix_PeriodicSurfaceModifier()
{
myMapOfFaces.Clear();
myMapOfSurfaces.Clear();
}
+//=======================================================================
+//function : ~BlockFix_PeriodicSurfaceModifier()
+//purpose : Destructor
+//=======================================================================
+BlockFix_PeriodicSurfaceModifier::~BlockFix_PeriodicSurfaceModifier()
+{
+}
//=======================================================================
//function : SetTolerance
//purpose :
//=======================================================================
-
void BlockFix_PeriodicSurfaceModifier::SetTolerance(const Standard_Real Tol)
{
myTolerance = Tol;
}
-
//=======================================================================
//function : ModifySurface
//purpose : auxilary
//=======================================================================
-
static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
const Handle(Geom_Surface)& aSurface,
Handle(Geom_Surface)& aNewSurface)
@@ -102,12 +122,10 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
return Standard_False;
}
-
//=======================================================================
//function : NewSurface
//purpose :
//=======================================================================
-
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face& F,
Handle(Geom_Surface)& S,
TopLoc_Location& L,Standard_Real& Tol,
@@ -133,12 +151,10 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face&
return Standard_False;
}
-
//=======================================================================
//function : NewCurve
//purpose :
//=======================================================================
-
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& /*E*/,
Handle(Geom_Curve)& /*C*/,
TopLoc_Location& /*L*/,
@@ -147,12 +163,10 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& /
return Standard_False;
}
-
//=======================================================================
//function : NewPoint
//purpose :
//=======================================================================
-
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex& /*V*/,
gp_Pnt& /*P*/,
Standard_Real& /*Tol*/)
@@ -160,12 +174,10 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex&
return Standard_False;
}
-
//=======================================================================
//function : NewCurve2d
//purpose :
//=======================================================================
-
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge& E,
const TopoDS_Face& F,
const TopoDS_Edge& /*NewE*/,
@@ -219,12 +231,10 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge&
return Standard_False;
}
-
//=======================================================================
//function : NewParameter
//purpose :
//=======================================================================
-
Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,
const TopoDS_Edge& /*E*/,
Standard_Real& /*P*/,
@@ -233,12 +243,10 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Ver
return Standard_False;
}
-
//=======================================================================
//function : Continuity
//purpose :
//=======================================================================
-
GeomAbs_Shape BlockFix_PeriodicSurfaceModifier::Continuity(const TopoDS_Edge& E,
const TopoDS_Face& F1,
const TopoDS_Face& F2,
@@ -248,4 +256,3 @@ GeomAbs_Shape BlockFix_PeriodicSurfaceModifier::Continuity(const TopoDS_Edge& E,
{
return BRep_Tool::Continuity(E,F1,F2);
}
-
diff --git a/src/BlockFix/BlockFix_PeriodicSurfaceModifier.hxx b/src/BlockFix/BlockFix_PeriodicSurfaceModifier.hxx
new file mode 100644
index 000000000..0223b25e2
--- /dev/null
+++ b/src/BlockFix/BlockFix_PeriodicSurfaceModifier.hxx
@@ -0,0 +1,95 @@
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _BlockFix_PeriodicSurfaceModifier_HeaderFile
+#define _BlockFix_PeriodicSurfaceModifier_HeaderFile
+
+#include
+#include
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+class TopoDS_Face;
+class Geom_Surface;
+class TopLoc_Location;
+class TopoDS_Edge;
+class Geom_Curve;
+class TopoDS_Vertex;
+class gp_Pnt;
+class Geom2d_Curve;
+
+DEFINE_STANDARD_HANDLE(BlockFix_PeriodicSurfaceModifier, BRepTools_Modification);
+
+class BlockFix_PeriodicSurfaceModifier : public BRepTools_Modification {
+
+public:
+ Standard_EXPORT BlockFix_PeriodicSurfaceModifier();
+ Standard_EXPORT ~BlockFix_PeriodicSurfaceModifier();
+
+ Standard_EXPORT void SetTolerance (const Standard_Real Toler) ;
+ Standard_EXPORT Standard_Boolean NewSurface (const TopoDS_Face& F,
+ Handle(Geom_Surface)& S,
+ TopLoc_Location& L,
+ Standard_Real& Tol,
+ Standard_Boolean& RevWires,
+ Standard_Boolean& RevFace);
+ Standard_EXPORT Standard_Boolean NewCurve (const TopoDS_Edge& E,
+ Handle(Geom_Curve)& C,
+ TopLoc_Location& L,
+ Standard_Real& Tol) ;
+ Standard_EXPORT Standard_Boolean NewPoint (const TopoDS_Vertex& V, gp_Pnt& P, Standard_Real& Tol);
+ Standard_EXPORT Standard_Boolean NewCurve2d (const TopoDS_Edge& E,
+ const TopoDS_Face& F,
+ const TopoDS_Edge& NewE,
+ const TopoDS_Face& NewF,
+ Handle(Geom2d_Curve)& C,
+ Standard_Real& Tol);
+ Standard_EXPORT Standard_Boolean NewParameter (const TopoDS_Vertex& V,
+ const TopoDS_Edge& E,
+ Standard_Real& P,
+ Standard_Real& Tol);
+ Standard_EXPORT GeomAbs_Shape Continuity (const TopoDS_Edge& E,
+ const TopoDS_Face& F1,
+ const TopoDS_Face& F2,
+ const TopoDS_Edge& NewE,
+ const TopoDS_Face& NewF1,
+ const TopoDS_Face& NewF2);
+
+ DEFINE_STANDARD_RTTI(BlockFix_PeriodicSurfaceModifier);
+
+private:
+ Standard_Real myTolerance;
+ TopTools_DataMapOfShapeInteger myMapOfFaces;
+ TColStd_IndexedMapOfTransient myMapOfSurfaces;
+
+};
+
+#endif
diff --git a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx b/src/BlockFix/BlockFix_SphereSpaceModifier.cxx
similarity index 94%
rename from src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx
rename to src/BlockFix/BlockFix_SphereSpaceModifier.cxx
index 2abc08316..4a984cd45 100644
--- a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx
+++ b/src/BlockFix/BlockFix_SphereSpaceModifier.cxx
@@ -18,60 +18,75 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File: BlockFix.cxx
// Created: Tue Dec 7 11:59:05 2004
// Author: Pavel DURANDIN
-#include
+#include
+
+#include
+
+#include
+
+#include
#include
+
+#include
+#include
+#include
+#include
+
#include
+#include
+
+#include
+#include
+
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+
+#include
+
+#include
+#include
+
+IMPLEMENT_STANDARD_HANDLE(BlockFix_SphereSpaceModifier, BRepTools_Modification);
+IMPLEMENT_STANDARD_RTTIEXT(BlockFix_SphereSpaceModifier, BRepTools_Modification);
//=======================================================================
//function : BlockFix_SphereSpaceModifier
//purpose :
//=======================================================================
-
BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier()
{
myMapOfFaces.Clear();
myMapOfSpheres.Clear();
}
+//=======================================================================
+//function : ~BlockFix_SphereSpaceModifier
+//purpose :
+//=======================================================================
+BlockFix_SphereSpaceModifier::~BlockFix_SphereSpaceModifier() {}
+
//=======================================================================
//function : SetTolerance
//purpose :
//=======================================================================
-
void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol)
{
myTolerance = Tol;
}
-
//=======================================================================
//function : NewSurface
//purpose :
//=======================================================================
-
-
static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
const Handle(Geom_Surface)& aSurface,
Handle(Geom_Surface)& aNewSurface)
@@ -132,7 +147,6 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace,
return Standard_False;
}
-
Standard_Boolean BlockFix_SphereSpaceModifier::NewSurface(const TopoDS_Face& F,
Handle(Geom_Surface)& S,
TopLoc_Location& L,Standard_Real& Tol,
@@ -163,7 +177,6 @@ Standard_Boolean BlockFix_SphereSpaceModifier::NewSurface(const TopoDS_Face& F,
//function : NewCurve
//purpose :
//=======================================================================
-
Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve(const TopoDS_Edge& /*E*/,Handle(Geom_Curve)& /*C*/,
TopLoc_Location& /*L*/,Standard_Real& /*Tol*/)
{
@@ -174,7 +187,6 @@ Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve(const TopoDS_Edge& /*E*/
//function : NewPoint
//purpose :
//=======================================================================
-
Standard_Boolean BlockFix_SphereSpaceModifier::NewPoint(const TopoDS_Vertex& /*V*/,
gp_Pnt& /*P*/,
Standard_Real& /*Tol*/)
@@ -186,7 +198,6 @@ Standard_Boolean BlockFix_SphereSpaceModifier::NewPoint(const TopoDS_Vertex& /*V
//function : NewCurve2d
//purpose :
//=======================================================================
-
Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,
const TopoDS_Edge& /*NewE*/,const TopoDS_Face& /*NewF*/,
Handle(Geom2d_Curve)& C,Standard_Real& Tol)
@@ -249,24 +260,20 @@ Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,c
return Standard_False;
}
-
//=======================================================================
//function : NewParameter
//purpose :
//=======================================================================
-
Standard_Boolean BlockFix_SphereSpaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,const TopoDS_Edge& /*E*/,
Standard_Real& /*P*/,Standard_Real& /*Tol*/)
{
return Standard_False;
}
-
//=======================================================================
//function : Continuity
//purpose :
//=======================================================================
-
GeomAbs_Shape BlockFix_SphereSpaceModifier::Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,
const TopoDS_Face& F2,const TopoDS_Edge& /*NewE*/,
const TopoDS_Face& /*NewF1*/,const TopoDS_Face& /*NewF2*/)
diff --git a/src/BlockFix/BlockFix_SphereSpaceModifier.hxx b/src/BlockFix/BlockFix_SphereSpaceModifier.hxx
new file mode 100644
index 000000000..fa620b4e3
--- /dev/null
+++ b/src/BlockFix/BlockFix_SphereSpaceModifier.hxx
@@ -0,0 +1,82 @@
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+#ifndef _BlockFix_SphereSpaceModifier_HeaderFile
+#define _BlockFix_SphereSpaceModifier_HeaderFile
+
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+class TopoDS_Face;
+class Geom_Surface;
+class TopLoc_Location;
+class TopoDS_Edge;
+class Geom_Curve;
+class TopoDS_Vertex;
+class gp_Pnt;
+class Geom2d_Curve;
+
+DEFINE_STANDARD_HANDLE(BlockFix_SphereSpaceModifier, BRepTools_Modification);
+
+class BlockFix_SphereSpaceModifier : public BRepTools_Modification {
+
+public:
+ Standard_EXPORT BlockFix_SphereSpaceModifier();
+ Standard_EXPORT ~BlockFix_SphereSpaceModifier();
+
+ Standard_EXPORT void SetTolerance (const Standard_Real Toler);
+ Standard_EXPORT Standard_Boolean NewSurface (const TopoDS_Face& F, Handle(Geom_Surface)& S,
+ TopLoc_Location& L, Standard_Real& Tol,
+ Standard_Boolean& RevWires, Standard_Boolean& RevFace);
+ Standard_EXPORT Standard_Boolean NewCurve (const TopoDS_Edge& E, Handle(Geom_Curve)& C,
+ TopLoc_Location& L, Standard_Real& Tol);
+ Standard_EXPORT Standard_Boolean NewPoint (const TopoDS_Vertex& V, gp_Pnt& P, Standard_Real& Tol);
+ Standard_EXPORT Standard_Boolean NewCurve2d (const TopoDS_Edge& E, const TopoDS_Face& F,
+ const TopoDS_Edge& NewE, const TopoDS_Face& NewF,
+ Handle(Geom2d_Curve)& C, Standard_Real& Tol);
+ Standard_EXPORT Standard_Boolean NewParameter (const TopoDS_Vertex& V, const TopoDS_Edge& E,
+ Standard_Real& P, Standard_Real& Tol);
+ Standard_EXPORT GeomAbs_Shape Continuity (const TopoDS_Edge& E,
+ const TopoDS_Face& F1,const TopoDS_Face& F2,
+ const TopoDS_Edge& NewE,
+ const TopoDS_Face& NewF1, const TopoDS_Face& NewF2);
+ Standard_EXPORT Standard_Boolean ForRotation (const TopoDS_Face& F);
+
+ DEFINE_STANDARD_RTTI(BlockFix_SphereSpaceModifier);
+
+private:
+ Standard_Real myTolerance;
+ TopTools_DataMapOfShapeInteger myMapOfFaces;
+ TColStd_IndexedMapOfTransient myMapOfSpheres;
+
+};
+
+#endif
diff --git a/src/GEOMAlgo/BlockFix_UnionEdges.cxx b/src/BlockFix/BlockFix_UnionEdges.cxx
similarity index 99%
rename from src/GEOMAlgo/BlockFix_UnionEdges.cxx
rename to src/BlockFix/BlockFix_UnionEdges.cxx
index 95a1a713e..531d30a5a 100644
--- a/src/GEOMAlgo/BlockFix_UnionEdges.cxx
+++ b/src/BlockFix/BlockFix_UnionEdges.cxx
@@ -23,10 +23,12 @@
// Created: 07.12.04 15:27:30
// Author: Sergey KUUL
-#include
+#include
#include
+#include
+
#include
#include
#include
@@ -57,6 +59,7 @@
#include
#include
#include
+#include
#include
diff --git a/src/GEOMAlgo/BlockFix_UnionEdges.jxx b/src/BlockFix/BlockFix_UnionEdges.hxx
similarity index 72%
rename from src/GEOMAlgo/BlockFix_UnionEdges.jxx
rename to src/BlockFix/BlockFix_UnionEdges.hxx
index 558e8d82b..b63f5c7e2 100644
--- a/src/GEOMAlgo/BlockFix_UnionEdges.jxx
+++ b/src/BlockFix/BlockFix_UnionEdges.hxx
@@ -18,14 +18,30 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-#ifndef _ShapeBuild_ReShape_HeaderFile
-#include
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include
-#endif
#ifndef _BlockFix_UnionEdges_HeaderFile
-#include
+#define _BlockFix_UnionEdges_HeaderFile
+
+#include
+
+#include
+
+#include
+#include
+
+class TopoDS_Shape;
+
+class BlockFix_UnionEdges {
+
+public:
+ Standard_EXPORT BlockFix_UnionEdges();
+
+ Standard_EXPORT TopoDS_Shape Perform (const TopoDS_Shape& Shape,const Standard_Real Tol);
+
+private:
+ Standard_Real myTolerance;
+ Handle_ShapeBuild_ReShape myContext;
+
+};
+
#endif
diff --git a/src/GEOMAlgo/BlockFix_UnionFaces.cxx b/src/BlockFix/BlockFix_UnionFaces.cxx
similarity index 99%
rename from src/GEOMAlgo/BlockFix_UnionFaces.cxx
rename to src/BlockFix/BlockFix_UnionFaces.cxx
index c800fd421..aae28cab6 100644
--- a/src/GEOMAlgo/BlockFix_UnionFaces.cxx
+++ b/src/BlockFix/BlockFix_UnionFaces.cxx
@@ -18,13 +18,12 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File: BlockFix_UnionFaces.cxx
// Created: Tue Dec 7 17:15:42 2004
// Author: Pavel DURANDIN
-#include
+#include
#include
@@ -73,6 +72,7 @@
#include
#include
#include
+#include
#include
@@ -104,43 +104,37 @@
//function : BlockFix_UnionFaces
//purpose :
//=======================================================================
-
BlockFix_UnionFaces::BlockFix_UnionFaces()
: myTolerance(Precision::Confusion()),
myOptimumNbFaces(6)
{
}
-
//=======================================================================
//function : GetTolerance
//purpose :
//=======================================================================
-
Standard_Real& BlockFix_UnionFaces::GetTolerance()
{
return myTolerance;
}
-
//=======================================================================
//function : GetOptimumNbFaces
//purpose :
//=======================================================================
-
Standard_Integer& BlockFix_UnionFaces::GetOptimumNbFaces()
{
return myOptimumNbFaces;
}
-
//=======================================================================
//function : AddOrdinaryEdges
//purpose : auxilary
+// adds edges from the shape to the sequence
+// seams and equal edges are dropped
+// Returns true if one of original edges dropped
//=======================================================================
-// adds edges from the shape to the sequence
-// seams and equal edges are dropped
-// Returns true if one of original edges dropped
static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
const TopoDS_Shape aShape,
Standard_Integer& anIndex)
@@ -180,7 +174,6 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges,
return isDropped;
}
-
//=======================================================================
//function : ClearRts
//purpose : auxilary
@@ -195,12 +188,10 @@ static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface)
return aSurface;
}
-
//=======================================================================
//function : Perform
//purpose :
//=======================================================================
-
TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
{
Handle(ShapeBuild_ReShape) myContext = new ShapeBuild_ReShape;
@@ -519,12 +510,10 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
return aResShape;
}
-
//=======================================================================
//function : IsSameDomain
//purpose :
//=======================================================================
-
bool getCylinder (Handle(Geom_Surface)& theInSurface, gp_Cylinder& theOutCylinder)
{
bool isCylinder = false;
@@ -683,12 +672,10 @@ Standard_Boolean BlockFix_UnionFaces::IsSameDomain(const TopoDS_Face& aFace,
return false;
}
-
//=======================================================================
//function : MovePCurves
//purpose :
//=======================================================================
-
void BlockFix_UnionFaces::MovePCurves(TopoDS_Face& aTarget,
const TopoDS_Face& aSource) const
{
diff --git a/src/GEOMAlgo/BlockFix_UnionFaces.hxx b/src/BlockFix/BlockFix_UnionFaces.hxx
similarity index 64%
rename from src/GEOMAlgo/BlockFix_UnionFaces.hxx
rename to src/BlockFix/BlockFix_UnionFaces.hxx
index f676d5bcf..83140b08b 100644
--- a/src/GEOMAlgo/BlockFix_UnionFaces.hxx
+++ b/src/BlockFix/BlockFix_UnionFaces.hxx
@@ -18,23 +18,14 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
#ifndef _BlockFix_UnionFaces_HeaderFile
#define _BlockFix_UnionFaces_HeaderFile
-#ifndef _Standard_Real_HeaderFile
#include
-#endif
-#ifndef _Standard_Boolean_HeaderFile
#include
-#endif
-#ifndef _Standard_HeaderFile
#include
-#endif
-#ifndef _Standard_Macro_HeaderFile
#include
-#endif
class TopoDS_Shape;
class TopoDS_Face;
@@ -42,24 +33,9 @@ class TopoDS_Face;
class BlockFix_UnionFaces
{
public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-
- // Methods PUBLIC
- //
Standard_EXPORT BlockFix_UnionFaces();
- Standard_EXPORT Standard_Real& GetTolerance();
+ Standard_EXPORT Standard_Real& GetTolerance();
/* \brief To get/set the OptimumNbFaces parameter
*
@@ -71,18 +47,17 @@ public:
* negative - do not perform any unions, regardless the faces quantity.
*
*/
- Standard_EXPORT Standard_Integer& GetOptimumNbFaces();
+ Standard_EXPORT Standard_Integer& GetOptimumNbFaces();
- Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape);
+ Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape);
- Standard_EXPORT virtual Standard_Boolean IsSameDomain(const TopoDS_Face& aFace,
- const TopoDS_Face& aChekedFace) const;
- Standard_EXPORT virtual void MovePCurves(TopoDS_Face& aTarget,
- const TopoDS_Face& aSource) const;
+ Standard_EXPORT virtual Standard_Boolean IsSameDomain(const TopoDS_Face& aFace,
+ const TopoDS_Face& aChekedFace) const;
+
+ Standard_EXPORT virtual void MovePCurves(TopoDS_Face& aTarget,
+ const TopoDS_Face& aSource) const;
private:
- // Fields PRIVATE
- //
Standard_Real myTolerance;
Standard_Integer myOptimumNbFaces;
};
diff --git a/src/BlockFix/Makefile.am b/src/BlockFix/Makefile.am
new file mode 100644
index 000000000..a3b37223d
--- /dev/null
+++ b/src/BlockFix/Makefile.am
@@ -0,0 +1,55 @@
+# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+# GEOM BlockFix : tools for Blocks algorithms
+# File : Makefile.am
+# Author : Julia DOROVSKIKH
+# Module : GEOM
+
+include $(top_srcdir)/adm_local/unix/make_common_starter.am
+
+# Libraries targets
+lib_LTLIBRARIES = libBlockFix.la
+
+dist_libBlockFix_la_SOURCES = \
+ BlockFix_BlockFixAPI.cxx \
+ BlockFix_CheckTool.cxx \
+ BlockFix.cxx \
+ BlockFix_PeriodicSurfaceModifier.cxx \
+ BlockFix_SphereSpaceModifier.cxx \
+ BlockFix_UnionEdges.cxx \
+ BlockFix_UnionFaces.cxx
+
+# header files
+salomeinclude_HEADERS = \
+ BlockFix.hxx \
+ BlockFix_BlockFixAPI.hxx \
+ BlockFix_CheckTool.hxx \
+ BlockFix_PeriodicSurfaceModifier.hxx \
+ BlockFix_SphereSpaceModifier.hxx \
+ BlockFix_UnionEdges.hxx \
+ BlockFix_UnionFaces.hxx
+
+libBlockFix_la_CPPFLAGS = \
+ $(CAS_CPPFLAGS) \
+ $(KERNEL_CXXFLAGS)
+
+libBlockFix_la_LDFLAGS = \
+ $(STDLIB) \
+ $(CAS_LDPATH) -lTKBO -lTKShHealing -lTKBool -lTKMesh -lTKOffset \
+ $(KERNEL_LDFLAGS) -lSALOMELocalTrace
diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx
index a03687eab..c50811b82 100644
--- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx
+++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx
@@ -509,7 +509,7 @@ GEOM::GEOM_Object_ptr BlocksGUI_ExplodeDlg::getFather( GEOM::GEOM_Object_ptr )
// Function : getNewObjectName
// Purpose : Redefine this method to return proper name for a new object
//================================================================
-QString BlocksGUI_ExplodeDlg::getNewObjectName() const
+QString BlocksGUI_ExplodeDlg::getNewObjectName (int) const
{
return QString::null;
}
diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.h b/src/BlocksGUI/BlocksGUI_ExplodeDlg.h
index 6be87bef4..1f396ccc5 100644
--- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.h
+++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.h
@@ -50,7 +50,7 @@ protected:
virtual bool execute( ObjectList& );
virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr );
- virtual QString getNewObjectName() const;
+ virtual QString getNewObjectName (int CurrObj = -1) const;
private:
void Init();
diff --git a/src/DisplayGUI/DisplayGUI.cxx b/src/DisplayGUI/DisplayGUI.cxx
index 67665f66e..0dc9455d4 100644
--- a/src/DisplayGUI/DisplayGUI.cxx
+++ b/src/DisplayGUI/DisplayGUI.cxx
@@ -577,10 +577,10 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
}
}
if(mode == 0 || mode == 1 || mode == 2) {
- aStudy->setObjectProperty(mgrId,It.Value()->getEntry(),DISPLAY_MODE_PROP, mode);
+ aStudy->setObjectProperty(mgrId,It.Value()->getEntry(),GEOM::propertyName( GEOM::DisplayMode ), mode);
}
else if (mode == 4) {
- aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),VECTOR_MODE_PROP, vectorMode);
+ aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),GEOM::propertyName( GEOM::EdgesDirection ), vectorMode);
}
}
}
@@ -625,10 +625,10 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
}
}
if(mode == 0 || mode == 1 || mode == 2 || mode == 3) {
- aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),DISPLAY_MODE_PROP, mode);
+ aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),GEOM::propertyName( GEOM::DisplayMode ), mode);
}
else if (mode == 4) {
- aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),VECTOR_MODE_PROP, vectorMode);
+ aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),GEOM::propertyName( GEOM::EdgesDirection ), vectorMode);
}
}
}
diff --git a/src/DlgRef/DlgRef.cxx b/src/DlgRef/DlgRef.cxx
index 164f483b4..a7a551f60 100644
--- a/src/DlgRef/DlgRef.cxx
+++ b/src/DlgRef/DlgRef.cxx
@@ -15,7 +15,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File : DlgRef.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
@@ -218,34 +217,6 @@ DlgRef_1Sel3Spin1Check::~DlgRef_1Sel3Spin1Check()
{
}
-//////////////////////////////////////////
-// DlgRef_1Sel4Spin2Check
-//////////////////////////////////////////
-
-DlgRef_1Sel4Spin2Check::DlgRef_1Sel4Spin2Check( QWidget* parent, Qt::WindowFlags f )
-: QWidget( parent, f )
-{
- setupUi( this );
-}
-
-DlgRef_1Sel4Spin2Check::~DlgRef_1Sel4Spin2Check()
-{
-}
-
-//////////////////////////////////////////
-// DlgRef_1Sel4Spin
-//////////////////////////////////////////
-
-DlgRef_1Sel4Spin::DlgRef_1Sel4Spin( QWidget* parent, Qt::WindowFlags f )
-: QWidget( parent, f )
-{
- setupUi( this );
-}
-
-DlgRef_1Sel4Spin::~DlgRef_1Sel4Spin()
-{
-}
-
//////////////////////////////////////////
// DlgRef_1Sel5Spin1Check
//////////////////////////////////////////
@@ -260,20 +231,6 @@ DlgRef_1Sel5Spin1Check::~DlgRef_1Sel5Spin1Check()
{
}
-//////////////////////////////////////////
-// DlgRef_1Sel5Spin
-//////////////////////////////////////////
-
-DlgRef_1Sel5Spin::DlgRef_1Sel5Spin( QWidget* parent, Qt::WindowFlags f )
-: QWidget( parent, f )
-{
- setupUi( this );
-}
-
-DlgRef_1Sel5Spin::~DlgRef_1Sel5Spin()
-{
-}
-
//////////////////////////////////////////
// DlgRef_1Spin
//////////////////////////////////////////
@@ -526,20 +483,6 @@ DlgRef_2Sel3Spin::~DlgRef_2Sel3Spin()
{
}
-//////////////////////////////////////////
-// DlgRef_2Sel4Spin1Check
-//////////////////////////////////////////
-
-DlgRef_2Sel4Spin1Check::DlgRef_2Sel4Spin1Check( QWidget* parent, Qt::WindowFlags f )
-: QWidget( parent, f )
-{
- setupUi( this );
-}
-
-DlgRef_2Sel4Spin1Check::~DlgRef_2Sel4Spin1Check()
-{
-}
-
//////////////////////////////////////////
// DlgRef_2Sel
//////////////////////////////////////////
diff --git a/src/DlgRef/DlgRef.h b/src/DlgRef/DlgRef.h
index bda6da5b5..b727e96ec 100644
--- a/src/DlgRef/DlgRef.h
+++ b/src/DlgRef/DlgRef.h
@@ -15,7 +15,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// File : DlgRef.h
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
@@ -259,38 +258,6 @@ public:
~DlgRef_1Sel3Spin1Check();
};
-//////////////////////////////////////////
-// DlgRef_1Sel4Spin2Check
-//////////////////////////////////////////
-
-#include "ui_DlgRef_1Sel4Spin2Check_QTD.h"
-
-class DLGREF_EXPORT DlgRef_1Sel4Spin2Check : public QWidget,
- public Ui::DlgRef_1Sel4Spin2Check_QTD
-{
- Q_OBJECT
-
-public:
- DlgRef_1Sel4Spin2Check( QWidget* = 0, Qt::WindowFlags = 0 );
- ~DlgRef_1Sel4Spin2Check();
-};
-
-//////////////////////////////////////////
-// DlgRef_1Sel4Spin
-//////////////////////////////////////////
-
-#include "ui_DlgRef_1Sel4Spin_QTD.h"
-
-class DLGREF_EXPORT DlgRef_1Sel4Spin : public QWidget,
- public Ui::DlgRef_1Sel4Spin_QTD
-{
- Q_OBJECT
-
-public:
- DlgRef_1Sel4Spin( QWidget* = 0, Qt::WindowFlags = 0 );
- ~DlgRef_1Sel4Spin();
-};
-
//////////////////////////////////////////
// DlgRef_1Sel5Spin1Check
//////////////////////////////////////////
@@ -307,22 +274,6 @@ public:
~DlgRef_1Sel5Spin1Check();
};
-//////////////////////////////////////////
-// DlgRef_1Sel5Spin
-//////////////////////////////////////////
-
-#include "ui_DlgRef_1Sel5Spin_QTD.h"
-
-class DLGREF_EXPORT DlgRef_1Sel5Spin : public QWidget,
- public Ui::DlgRef_1Sel5Spin_QTD
-{
- Q_OBJECT
-
-public:
- DlgRef_1Sel5Spin( QWidget* = 0, Qt::WindowFlags = 0 );
- ~DlgRef_1Sel5Spin();
-};
-
//////////////////////////////////////////
// DlgRef_1Spin
//////////////////////////////////////////
@@ -611,22 +562,6 @@ public:
~DlgRef_2Sel3Spin();
};
-//////////////////////////////////////////
-// DlgRef_2Sel4Spin1Check
-//////////////////////////////////////////
-
-#include "ui_DlgRef_2Sel4Spin1Check_QTD.h"
-
-class DLGREF_EXPORT DlgRef_2Sel4Spin1Check : public QWidget,
- public Ui::DlgRef_2Sel4Spin1Check_QTD
-{
- Q_OBJECT
-
-public:
- DlgRef_2Sel4Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
- ~DlgRef_2Sel4Spin1Check();
-};
-
//////////////////////////////////////////
// DlgRef_2Sel
//////////////////////////////////////////
diff --git a/src/DlgRef/DlgRef_1Sel4Spin2Check_QTD.ui b/src/DlgRef/DlgRef_1Sel4Spin2Check_QTD.ui
deleted file mode 100644
index a6c6a6391..000000000
--- a/src/DlgRef/DlgRef_1Sel4Spin2Check_QTD.ui
+++ /dev/null
@@ -1,211 +0,0 @@
-
- DlgRef_1Sel4Spin2Check_QTD
-
-
-
- 0
- 0
- 156
- 120
-
-
-
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 6
-
-
- 6
-
- -
-
-
-
-
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
-
- 6
-
-
-
-
-
-
- 0
- 0
-
-
-
- TL1
-
-
- false
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
-
-
- -
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL2
-
-
- false
-
-
-
- -
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL3
-
-
- false
-
-
-
- -
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL4
-
-
- false
-
-
-
- -
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL5
-
-
- false
-
-
-
- -
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
- qPixmapFromMimeSource
-
-
- SalomeApp_DoubleSpinBox
- QDoubleSpinBox
- SalomeApp_DoubleSpinBox.h
-
-
-
- PushButton1
- LineEdit1
- SpinBox_DX
- SpinBox_DY
- SpinBox_DZ
- SpinBox_SC
- CheckBox1
- CheckBox2
-
-
-
-
diff --git a/src/DlgRef/DlgRef_1Sel4Spin_QTD.ui b/src/DlgRef/DlgRef_1Sel4Spin_QTD.ui
deleted file mode 100644
index 43cbcba2b..000000000
--- a/src/DlgRef/DlgRef_1Sel4Spin_QTD.ui
+++ /dev/null
@@ -1,214 +0,0 @@
-
- DlgRef_1Sel4Spin_QTD
-
-
-
- 0
- 0
- 271
- 117
-
-
-
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 6
-
-
- 6
-
- -
-
-
-
-
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
-
- 6
-
-
-
-
-
-
- 0
- 0
-
-
-
- TL6
-
-
- false
-
-
-
- -
-
-
- -
-
-
-
-
-
-
- 6
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
-
-
-
-
- 0
- 0
-
-
-
- TL3
-
-
- false
-
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL4
-
-
- false
-
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL5
-
-
- false
-
-
-
- -
-
-
-
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL1
-
-
- false
-
-
-
-
-
-
-
-
-
- qPixmapFromMimeSource
-
-
- SalomeApp_DoubleSpinBox
- QDoubleSpinBox
- SalomeApp_DoubleSpinBox.h
-
-
-
- PushButton1
- LineEdit1
- SpinBox_DX
- SpinBox_DY
- SpinBox_DZ
- SpinBox_S
-
-
-
-
diff --git a/src/DlgRef/DlgRef_1Sel5Spin_QTD.ui b/src/DlgRef/DlgRef_1Sel5Spin_QTD.ui
deleted file mode 100644
index 1b945b5a8..000000000
--- a/src/DlgRef/DlgRef_1Sel5Spin_QTD.ui
+++ /dev/null
@@ -1,232 +0,0 @@
-
- DlgRef_1Sel5Spin_QTD
-
-
-
- 0
- 0
- 174
- 123
-
-
-
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
- -
-
-
-
-
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
-
- 6
-
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 6
-
-
- 6
-
-
-
-
-
-
- 0
- 0
-
-
-
- TL4
-
-
- false
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL3
-
-
- false
-
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL2
-
-
- false
-
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL6
-
-
- false
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL5
-
-
- false
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL1
-
-
- false
-
-
-
- -
-
-
-
-
-
-
-
-
- qPixmapFromMimeSource
-
-
- SalomeApp_DoubleSpinBox
- QDoubleSpinBox
- SalomeApp_DoubleSpinBox.h
-
-
-
- PushButton1
- LineEdit1
- SpinBox1
- SpinBox2
- SpinBox4
- SpinBox5
- SpinBox3
-
-
-
-
diff --git a/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.ui b/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.ui
deleted file mode 100644
index 5d0afce71..000000000
--- a/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.ui
+++ /dev/null
@@ -1,237 +0,0 @@
-
- DlgRef_2Sel4Spin1Check_QTD
-
-
-
- 0
- 0
- 156
- 197
-
-
-
-
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
- -
-
-
-
-
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 9
-
-
- 6
-
-
- 6
-
-
-
-
-
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL6
-
-
- false
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL5
-
-
- false
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL4
-
-
- false
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL3
-
-
- false
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL2
-
-
- false
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
- TL1
-
-
- false
-
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
- qPixmapFromMimeSource
-
-
- SalomeApp_DoubleSpinBox
- QDoubleSpinBox
- SalomeApp_DoubleSpinBox.h
-
-
- SalomeApp_IntSpinBox
- QSpinBox
-
-
-
-
- PushButton1
- LineEdit1
- PushButton2
- LineEdit2
- SpinBox_DX1
- SpinBox_DY1
- CheckButton1
- SpinBox_DX2
- SpinBox_DY2
-
-
-
-
diff --git a/src/DlgRef/Makefile.am b/src/DlgRef/Makefile.am
index deaa27026..681636166 100644
--- a/src/DlgRef/Makefile.am
+++ b/src/DlgRef/Makefile.am
@@ -15,9 +15,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-# GEOM DLGREF :
# File : Makefile.am
# Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
# Package : DlgRef
@@ -50,10 +48,7 @@ UIC_FILES = \
ui_DlgRef_1Sel3Spin_QTD.h \
ui_DlgRef_1Sel3Spin1Check_QTD.h \
ui_DlgRef_1Sel3Spin2Check1Spin_QTD.h \
- ui_DlgRef_1Sel4Spin2Check_QTD.h \
- ui_DlgRef_1Sel4Spin_QTD.h \
ui_DlgRef_1Sel5Spin1Check_QTD.h \
- ui_DlgRef_1Sel5Spin_QTD.h \
ui_DlgRef_1Sel_QTD.h \
ui_DlgRef_1SelExt_QTD.h \
ui_DlgRef_1Spin_QTD.h \
@@ -72,7 +67,6 @@ UIC_FILES = \
ui_DlgRef_2Sel2Spin2Push_QTD.h \
ui_DlgRef_2Sel3Spin2Rb_QTD.h \
ui_DlgRef_2Sel3Spin_QTD.h \
- ui_DlgRef_2Sel4Spin1Check_QTD.h \
ui_DlgRef_2Sel_QTD.h \
ui_DlgRef_2SelExt_QTD.h \
ui_DlgRef_2Spin_QTD.h \
diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx
index 5facd0411..3de5f8e89 100644
--- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx
+++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx
@@ -831,7 +831,7 @@ GEOM::GEOM_Object_ptr EntityGUI_SubShapeDlg::getFather(GEOM::GEOM_Object_ptr)
// Function : getNewObjectName
// Purpose :
//================================================================
-QString EntityGUI_SubShapeDlg::getNewObjectName() const
+QString EntityGUI_SubShapeDlg::getNewObjectName (int) const
{
return QString::null;
}
diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.h b/src/EntityGUI/EntityGUI_SubShapeDlg.h
index d9bf30a3f..816059e86 100644
--- a/src/EntityGUI/EntityGUI_SubShapeDlg.h
+++ b/src/EntityGUI/EntityGUI_SubShapeDlg.h
@@ -51,7 +51,7 @@ protected:
virtual bool isValid (QString&);
virtual bool execute (ObjectList&);
virtual GEOM::GEOM_Object_ptr getFather (GEOM::GEOM_Object_ptr);
- virtual QString getNewObjectName() const;
+ virtual QString getNewObjectName (int CurrObj = -1) const;
void closeEvent (QCloseEvent*);
diff --git a/src/GEOM/Makefile.am b/src/GEOM/Makefile.am
index 68f248fb6..98fcfe532 100644
--- a/src/GEOM/Makefile.am
+++ b/src/GEOM/Makefile.am
@@ -21,7 +21,6 @@
# Author : Damien COQUERET (OCC)
# Modified by : Alexander BORODIN (OCN) - autotools usage
# Module : GEOM
-# $Header:
include $(top_srcdir)/adm_local/unix/make_common_starter.am
diff --git a/src/GEOMAlgo/BlockFix.cdl b/src/GEOMAlgo/BlockFix.cdl
deleted file mode 100644
index 961af6625..000000000
--- a/src/GEOMAlgo/BlockFix.cdl
+++ /dev/null
@@ -1,67 +0,0 @@
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
-
--- File: BlockFix.cdl
--- Created: Tue Dec 7 11:59:05 2004
--- Author: Pavel Durandin
---
-package BlockFix
-
-uses
-
- TColStd,
- gp,
- Geom,
- Geom2d,
- GeomAbs,
- TopLoc,
- TopoDS,
- BRepTools,
- TopTools,
- ShapeBuild
-
-is
-
- class SphereSpaceModifier;
-
- class UnionFaces;
-
- class UnionEdges;
-
- class BlockFixAPI;
- ---Purpose: API class to perform the fixing of the
- -- block
-
- class PeriodicSurfaceModifier;
-
- class CheckTool;
-
- RotateSphereSpace (S: Shape from TopoDS; Tol: Real)
- returns Shape from TopoDS;
-
- FixRanges (S: Shape from TopoDS; Tol: Real)
- returns Shape from TopoDS;
- ---Purpose: checking and fixing cases where parametric
- -- boundaries of face based on periodic surface are not
- -- contained in the range of this surface.
-
-end BlockFix;
diff --git a/src/GEOMAlgo/BlockFix.ixx b/src/GEOMAlgo/BlockFix.ixx
deleted file mode 100644
index 2ea228ff7..000000000
--- a/src/GEOMAlgo/BlockFix.ixx
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include
-
-
-
-
diff --git a/src/GEOMAlgo/BlockFix.jxx b/src/GEOMAlgo/BlockFix.jxx
deleted file mode 100644
index 8649f8895..000000000
--- a/src/GEOMAlgo/BlockFix.jxx
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include
-#endif
-#ifndef _BlockFix_HeaderFile
-#include
-#endif
diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.cdl b/src/GEOMAlgo/BlockFix_BlockFixAPI.cdl
deleted file mode 100644
index 8cb4c49ce..000000000
--- a/src/GEOMAlgo/BlockFix_BlockFixAPI.cdl
+++ /dev/null
@@ -1,68 +0,0 @@
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
-
--- File: BlockFix_BlockFixAPI.cdl
--- Created: Tue Dec 7 17:56:09 2004
--- Author: Pavel Durandin
---
-class BlockFixAPI from BlockFix inherits TShared from MMgt
-
- ---Purpose:
-
-uses
-
- Shape from TopoDS,
- ReShape from ShapeBuild
-
-is
- Create returns BlockFixAPI from BlockFix;
- ---Purpose: Empty constructor
-
- SetShape(me: mutable; Shape: Shape from TopoDS);
- ---Purpose: Sets the shape to be operated on
- ---C++: inline
-
- Perform(me: mutable);
- ---Purpose:
-
- Shape(me) returns Shape from TopoDS;
- ---Purpose: Returns resulting shape.
- ---C++: inline
-
- Context(me:mutable) returns ReShape from ShapeBuild;
- ---Purpose: Returns modifiable context for storing the
- -- mofifications
- ---C++: inline
- ---C++: return &
-
- Tolerance (me:mutable) returns Real;
- ---Purpose: Returns modifiable tolerance of recognition
- ---C++: inline
- ---C++: return &
-
-fields
-
- myContext : ReShape from ShapeBuild;
- myShape : Shape from TopoDS;
- myTolerance : Real from Standard;
-
-end BlockFixAPI from BlockFix;
diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx b/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx
deleted file mode 100644
index 7be25cc57..000000000
--- a/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _BlockFix_BlockFixAPI_HeaderFile
-#define _BlockFix_BlockFixAPI_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include
-#endif
-#ifndef _Handle_BlockFix_BlockFixAPI_HeaderFile
-#include
-#endif
-
-#ifndef _Handle_ShapeBuild_ReShape_HeaderFile
-#include
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include
-#endif
-#ifndef _Standard_Real_HeaderFile
-#include
-#endif
-#ifndef _MMgt_TShared_HeaderFile
-#include
-#endif
-
-class ShapeBuild_ReShape;
-class TopoDS_Shape;
-
-
-class BlockFix_BlockFixAPI : public MMgt_TShared
-{
-public:
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
-
- // Methods PUBLIC
- //
- Standard_EXPORT BlockFix_BlockFixAPI();
- void SetShape(const TopoDS_Shape& Shape);
- Standard_EXPORT void Perform();
- TopoDS_Shape Shape() const;
- Handle_ShapeBuild_ReShape& Context();
- Standard_Real& Tolerance();
- Standard_Integer& OptimumNbFaces();
- Standard_EXPORT ~BlockFix_BlockFixAPI();
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& BlockFix_BlockFixAPI_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-private:
- // Fields PRIVATE
- //
- Handle_ShapeBuild_ReShape myContext;
- TopoDS_Shape myShape;
- Standard_Real myTolerance;
- Standard_Integer myOptimumNbFaces;
-};
-
-#include
-
-#endif
diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx b/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx
deleted file mode 100644
index 4d06a875e..000000000
--- a/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include
-#endif
-
-BlockFix_BlockFixAPI::~BlockFix_BlockFixAPI() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("BlockFix_BlockFixAPI",
- sizeof(BlockFix_BlockFixAPI),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(BlockFix_BlockFixAPI) Handle(BlockFix_BlockFixAPI)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(BlockFix_BlockFixAPI) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(BlockFix_BlockFixAPI))) {
- _anOtherObject = Handle(BlockFix_BlockFixAPI)((Handle(BlockFix_BlockFixAPI)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& BlockFix_BlockFixAPI::DynamicType() const
-{
- return STANDARD_TYPE(BlockFix_BlockFixAPI) ;
-}
-Standard_Boolean BlockFix_BlockFixAPI::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(BlockFix_BlockFixAPI) == AType || MMgt_TShared::IsKind(AType));
-}
-Handle_BlockFix_BlockFixAPI::~Handle_BlockFix_BlockFixAPI() {}
-
diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.jxx b/src/GEOMAlgo/BlockFix_BlockFixAPI.jxx
deleted file mode 100644
index 945a6ed88..000000000
--- a/src/GEOMAlgo/BlockFix_BlockFixAPI.jxx
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _ShapeBuild_ReShape_HeaderFile
-#include
-#endif
-#ifndef _TopoDS_Shape_HeaderFile
-#include
-#endif
-#ifndef _BlockFix_BlockFixAPI_HeaderFile
-#include
-#endif
diff --git a/src/GEOMAlgo/BlockFix_CheckTool.cdl b/src/GEOMAlgo/BlockFix_CheckTool.cdl
deleted file mode 100644
index c5423377f..000000000
--- a/src/GEOMAlgo/BlockFix_CheckTool.cdl
+++ /dev/null
@@ -1,67 +0,0 @@
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
-
--- File: BlockFix_CheckTool.cdl
--- Created: Fri Dec 17 10:36:58 2004
--- Author: Sergey KUUL
---
-class CheckTool from BlockFix
-
- ---Purpose:
-
-uses
-
- Shape from TopoDS,
- SequenceOfShape from TopTools
-
-is
-
- Create returns CheckTool from BlockFix;
- ---Purpose: Empty constructor
-
- SetShape(me: in out; aShape: Shape from TopoDS);
-
- Perform(me: in out);
- ---Purpose:
-
- NbPossibleBlocks(me) returns Integer;
-
- PossibleBlock(me; num: Integer) returns Shape from TopoDS;
-
- DumpCheckResult(me; S : in out OStream);
- ---Purpose: Dumps results of checking
-
-
-fields
-
- myShape : Shape from TopoDS;
- myHasCheck : Boolean;
- myNbSolids : Integer;
- myNbBlocks : Integer;
- myPossibleBlocks : SequenceOfShape from TopTools;
- myNbDegen : Integer;
- myNbUF : Integer;
- myNbUE : Integer;
- myNbUFUE : Integer;
- myBadRanges : Integer;
-
-end CheckTool;
diff --git a/src/GEOMAlgo/BlockFix_CheckTool.hxx b/src/GEOMAlgo/BlockFix_CheckTool.hxx
deleted file mode 100644
index 652319e42..000000000
--- a/src/GEOMAlgo/BlockFix_CheckTool.hxx
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _BlockFix_CheckTool_HeaderFile
-#define _BlockFix_CheckTool_HeaderFile
-
-#ifndef _TopoDS_Shape_HeaderFile
-#include
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include
-#endif
-#ifndef _Standard_Integer_HeaderFile
-#include
-#endif
-#ifndef _TopTools_SequenceOfShape_HeaderFile
-#include
-#endif
-#ifndef _Standard_OStream_HeaderFile
-#include
-#endif
-class TopoDS_Shape;
-
-
-#ifndef _Standard_HeaderFile
-#include
-#endif
-#ifndef _Standard_Macro_HeaderFile
-#include
-#endif
-
-class BlockFix_CheckTool {
-
-public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- // Methods PUBLIC
- //
-Standard_EXPORT BlockFix_CheckTool();
-Standard_EXPORT void SetShape(const TopoDS_Shape& aShape) ;
-Standard_EXPORT void Perform() ;
-Standard_EXPORT Standard_Integer NbPossibleBlocks() const;
-Standard_EXPORT TopoDS_Shape PossibleBlock(const Standard_Integer num) const;
-Standard_EXPORT void DumpCheckResult(Standard_OStream& S) const;
-
-
-
-
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-TopoDS_Shape myShape;
-Standard_Boolean myHasCheck;
-Standard_Integer myNbSolids;
-Standard_Integer myNbBlocks;
-TopTools_SequenceOfShape myPossibleBlocks;
-Standard_Integer myNbDegen;
-Standard_Integer myNbUF;
-Standard_Integer myNbUE;
-Standard_Integer myNbUFUE;
-Standard_Integer myBadRanges;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
diff --git a/src/GEOMAlgo/BlockFix_CheckTool.ixx b/src/GEOMAlgo/BlockFix_CheckTool.ixx
deleted file mode 100644
index d44f98056..000000000
--- a/src/GEOMAlgo/BlockFix_CheckTool.ixx
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include
-
-
-
-
diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cdl b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cdl
deleted file mode 100644
index 374af919c..000000000
--- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cdl
+++ /dev/null
@@ -1,135 +0,0 @@
--- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
---
--- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
--- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
---
--- This library is free software; you can redistribute it and/or
--- modify it under the terms of the GNU Lesser General Public
--- License as published by the Free Software Foundation; either
--- version 2.1 of the License.
---
--- This library is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--- Lesser General Public License for more details.
---
--- You should have received a copy of the GNU Lesser General Public
--- License along with this library; if not, write to the Free Software
--- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---
--- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
---
-
--- File: BlockFix_PeriodicSurfaceModifier.cdl
--- Created: Wed Dec 15 10:03:50 2004
--- Author: Sergey KUUL
---
-class PeriodicSurfaceModifier from BlockFix inherits Modification from BRepTools
-
- ---Purpose:
-
-uses
- Vertex from TopoDS,
- Edge from TopoDS,
- Face from TopoDS,
- Location from TopLoc,
- Shape from GeomAbs,
- Pnt from gp,
- Curve from Geom,
- Curve from Geom2d,
- Surface from Geom,
- IndexedMapOfTransient from TColStd,
- DataMapOfShapeInteger from TopTools
-
-is
-
- Create returns mutable PeriodicSurfaceModifier from BlockFix;
-
- SetTolerance(me: mutable; Toler: Real);
- ---Purpose: Sets the tolerance for recognition of geometry
-
- NewSurface(me: mutable; F : Face from TopoDS;
- S : out Surface from Geom;
- L : out Location from TopLoc;
- Tol: out Real from Standard;
- RevWires : out Boolean from Standard;
- RevFace : out Boolean from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the face has been
- -- modified. In this case, is the new geometric
- -- support of the face, the new location,
- -- the new tolerance. Otherwise, returns
- -- Standard_False, and , , are not
- -- significant.
-
- NewCurve(me: mutable; E : Edge from TopoDS;
- C : out Curve from Geom;
- L : out Location from TopLoc;
- Tol: out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the edge has been
- -- modified. In this case, is the new geometric
- -- support of the edge, the new location,
- -- the new tolerance. Otherwise, returns
- -- Standard_False, and , , are not
- -- significant.
-
- NewPoint(me: mutable; V : Vertex from TopoDS;
- P : out Pnt from gp;
- Tol: out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the vertex has been
- -- modified. In this case, is the new geometric
- -- support of the vertex, the new tolerance.
- -- Otherwise, returns Standard_False, and ,
- -- are not significant.
-
- NewCurve2d(me: mutable; E : Edge from TopoDS;
- F : Face from TopoDS;
- NewE : Edge from TopoDS;
- NewF : Face from TopoDS;
- C : out Curve from Geom2d;
- Tol : out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the edge has a new
- -- curve on surface on the face .In this case,
- -- is the new geometric support of the edge, the
- -- new location, the new tolerance.
- --
- -- Otherwise, returns Standard_False, and , ,
- -- are not significant.
- --
- -- is the new edge created from .
- -- is the new face created from . They may be usefull.
-
- NewParameter(me: mutable; V : Vertex from TopoDS;
- E : Edge from TopoDS;
- P : out Real from Standard;
- Tol: out Real from Standard)
- returns Boolean from Standard;
- ---Purpose: Returns Standard_True if the Vertex has a new
- -- parameter on the edge . In this case, is
- -- the parameter, the new tolerance.
- -- Otherwise, returns Standard_False, and ,
- -- are not significant.
-
- Continuity(me: mutable; E : Edge from TopoDS;
- F1,F2 : Face from TopoDS;
- NewE : Edge from TopoDS;
- NewF1,NewF2: Face from TopoDS)
- returns Shape from GeomAbs;
- ---Purpose: Returns the continuity of between
- -- and .
- --
- -- is the new edge created from .
- -- (resp. ) is the new face created from
- -- (resp. ).
-
-
-fields
-
- myTolerance : Real;
- myMapOfFaces : DataMapOfShapeInteger from TopTools;
- myMapOfSurfaces: IndexedMapOfTransient from TColStd;
-
-end PeriodicSurfaceModifier;
diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx
deleted file mode 100644
index 39d2062ea..000000000
--- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _BlockFix_PeriodicSurfaceModifier_HeaderFile
-#define _BlockFix_PeriodicSurfaceModifier_HeaderFile
-
-#ifndef _Standard_HeaderFile
-#include
-#endif
-#ifndef _Handle_BlockFix_PeriodicSurfaceModifier_HeaderFile
-#include
-#endif
-
-#ifndef _Standard_Real_HeaderFile
-#include
-#endif
-#ifndef _TopTools_DataMapOfShapeInteger_HeaderFile
-#include
-#endif
-#ifndef _TColStd_IndexedMapOfTransient_HeaderFile
-#include
-#endif
-#ifndef _BRepTools_Modification_HeaderFile
-#include
-#endif
-#ifndef _Standard_Boolean_HeaderFile
-#include
-#endif
-#ifndef _Handle_Geom_Surface_HeaderFile
-#include
-#endif
-#ifndef _Handle_Geom_Curve_HeaderFile
-#include
-#endif
-#ifndef _Handle_Geom2d_Curve_HeaderFile
-#include
-#endif
-#ifndef _GeomAbs_Shape_HeaderFile
-#include
-#endif
-class TopoDS_Face;
-class Geom_Surface;
-class TopLoc_Location;
-class TopoDS_Edge;
-class Geom_Curve;
-class TopoDS_Vertex;
-class gp_Pnt;
-class Geom2d_Curve;
-
-
-class BlockFix_PeriodicSurfaceModifier : public BRepTools_Modification {
-
-public:
-
- void* operator new(size_t,void* anAddress)
- {
- return anAddress;
- }
- void* operator new(size_t size)
- {
- return Standard::Allocate(size);
- }
- void operator delete(void *anAddress)
- {
- if (anAddress) Standard::Free((Standard_Address&)anAddress);
- }
- // Methods PUBLIC
- //
-Standard_EXPORT BlockFix_PeriodicSurfaceModifier();
-Standard_EXPORT void SetTolerance(const Standard_Real Toler) ;
-Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ;
-Standard_EXPORT Standard_Boolean NewCurve(const TopoDS_Edge& E,Handle(Geom_Curve)& C,TopLoc_Location& L,Standard_Real& Tol) ;
-Standard_EXPORT Standard_Boolean NewPoint(const TopoDS_Vertex& V,gp_Pnt& P,Standard_Real& Tol) ;
-Standard_EXPORT Standard_Boolean NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,const TopoDS_Edge& NewE,const TopoDS_Face& NewF,Handle(Geom2d_Curve)& C,Standard_Real& Tol) ;
-Standard_EXPORT Standard_Boolean NewParameter(const TopoDS_Vertex& V,const TopoDS_Edge& E,Standard_Real& P,Standard_Real& Tol) ;
-Standard_EXPORT GeomAbs_Shape Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,const TopoDS_Face& F2,const TopoDS_Edge& NewE,const TopoDS_Face& NewF1,const TopoDS_Face& NewF2) ;
-Standard_EXPORT ~BlockFix_PeriodicSurfaceModifier();
-
-
-
-
- // Type management
- //
- Standard_EXPORT friend Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_();
- Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
- Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const;
-
-protected:
-
- // Methods PROTECTED
- //
-
-
- // Fields PROTECTED
- //
-
-
-private:
-
- // Methods PRIVATE
- //
-
-
- // Fields PRIVATE
- //
-Standard_Real myTolerance;
-TopTools_DataMapOfShapeInteger myMapOfFaces;
-TColStd_IndexedMapOfTransient myMapOfSurfaces;
-
-
-};
-
-
-
-
-
-// other Inline functions and methods (like "C++: function call" methods)
-//
-
-
-#endif
diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx
deleted file mode 100644
index da3bdc95e..000000000
--- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#include
-
-#ifndef _Standard_TypeMismatch_HeaderFile
-#include
-#endif
-
-BlockFix_PeriodicSurfaceModifier::~BlockFix_PeriodicSurfaceModifier() {}
-
-
-
-Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_()
-{
-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(BRepTools_Modification);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(BRepTools_Modification);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("BlockFix_PeriodicSurfaceModifier",
- sizeof(BlockFix_PeriodicSurfaceModifier),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-
-// DownCast method
-// allow safe downcasting
-//
-const Handle(BlockFix_PeriodicSurfaceModifier) Handle(BlockFix_PeriodicSurfaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(BlockFix_PeriodicSurfaceModifier) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier))) {
- _anOtherObject = Handle(BlockFix_PeriodicSurfaceModifier)((Handle(BlockFix_PeriodicSurfaceModifier)&)AnObject);
- }
- }
-
- return _anOtherObject ;
-}
-const Handle(Standard_Type)& BlockFix_PeriodicSurfaceModifier::DynamicType() const
-{
- return STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) ;
-}
-Standard_Boolean BlockFix_PeriodicSurfaceModifier::IsKind(const Handle(Standard_Type)& AType) const
-{
- return (STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) == AType || BRepTools_Modification::IsKind(AType));
-}
-Handle_BlockFix_PeriodicSurfaceModifier::~Handle_BlockFix_PeriodicSurfaceModifier() {}
-
diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.jxx b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.jxx
deleted file mode 100644
index 29c1c1e34..000000000
--- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.jxx
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-#ifndef _TopoDS_Face_HeaderFile
-#include
-#endif
-#ifndef _Geom_Surface_HeaderFile
-#include
-#endif
-#ifndef _TopLoc_Location_HeaderFile
-#include
-#endif
-#ifndef _TopoDS_Edge_HeaderFile
-#include
-#endif
-#ifndef _Geom_Curve_HeaderFile
-#include
-#endif
-#ifndef _TopoDS_Vertex_HeaderFile
-#include