diff --git a/doc/salome/examples/3dsketcher.py b/doc/salome/examples/3dsketcher.py index 69b779898..29f88e710 100644 --- a/doc/salome/examples/3dsketcher.py +++ b/doc/salome/examples/3dsketcher.py @@ -1,7 +1,10 @@ # 3D Sketcher -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # Create a 3D sketcher (wire) on the given points coordinates diff --git a/doc/salome/examples/GEOM_box.py b/doc/salome/examples/GEOM_box.py new file mode 100644 index 000000000..1d9864b2f --- /dev/null +++ b/doc/salome/examples/GEOM_box.py @@ -0,0 +1,16 @@ +# --- salome initialization +import salome +salome.salome_init() + +# --- geom Python interface +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) + +# --- Create a box and publish it into the salome study +Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) +geompy.addToStudy( Box_1, 'Box_1' ) + +# --- update the study object browser +if salome.sg.hasDesktop(): + salome.sg.updateObjBrowser(1) diff --git a/doc/salome/examples/Makefile.am b/doc/salome/examples/Makefile.am index 506afc7af..171c03674 100644 --- a/doc/salome/examples/Makefile.am +++ b/doc/salome/examples/Makefile.am @@ -74,6 +74,7 @@ GOOD_TESTS = \ complex_objs_ex10.py \ free_boundaries.py \ free_faces.py \ + GEOM_box.py \ get_non_blocks.py \ import_export.py \ inertia.py \ diff --git a/doc/salome/examples/advanced_geom_objs_ex01.py b/doc/salome/examples/advanced_geom_objs_ex01.py index 036fe8f4e..b2499e906 100644 --- a/doc/salome/examples/advanced_geom_objs_ex01.py +++ b/doc/salome/examples/advanced_geom_objs_ex01.py @@ -1,7 +1,10 @@ # Creation of PipeTShape -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create PipeTShape object diff --git a/doc/salome/examples/advanced_geom_objs_ex02.py b/doc/salome/examples/advanced_geom_objs_ex02.py index 2ee301688..442af631e 100644 --- a/doc/salome/examples/advanced_geom_objs_ex02.py +++ b/doc/salome/examples/advanced_geom_objs_ex02.py @@ -1,8 +1,10 @@ # Creation of DividedDisk -import geompy import salome +salome.salome_init() import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create DividedDisk object diff --git a/doc/salome/examples/advanced_geom_objs_ex03.py b/doc/salome/examples/advanced_geom_objs_ex03.py index 195cda0dd..915ee1586 100644 --- a/doc/salome/examples/advanced_geom_objs_ex03.py +++ b/doc/salome/examples/advanced_geom_objs_ex03.py @@ -1,8 +1,10 @@ # Creation of DividedCylinder -import geompy import salome +salome.salome_init() import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create DividedCylinder object diff --git a/doc/salome/examples/angle.py b/doc/salome/examples/angle.py index 324d72653..1fd60440f 100644 --- a/doc/salome/examples/angle.py +++ b/doc/salome/examples/angle.py @@ -2,10 +2,10 @@ import salome salome.salome_init() - +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import math -import geompy -geompy.init_geom(salome.myStudy) OX = geompy.MakeVectorDXDYDZ(10, 0,0) OXY = geompy.MakeVectorDXDYDZ(10,10,0) diff --git a/doc/salome/examples/basic_geom_objs_ex01.py b/doc/salome/examples/basic_geom_objs_ex01.py index 05abb799d..1501633ca 100644 --- a/doc/salome/examples/basic_geom_objs_ex01.py +++ b/doc/salome/examples/basic_geom_objs_ex01.py @@ -1,7 +1,10 @@ # Creation of a Point -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/basic_geom_objs_ex02.py b/doc/salome/examples/basic_geom_objs_ex02.py index 02f87e910..858548f23 100644 --- a/doc/salome/examples/basic_geom_objs_ex02.py +++ b/doc/salome/examples/basic_geom_objs_ex02.py @@ -1,7 +1,10 @@ # Creation of a Line -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/basic_geom_objs_ex03.py b/doc/salome/examples/basic_geom_objs_ex03.py index 510ae18fc..d7bdf2feb 100644 --- a/doc/salome/examples/basic_geom_objs_ex03.py +++ b/doc/salome/examples/basic_geom_objs_ex03.py @@ -1,7 +1,10 @@ # Creation of a Circle -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/basic_geom_objs_ex04.py b/doc/salome/examples/basic_geom_objs_ex04.py index bf7d3e870..51a1304d4 100644 --- a/doc/salome/examples/basic_geom_objs_ex04.py +++ b/doc/salome/examples/basic_geom_objs_ex04.py @@ -1,7 +1,10 @@ # Creation of an Ellipse -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/basic_geom_objs_ex05.py b/doc/salome/examples/basic_geom_objs_ex05.py index 5a82c3b1b..fe24424cc 100644 --- a/doc/salome/examples/basic_geom_objs_ex05.py +++ b/doc/salome/examples/basic_geom_objs_ex05.py @@ -1,7 +1,10 @@ # Creation of an Arc -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/basic_geom_objs_ex06.py b/doc/salome/examples/basic_geom_objs_ex06.py index ba4940c14..661b0edef 100644 --- a/doc/salome/examples/basic_geom_objs_ex06.py +++ b/doc/salome/examples/basic_geom_objs_ex06.py @@ -1,7 +1,10 @@ # Creation of a Curve -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices and vectors @@ -27,13 +30,13 @@ interpol = geompy.MakeInterpol([p0, p1, p2, p3, p4], False) 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) +param_polyline = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, 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) +param_bezier = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 20, 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) +param_interpol = geompy.MakeCurveParametric("t", "sin(t)", "cos(t)", 0., 100., 100, GEOM.Interpolation, theNewMethod=True) # add objects in the study diff --git a/doc/salome/examples/basic_geom_objs_ex07.py b/doc/salome/examples/basic_geom_objs_ex07.py index 2de687af0..04673b1f4 100644 --- a/doc/salome/examples/basic_geom_objs_ex07.py +++ b/doc/salome/examples/basic_geom_objs_ex07.py @@ -1,7 +1,10 @@ # Creation of a Vector -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/basic_geom_objs_ex08.py b/doc/salome/examples/basic_geom_objs_ex08.py index 81a8745c5..707540a06 100644 --- a/doc/salome/examples/basic_geom_objs_ex08.py +++ b/doc/salome/examples/basic_geom_objs_ex08.py @@ -1,7 +1,10 @@ # Creation of a Plane -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/basic_geom_objs_ex09.py b/doc/salome/examples/basic_geom_objs_ex09.py index 3934410ee..91fa3ce6d 100644 --- a/doc/salome/examples/basic_geom_objs_ex09.py +++ b/doc/salome/examples/basic_geom_objs_ex09.py @@ -1,7 +1,10 @@ # Creation of a Local Coordinate System +import salome +salome.salome_init() import GEOM -import geompy +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import math import SALOMEDS diff --git a/doc/salome/examples/basic_operations_ex01.py b/doc/salome/examples/basic_operations_ex01.py index bed9e1c86..b9152729f 100644 --- a/doc/salome/examples/basic_operations_ex01.py +++ b/doc/salome/examples/basic_operations_ex01.py @@ -1,7 +1,10 @@ # Partition -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/basic_operations_ex02.py b/doc/salome/examples/basic_operations_ex02.py index ac9b77b9d..ff102f0d5 100644 --- a/doc/salome/examples/basic_operations_ex02.py +++ b/doc/salome/examples/basic_operations_ex02.py @@ -1,7 +1,10 @@ # Archimede -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/basic_operations_ex03.py b/doc/salome/examples/basic_operations_ex03.py index 39b1dd22b..5fa0e9e0a 100644 --- a/doc/salome/examples/basic_operations_ex03.py +++ b/doc/salome/examples/basic_operations_ex03.py @@ -1,7 +1,10 @@ # Restore presentation parameters and sub-shapes -import geompy +import salome +salome.salome_init() import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import SALOMEDS # create a box and a cylinder diff --git a/doc/salome/examples/basic_properties.py b/doc/salome/examples/basic_properties.py index 239655901..ce6e45a9c 100644 --- a/doc/salome/examples/basic_properties.py +++ b/doc/salome/examples/basic_properties.py @@ -1,6 +1,10 @@ # Basic Properties -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import math # create a box diff --git a/doc/salome/examples/blocks_operations_ex01.py b/doc/salome/examples/blocks_operations_ex01.py index 5535f121d..d8040637c 100644 --- a/doc/salome/examples/blocks_operations_ex01.py +++ b/doc/salome/examples/blocks_operations_ex01.py @@ -1,7 +1,10 @@ # Multi Transformation -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/blocks_operations_ex02.py b/doc/salome/examples/blocks_operations_ex02.py index 68fbb01a6..03deab0a6 100644 --- a/doc/salome/examples/blocks_operations_ex02.py +++ b/doc/salome/examples/blocks_operations_ex02.py @@ -1,7 +1,10 @@ # Explode on Blocks -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a box and a sphere diff --git a/doc/salome/examples/blocks_operations_ex03.py b/doc/salome/examples/blocks_operations_ex03.py index 268a52e10..c38bf6c83 100644 --- a/doc/salome/examples/blocks_operations_ex03.py +++ b/doc/salome/examples/blocks_operations_ex03.py @@ -1,7 +1,10 @@ # Propagate -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a box check_box = geompy.MakeBoxDXDYDZ(200, 200, 200) diff --git a/doc/salome/examples/boolean_operations_ex01.py b/doc/salome/examples/boolean_operations_ex01.py index 5f52542c6..01809955e 100644 --- a/doc/salome/examples/boolean_operations_ex01.py +++ b/doc/salome/examples/boolean_operations_ex01.py @@ -1,7 +1,10 @@ # Fuse -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/boolean_operations_ex02.py b/doc/salome/examples/boolean_operations_ex02.py index b7e73b727..90317ba93 100644 --- a/doc/salome/examples/boolean_operations_ex02.py +++ b/doc/salome/examples/boolean_operations_ex02.py @@ -1,7 +1,10 @@ # Common -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/boolean_operations_ex03.py b/doc/salome/examples/boolean_operations_ex03.py index 44c597405..7c97b09f0 100644 --- a/doc/salome/examples/boolean_operations_ex03.py +++ b/doc/salome/examples/boolean_operations_ex03.py @@ -1,7 +1,10 @@ # Cut -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/boolean_operations_ex04.py b/doc/salome/examples/boolean_operations_ex04.py index 9472f7aa1..a7da6a9af 100644 --- a/doc/salome/examples/boolean_operations_ex04.py +++ b/doc/salome/examples/boolean_operations_ex04.py @@ -1,7 +1,10 @@ # Section -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/bounding_box.py b/doc/salome/examples/bounding_box.py index d6480aeac..ed8736b98 100644 --- a/doc/salome/examples/bounding_box.py +++ b/doc/salome/examples/bounding_box.py @@ -1,6 +1,10 @@ # Bounding Box -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a box box = geompy.MakeBoxDXDYDZ(100,30,100) diff --git a/doc/salome/examples/building_by_blocks_ex01.py b/doc/salome/examples/building_by_blocks_ex01.py index 16b02d75b..fe93e7c4c 100644 --- a/doc/salome/examples/building_by_blocks_ex01.py +++ b/doc/salome/examples/building_by_blocks_ex01.py @@ -1,7 +1,10 @@ # Quadrangle Face -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/building_by_blocks_ex02.py b/doc/salome/examples/building_by_blocks_ex02.py index ed81f4233..8d40beec5 100644 --- a/doc/salome/examples/building_by_blocks_ex02.py +++ b/doc/salome/examples/building_by_blocks_ex02.py @@ -1,7 +1,10 @@ # Hexagonal Solid -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/center_of_mass.py b/doc/salome/examples/center_of_mass.py index acf5962ff..9e570f318 100644 --- a/doc/salome/examples/center_of_mass.py +++ b/doc/salome/examples/center_of_mass.py @@ -1,6 +1,10 @@ # Center of masses -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import math # create a box diff --git a/doc/salome/examples/check_compound_of_blocks.py b/doc/salome/examples/check_compound_of_blocks.py index 2f1ba9850..26f7c3012 100644 --- a/doc/salome/examples/check_compound_of_blocks.py +++ b/doc/salome/examples/check_compound_of_blocks.py @@ -1,7 +1,10 @@ # Check Compound of Blocks -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create boxes diff --git a/doc/salome/examples/check_self_intersections.py b/doc/salome/examples/check_self_intersections.py index 44c55d257..8df91b9fe 100644 --- a/doc/salome/examples/check_self_intersections.py +++ b/doc/salome/examples/check_self_intersections.py @@ -1,6 +1,10 @@ # Detect Self-intersections -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a box box = geompy.MakeBoxDXDYDZ(100,30,100) diff --git a/doc/salome/examples/check_shape.py b/doc/salome/examples/check_shape.py index b708494b3..30793345e 100644 --- a/doc/salome/examples/check_shape.py +++ b/doc/salome/examples/check_shape.py @@ -1,6 +1,10 @@ # Check Shape -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a box box = geompy.MakeBoxDXDYDZ(100,30,100) diff --git a/doc/salome/examples/complex_objs_ex01.py b/doc/salome/examples/complex_objs_ex01.py index a5cf102c8..5a04f3a76 100644 --- a/doc/salome/examples/complex_objs_ex01.py +++ b/doc/salome/examples/complex_objs_ex01.py @@ -1,7 +1,10 @@ # Creation of a Prism -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/complex_objs_ex02.py b/doc/salome/examples/complex_objs_ex02.py index e096551fd..ec9f85729 100644 --- a/doc/salome/examples/complex_objs_ex02.py +++ b/doc/salome/examples/complex_objs_ex02.py @@ -1,7 +1,10 @@ # Creation of a Revolution -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/complex_objs_ex03.py b/doc/salome/examples/complex_objs_ex03.py index ec7767b2a..35ccf0857 100644 --- a/doc/salome/examples/complex_objs_ex03.py +++ b/doc/salome/examples/complex_objs_ex03.py @@ -1,7 +1,10 @@ # Creation of a Filling -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") mindeg = 2 diff --git a/doc/salome/examples/complex_objs_ex04.py b/doc/salome/examples/complex_objs_ex04.py index 72af08f29..4bff05d17 100644 --- a/doc/salome/examples/complex_objs_ex04.py +++ b/doc/salome/examples/complex_objs_ex04.py @@ -1,7 +1,10 @@ # Creation of a Pipe -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/complex_objs_ex05.py b/doc/salome/examples/complex_objs_ex05.py index 724810c58..f38f0816b 100644 --- a/doc/salome/examples/complex_objs_ex05.py +++ b/doc/salome/examples/complex_objs_ex05.py @@ -1,7 +1,10 @@ # Creation of a PipeWithDifferentSections -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) 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]) diff --git a/doc/salome/examples/complex_objs_ex06.py b/doc/salome/examples/complex_objs_ex06.py index 4a3dfe439..caa68c4c0 100644 --- a/doc/salome/examples/complex_objs_ex06.py +++ b/doc/salome/examples/complex_objs_ex06.py @@ -1,7 +1,10 @@ # Creation of a PipeWithShellSections -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import math gg = salome.ImportComponentGUI("GEOM") diff --git a/doc/salome/examples/complex_objs_ex07.py b/doc/salome/examples/complex_objs_ex07.py index 1b37a2e39..d9e72ae96 100644 --- a/doc/salome/examples/complex_objs_ex07.py +++ b/doc/salome/examples/complex_objs_ex07.py @@ -1,7 +1,10 @@ # Creation of a PipeShellsWithoutPath -import geompy -import math +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import salome gg = salome.ImportComponentGUI("GEOM") diff --git a/doc/salome/examples/complex_objs_ex08.py b/doc/salome/examples/complex_objs_ex08.py index 4777e071b..bb4cac595 100644 --- a/doc/salome/examples/complex_objs_ex08.py +++ b/doc/salome/examples/complex_objs_ex08.py @@ -1,4 +1,9 @@ # Creation of a PipeBiNormalAlongVector +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) def MakeHelix(radius, height, rotation, direction): # - create a helix - @@ -14,7 +19,6 @@ def MakeHelix(radius, height, rotation, direction): 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: @@ -48,7 +52,6 @@ def MakeSpring(radius, height, rotation, direction, thread_radius, base_rotation # 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) diff --git a/doc/salome/examples/complex_objs_ex09.py b/doc/salome/examples/complex_objs_ex09.py index 55c347a1f..9615ad1ef 100644 --- a/doc/salome/examples/complex_objs_ex09.py +++ b/doc/salome/examples/complex_objs_ex09.py @@ -1,7 +1,10 @@ # Creation of a Middle Path import salome -import geompy +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # Create a box Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) diff --git a/doc/salome/examples/complex_objs_ex10.py b/doc/salome/examples/complex_objs_ex10.py index 8a14455ef..b51281505 100644 --- a/doc/salome/examples/complex_objs_ex10.py +++ b/doc/salome/examples/complex_objs_ex10.py @@ -1,7 +1,10 @@ # Creation of Tangent Plane On Face import salome -import geompy +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # Create Vertexes for curve Vertex_1 = geompy.MakeVertex(0, 0, 0) diff --git a/doc/salome/examples/free_boundaries.py b/doc/salome/examples/free_boundaries.py index 7582f79dc..d36bbbbf7 100644 --- a/doc/salome/examples/free_boundaries.py +++ b/doc/salome/examples/free_boundaries.py @@ -1,8 +1,11 @@ # Check Free Boundaries import os -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create boxes diff --git a/doc/salome/examples/free_faces.py b/doc/salome/examples/free_faces.py index 16d705614..2d1de5a00 100644 --- a/doc/salome/examples/free_faces.py +++ b/doc/salome/examples/free_faces.py @@ -1,7 +1,10 @@ # Check Free Faces -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/get_non_blocks.py b/doc/salome/examples/get_non_blocks.py index 267fa870a..87bf934a6 100644 --- a/doc/salome/examples/get_non_blocks.py +++ b/doc/salome/examples/get_non_blocks.py @@ -1,7 +1,10 @@ # Get Non Blocks -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create solids box = geompy.MakeBoxDXDYDZ(100, 100, 100) diff --git a/doc/salome/examples/import_export.py b/doc/salome/examples/import_export.py index ecde2442f..158fc6375 100644 --- a/doc/salome/examples/import_export.py +++ b/doc/salome/examples/import_export.py @@ -1,7 +1,10 @@ # Import/Export -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # Example of import from IGES using various formats diff --git a/doc/salome/examples/inertia.py b/doc/salome/examples/inertia.py index 203a39436..a63608c12 100644 --- a/doc/salome/examples/inertia.py +++ b/doc/salome/examples/inertia.py @@ -1,7 +1,10 @@ # Inertia -import geompy -import math +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a box box = geompy.MakeBoxDXDYDZ(100,30,100) diff --git a/doc/salome/examples/min_distance.py b/doc/salome/examples/min_distance.py index e6048bba2..e48804b30 100644 --- a/doc/salome/examples/min_distance.py +++ b/doc/salome/examples/min_distance.py @@ -1,6 +1,10 @@ # Minimal Distance -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # Create two curves with three closest points Vertex_1 = geompy.MakeVertex(0, 0, 0) diff --git a/doc/salome/examples/normal_face.py b/doc/salome/examples/normal_face.py index 572b0f9f8..91eac0b5a 100644 --- a/doc/salome/examples/normal_face.py +++ b/doc/salome/examples/normal_face.py @@ -1,6 +1,10 @@ # Normal to a Face -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import math # create a box diff --git a/doc/salome/examples/notebook_geom.py b/doc/salome/examples/notebook_geom.py index a84ae87de..5b52d9f2c 100644 --- a/doc/salome/examples/notebook_geom.py +++ b/doc/salome/examples/notebook_geom.py @@ -1,7 +1,10 @@ # Using SALOME NoteBook -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import salome_notebook gg = salome.ImportComponentGUI("GEOM") diff --git a/doc/salome/examples/point_coordinates.py b/doc/salome/examples/point_coordinates.py index 802c88ca5..e31569b69 100644 --- a/doc/salome/examples/point_coordinates.py +++ b/doc/salome/examples/point_coordinates.py @@ -1,7 +1,11 @@ # Point Coordinates import math -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a point point = geompy.MakeVertex(15., 23., 80.) diff --git a/doc/salome/examples/primitives_ex01.py b/doc/salome/examples/primitives_ex01.py index 77db019cd..41590a544 100644 --- a/doc/salome/examples/primitives_ex01.py +++ b/doc/salome/examples/primitives_ex01.py @@ -1,7 +1,10 @@ # Creation of a Box -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/primitives_ex02.py b/doc/salome/examples/primitives_ex02.py index ed6a6f9a6..d55d6510f 100644 --- a/doc/salome/examples/primitives_ex02.py +++ b/doc/salome/examples/primitives_ex02.py @@ -1,7 +1,10 @@ # Creation of a Cylinder -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") diff --git a/doc/salome/examples/primitives_ex03.py b/doc/salome/examples/primitives_ex03.py index 21dbc9e7e..4f07701ef 100644 --- a/doc/salome/examples/primitives_ex03.py +++ b/doc/salome/examples/primitives_ex03.py @@ -1,7 +1,10 @@ # Creation of a Sphere -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex diff --git a/doc/salome/examples/primitives_ex04.py b/doc/salome/examples/primitives_ex04.py index 99a003a4b..4e27ac41c 100644 --- a/doc/salome/examples/primitives_ex04.py +++ b/doc/salome/examples/primitives_ex04.py @@ -1,7 +1,10 @@ # Creation of a Torus -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/primitives_ex05.py b/doc/salome/examples/primitives_ex05.py index b563303b2..61fcc3846 100644 --- a/doc/salome/examples/primitives_ex05.py +++ b/doc/salome/examples/primitives_ex05.py @@ -1,7 +1,10 @@ # Creation of a Cone -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/primitives_ex06.py b/doc/salome/examples/primitives_ex06.py index d3fd53e35..b639ec0ca 100644 --- a/doc/salome/examples/primitives_ex06.py +++ b/doc/salome/examples/primitives_ex06.py @@ -1,7 +1,10 @@ # Creation of a Disk -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/primitives_ex07.py b/doc/salome/examples/primitives_ex07.py index 75dad1e94..e5989dfe4 100644 --- a/doc/salome/examples/primitives_ex07.py +++ b/doc/salome/examples/primitives_ex07.py @@ -1,7 +1,10 @@ # Creation of a Rectangle -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/repairing_operations_ex01.py b/doc/salome/examples/repairing_operations_ex01.py index 8a57db040..dc937caf0 100644 --- a/doc/salome/examples/repairing_operations_ex01.py +++ b/doc/salome/examples/repairing_operations_ex01.py @@ -1,7 +1,10 @@ # Shape Processing -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices, an edge, an arc, a wire, a face and a prism diff --git a/doc/salome/examples/repairing_operations_ex02.py b/doc/salome/examples/repairing_operations_ex02.py index f5ee65caf..344ec4bff 100644 --- a/doc/salome/examples/repairing_operations_ex02.py +++ b/doc/salome/examples/repairing_operations_ex02.py @@ -1,7 +1,10 @@ # Suppress Faces -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a box diff --git a/doc/salome/examples/repairing_operations_ex03.py b/doc/salome/examples/repairing_operations_ex03.py index 50eec1126..8b8baedbd 100644 --- a/doc/salome/examples/repairing_operations_ex03.py +++ b/doc/salome/examples/repairing_operations_ex03.py @@ -1,7 +1,10 @@ # Close Contour -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices and vectors diff --git a/doc/salome/examples/repairing_operations_ex04.py b/doc/salome/examples/repairing_operations_ex04.py index fad69131c..242b17231 100644 --- a/doc/salome/examples/repairing_operations_ex04.py +++ b/doc/salome/examples/repairing_operations_ex04.py @@ -1,7 +1,10 @@ # Suppress Internal Wires -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/repairing_operations_ex05.py b/doc/salome/examples/repairing_operations_ex05.py index b7534ab65..e5fef2bb5 100644 --- a/doc/salome/examples/repairing_operations_ex05.py +++ b/doc/salome/examples/repairing_operations_ex05.py @@ -1,8 +1,10 @@ # Suppress Holes -import geompy import salome +salome.salome_init() import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/repairing_operations_ex06.py b/doc/salome/examples/repairing_operations_ex06.py index e6120a7a6..8935962bf 100644 --- a/doc/salome/examples/repairing_operations_ex06.py +++ b/doc/salome/examples/repairing_operations_ex06.py @@ -1,7 +1,10 @@ # Sewing -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import math gg = salome.ImportComponentGUI("GEOM") diff --git a/doc/salome/examples/repairing_operations_ex07.py b/doc/salome/examples/repairing_operations_ex07.py index 6cc688a4e..1a7ff79a4 100644 --- a/doc/salome/examples/repairing_operations_ex07.py +++ b/doc/salome/examples/repairing_operations_ex07.py @@ -1,7 +1,10 @@ # Glue Faces -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create boxes diff --git a/doc/salome/examples/repairing_operations_ex08.py b/doc/salome/examples/repairing_operations_ex08.py index a39d11088..933298eef 100644 --- a/doc/salome/examples/repairing_operations_ex08.py +++ b/doc/salome/examples/repairing_operations_ex08.py @@ -1,7 +1,10 @@ # Glue Edges -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create boxes diff --git a/doc/salome/examples/repairing_operations_ex09.py b/doc/salome/examples/repairing_operations_ex09.py index e94b1aa03..2875051d2 100644 --- a/doc/salome/examples/repairing_operations_ex09.py +++ b/doc/salome/examples/repairing_operations_ex09.py @@ -1,7 +1,10 @@ # Limit Tolerance -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # import initial topology with bad tolerances (more than 1e-07) diff --git a/doc/salome/examples/repairing_operations_ex10.py b/doc/salome/examples/repairing_operations_ex10.py index 7849a7cf5..898991b4e 100644 --- a/doc/salome/examples/repairing_operations_ex10.py +++ b/doc/salome/examples/repairing_operations_ex10.py @@ -1,7 +1,10 @@ # Add Point on Edge -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create vertices p1 = geompy.MakeVertex(0,0,50) diff --git a/doc/salome/examples/repairing_operations_ex11.py b/doc/salome/examples/repairing_operations_ex11.py index 396881c72..1b50e6ffd 100644 --- a/doc/salome/examples/repairing_operations_ex11.py +++ b/doc/salome/examples/repairing_operations_ex11.py @@ -1,7 +1,10 @@ # Fuse Collinear Edges within a Wire -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create vertices p1 = geompy.MakeVertex(0, 0, 0) diff --git a/doc/salome/examples/sketcher.py b/doc/salome/examples/sketcher.py index 8ca1f98ce..6cd355da9 100644 --- a/doc/salome/examples/sketcher.py +++ b/doc/salome/examples/sketcher.py @@ -1,7 +1,10 @@ # 2D Sketcher -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/tolerance.py b/doc/salome/examples/tolerance.py index 639a676cf..ac72a3031 100644 --- a/doc/salome/examples/tolerance.py +++ b/doc/salome/examples/tolerance.py @@ -1,6 +1,10 @@ # Tolerance -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a box box = geompy.MakeBoxDXDYDZ(100,30,100) diff --git a/doc/salome/examples/topological_geom_objs_ex01.py b/doc/salome/examples/topological_geom_objs_ex01.py index 77c1d1807..257819c3d 100644 --- a/doc/salome/examples/topological_geom_objs_ex01.py +++ b/doc/salome/examples/topological_geom_objs_ex01.py @@ -1,7 +1,10 @@ # Creation of an Edge -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # diff --git a/doc/salome/examples/topological_geom_objs_ex02.py b/doc/salome/examples/topological_geom_objs_ex02.py index 62806d770..eb12ea6a5 100644 --- a/doc/salome/examples/topological_geom_objs_ex02.py +++ b/doc/salome/examples/topological_geom_objs_ex02.py @@ -1,7 +1,10 @@ # Creation of a Wire -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/topological_geom_objs_ex03.py b/doc/salome/examples/topological_geom_objs_ex03.py index 7b1600153..db2f060a9 100644 --- a/doc/salome/examples/topological_geom_objs_ex03.py +++ b/doc/salome/examples/topological_geom_objs_ex03.py @@ -1,7 +1,10 @@ # Creation of a Face -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices diff --git a/doc/salome/examples/topological_geom_objs_ex04.py b/doc/salome/examples/topological_geom_objs_ex04.py index b85e553f2..31a938dda 100644 --- a/doc/salome/examples/topological_geom_objs_ex04.py +++ b/doc/salome/examples/topological_geom_objs_ex04.py @@ -1,7 +1,10 @@ # Creation of a Shell -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") #create vertices diff --git a/doc/salome/examples/topological_geom_objs_ex05.py b/doc/salome/examples/topological_geom_objs_ex05.py index 700236b03..67bf79084 100644 --- a/doc/salome/examples/topological_geom_objs_ex05.py +++ b/doc/salome/examples/topological_geom_objs_ex05.py @@ -1,7 +1,10 @@ # Creation of a Solid -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") #create vertices diff --git a/doc/salome/examples/topological_geom_objs_ex06.py b/doc/salome/examples/topological_geom_objs_ex06.py index 071730b52..7ae16d8e6 100644 --- a/doc/salome/examples/topological_geom_objs_ex06.py +++ b/doc/salome/examples/topological_geom_objs_ex06.py @@ -1,7 +1,10 @@ # Creation of a Compound -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/transformation_operations_ex01.py b/doc/salome/examples/transformation_operations_ex01.py index 678afa9e2..5a01039fd 100644 --- a/doc/salome/examples/transformation_operations_ex01.py +++ b/doc/salome/examples/transformation_operations_ex01.py @@ -1,7 +1,10 @@ # Translation -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a vertex and a vector diff --git a/doc/salome/examples/transformation_operations_ex02.py b/doc/salome/examples/transformation_operations_ex02.py index 7abbb7873..564e1409d 100644 --- a/doc/salome/examples/transformation_operations_ex02.py +++ b/doc/salome/examples/transformation_operations_ex02.py @@ -1,7 +1,10 @@ # Rotation -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import math gg = salome.ImportComponentGUI("GEOM") diff --git a/doc/salome/examples/transformation_operations_ex03.py b/doc/salome/examples/transformation_operations_ex03.py index 3d250fd48..6870a3529 100644 --- a/doc/salome/examples/transformation_operations_ex03.py +++ b/doc/salome/examples/transformation_operations_ex03.py @@ -1,7 +1,10 @@ # Modify Location -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) import math gg = salome.ImportComponentGUI("GEOM") diff --git a/doc/salome/examples/transformation_operations_ex04.py b/doc/salome/examples/transformation_operations_ex04.py index 28e8b308a..ebcd1f48d 100644 --- a/doc/salome/examples/transformation_operations_ex04.py +++ b/doc/salome/examples/transformation_operations_ex04.py @@ -1,7 +1,10 @@ # Mirror Image -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a box diff --git a/doc/salome/examples/transformation_operations_ex05.py b/doc/salome/examples/transformation_operations_ex05.py index 7b906b969..948fa0087 100644 --- a/doc/salome/examples/transformation_operations_ex05.py +++ b/doc/salome/examples/transformation_operations_ex05.py @@ -1,7 +1,10 @@ # Scale Transform -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a box and a sphere diff --git a/doc/salome/examples/transformation_operations_ex06.py b/doc/salome/examples/transformation_operations_ex06.py index f6c2adfd4..64f8b6615 100644 --- a/doc/salome/examples/transformation_operations_ex06.py +++ b/doc/salome/examples/transformation_operations_ex06.py @@ -1,7 +1,10 @@ # Offset Surface -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a box and a sphere diff --git a/doc/salome/examples/transformation_operations_ex07.py b/doc/salome/examples/transformation_operations_ex07.py index c1efc39e3..206b93e80 100644 --- a/doc/salome/examples/transformation_operations_ex07.py +++ b/doc/salome/examples/transformation_operations_ex07.py @@ -1,7 +1,10 @@ # Projection -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a cylindric face and a curve(edge) cylinder = geompy.MakeCylinderRH(100, 300) diff --git a/doc/salome/examples/transformation_operations_ex08.py b/doc/salome/examples/transformation_operations_ex08.py index fb103f950..c26774d66 100644 --- a/doc/salome/examples/transformation_operations_ex08.py +++ b/doc/salome/examples/transformation_operations_ex08.py @@ -1,7 +1,10 @@ # Multi Translation -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create vertices and vectors diff --git a/doc/salome/examples/transformation_operations_ex09.py b/doc/salome/examples/transformation_operations_ex09.py index 665a2acb3..3467b5be6 100644 --- a/doc/salome/examples/transformation_operations_ex09.py +++ b/doc/salome/examples/transformation_operations_ex09.py @@ -1,7 +1,10 @@ # Multi Rotation -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") import math diff --git a/doc/salome/examples/transformation_operations_ex10.py b/doc/salome/examples/transformation_operations_ex10.py index cd2527331..17747db1b 100644 --- a/doc/salome/examples/transformation_operations_ex10.py +++ b/doc/salome/examples/transformation_operations_ex10.py @@ -1,7 +1,10 @@ # Fillet 2D -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create a face in OXY plane diff --git a/doc/salome/examples/transformation_operations_ex11.py b/doc/salome/examples/transformation_operations_ex11.py index f3b4bd095..a5b6e5b3a 100644 --- a/doc/salome/examples/transformation_operations_ex11.py +++ b/doc/salome/examples/transformation_operations_ex11.py @@ -1,7 +1,10 @@ # Fillet 1D -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create box @@ -13,7 +16,9 @@ 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]) +id_Wire_1 = geompy.addToStudy(Wire_1, "Wire_1") +id_Fillet_1D_1= geompy.addToStudy(Fillet_1D_1, "Fillet_1D_1") # display disks -gg.createAndDisplayGO(Wire_1) -gg.createAndDisplayGO(Fillet_1D_1) +gg.createAndDisplayGO(id_Wire_1) +gg.createAndDisplayGO(id_Fillet_1D_1) diff --git a/doc/salome/examples/transformation_operations_ex12.py b/doc/salome/examples/transformation_operations_ex12.py index 1f0f31c97..a59eda05f 100644 --- a/doc/salome/examples/transformation_operations_ex12.py +++ b/doc/salome/examples/transformation_operations_ex12.py @@ -1,7 +1,10 @@ # Fillet -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") radius = 10. ShapeTypeEdge = geompy.ShapeType["EDGE"] diff --git a/doc/salome/examples/transformation_operations_ex13.py b/doc/salome/examples/transformation_operations_ex13.py index ecc896e2b..ba857a05b 100644 --- a/doc/salome/examples/transformation_operations_ex13.py +++ b/doc/salome/examples/transformation_operations_ex13.py @@ -1,7 +1,10 @@ # Chamfer -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") d1 = 10. d2 = 10. diff --git a/doc/salome/examples/viewing_geom_objs_ex01.py b/doc/salome/examples/viewing_geom_objs_ex01.py index 473c7f15a..0458d42bf 100644 --- a/doc/salome/examples/viewing_geom_objs_ex01.py +++ b/doc/salome/examples/viewing_geom_objs_ex01.py @@ -1,7 +1,10 @@ # Changing Display Mode import salome -import geompy +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) box = geompy.MakeBox(0,0,0, 50,50,50) box2 = geompy.MakeBox(-50,-50,-50, 0,0,0) diff --git a/doc/salome/examples/viewing_geom_objs_ex02.py b/doc/salome/examples/viewing_geom_objs_ex02.py index fd8243d2f..b8629d61c 100644 --- a/doc/salome/examples/viewing_geom_objs_ex02.py +++ b/doc/salome/examples/viewing_geom_objs_ex02.py @@ -1,7 +1,10 @@ # Changing Color import salome -import geompy +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) box = geompy.MakeBox(0,0,0, 50,50,50) sphere = geompy.MakeSphere(50,50,50, 30) diff --git a/doc/salome/examples/viewing_geom_objs_ex03.py b/doc/salome/examples/viewing_geom_objs_ex03.py index 381f0e9ae..9932eeec6 100644 --- a/doc/salome/examples/viewing_geom_objs_ex03.py +++ b/doc/salome/examples/viewing_geom_objs_ex03.py @@ -1,7 +1,10 @@ # Changing Transparency import salome -import geompy +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) box = geompy.MakeBox(0,0,0, 50,50,50) sphere = geompy.MakeSphere(50,50,50, 30) diff --git a/doc/salome/examples/viewing_geom_objs_ex04.py b/doc/salome/examples/viewing_geom_objs_ex04.py index f31edefee..cbfcf40e6 100644 --- a/doc/salome/examples/viewing_geom_objs_ex04.py +++ b/doc/salome/examples/viewing_geom_objs_ex04.py @@ -1,8 +1,10 @@ # Set Point Marker import salome -import geompy +salome.salome_init() import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) texture = geompy.LoadTexture(os.getenv("DATA_DIR")+"/Textures/texture1.dat") diff --git a/doc/salome/examples/whatis.py b/doc/salome/examples/whatis.py index 42e7e4e4d..632ab6226 100644 --- a/doc/salome/examples/whatis.py +++ b/doc/salome/examples/whatis.py @@ -1,6 +1,10 @@ # What Is -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a box box = geompy.MakeBoxDXDYDZ(100,30,100) diff --git a/doc/salome/examples/working_with_groups_ex01.py b/doc/salome/examples/working_with_groups_ex01.py index 821862f4a..26678d58f 100644 --- a/doc/salome/examples/working_with_groups_ex01.py +++ b/doc/salome/examples/working_with_groups_ex01.py @@ -1,7 +1,10 @@ # Creation of a group -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create two vertices diff --git a/doc/salome/examples/working_with_groups_ex02.py b/doc/salome/examples/working_with_groups_ex02.py index 4c415babe..6531cbfc9 100644 --- a/doc/salome/examples/working_with_groups_ex02.py +++ b/doc/salome/examples/working_with_groups_ex02.py @@ -1,7 +1,10 @@ # Adding an object to the group -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create two vertices diff --git a/doc/salome/examples/working_with_groups_ex03.py b/doc/salome/examples/working_with_groups_ex03.py index 2c8a3d5f3..0170d54ed 100644 --- a/doc/salome/examples/working_with_groups_ex03.py +++ b/doc/salome/examples/working_with_groups_ex03.py @@ -1,7 +1,10 @@ # Removing an object from the group -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) gg = salome.ImportComponentGUI("GEOM") # create two vertices diff --git a/doc/salome/examples/working_with_groups_ex04.py b/doc/salome/examples/working_with_groups_ex04.py index 945ae61fc..af9fc6f12 100644 --- a/doc/salome/examples/working_with_groups_ex04.py +++ b/doc/salome/examples/working_with_groups_ex04.py @@ -1,7 +1,10 @@ # Union Groups -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a box and some groups of faces on it Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) diff --git a/doc/salome/examples/working_with_groups_ex05.py b/doc/salome/examples/working_with_groups_ex05.py index 422c67274..50af27d5e 100644 --- a/doc/salome/examples/working_with_groups_ex05.py +++ b/doc/salome/examples/working_with_groups_ex05.py @@ -1,7 +1,10 @@ # Intersect Groups -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a box and some groups of faces on it Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) diff --git a/doc/salome/examples/working_with_groups_ex06.py b/doc/salome/examples/working_with_groups_ex06.py index 65c4fe21e..27fb6d509 100644 --- a/doc/salome/examples/working_with_groups_ex06.py +++ b/doc/salome/examples/working_with_groups_ex06.py @@ -1,7 +1,10 @@ # Cut Groups -import geompy import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) # create a box and some groups of faces on it Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) diff --git a/doc/salome/gui/GEOM/Makefile.am b/doc/salome/gui/GEOM/Makefile.am index 4f3011e40..7454eb2ce 100755 --- a/doc/salome/gui/GEOM/Makefile.am +++ b/doc/salome/gui/GEOM/Makefile.am @@ -30,10 +30,6 @@ guidocdir = $(docdir)/gui/GEOM guidoc_DATA = images/head.png static/SALOME_BOA_PA.pdf usr_docs: doxyfile_tui doxyfile_py doxyfile - echo "===========================================" ; \ - echo "Replacing geompyDC by geompy" ; \ - echo "===========================================" ; \ - $(KERNEL_ROOT_DIR)/bin/salome/prepare_generating_doc.py geompy.py $(top_srcdir)/src/GEOM_SWIG/geompyDC.py geompy ; \ echo "===========================================" ; \ echo "Generating examples documentation" ; \ echo "===========================================" ; \ diff --git a/doc/salome/gui/GEOM/doxyfile_py.in b/doc/salome/gui/GEOM/doxyfile_py.in index 6da7b1512..56ae4db87 100755 --- a/doc/salome/gui/GEOM/doxyfile_py.in +++ b/doc/salome/gui/GEOM/doxyfile_py.in @@ -60,7 +60,7 @@ HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = YES CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO +HIDE_SCOPE_NAMES = YES SHOW_INCLUDE_FILES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = NO @@ -99,7 +99,7 @@ EXAMPLE_RECURSIVE = NO #--------------------------------------------------------------------------- #Input related options #--------------------------------------------------------------------------- -INPUT = geompy.py @top_srcdir@/src/GEOM_SWIG/gsketcher.py @top_srcdir@/idl/GEOM_Gen.idl +INPUT = @top_srcdir@/src/GEOM_SWIG/geomBuilder.py @top_srcdir@/src/GEOM_SWIG/gsketcher.py @top_srcdir@/idl/GEOM_Gen.idl FILE_PATTERNS = IMAGE_PATH = @srcdir@/images EXAMPLE_PATH = @top_srcdir@/src/GEOM_SWIG diff --git a/doc/salome/gui/GEOM/input/geometrical_object_properties.doc b/doc/salome/gui/GEOM/input/geometrical_object_properties.doc index a5b55449a..2d9653716 100644 --- a/doc/salome/gui/GEOM/input/geometrical_object_properties.doc +++ b/doc/salome/gui/GEOM/input/geometrical_object_properties.doc @@ -73,7 +73,12 @@ that allows converting the geometrical object id value to its string representat For example, the output of the following code: \code -import geompy +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) + box = geompy.MakeBoxDXDYDZ(10,10,10) type = geompy.ShapeIdToType(box.GetType()) print type @@ -94,8 +99,12 @@ of the \b GEOM_Object interface. For example: \code -import geompy +import salome +salome.salome_init() import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) + box = geompy.MakeBoxDXDYDZ(10,10,10) type = box.GetShapeType() print type == GEOM.SOLID diff --git a/doc/salome/gui/GEOM/input/geompy.doc b/doc/salome/gui/GEOM/input/geompy.doc index f34f87fe1..c6411b7de 100644 --- a/doc/salome/gui/GEOM/input/geompy.doc +++ b/doc/salome/gui/GEOM/input/geompy.doc @@ -1,15 +1,20 @@ /*! -\page geompy_page Python Interface geompy.py +\page geompy_page Python Interface geomBuilder.py \n Please, see -structured documentation for geompy.py, +structured documentation for geomBuilder.py, where all package functionality is separated in groups by purpose. -\n Also you can find any function in the \ref geompy -"linear documentation for geompy.py". +\n Also you can find any function in the \ref GEOM_SWIG.geomBuilder +"linear documentation for geomBuilder.py". -By the links below you can find sample scripts for all operations +\n +\anchor tui_sample_geom_script +

GEOM Python script example

+\tui_script{GEOM_box.py} + +\n By the links below you can find sample scripts for all operations provided by Geometry module.