]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Merge from V6_main 28/02/2013
authorvsr <vsr@opencascade.com>
Thu, 28 Feb 2013 14:00:05 +0000 (14:00 +0000)
committervsr <vsr@opencascade.com>
Thu, 28 Feb 2013 14:00:05 +0000 (14:00 +0000)
79 files changed:
build_cmake
build_cmake.bat
doc/salome/examples/3dsketcher.py
doc/salome/examples/Makefile.am
doc/salome/examples/angle.py
doc/salome/examples/blocks_operations_ex03.py
doc/salome/examples/complex_objs_ex06.py
doc/salome/examples/primitives_ex06.py
doc/salome/examples/repairing_operations_ex05.py
doc/salome/examples/repairing_operations_ex09.py
doc/salome/examples/testme.py
doc/salome/examples/viewing_geom_objs_ex04.py
doc/salome/gui/GEOM/doxyfile.in
doc/salome/gui/GEOM/doxyfile_tui.in
doc/salome/gui/GEOM/input/tui_3dsketcher.doc
doc/salome/gui/GEOM/input/tui_advanced_geom_objs.doc
doc/salome/gui/GEOM/input/tui_angle.doc
doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc
doc/salome/gui/GEOM/input/tui_basic_operations.doc
doc/salome/gui/GEOM/input/tui_basic_properties.doc
doc/salome/gui/GEOM/input/tui_blocks_operations.doc
doc/salome/gui/GEOM/input/tui_boolean_operations.doc
doc/salome/gui/GEOM/input/tui_bounding_box.doc
doc/salome/gui/GEOM/input/tui_building_by_blocks.doc
doc/salome/gui/GEOM/input/tui_center_of_mass.doc
doc/salome/gui/GEOM/input/tui_check_compound_of_blocks.doc
doc/salome/gui/GEOM/input/tui_check_self_intersections.doc
doc/salome/gui/GEOM/input/tui_check_shape.doc
doc/salome/gui/GEOM/input/tui_complex_objs.doc
doc/salome/gui/GEOM/input/tui_free_boundaries.doc
doc/salome/gui/GEOM/input/tui_free_faces.doc
doc/salome/gui/GEOM/input/tui_get_non_blocks.doc
doc/salome/gui/GEOM/input/tui_import_export.doc
doc/salome/gui/GEOM/input/tui_inertia.doc
doc/salome/gui/GEOM/input/tui_min_distance.doc
doc/salome/gui/GEOM/input/tui_normal_face.doc
doc/salome/gui/GEOM/input/tui_notebook_geom.doc
doc/salome/gui/GEOM/input/tui_point_coordinates.doc
doc/salome/gui/GEOM/input/tui_primitives.doc
doc/salome/gui/GEOM/input/tui_repairing_operations.doc
doc/salome/gui/GEOM/input/tui_sketcher.doc
doc/salome/gui/GEOM/input/tui_tolerance.doc
doc/salome/gui/GEOM/input/tui_topological_geom_objs.doc
doc/salome/gui/GEOM/input/tui_transformation_operations.doc
doc/salome/gui/GEOM/input/tui_viewing_geom_objs.doc
doc/salome/gui/GEOM/input/tui_whatis.doc
doc/salome/gui/GEOM/input/tui_working_with_groups.doc
idl/GEOM_Gen.idl
src/DisplayGUI/DisplayGUI.cxx
src/DlgRef/DlgRef.cxx
src/DlgRef/DlgRef.h
src/DlgRef/DlgRef_1Check1Spin1Check_QTD.ui [new file with mode: 0644]
src/DlgRef/Makefile.am
src/GEOMBase/GEOMBase.cxx
src/GEOMBase/GEOMBase_Helper.cxx
src/GEOMGUI/GEOM_msg_en.ts
src/GEOMGUI/GEOM_msg_fr.ts
src/GEOMGUI/GeometryGUI.cxx
src/GEOMGUI/GeometryGUI.h
src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx
src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx
src/GEOMImpl/GEOMImpl_IGroupOperations.cxx
src/GEOMImpl/GEOMImpl_OffsetDriver.cxx
src/GEOMImpl/GEOMImpl_PipeDriver.cxx
src/GEOMImpl/GEOMImpl_Types.hxx
src/GEOMToolsGUI/GEOMToolsGUI.h
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
src/GEOM_I/GEOM_Gen_i.hh
src/GEOM_I/GEOM_I3DPrimOperations_i.cc
src/GEOM_I/GEOM_I3DPrimOperations_i.hh
src/GEOM_I/GEOM_IGroupOperations_i.cc
src/GEOM_I/GEOM_IOperations_i.cc
src/GEOM_I/GEOM_IOperations_i.hh
src/GEOM_I/GEOM_ITransformOperations_i.cc
src/GEOM_SWIG/geompyDC.py
src/GEOM_SWIG/gsketcher.py
src/GenerationGUI/GenerationGUI_PrismDlg.cxx
src/GenerationGUI/GenerationGUI_PrismDlg.h
src/MeasureGUI/MeasureGUI_DistanceDlg.cxx

index 83f78035a4e2825470fd38943d1c04ed54c0fbef..7acc570e5af8c8e6bbcfc3f1e2abb91da91eeaf7 100755 (executable)
@@ -21,7 +21,7 @@
 CURRENT_DIR=`pwd`
 CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"`
 cd ${CONF_DIR}
-python $KERNEL_ROOT_DIR/salome_adm/cmake_files/am2cmake.py --geom
+python $KERNEL_ROOT_DIR/salome_adm/cmake_files/deprecated/am2cmake.py --geom
 status=$?
 cd ${CURRENT_DIR}
 exit $status
index 0829ab1f1a466b410a48d6db166eb036f93edd1b..6b14a8ade3afb13be5c04b1c4a6f92a1ebf6dbbb 100644 (file)
@@ -17,4 +17,4 @@
 @REM See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 @REM
 
-%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\am2cmake.py --geom\r
+%PYTHONBIN% %KERNEL_ROOT_DIR%\salome_adm\cmake_files\deprecated\am2cmake.py --geom\r
index 84dc281125a92e6a0b4327d46ea6cd87674b11e1..69b779898d241ec76fb68e7d9efeda063a6d86a8 100644 (file)
@@ -5,7 +5,7 @@ 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 ])
+sketcher1 = geompy.Make3DSketcher([ 0,0,0, 50,50,50, 0,50,0, 50,0,25, 10,20,100, 0,0,0 ])
 
 # add object in the study
 id_sketcher1 = geompy.addToStudy(sketcher1, "Sketcher1")
@@ -24,7 +24,7 @@ sk = geompy.Sketcher3D()
 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)
+sk.addPointRadiusAnglesRelative(45, 0, 100, "OXY")
 
 # add three points with relative coordinates
 # three segments will be added by this command
index 1174f011461170e366088e30b6b8ea31a11d8975..dc2264250f8c66ea8bcbc32691abade21c82c2d9 100644 (file)
@@ -26,7 +26,8 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
 
 pyexamplesdir = $(docdir)/examples/GEOM
 
-BAD_TESTS = 
+BAD_TESTS = \
+       repairing_operations_ex09.py 
 
 GOOD_TESTS = \
        3dsketcher.py \
@@ -95,7 +96,6 @@ GOOD_TESTS = \
        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 \
@@ -135,7 +135,7 @@ pyexamples_SCRIPTS = $(BAD_TESTS) $(GOOD_TESTS)
 
 EXTRA_DIST += $(pyexamples_SCRIPTS) testme.py
 
-check-local:
+installcheck-local:
        @for f in $(GOOD_TESTS) ; do \
-         python $(top_srcdir)/doc/salome/examples/testme.py $(top_srcdir)/doc/salome/examples/$$f || exit 1; \
+         env GEOM_ROOT_DIR=$(prefix) python -B $(top_srcdir)/doc/salome/examples/testme.py $(top_srcdir)/doc/salome/examples/$$f || exit 1; \
        done
index 547db7184cc16384f0056bca309af4398f5ba85e..324d72653c0ad68252af21a3a80595debdfc7bc5 100644 (file)
@@ -53,8 +53,11 @@ 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"
+try:
+    Angle = geompy.GetAngle(OX, arc)
+    pass
+except:
+    # It is a correct case, because GetAngle() must not be computed on curvilinear edges.
     pass
+
+assert (not geompy.MeasuOp.IsDone() ), 'Angle must not be computed on curvilinear edges.'
index 546bc22748ae03ba2d12cd811a8136ad007d7349..268a52e10f65e0b5b126aca0e807140c0a001790 100644 (file)
@@ -4,7 +4,7 @@ import geompy
 import salome
 
 # create a box
-box = geompy.MakeBoxDXDYDZ(200, 200, 200)
+check_box = geompy.MakeBoxDXDYDZ(200, 200, 200)
 
 # build all possible propagation groups
 listChains = geompy.Propagate(check_box)
index a836b35fc4acb6740e6940c4d9cbe09acaf228a3..4a3dfe43931fb7bd8031e70c008d564bbded0cc2 100644 (file)
@@ -2,19 +2,25 @@
 
 import geompy
 import salome
+import math
 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])
 
+# get sub-shapes
+edges = geompy.SubShapeAll(WirePath, geompy.ShapeType["EDGE"])
+vertices = geompy.SubShapeAll(WirePath, geompy.ShapeType["VERTEX"])
+
+
 #=======================================================
 #                 Create shell sections
 #=======================================================
-ps = [Vertex_1,Vertex_2,Vertex_3,Vertex_4]
-theLocations = [Vertex_1, Vertex_2, Vertex_3, Vertex_4]
+ps = [vertices[0],vertices[1],vertices[2],vertices[3]]
+theLocations = [vertices[0],vertices[1],vertices[2],vertices[3]]
 VC = geompy.MakeCompound(theLocations)
 geompy.addToStudy(VC,"VC")
-vs = [Edge_1,Edge_1,Edge_3,Edge_3]
+vs = [edges[0],edges[0],edges[2],edges[2]]
 hs = [20,40,30,20]
 shells = []
 subbases = []
@@ -49,30 +55,30 @@ 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])
+contour = geompy.CloseContour(w, [], isCommonVertex=False)
+[e1,e2,e3,e4] = geompy.SubShapeAll(contour, geompy.ShapeType["EDGE"])
+w = geompy.MakeWire([e1,e2,e3,e4])
 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])
+contour = geompy.CloseContour(w, [], isCommonVertex=False)
+[e1,e2,e3,e4] = geompy.SubShapeAll(contour, geompy.ShapeType["EDGE"])
+w = geompy.MakeWire([e1,e2,e3,e4])
 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])
+contour = geompy.CloseContour(w, [], isCommonVertex=False)
+[e1,e2,e3,e4] = geompy.SubShapeAll(contour, geompy.ShapeType["EDGE"])
+w = geompy.MakeWire([e1,e2,e3,e4])
 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])
+contour = geompy.CloseContour(w, [], isCommonVertex=False)
+[e1,e2,e3,e4] = geompy.SubShapeAll(contour, geompy.ShapeType["EDGE"])
+w = geompy.MakeWire([e1,e2,e3,e4])
 f4 = geompy.MakeFace(w,1)
 
 faces.append(f1)
@@ -94,30 +100,30 @@ 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])
+contour = geompy.CloseContour(w, [], isCommonVertex=False)
+[e1,e2,e3,e4] = geompy.SubShapeAll(contour, geompy.ShapeType["EDGE"])
+w = geompy.MakeWire([e1,e2,e3,e4])
 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])
+contour = geompy.CloseContour(w, [], isCommonVertex=False)
+[e1,e2,e3,e4] = geompy.SubShapeAll(contour, geompy.ShapeType["EDGE"])
+w = geompy.MakeWire([e1,e2,e3,e4])
 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])
+contour = geompy.CloseContour(w, [], isCommonVertex=False)
+[e1,e2,e3,e4] = geompy.SubShapeAll(contour, geompy.ShapeType["EDGE"])
+w = geompy.MakeWire([e1,e2,e3,e4])
 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])
+contour = geompy.CloseContour(w, [], isCommonVertex=False)
+[e1,e2,e3,e4] = geompy.SubShapeAll(contour, geompy.ShapeType["EDGE"])
+w = geompy.MakeWire([e1,e2,e3,e4])
 f4 = geompy.MakeFace(w,1)
 
 faces.append(f1)
@@ -163,19 +169,19 @@ 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])
+for face in fs:
+    if ( 4 == geompy.NbShapes(face, geompy.ShapeType["VERTEX"]) ):
+        faces.append(face)
+        pass
+    pass
 shell = geompy.MakeSewing(faces,1.e-6)
 shells.append(shell)
 faces = geompy.SubShapeAllSortedCentres(shell, geompy.ShapeType["FACE"])
-
+subbases.append(faces[2])
 
 #===========================================================
 #                   Create Pipe
 #===========================================================
-subbases = []
 Pipe = geompy.MakePipeWithShellSections(shells, subbases, theLocations, WirePath,
                                         theWithContact=0, theWithCorrection=0)
 
index c558eafb8fcdafe1390896571bd864d5c35001df..d3fd53e353d709f013741ff2442cb1206d027238 100644 (file)
@@ -31,5 +31,5 @@ id_disk3  = geompy.addToStudy(disk3,"Disk3")
 # display disks
 gg.createAndDisplayGO(id_vxy)
 gg.createAndDisplayGO(id_disk1)
-gg.createAndDisplayGO(id_diks2)
-gg.createAndDisplayGO(id_diks3)
+gg.createAndDisplayGO(id_disk2)
+gg.createAndDisplayGO(id_disk3)
index f6593b3e804a5749915fdec2ac9443c791d69bbe..b7534ab654e2aa820a0fb59749cc92e75f0a26b4 100644 (file)
@@ -2,6 +2,7 @@
 
 import geompy
 import salome
+import GEOM
 gg = salome.ImportComponentGUI("GEOM")
 
 # create a vertex and a vector
@@ -21,20 +22,19 @@ cone = geompy.MakeCone(p1, v, 70, 0, 80)
 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])
+# get edges as sub-shapes
+edges = geompy.SubShapeAllSortedCentres(faces[2], geompy.ShapeType["EDGE"])
+edge  = geompy.GetInPlace(cut_without_f_2, edges[0], True)
+e_2 = geompy.GetSubShapeID(cut_without_f_2, edge)
 
-# suppress the selected wire
-result = geompy.SuppressHoles(cut_without_f_2, [w_0])
+# suppress a hole using the selected edge
+result = geompy.SuppressHoles(cut_without_f_2, [e_2])
 
 # add objects in the study
 id_cut = geompy.addToStudy(cut, "Cut")
index 41807fee4d2e812af7c80df314cf241f3db061f7..e94b1aa03c45c3f345ac93c3b28df88f96f635ca 100644 (file)
@@ -1,9 +1,10 @@
 # Limit Tolerance
 
 import geompy
+import salome
 gg = salome.ImportComponentGUI("GEOM")
 
-# import initial topology
+# import initial topology with bad tolerances (more than 1e-07)
 shape1 = geompy.ImportBREP("my_shape_1.brep")
 shape2 = geompy.ImportBREP("my_shape_2.brep")
 
index d8a98200d142ca76cfce6ce3a6bf7c1ec219d4a9..f6c5e783713e56f29fed1807bfdab20832750d0d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-import unittest, sys
+import unittest, sys, os
 
 class SalomeSession(object):
     def __init__(self, script):
@@ -10,11 +10,10 @@ class SalomeSession(object):
         sys.argv += ["--modules=GEOM"]
         sys.argv += ["--execute=%s" % script]
         clt, d = runSalome.main()
-        self.port = d['port']
         return
 
     def __del__(self):
-        port = self.port
+        port = os.getenv('NSPORT')
         import killSalomeWithPort
         killSalomeWithPort.killMyPort(port)
         return
index cf521f407e9fccab116fd19e79c3b47ea57020a8..f31edefeea4e883533c8ec44643d827173acbb9c 100644 (file)
@@ -2,8 +2,9 @@
 
 import salome
 import geompy
+import GEOM
 
-texture = geompy.LoadTexture("/users/user/mytexture.dat")
+texture = geompy.LoadTexture(os.getenv("DATA_DIR")+"/Textures/texture1.dat")
 
 v1 = geompy.MakeVertex(0, 0, 0)
 v2 = geompy.MakeVertex(100, 0, 0)
index 267b71c24f865f49ac3b2d6577d03b383d92fee6..35639edb0d98978f87042ba33771003fcc01e092 100755 (executable)
@@ -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 @top_srcdir@/doc/salome/examples
+EXAMPLE_PATH      = @top_srcdir@/doc/salome/examples @top_srcdir@/src/GEOM_SWIG
 
 #---------------------------------------------------------------------------
 #HTML related options
@@ -81,3 +81,8 @@ TAGFILES          = geompy_doc.tag=../GEOM/geompy_doc #rnv: 07.04.2011 Workaroun
                                                       #because it wrongly defines location of the html files for search.
 ALLEXTERNALS      = NO
 SEARCHENGINE      = YES
+
+#---------------------------------------------------------------------------
+#Custom commands
+#---------------------------------------------------------------------------
+ALIASES += tui_script{1}="\include \1 <a href=\"../../examples/GEOM/\1\">Download this script</a>"
index 9617a169d215a0e6cb71ef79e85673d41bc24ac0..516f87b165f01016f97678534e0c7f2a47728590 100755 (executable)
@@ -41,7 +41,7 @@ WARNINGS          = YES
 INPUT             = @srcdir@/input               
 FILE_PATTERNS     = tui_*.doc
 IMAGE_PATH        = @srcdir@/images
-EXAMPLE_PATH      = @top_srcdir@/src/GEOM_SWIG
+EXAMPLE_PATH      = @top_srcdir@/doc/salome/examples @top_srcdir@/src/GEOM_SWIG
 
 #---------------------------------------------------------------------------
 #HTML related options
@@ -71,3 +71,8 @@ GENERATE_RTF      = NO
 #---------------------------------------------------------------------------
 GENERATE_TAGFILE  = tui_examples.tag
 SEARCHENGINE      = YES
+
+#---------------------------------------------------------------------------
+#Custom commands
+#---------------------------------------------------------------------------
+ALIASES += tui_script{1}="\include \1 <a href=\"../../examples/GEOM/\1\">Download this script</a>"
index 9afadc9ca4a8f0d8c37c924744e7f684dedc6d27..db3504a1fb877baddd51ba0f104088b43025f669 100755 (executable)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_3dsketcher_page 3D Sketcher
-\include 3dsketcher.py
-<a href="../../examples/GEOM/3dsketcher.py">Download this script</a>
+\tui_script{3dsketcher.py}
 
 */
index 1f513a496ee6d430ad63cc1a0be2ee5318013698..d963c28ea4227fac58444293eaa7a914a66b3afe 100644 (file)
@@ -4,18 +4,15 @@
 
 \anchor tui_creation_pipetshape
 <br><h2>Creation of PipeTShape</h2>
-\include advanced_geom_objs_ex01.py
-<a href="../../examples/GEOM/advanced_geom_objs_ex01.py">Download this script</a>
+\tui_script{advanced_geom_objs_ex01.py}
 
 \anchor tui_creation_divideddisk
 <br><h2>Creation of DividedDisk</h2>
-\include advanced_geom_objs_ex02.py
-<a href="../../examples/GEOM/advanced_geom_objs_ex02.py">Download this script</a>
+\tui_script{advanced_geom_objs_ex02.py}
 
 \anchor tui_creation_dividedcylinder
 <br><h2>Creation of DividedCylinder</h2>
-\include advanced_geom_objs_ex03.py
-<a href="../../examples/GEOM/advanced_geom_objs_ex03.py">Download this script</a>
+\tui_script{advanced_geom_objs_ex03.py}
 
 <!--@@ insert new functions before this line @@ do not remove this line @@-->
 */
index e1618fb307e46f959402633dfa4c29d350e12451..7cca534f4f97b464fbcad52d32e63f940da6263c 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_angle_page Angle
-\include angle.py
-<a href="../../examples/GEOM/angle.py">Download this script</a>
+\tui_script{angle.py}
 
 */
index fcb21c2683d47e1332936e9cb0694d5956d577e3..89be6f64b4bb13c51c72a33057bc4f25f9bc6553 100644 (file)
@@ -4,47 +4,38 @@
 
 \anchor tui_creation_point
 <br><h2>Creation of a Point</h2>
-\include basic_geom_objs_ex01.py
-<a href="../../examples/GEOM/basic_geom_objs_ex01.py">Download this script</a>
+\tui_script{basic_geom_objs_ex01.py}
 
 \anchor tui_creation_line
 <br><h2>Creation of a Line</h2>
-\include basic_geom_objs_ex02.py
-<a href="../../examples/GEOM/basic_geom_objs_ex02.py">Download this script</a>
+\tui_script{basic_geom_objs_ex02.py}
 
 \anchor tui_creation_circle
 <br><h2>Creation of a Circle</h2>
-\include basic_geom_objs_ex03.py
-<a href="../../examples/GEOM/basic_geom_objs_ex03.py">Download this script</a>
+\tui_script{basic_geom_objs_ex03.py}
 
 \anchor tui_creation_ellipse
 <br><h2>Creation of an Ellipse</h2>
-\include basic_geom_objs_ex04.py
-<a href="../../examples/GEOM/basic_geom_objs_ex04.py">Download this script</a>
+\tui_script{basic_geom_objs_ex04.py}
 
 \anchor tui_creation_arc
 <br><h2>Creation of an Arc</h2>
-\include basic_geom_objs_ex05.py
-<a href="../../examples/GEOM/basic_geom_objs_ex05.py">Download this script</a>
+\tui_script{basic_geom_objs_ex05.py}
 
 \anchor tui_creation_curve
 <br><h2>Creation of a Curve</h2>
-\include basic_geom_objs_ex06.py
-<a href="../../examples/GEOM/basic_geom_objs_ex06.py">Download this script</a>
+\tui_script{basic_geom_objs_ex06.py}
 
 \anchor tui_creation_vector
 <br><h2>Creation of a Vector</h2>
-\include basic_geom_objs_ex07.py
-<a href="../../examples/GEOM/basic_geom_objs_ex07.py">Download this script</a>
+\tui_script{basic_geom_objs_ex07.py}
 
 \anchor tui_creation_plane
 <br><h2>Creation of a Plane</h2>
-\include basic_geom_objs_ex08.py
-<a href="../../examples/GEOM/basic_geom_objs_ex08.py">Download this script</a>
+\tui_script{basic_geom_objs_ex08.py}
 
 \anchor tui_creation_lcs
 <br><h2>Creation of a Local Coordinate System</h2>
-\include basic_geom_objs_ex09.py
-<a href="../../examples/GEOM/basic_geom_objs_ex09.py">Download this script</a>
+\tui_script{basic_geom_objs_ex09.py}
 
 */
index 3899255b12a46c244bae3f649119095f11864cf1..743b75dc2ffd6a954a1340151b2d8442c6255f25 100644 (file)
@@ -4,17 +4,14 @@
 
 \anchor tui_partition
 <br><h2>Partition</h2>
-\include basic_operations_ex01.py
-<a href="../../examples/GEOM/basic_operations_ex01.py">Download this script</a>
+\tui_script{basic_operations_ex01.py}
 
 \anchor tui_archimede
 <br><h2>Archimede</h2>
-\include basic_operations_ex02.py
-<a href="../../examples/GEOM/basic_operations_ex02.py">Download this script</a>
+\tui_script{basic_operations_ex02.py}
 
 \anchor tui_restore_prs_params
 <br><h2>Restore presentation parameters and sub-shapes</h2>
-\include basic_operations_ex03.py
-<a href="../../examples/GEOM/basic_operations_ex03.py">Download this script</a>
+\tui_script{basic_operations_ex03.py}
 
 */
index dad8e828bef03a1ed14c79409b2805e7a556f1ce..ed03ccfd4341879959206c56ccdf5d274c71bcd8 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_basic_properties_page Basic Properties
-\include basic_properties.py
-<a href="../../examples/GEOM/basic_properties.py">Download this script</a>
+\tui_script{basic_properties.py}
 
 */
index 4acb44f809adda6aea2bde6a7e34f6f87f10ac57..58a761a42b0ea332b48cb9d398a6d19c361435d3 100644 (file)
@@ -4,17 +4,14 @@
 
 \anchor tui_multi_transformation
 <br><h2>Multi Transformation</h2>
-\include blocks_operations_ex01.py
-<a href="../../examples/GEOM/blocks_operations_ex01.py">Download this script</a>
+\tui_script{blocks_operations_ex01.py}
 
 \anchor tui_explode_on_blocks
 <br><h2>Explode on Blocks</h2>
-\include blocks_operations_ex02.py
-<a href="../../examples/GEOM/blocks_operations_ex02.py">Download this script</a>
+\tui_script{blocks_operations_ex02.py}
 
 \anchor tui_propagate
 <br><h2>Propagate</h2>
-\include blocks_operations_ex03.py
-<a href="../../examples/GEOM/blocks_operations_ex03.py">Download this script</a>
+\tui_script{blocks_operations_ex03.py}
 
 */
index 0ab8db001cdb4f55e5e0ea1184f1b1d24c2c85e1..784003c3ceb79d0966c3c03b183b0db96f32d71c 100644 (file)
@@ -4,22 +4,18 @@
 
 \anchor tui_fuse
 <br><h2>Fuse</h2>
-\include boolean_operations_ex01.py
-<a href="../../examples/GEOM/boolean_operations_ex01.py">Download this script</a>
+\tui_script{boolean_operations_ex01.py}
 
 \anchor tui_common
 <br><h2>Common</h2>
-\include boolean_operations_ex02.py
-<a href="../../examples/GEOM/boolean_operations_ex02.py">Download this script</a>
+\tui_script{boolean_operations_ex02.py}
 
 \anchor tui_cut
 <br><h2>Cut</h2>
-\include boolean_operations_ex03.py
-<a href="../../examples/GEOM/boolean_operations_ex03.py">Download this script</a>
+\tui_script{boolean_operations_ex03.py}
 
 \anchor tui_section
 <br><h2>Section</h2>
-\include boolean_operations_ex04.py
-<a href="../../examples/GEOM/boolean_operations_ex04.py">Download this script</a>
+\tui_script{boolean_operations_ex04.py}
 
 */
index 76d4b43474d5d1e059d224677d56bc1c6e4f914d..5dd436773cb843f4be19682c58e77c9a03ec4fae 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_bounding_box_page Bounding Box
-\include bounding_box.py
-<a href="../../examples/GEOM/bounding_box.py">Download this script</a>
+\tui_script{bounding_box.py}
 
 */
index 77f8e363bf2f275a43441cff62dfbe661bc32f33..ab66d27a441353bceff16a1f456a6fcede2a6f4c 100644 (file)
@@ -3,11 +3,9 @@
 \page tui_building_by_blocks_page Building by Blocks
 
 <br><h2>Quadrangle Face</h2>
-\include building_by_blocks_ex01.py
-<a href="../../examples/GEOM/building_by_blocks_ex01.py">Download this script</a>
+\tui_script{building_by_blocks_ex01.py}
 
 <br><h2>Hexagonal Solid</h2>
-\include building_by_blocks_ex02.py
-<a href="../../examples/GEOM/building_by_blocks_ex02.py">Download this script</a>
+\tui_script{building_by_blocks_ex02.py}
 
 */
index 49eb49538b4188ddec2dbf424b43c9e27266de12..604d67b6138998b855f89ba3f6c0de2e44a2edd2 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_center_of_mass_page Center of masses
-\include center_of_mass.py
-<a href="../../examples/GEOM/center_of_mass.py">Download this script</a>
+\tui_script{center_of_mass.py}
 
 */
index eeb9d92a1e8afd5004144dbb9c515b21b21616fd..ff448334bfcd58b24d77addc01343eba9e3e6e08 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_check_compound_of_blocks_page Check Compound of Blocks
-\include check_compound_of_blocks.py
-<a href="../../examples/GEOM/check_compound_of_blocks.py">Download this script</a>
+\tui_script{check_compound_of_blocks.py}
 
 */
index 346de0c2b6577997f06e8894b126f213f78ffba9..d3d6c06af975af23e17a57a0b4f95a759ba09a16 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_check_self_intersections_page Detect Self-intersections
-\include check_self_intersections.py
-<a href="../../examples/GEOM/check_self_intersections.py">Download this script</a>
+\tui_script{check_self_intersections.py}
 
 */
index 5e11279eff0108efbbee713e9b43f4e70b291b38..59ebd7d47cb4edc0f443f188db096933ef1db5b1 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_check_shape_page Check Shape
-\include check_shape.py
-<a href="../../examples/GEOM/check_shape.py">Download this script</a>
+\tui_script{check_shape.py}
 
 */
index 03094395632ff0e186bc9e5271e7d8237aaf2936..61ce18b5a126d1aa268b8735674cb46d87f98225 100644 (file)
@@ -4,51 +4,42 @@
 
 \anchor tui_creation_prism
 <br><h2>Creation of a Prism</h2>
-\include complex_objs_ex01.py
-<a href="../../examples/GEOM/complex_objs_ex01.py">Download this script</a>
+\tui_script{complex_objs_ex01.py}
 
 \anchor tui_creation_revolution
 <br><h2>Creation of a Revolution</h2>
-\include complex_objs_ex02.py
-<a href="../../examples/GEOM/complex_objs_ex02.py">Download this script</a>
+\tui_script{complex_objs_ex02.py}
 
 \anchor tui_creation_filling
 <br><h2>Creation of a Filling</h2>
-\include complex_objs_ex03.py
-<a href="../../examples/GEOM/complex_objs_ex03.py">Download this script</a>
+\tui_script{complex_objs_ex03.py}
 
 \anchor tui_creation_pipe
 <br><h2>Creation of a Pipe</h2>
-\include complex_objs_ex04.py
-<a href="../../examples/GEOM/complex_objs_ex04.py">Download this script</a>
+\tui_script{complex_objs_ex04.py}
 
 \anchor tui_creation_pipe_with_diff_sec
 <br><h2>Creation of a PipeWithDifferentSections</h2>
-\include complex_objs_ex05.py
-<a href="../../examples/GEOM/complex_objs_ex05.py">Download this script</a>
+\tui_script{complex_objs_ex05.py}
 
 \anchor tui_creation_pipe_with_shell_sec
 <br><h2>Creation of a PipeWithShellSections</h2>
-\include complex_objs_ex06.py
-<a href="../../examples/GEOM/complex_objs_ex06.py">Download this script</a>
+\tui_script{complex_objs_ex06.py}
 
 \anchor tui_creation_pipe_without_path
 <br><h2>Creation of a PipeShellsWithoutPath</h2>
-\include complex_objs_ex07.py
-<a href="../../examples/GEOM/complex_objs_ex07.py">Download this script</a>
+\tui_script{complex_objs_ex07.py}
 
 \anchor tui_creation_pipe_binormal_along_vector
 <br><h2>Creation of a PipeBiNormalAlongVector</h2>
-\include complex_objs_ex08.py
-<a href="../../examples/GEOM/complex_objs_ex08.py">Download this script</a>
+\tui_script{complex_objs_ex08.py}
 
 \anchor tui_creation_pipe_path
 <br><h2>Creation of a Middle Path</h2>
-\include complex_objs_ex09.py
-<a href="../../examples/GEOM/complex_objs_ex09.py">Download this script</a>
+\tui_script{complex_objs_ex09.py}
 
+\anchor tui_creation_tangent_plane_on_face
 <br><h2>Creation of Tangent Plane On Face</h2>
-\include complex_objs_ex10.py
-<a href="../../examples/GEOM/complex_objs_ex10.py">Download this script</a>
+\tui_script{complex_objs_ex10.py}
 
 */
index fb0420c6dd77d327eb217f07c7dbf216956d5a9c..41a2a5dd8a738b08a6330c82236b86a0c949a044 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_free_boundaries_page Check Free Boundaries
-\include free_boundaries.py
-<a href="../../examples/GEOM/free_boundaries.py">Download this script</a>
+\tui_script{free_boundaries.py}
 
 */
index 00ae5bd238b0e553ed85611a9a9c13e0123d5b1b..c0a9286fd6bea6216c9731dcdce393ec04eb7db1 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_free_faces_page Check Free Faces
-\include free_faces.py
-<a href="../../examples/GEOM/free_faces.py">Download this script</a>
+\tui_script{free_faces.py}
 
 */
index ca7a98d8fe72a06edb88ae69fd747e245a83b14e..df1ffe0540da754382994b0da33ab0db9a1afc4f 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_get_non_blocks_page Get Non Blocks
-\include get_non_blocks.py
-<a href="../../examples/GEOM/get_non_blocks.py">Download this script</a>
+\tui_script{get_non_blocks.py}
 
 */
index 52adf987e1c7f6f0754c852d7f581083535dd666..7b3efdde497d9ecd114c3f4aa309cec6a08215ae 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_import_export_page Import/Export
-\include import_export.py
-<a href="../../examples/GEOM/import_export.py">Download this script</a>
+\tui_script{import_export.py}
 
 */
index a62b20784fa0d1150a398e092c906535abaf38f4..2f7923d8b2a5e9a81f4ca0f21c87e60fc9be3c19 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_inertia_page Inertia
-\include inertia.py
-<a href="../../examples/GEOM/inertia.py">Download this script</a>
+\tui_script{inertia.py}
 
 */
index db024ca4b05509a3c5813fdcf1abc887ae235cc4..a53e90104e37b4caae9f4fc49789e91ebea33769 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_min_distance_page Minimal Distance
-\include min_distance.py
-<a href="../../examples/GEOM/min_distance.py">Download this script</a>
+\tui_script{min_distance.py}
 
 */
index 7d31fcc265dbc627c93400f7984dd1199a770fce..13d9000037845e3a044122d3e544f7f331d75648 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_normal_face_page Normal to a Face
-\include normal_face.py
-<a href="../../examples/GEOM/normal_face.py">Download this script</a>
+\tui_script{normal_face.py}
 
 */
index 8db9c59d2ee382a78815b00cf3c4e4ed940057de..38dac82550f1d91de0c90090773065d5d41cc567 100644 (file)
@@ -3,7 +3,6 @@
 \page tui_notebook_geom_page Using SALOME NoteBook
 
 \anchor tui_notebook_geom
-\include notebook_geom.py
-<a href="../../examples/GEOM/notebook_geom.py">Download this script</a>
+\tui_script{notebook_geom.py}
 
 */
index 6fbb9c9a60d946504a3f599c64441b80017f09fa..3dcba1b219d347a10d1820559aea1228445adc98 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_point_coordinates_page Point Coordinates
-\include point_coordinates.py
-<a href="../../examples/GEOM/point_coordinates.py">Download this script</a>
+\tui_script{point_coordinates.py}
 
 */
index 9c4f49d558865c960a25f260b4854fe8bb67e651..f70bead3c2ea213935a1e739e72d3b3b8ea8396b 100644 (file)
@@ -4,37 +4,30 @@
 
 \anchor tui_creation_box
 <br><h2>Creation of a Box</h2>
-\include primitives_ex01.py
-<a href="../../examples/GEOM/primitives_ex01.py">Download this script</a>
+\tui_script{primitives_ex01.py}
 
 \anchor tui_creation_cylinder
 <br><h2>Creation of a Cylinder</h2>
-\include primitives_ex02.py
-<a href="../../examples/GEOM/primitives_ex02.py">Download this script</a>
+\tui_script{primitives_ex02.py}
 
 \anchor tui_creation_sphere
 <br><h2>Creation of a Sphere</h2>
-\include primitives_ex03.py
-<a href="../../examples/GEOM/primitives_ex03.py">Download this script</a>
+\tui_script{primitives_ex03.py}
 
 \anchor tui_creation_torus
 <br><h2>Creation of a Torus</h2>
-\include primitives_ex04.py
-<a href="../../examples/GEOM/primitives_ex04.py">Download this script</a>
+\tui_script{primitives_ex04.py}
 
 \anchor tui_creation_cone
 <br><h2>Creation of a Cone</h2>
-\include primitives_ex05.py
-<a href="../../examples/GEOM/primitives_ex05.py">Download this script</a>
+\tui_script{primitives_ex05.py}
 
 \anchor tui_creation_disk
 <br><h2>Creation of a Disk</h2>
-\include primitives_ex06.py
-<a href="../../examples/GEOM/primitives_ex06.py">Download this script</a>
+\tui_script{primitives_ex06.py}
 
 \anchor tui_creation_squareface
 <br><h2>Creation of a Rectangle</h2>
-\include primitives_ex07.py
-<a href="../../examples/GEOM/primitives_ex07.py">Download this script</a>
+\tui_script{primitives_ex07.py}
 
 */
index 28673197079498e75bf155d4ada82eee7001ea11..711800caa4f7953207646991c5ac99d64828ecf2 100644 (file)
@@ -4,57 +4,46 @@
 
 \anchor tui_shape_processing
 <br><h2>Shape Processing</h2>
-\include repairing_operations_ex01.py
-<a href="../../examples/GEOM/repairing_operations_ex01.py">Download this script</a>
+\tui_script{repairing_operations_ex01.py}
 
 \anchor tui_suppress_faces
 <br><h2>Suppress Faces</h2>
-\include repairing_operations_ex02.py
-<a href="../../examples/GEOM/repairing_operations_ex02.py">Download this script</a>
+\tui_script{repairing_operations_ex02.py}
 
 \anchor tui_close_contour
 <br><h2>Close Contour</h2>
-\include repairing_operations_ex03.py
-<a href="../../examples/GEOM/repairing_operations_ex03.py">Download this script</a>
+\tui_script{repairing_operations_ex03.py}
 
 \anchor tui_suppress_internal_wires 
 <br><h2>Suppress Internal Wires</h2>
-\include repairing_operations_ex04.py
-<a href="../../examples/GEOM/repairing_operations_ex04.py">Download this script</a>
+\tui_script{repairing_operations_ex04.py}
 
 \anchor tui_suppress_holes
 <br><h2>Suppress Holes</h2>
-\include repairing_operations_ex05.py
-<a href="../../examples/GEOM/repairing_operations_ex05.py">Download this script</a>
+\tui_script{repairing_operations_ex05.py}
 
 \anchor tui_sewing
 <br><h2>Sewing</h2>
-\include repairing_operations_ex06.py
-<a href="../../examples/GEOM/repairing_operations_ex06.py">Download this script</a>
+\tui_script{repairing_operations_ex06.py}
 
 \anchor tui_glue_faces
 <br><h2>Glue Faces</h2>
-\include repairing_operations_ex07.py
-<a href="../../examples/GEOM/repairing_operations_ex07.py">Download this script</a>
+\tui_script{repairing_operations_ex07.py}
 
 \anchor tui_glue_edges
 <br><h2>Glue Edges</h2>
-\include repairing_operations_ex08.py
-<a href="../../examples/GEOM/repairing_operations_ex08.py">Download this script</a>
+\tui_script{repairing_operations_ex08.py}
 
 \anchor tui_limit_tolerance
 <br><h2>Limit Tolerance</h2>
-\include repairing_operations_ex09.py
-<a href="../../examples/GEOM/repairing_operations_ex09.py">Download this script</a>
+\tui_script{repairing_operations_ex09.py}
 
 \anchor tui_add_point_on_edge
 <br><h2>Add Point on Edge</h2>
-\include repairing_operations_ex10.py
-<a href="../../examples/GEOM/repairing_operations_ex10.py">Download this script</a>
+\tui_script{repairing_operations_ex10.py}
 
 \anchor tui_fuse_collinear_edges
 <br><h2>Fuse Collinear Edges within a Wire</h2>
-\include repairing_operations_ex11.py
-<a href="../../examples/GEOM/repairing_operations_ex11.py">Download this script</a>
+\tui_script{repairing_operations_ex11.py}
 
 */
index be24fd763abb3ce27da1de6822a0d0b95057e6f9..2c0f2d8852fda84c1f397a2c512590e431d81b90 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_sketcher_page 2D Sketcher
-\include sketcher.py
-<a href="../../examples/GEOM/sketcher.py">Download this script</a>
+\tui_script{sketcher.py}
 
 */
index 4da20b24936fde1dea77fb010490952d5feee5f3..552454cf86ae6c9d2f8c7a26a468bc5f60f2433b 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_tolerance_page Tolerance
-\include tolerance.py
-<a href="../../examples/GEOM/tolerance.py">Download this script</a>
+\tui_script{tolerance.py}
 
 */
index 2b9f5d1c2f64d33dbda4de33affbf227a64e3d19..9576e47a8eedd468fa8e36a54a5388bab2f73edf 100644 (file)
@@ -4,32 +4,26 @@
 
 \anchor tui_creation_edge
 <br><h2>Creation of an Edge</h2>
-\include topological_geom_objs_ex01.py
-<a href="../../examples/GEOM/topological_geom_objs_ex01.py">Download this script</a>
+\tui_script{topological_geom_objs_ex01.py}
 
 \anchor tui_creation_wire
 <br><h2>Creation of a Wire</h2>
-\include topological_geom_objs_ex02.py
-<a href="../../examples/GEOM/topological_geom_objs_ex02.py">Download this script</a>
+\tui_script{topological_geom_objs_ex02.py}
 
 \anchor tui_creation_face
 <br><h2>Creation of a Face</h2>
-\include topological_geom_objs_ex03.py
-<a href="../../examples/GEOM/topological_geom_objs_ex03.py">Download this script</a>
+\tui_script{topological_geom_objs_ex03.py}
 
 \anchor tui_creation_shell
 <br><h2>Creation of a Shell</h2>
-\include topological_geom_objs_ex04.py
-<a href="../../examples/GEOM/topological_geom_objs_ex04.py">Download this script</a>
+\tui_script{topological_geom_objs_ex04.py}
 
 \anchor tui_creation_solid
 <br><h2>Creation of a Solid</h2>
-\include topological_geom_objs_ex05.py
-<a href="../../examples/GEOM/topological_geom_objs_ex05.py">Download this script</a>
+\tui_script{topological_geom_objs_ex05.py}
 
 \anchor tui_creation_compound
 <br><h2>Creation of a Compound</h2>
-\include topological_geom_objs_ex06.py
-<a href="../../examples/GEOM/topological_geom_objs_ex06.py">Download this script</a>
+\tui_script{topological_geom_objs_ex06.py}
 
 */
index 10e392ec0d52fdadaf3a7a378bf6ee2eb89c36ea..f25eb9c7644429f1646ec2a18bf2dc851ddb8963 100644 (file)
@@ -4,67 +4,54 @@
 
 \anchor tui_translation
 <br><h2>Translation</h2>
-\include transformation_operations_ex01.py
-<a href="../../examples/GEOM/transformation_operations_ex01.py">Download this script</a>
+\tui_script{transformation_operations_ex01.py}
 
 \anchor tui_rotation
 <br><h2>Rotation</h2>
-\include transformation_operations_ex02.py
-<a href="../../examples/GEOM/transformation_operations_ex02.py">Download this script</a>
+\tui_script{transformation_operations_ex02.py}
 
 \anchor tui_modify_location 
 <br><h2>Modify Location</h2>
-\include transformation_operations_ex03.py
-<a href="../../examples/GEOM/transformation_operations_ex03.py">Download this script</a>
+\tui_script{transformation_operations_ex03.py}
 
 \anchor tui_mirror
 <br><h2>Mirror Image</h2>
-\include transformation_operations_ex04.py
-<a href="../../examples/GEOM/transformation_operations_ex04.py">Download this script</a>
+\tui_script{transformation_operations_ex04.py}
 
 \anchor tui_scale
 <br><h2>Scale Transform</h2>
-\include transformation_operations_ex05.py
-<a href="../../examples/GEOM/transformation_operations_ex05.py">Download this script</a>
+\tui_script{transformation_operations_ex05.py}
 
 \anchor tui_offset 
 <br><h2>Offset Surface</h2>
-\include transformation_operations_ex06.py
-<a href="../../examples/GEOM/transformation_operations_ex06.py">Download this script</a>
+\tui_script{transformation_operations_ex06.py}
 
 \anchor tui_projection
 <br><h2>Projection</h2>
-\include transformation_operations_ex07.py
-<a href="../../examples/GEOM/transformation_operations_ex07.py">Download this script</a>
+\tui_script{transformation_operations_ex07.py}
 
 \anchor tui_multi_translation 
 <br><h2>Multi Translation</h2>
-\include transformation_operations_ex08.py
-<a href="../../examples/GEOM/transformation_operations_ex08.py">Download this script</a>
+\tui_script{transformation_operations_ex08.py}
 
 \anchor tui_multi_rotation
 <br><h2>Multi Rotation</h2>
-\include transformation_operations_ex09.py
-<a href="../../examples/GEOM/transformation_operations_ex09.py">Download this script</a>
+\tui_script{transformation_operations_ex09.py}
 
 \anchor tui_fillet2d
 <br><h2>Fillet 2D</h2>
-\include transformation_operations_ex10.py
-<a href="../../examples/GEOM/transformation_operations_ex10.py">Download this script</a>
+\tui_script{transformation_operations_ex10.py}
 
 \anchor tui_fillet1d
 <br><h2>Fillet 1D</h2>
-\include transformation_operations_ex11.py
-<a href="../../examples/GEOM/transformation_operations_ex11.py">Download this script</a>
+\tui_script{transformation_operations_ex11.py}
 
 \anchor tui_fillet
 <br><h2>Fillet</h2>
-\include transformation_operations_ex12.py
-<a href="../../examples/GEOM/transformation_operations_ex12.py">Download this script</a>
+\tui_script{transformation_operations_ex12.py}
 
 \anchor tui_chamfer
 <br><h2>Chamfer</h2>
-\include transformation_operations_ex13.py
-<a href="../../examples/GEOM/transformation_operations_ex13.py">Download this script</a>
+\tui_script{transformation_operations_ex13.py}
 
 */
index 8505548d3aced07b8c2a6732027dd3aa5b91c0f1..205ac618349bea2419d36a84b92217084b1b4143 100644 (file)
@@ -4,22 +4,18 @@
 
 \anchor tui_change_disp_mode
 <br><h2>Changing Display Mode</h2>
-\include viewing_geom_objs_ex01.py
-<a href="../../examples/GEOM/viewing_geom_objs_ex01.py">Download this script</a>
+\tui_script{viewing_geom_objs_ex01.py}
 
 \anchor tui_change_color 
 <br><h2> Changing Color</h2>
-\include viewing_geom_objs_ex02.py
-<a href="../../examples/GEOM/viewing_geom_objs_ex02.py">Download this script</a>
+\tui_script{viewing_geom_objs_ex02.py}
 
 \anchor tui_change_transparency
 <br><h2>Changing Transparency</h2>
-\include viewing_geom_objs_ex03.py
-<a href="../../examples/GEOM/viewing_geom_objs_ex03.py">Download this script</a>
+\tui_script{viewing_geom_objs_ex03.py}
 
 \anchor tui_point_marker
 <br><h2>Set Point Marker</h2>
-\include viewing_geom_objs_ex04.py
-<a href="../../examples/GEOM/viewing_geom_objs_ex04.py">Download this script</a>
+\tui_script{viewing_geom_objs_ex04.py}
 
 */
index d1c8fc91187a5d39197fe9f4d11a9fa8b50ddcf6..603f341475503637c8c3946ac77b2a413f28d3c2 100644 (file)
@@ -1,7 +1,6 @@
 /*!
 
 \page tui_whatis_page What Is
-\include whatis.py
-<a href="../../examples/GEOM/whatis.py">Download this script</a>
+\tui_script{whatis.py}
 
 */
index 4f252c2e9e97423cb08fb68eb21e643dbc593fc6..e21cb55884a678eb0f970f97232e037472862b39 100644 (file)
@@ -5,35 +5,29 @@
 <br>
 \anchor tui_create_groups_anchor
 <h2>Creation of a group</h2>
-\include working_with_groups_ex01.py
-<a href="../../examples/GEOM/working_with_groups_ex01.py">Download this script</a>
+\tui_script{working_with_groups_ex01.py}
 
 \anchor tui_edit_groups_anchor
 
 <br><h2>Adding an object to the group</h2>
-\include working_with_groups_ex02.py
-<a href="../../examples/GEOM/working_with_groups_ex02.py">Download this script</a>
+\tui_script{working_with_groups_ex02.py}
 
 <br><h2>Removing an object from the group</h2>
-\include working_with_groups_ex03.py
-<a href="../../examples/GEOM/working_with_groups_ex03.py">Download this script</a>
+\tui_script{working_with_groups_ex03.py}
 
 <br>
 \anchor tui_union_groups_anchor
 <h2>Union Groups</h2>
-\include working_with_groups_ex04.py
-<a href="../../examples/GEOM/working_with_groups_ex04.py">Download this script</a>
+\tui_script{working_with_groups_ex04.py}
 
 <br>
 \anchor tui_intersect_groups_anchor
 <h2>Intersect Groups</h2>
-\include working_with_groups_ex05.py
-<a href="../../examples/GEOM/working_with_groups_ex05.py">Download this script</a>
+\tui_script{working_with_groups_ex05.py}
 
 <br>
 \anchor tui_cut_groups_anchor
 <h2>Cut Groups</h2>
-\include working_with_groups_ex06.py
-<a href="../../examples/GEOM/working_with_groups_ex06.py">Download this script</a>
+\tui_script{working_with_groups_ex06.py}
 
 */
index b7bcf45e20c1234da2a8a9ffadda47540e92c1a9..d16392a9f20d7c7bebdab9278de02e2691e80415 100644 (file)
@@ -1541,6 +1541,19 @@ module GEOM
                                              in GEOM_Object thePath,
                                              in GEOM_Object theVec);
 
+
+     /*!
+     *  \brief Make a thick solid from a surface shape (face or shell)
+     *  \param theObject Surface from which the thick solid is made
+     *  \param theThickness Value of the thickness
+     *  \return New GEOM_Object, containing the created pipe if isCopy = true
+     *          or the modified object if isCopy = false
+     */
+    GEOM_Object MakeThickening (in GEOM_Object theObject,
+                                in double theThickness,
+                                in boolean isCopy);
+
+    
     /*!
      *  \brief Build a middle path of a pipe-like shape.
      *
index 0dc9455d44b575b09a5c7e29172d2e09da504f8e..15f9a239655b7648d84dda3e3ac6e0b66491bf7e 100644 (file)
@@ -204,7 +204,7 @@ void DisplayGUI::EraseAll()
       SUIT_ViewManager* vman = vw->getViewManager();
       if ( vman->getType() == OCCViewer_Viewer::Type() || 
            vman->getType() == SVTK_Viewer::Type() ) {
-        GEOM_Displayer( appStudy ).EraseAll();
+        GEOM_Displayer( appStudy ).EraseAll(true);
       }
     }
   }
@@ -406,59 +406,29 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
 {
   SUIT_OverrideCursor();
 
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return;
+
   if ( !viewWindow ) 
-    viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
-  if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
-    SVTK_View* aView = ((SVTK_ViewWindow*)viewWindow)->getView();
-    aView->SetDisplayMode( mode );
-    GeometryGUI::Modified();
-  } 
-  else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
-    OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
-    Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
-
-    AIS_DisplayMode newmode;
-    switch (mode) {
-    case 0:
-      newmode = AIS_WireFrame;
-      break;
-    case 1:
-      newmode = AIS_Shaded;
-      break;
-    case 2:
-      newmode = AIS_DisplayMode( GEOM_AISShape::ShadingWithEdges );
-      break;
-    case 3:
-      newmode = AIS_DisplayMode( GEOM_AISShape::TexturedShape );
-      break;
-    default:
-      break;
-    }
+    viewWindow = app->desktop()->activeWindow();
 
-    AIS_ListOfInteractive List;
-    ic->DisplayedObjects( List );
-    AIS_ListOfInteractive List1;
-    ic->ObjectsInCollector( List1 );
-    List.Append( List1 );
-    
-    AIS_ListIteratorOfListOfInteractive ite( List );
-    while( ite.More() ) {
-      if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
-       Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
-        if(aSh->isTopLevel()) {
-           aSh->setPrevDisplayMode(Standard_Integer( newmode ));
-        }
-        else {
-          ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true );
-        }
-      }
-      ite.Next();
-    }
-      
-    ic->SetDisplayMode( newmode, Standard_False );
+  SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if ( !aStudy ) return;
+
+  GEOM_Displayer displayer( aStudy );
 
-    GeometryGUI::Modified();
+  int mgrId = viewWindow->getViewManager()->getGlobalId();
+
+  SALOME_ListIO anIOlst;
+  displayer.GetActiveView()->GetVisible( anIOlst );
+
+  for ( SALOME_ListIteratorOfListIO It( anIOlst ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    aStudy->setObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::DisplayMode ), mode );
+    displayer.Redisplay( io, false );
   }
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
 }
 
 //=====================================================================================
@@ -469,46 +439,31 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
 {
   SUIT_OverrideCursor();
 
+  SalomeApp_Application* app = getGeometryGUI()->getApp();
+  if ( !app ) return;
+
+  SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if ( !aStudy ) return;
+
   if ( !viewWindow ) 
-    viewWindow = getGeometryGUI()->getApp()->desktop()->activeWindow();
-  if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
-    viewWindow->setProperty( "VectorsMode", mode );
-    SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( viewWindow );
-    vtkActorCollection* allActors = vw->getRenderer()->GetActors();
-    allActors->InitTraversal();
-    while (vtkActor* actor = allActors->GetNextActor()) {
-      if (actor->GetVisibility()) { // only for visible actors
-        GEOM_Actor* aGeomActor = 0;
-        if ( actor->IsA( "GEOM_Actor" ) ) {
-          aGeomActor = GEOM_Actor::SafeDownCast( actor );
-          if ( aGeomActor )
-            aGeomActor->SetVectorMode( mode );
-        }
-      }
-    }
-    GeometryGUI::Modified();
-  }
-  else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
-    viewWindow->setProperty( "VectorsMode", mode );
-    OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
-    Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
-    AIS_ListOfInteractive List;
-    ic->DisplayedObjects( List );
-    AIS_ListOfInteractive List1;
-    ic->ObjectsInCollector( List1 );
-    List.Append( List1 );
-
-    AIS_ListIteratorOfListOfInteractive ite( List );
-    while( ite.More() ) {
-      if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) {
-        Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() );
-        aSh->SetDisplayVectors(mode);
-        ic->RecomputePrsOnly(ite.Value());
-      }
-      ite.Next();
-    }
-    GeometryGUI::Modified();
+    viewWindow = app->desktop()->activeWindow();
+
+  GEOM_Displayer displayer( aStudy );
+
+  viewWindow->setProperty( "VectorsMode", mode );
+
+  int aMgrId = viewWindow->getViewManager()->getGlobalId();
+
+  SALOME_ListIO anIOlst;
+  displayer.GetActiveView()->GetVisible( anIOlst );
+
+  for ( SALOME_ListIteratorOfListIO It( anIOlst ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    aStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::EdgesDirection ), mode );
+    displayer.Redisplay( io, false );
   }
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
 }
 
 //=====================================================================================
@@ -538,103 +493,34 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
   if ( !aSelMgr ) return;
 
-  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
-  
-  if(!aStudy)
-    return;
+  SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if ( !aStudy ) return;
 
   SUIT_OverrideCursor();
 
-  SALOME_ListIO aList;
+  SALOME_ListIO selected;
+  aSelMgr->selectedObjects( selected );
+  if ( selected.IsEmpty() ) return;
 
-  if ( viewWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
-    SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>( viewWindow );
-    SVTK_View* aView = vw->getView();
-    int mgrId = viewWindow->getViewManager()->getGlobalId();
-    bool vectorMode = false;
-
-    aSelMgr->selectedObjects( aList );
-    SALOME_ListIteratorOfListIO It( aList );
-
-    for( ;It.More(); It.Next() ) {
-      SVTK_Viewer* stvkViewer = dynamic_cast<SVTK_Viewer*>(vw->getViewManager()->getViewModel());
-      SVTK_Prs* vtkPrs =
-        stvkViewer ? dynamic_cast<SVTK_Prs*>( stvkViewer->CreatePrs( It.Value()->getEntry() ) ) : 0;
-      if ( vtkPrs && !vtkPrs->IsNull() ) {
-       if (mode == 0 )
-          aView->ChangeRepresentationToWireframe( vtkPrs->GetObjects() );
-       else if ( mode == 1 )
-          aView->ChangeRepresentationToSurface( vtkPrs->GetObjects() );
-       else if ( mode == 2 )
-         aView->ChangeRepresentationToSurfaceWithEdges( vtkPrs->GetObjects() );
-       else if ( mode == 4 ) {
-          vtkActorCollection* anActors = vtkPrs->GetObjects();
-          anActors->InitTraversal();
-          while (vtkActor* anAct = anActors->GetNextActor()) {
-            GEOM_Actor* aGeomActor = GEOM_Actor::SafeDownCast(anAct);
-            vectorMode = !aGeomActor->GetVectorMode();
-            aGeomActor->SetVectorMode(vectorMode);
-          }
-        }
-       if(mode == 0 || mode == 1 || mode == 2) {
-         aStudy->setObjectProperty(mgrId,It.Value()->getEntry(),GEOM::propertyName( GEOM::DisplayMode ), mode);
-       }
-       else if (mode == 4) {
-         aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),GEOM::propertyName( GEOM::EdgesDirection ), vectorMode);      
-       }
-      }
+  GEOM_Displayer displayer( aStudy );
+
+  int mgrId = viewWindow->getViewManager()->getGlobalId();
+
+  QVariant v = aStudy->getObjectProperty( mgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::EdgesDirection ), QVariant() );
+  bool vectorMode =  v.isValid() ? !v.toBool() : false;
+
+  for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    if ( mode == 0 || mode == 1 || mode == 2 || mode == 3 ) {
+      aStudy->setObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::DisplayMode ), mode );
     }
-    aView->Repaint();
-    GeometryGUI::Modified();
-  }
-  else if ( viewWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
-    OCCViewer_Viewer* v3d = ((OCCViewer_ViewManager*)(viewWindow->getViewManager()))->getOCCViewer();
-    Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
-
-    aSelMgr->selectedObjects( aList );
-    SALOME_ListIteratorOfListIO It( aList );
-    int mgrId = viewWindow->getViewManager()->getGlobalId();
-    bool vectorMode = 0;
-
-    for( ;It.More(); It.Next() ) {
-      SOCC_Viewer* soccViewer = (SOCC_Viewer*)(viewWindow->getViewManager()->getViewModel());
-      SOCC_Prs* occPrs = dynamic_cast<SOCC_Prs*>( soccViewer->CreatePrs( It.Value()->getEntry() ) );
-      if ( occPrs && !occPrs->IsNull() ) {
-        AIS_ListOfInteractive shapes; occPrs->GetObjects( shapes );
-        AIS_ListIteratorOfListOfInteractive interIter( shapes );
-        for ( ; interIter.More(); interIter.Next() ) {
-          Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( interIter.Value() );
-          if ( !aSh.IsNull() ) {
-            if(!aSh->isTopLevel()) {
-                   if ( mode == 0 )
-                ic->SetDisplayMode( interIter.Value(), AIS_WireFrame, false );
-                   else if ( mode == 1 )
-                ic->SetDisplayMode( interIter.Value(), AIS_Shaded, false );
-                   else if ( mode == 2 )
-                     ic->SetDisplayMode( interIter.Value(), GEOM_AISShape::ShadingWithEdges, false );
-                   else if ( mode == 3 )
-                ic->SetDisplayMode( interIter.Value(), AIS_ExactHLR, false );
-            } else {
-              aSh->setPrevDisplayMode(mode);
-            }
-               if (mode == 4 ) {           
-              vectorMode = !aSh->isShowVectors();      
-              aSh->SetDisplayVectors(vectorMode);
-              ic->RecomputePrsOnly(interIter.Value());
-            }
-          }
-        }
-       if(mode == 0 || mode == 1 || mode == 2 || mode == 3) {
-         aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),GEOM::propertyName( GEOM::DisplayMode ), mode);
-       }
-       else if (mode == 4) {
-         aStudy->setObjectProperty(mgrId, It.Value()->getEntry(),GEOM::propertyName( GEOM::EdgesDirection ), vectorMode);
-       }
-      }
+    else if ( mode == 4 ) {
+      aStudy->setObjectProperty( mgrId, io->getEntry(), GEOM::propertyName( GEOM::EdgesDirection ), vectorMode );
     }
-    ic->UpdateCurrentViewer();
-    GeometryGUI::Modified();
+    displayer.Redisplay( io, false );
   }
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
 }
 
 //=====================================================================================
index a7a551f602bb42750e1b5d7d06ecf46d8b9f64ae..80e6c0c5a57d95e4053a531e5f8dcc067c83baca 100644 (file)
 
 #include "DlgRef.h"
 
+//////////////////////////////////////////
+// DlgRef_1Check1Spin1Check
+//////////////////////////////////////////
+
+DlgRef_1Check1Spin1Check::DlgRef_1Check1Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Check1Spin1Check::~DlgRef_1Check1Spin1Check()
+{
+}
+
 //////////////////////////////////////////
 // DlgRef_1List1Spin1Btn
 //////////////////////////////////////////
index b727e96ec7df28617ed3485ef74146f3629b9ceb..6bda154344f53150720971414316aa4bd22f2c03 100644 (file)
 #  define DLGREF_EXPORT
 #endif
 
+//////////////////////////////////////////
+// DlgRef_1Check1Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Check1Spin1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Check1Spin1Check : public QWidget, 
+                                            public Ui::DlgRef_1Check1Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Check1Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Check1Spin1Check();
+};
+
+
 //////////////////////////////////////////
 // DlgRef_1List1Spin1Btn
 //////////////////////////////////////////
diff --git a/src/DlgRef/DlgRef_1Check1Spin1Check_QTD.ui b/src/DlgRef/DlgRef_1Check1Spin1Check_QTD.ui
new file mode 100644 (file)
index 0000000..d4dc954
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DlgRef_1Check1Spin1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Check1Spin1Check_QTD">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>165</width>
+    <height>94</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <layout class="QGridLayout">
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <property name="spacing">
+    <number>0</number>
+   </property>
+   <item row="0" column="0">
+    <widget class="QGroupBox" name="GroupBox1">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QGridLayout" name="gridLayout">
+      <property name="spacing">
+       <number>6</number>
+      </property>
+      <item row="0" column="0" colspan="2">
+       <widget class="QCheckBox" name="checkButton1">
+        <property name="text">
+         <string>CheckBox</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QCheckBox" name="checkButton2">
+        <property name="text">
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>TL1</string>
+        </property>
+        <property name="wordWrap">
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1">
+       <widget class="SalomeApp_DoubleSpinBox" name="SpinBox_DX"/>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+  <customwidget>
+   <class>SalomeApp_DoubleSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header location="global">SalomeApp_DoubleSpinBox.h</header>
+  </customwidget>
+ </customwidgets>
+ <tabstops>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>checkButton2</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
index 6816361661a5041f3b4c2306e885d10a380af3b8..774ba9b8d25f21e849a6b06491f8b44c45a40ddc 100644 (file)
@@ -34,6 +34,7 @@ MOC_FILES =                   \
        DlgRef_moc.cxx
 
 UIC_FILES =                                    \
+       ui_DlgRef_1Check1Spin1Check_QTD.h       \
        ui_DlgRef_1List1Spin1Btn_QTD.h          \
        ui_DlgRef_1Sel1Check1List_QTD.h         \
        ui_DlgRef_1Sel1Check1Sel_QTD.h          \
index 0e13b280ebb307c22435f9c8d651e3f78dedcf80..fb56bdeaf74d30c72f398f3720dd8c3242da88ed 100644 (file)
@@ -728,13 +728,7 @@ void GEOMBase::ShowErrorMessage( const QString& errorCode, const QString& commen
 //=======================================================================
 GEOM::GEOM_Object_ptr GEOMBase::GetObjectFromIOR( const QString& IOR )
 {
-  GEOM::GEOM_Object_var geomObj;
-  if ( !IOR.isEmpty() ) {
-    CORBA::Object_var corbaObj = SalomeApp_Application::orb()->string_to_object( IOR.toLatin1().constData() );
-    if ( !CORBA::is_nil( corbaObj ) )
-      geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
-  }
-  return geomObj._retn();
+  return GeometryGUI::GetObjectFromIOR (IOR);
 }
 
 //=======================================================================
@@ -743,12 +737,7 @@ GEOM::GEOM_Object_ptr GEOMBase::GetObjectFromIOR( const QString& IOR )
 //=======================================================================
 QString GEOMBase::GetIORFromObject( GEOM::GEOM_Object_ptr object )
 {
-  QString IOR;
-  if ( !CORBA::is_nil( object ) ) {
-    CORBA::String_var anIOR = SalomeApp_Application::orb()->object_to_string( object );
-    IOR = anIOR.in();
-  }
-  return IOR;
+  return GeometryGUI::GetIORFromObject (object);
 }
 
 //=======================================================================
index 4a051722cdd3f4bb54b8bf3aec070b96805e9749..4d3358874de7b827eecb02e44e08da73820e2f68 100755 (executable)
@@ -676,30 +676,7 @@ GEOM_Displayer* GEOMBase_Helper::getDisplayer()
 //================================================================
 void GEOMBase_Helper::clearShapeBuffer( GEOM::GEOM_Object_ptr theObj )
 {
-  if ( CORBA::is_nil( theObj ) )
-    return;
-
-  CORBA::String_var IOR = SalomeApp_Application::orb()->object_to_string( theObj );
-  TCollection_AsciiString asciiIOR( (char *)IOR.in() );
-  GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
-
-  if ( !getStudy() || !getStudy()->studyDS() )
-    return;
-
-  _PTR(Study) aStudy = getStudy()->studyDS();
-  _PTR(SObject) aSObj ( aStudy->FindObjectIOR( std::string( IOR ) ) );
-  if ( !aSObj )
-    return;
-
-  _PTR(ChildIterator) anIt ( aStudy->NewChildIterator( aSObj ) );
-  for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) {
-    _PTR(GenericAttribute) anAttr;
-    if ( anIt->Value()->FindAttribute(anAttr, "AttributeIOR") ) {
-      _PTR(AttributeIOR) anIOR ( anAttr );
-      TCollection_AsciiString asciiIOR( (char*)anIOR->Value().c_str() );
-      GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
-    }
-  }
+  GeometryGUI::ClearShapeBuffer(theObj);
 }
 
 //================================================================
index dfe43b5737291c12b3ade4320de77090f49fcf22..87d23adbeb983fd4c7a3f55473b41b78fc0dc2a9 100644 (file)
@@ -1080,12 +1080,20 @@ Please, select face, shell or solid and try again</translation>
     </message>
     <message>
         <source>GEOM_MINDIST_NO_SOL</source>
-        <translation>No solution found</translation>
+        <translation type="unfinished">No solution found</translation>
     </message>
     <message>
         <source>GEOM_MINDIST_OBJ</source>
         <translation>Objects And Results</translation>
     </message>
+    <message>
+        <source>GEOM_MINDIST_PUBLISH_TITLE</source>
+        <translation type="unfinished">Multiple solutions found</translation>
+    </message>
+    <message>
+        <source>GEOM_MINDIST_PUBLISH_TEXT</source>
+        <translation type="unfinished">Do you want to publish in the study all found solutions? If No, only the currently selected solution will be published.</translation>
+    </message>
     <message>
         <source>GEOM_MINDIST_TITLE</source>
         <translation>Minimun Distance Between Two Objects</translation>
index 81418e0c8362a0da69003347c3ebf6b54b240b9e..d07b791f53cd232ffc3565bad00f547e74201e36 100644 (file)
@@ -1070,10 +1070,26 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
         <source>GEOM_MIN</source>
         <translation>Min :</translation>
     </message>
+    <message>
+        <source>GEOM_MINDIST_NAME</source>
+        <translation type="unfinished">MinDist</translation>
+    </message>
+    <message>
+        <source>GEOM_MINDIST_NO_SOL</source>
+        <translation type="unfinished">No solution found</translation>
+    </message>
     <message>
         <source>GEOM_MINDIST_OBJ</source>
         <translation>Objets et résultats</translation>
     </message>
+    <message>
+        <source>GEOM_MINDIST_PUBLISH_TITLE</source>
+        <translation type="unfinished">Multiple solutions found</translation>
+    </message>
+    <message>
+        <source>GEOM_MINDIST_PUBLISH_TEXT</source>
+        <translation type="unfinished">Do you want to publish in the study all found solutions? If No, only the currently selected solution will be published.</translation>
+    </message>
     <message>
         <source>GEOM_MINDIST_TITLE</source>
         <translation>Distance minimale entre deux objets</translation>
index 10c4d4ec6202dedcc73acd1e055c6bce4ccd6792..ddc668c97ac559d92666432b246267ddb9fbd6aa 100644 (file)
@@ -2326,6 +2326,118 @@ QAction* GeometryGUI::getAction(const int id) {
   return action(id);
 }
 
+/*!
+  \brief GEOM module message handler
+
+  This method can be re-implemented in the subclasses.
+  This is a GEOM module message handler.
+
+  \param msg the message received.
+*/
+void GeometryGUI::message(const QString& msg)
+{
+  // dispatch message
+  QStringList data = msg.split("/");
+  const int nbStrings = data.count();
+
+  if (nbStrings > 0) {
+    if (data[0] == "modified") {
+      // get mesh entry
+      QString anIOR = nbStrings > 1 ? data[1] : QString();
+
+      if ( anIOR.isEmpty() ) {
+        return;
+      }
+
+      // Get the geom object.
+      GEOM::GEOM_Object_ptr anObj = GeometryGUI::GetObjectFromIOR (anIOR);
+
+      // Clear the shape buffer
+      GeometryGUI::ClearShapeBuffer (anObj);
+    }
+  }
+}
+
+/*!
+  \brief Clears the shape buffer.
+
+  This is a static method. It clears the shape buffer.
+
+  \param theObj the object
+*/
+void GeometryGUI::ClearShapeBuffer( GEOM::GEOM_Object_ptr theObj )
+{
+  if ( CORBA::is_nil( theObj ) )
+    return;
+
+  CORBA::String_var IOR = SalomeApp_Application::orb()->object_to_string( theObj );
+  TCollection_AsciiString asciiIOR( (char *)IOR.in() );
+  GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
+
+  SALOMEDSClient_StudyManager *aManager = SalomeApp_Application::studyMgr();
+
+  if (!aManager)
+    return;
+
+  _PTR(Study) aStudy = aManager->GetStudyByID(theObj->GetStudyID());
+
+  if ( !aStudy )
+    return;
+
+  _PTR(SObject) aSObj ( aStudy->FindObjectIOR( std::string( IOR ) ) );
+  if ( !aSObj )
+    return;
+
+  _PTR(ChildIterator) anIt ( aStudy->NewChildIterator( aSObj ) );
+  for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) {
+    _PTR(GenericAttribute) anAttr;
+    if ( anIt->Value()->FindAttribute(anAttr, "AttributeIOR") ) {
+      _PTR(AttributeIOR) anIOR ( anAttr );
+      TCollection_AsciiString asciiIOR( (char*)anIOR->Value().c_str() );
+      GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
+    }
+  }
+}
+
+/*!
+  \brief Returns the object from IOR.
+
+  This is a static method. It returns the object from its IOR.
+
+  \param IOR object IOR
+  \return GEOM object.
+*/
+GEOM::GEOM_Object_ptr GeometryGUI::GetObjectFromIOR( const QString& IOR )
+{
+  GEOM::GEOM_Object_var geomObj;
+  if ( !IOR.isEmpty() ) {
+    CORBA::Object_var corbaObj = SalomeApp_Application::orb()->string_to_object
+      ( IOR.toLatin1().constData() );
+    if ( !CORBA::is_nil( corbaObj ) )
+      geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
+  }
+  return geomObj._retn();
+}
+
+/*!
+  \brief Returns IOR of the object.
+
+  This is a static method. It returns the object's IOR.
+
+  \param object the GEOM object.
+  \return object's IOR.
+*/
+QString GeometryGUI::GetIORFromObject( GEOM::GEOM_Object_ptr object )
+{
+  QString IOR;
+  if ( !CORBA::is_nil( object ) ) {
+    CORBA::String_var anIOR =
+      SalomeApp_Application::orb()->object_to_string( object );
+    IOR = anIOR.in();
+  }
+  return IOR;
+}
+
 /*!
   \brief Check if this object is can't be renamed in place
 
index 9bf6e6326141ccc4e9b63f93e4acdfc4966ed590..34c19c6b220581c53b806e185bad4bf3423b17da 100644 (file)
@@ -135,6 +135,14 @@ public:
 
   QAction*                    getAction(const int id);
 
+  virtual void                message( const QString& msg);
+  static void                 ClearShapeBuffer( GEOM::GEOM_Object_ptr );
+  static GEOM::GEOM_Object_ptr
+                              GetObjectFromIOR( const QString& IOR );
+
+  static QString              GetIORFromObject( GEOM::GEOM_Object_ptr object );
+
+
 public slots:
   virtual bool                deactivateModule( SUIT_Study* );
   virtual bool                activateModule( SUIT_Study* );
index ffe04f377e03d8c04d02229c746222a4215bc4c3..2698619b1eb410d30de462255c7c66438c08c1f2 100644 (file)
@@ -53,6 +53,7 @@
 #include <GEOMImpl_ShapeDriver.hxx>
 #include <GEOMImpl_FillingDriver.hxx>
 #include <GEOMImpl_ThruSectionsDriver.hxx>
+#include <GEOMImpl_OffsetDriver.hxx>
 
 #include <GEOMImpl_IBox.hxx>
 #include <GEOMImpl_IFace.hxx>
@@ -69,6 +70,7 @@
 #include <GEOMImpl_IPipeDiffSect.hxx>
 #include <GEOMImpl_IPipeShellSect.hxx>
 #include <GEOMImpl_IPipeBiNormal.hxx>
+#include <GEOMImpl_IOffset.hxx>
 #include <GEOMImpl_IPipePath.hxx>
 
 #include <Precision.hxx>
@@ -1489,7 +1491,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle (Handle(
   //Make a Python command
   GEOM::TPythonDump(aFunction) << aRevolution << " = geompy.MakeRevolution("
     << theBase << ", " << theAxis << ", " << theAngle * 180.0 / M_PI << "*math.pi/180.0)";
-
+  
   SetErrorCode(OK);
   return aRevolution;
 }
@@ -2237,6 +2239,76 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeBiNormalAlongVector (Han
   return aPipe;
 }
 
+//=============================================================================
+/*!
+ *  MakeThickening
+ */
+//=============================================================================
+Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThickening(Handle(GEOM_Object) theObject,
+                                                              double theOffset,
+                                                              bool copy = true)
+{
+  SetErrorCode(KO);
+
+  if (theObject.IsNull()) return NULL;
+
+  Handle(GEOM_Function) anOriginal = theObject->GetLastFunction();
+  if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be offset
+
+  //Add a new Offset function
+  Handle(GEOM_Function) aFunction;
+  Handle(GEOM_Object) aCopy; 
+  if (copy)
+  { 
+    //Add a new Copy object
+    aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+    aFunction = aCopy->AddFunction(GEOMImpl_OffsetDriver::GetID(), OFFSET_THICKENING_COPY);
+  }
+  else
+    aFunction = theObject->AddFunction(GEOMImpl_OffsetDriver::GetID(), OFFSET_THICKENING);
+  
+  if (aFunction.IsNull()) return NULL;
+
+  //Check if the function is set correctly
+  if (aFunction->GetDriverGUID() != GEOMImpl_OffsetDriver::GetID()) return NULL;
+
+  GEOMImpl_IOffset aTI (aFunction);
+  aTI.SetShape(anOriginal);
+  aTI.SetValue(theOffset);
+
+  //Compute the offset
+  try {
+#if OCC_VERSION_LARGE > 0x06010000
+    OCC_CATCH_SIGNALS;
+#endif
+    if (!GetSolver()->ComputeFunction(aFunction)) {
+      SetErrorCode("Offset driver failed");
+      return NULL;
+    }
+  }
+  catch (Standard_Failure) {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+    return NULL;
+  }
+
+  //Make a Python command
+  if(copy)
+  {
+    GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeThickSolid("
+                               << theObject << ", " << theOffset << ")";
+    SetErrorCode(OK);
+    return aCopy;
+  }
+  else
+  {
+    GEOM::TPythonDump(aFunction) << "geompy.Thicken("
+                               << theObject << ", " << theOffset << ")";
+    SetErrorCode(OK);
+    return theObject;
+  }
+}
+
 //=============================================================================
 /*!
  *  RestorePath
index 6cd2dd25db152fc1a0da69e8b9928b8b43536c06..3ce36cd271094787ef0bd2877523a45899f6fad3 100644 (file)
@@ -68,7 +68,8 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
 
   Standard_EXPORT Handle(GEOM_Object) MakePrismVecH (Handle(GEOM_Object) theBase,
                                                      Handle(GEOM_Object) theVec,
-                                                     double theH, double theScaleFactor = -1.0);
+                                                     double theH, 
+                                                     double theScaleFactor = -1.0);
 
   Standard_EXPORT Handle(GEOM_Object) MakePrismVecH2Ways (Handle(GEOM_Object) theBase,
                                                           Handle(GEOM_Object) theVec, double theH);
@@ -137,6 +138,10 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
   Standard_EXPORT Handle(GEOM_Object) MakePipeBiNormalAlongVector (Handle(GEOM_Object) theBase,
                                                                    Handle(GEOM_Object) thePath,
                                                                    Handle(GEOM_Object) theVec);
+  
+  Standard_EXPORT Handle(GEOM_Object) MakeThickening (Handle(GEOM_Object) theObject, 
+                                                      double theOffset,
+                                                      bool isCopy);
 
   Standard_EXPORT Handle(GEOM_Object) RestorePath (Handle(GEOM_Object) theShape,
                                                    Handle(GEOM_Object) theBase1,
index dc47e1f0e5e0581cc7803a5ff45175fbeb2f23e6..78a0548e86cca2dacb274cd84ede7f0e84b3785c 100644 (file)
@@ -80,6 +80,12 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::CreateGroup
 {
   SetErrorCode(KO);
 
+  if ( theShapeType != TopAbs_VERTEX && theShapeType != TopAbs_EDGE &&
+       theShapeType != TopAbs_FACE && theShapeType != TopAbs_SOLID ) {
+    SetErrorCode( "Error: You could create group only next type: vertex, edge, face or solid" );
+    return NULL;
+  }
+
   Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1);
   anArray->SetValue(1, -1);
 
@@ -113,6 +119,11 @@ void GEOMImpl_IGroupOperations::AddObject(Handle(GEOM_Object) theGroup, int theS
   SetErrorCode(KO);
   if(theGroup.IsNull()) return;
 
+  if ( theGroup->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return;
+  }
+
   Handle(GEOM_Function) aFunction = theGroup->GetLastFunction();
   if(aFunction.IsNull()) return;
 
@@ -129,6 +140,13 @@ void GEOMImpl_IGroupOperations::AddObject(Handle(GEOM_Object) theGroup, int theS
   TopTools_IndexedMapOfShape aMapOfShapes;
   TopExp::MapShapes(aMainShape, aMapOfShapes);
 
+  TopAbs_ShapeEnum aGroupType = GetType(theGroup);
+  TopAbs_ShapeEnum aShapeType = aMapOfShapes.FindKey(theSubShapeID).ShapeType();
+  if ( aGroupType != aShapeType ) {
+    SetErrorCode( "Error: You could perform this operation only with object the same type as the type of group." );
+    return;
+  }
+
   if (theSubShapeID < 1 || aMapOfShapes.Extent() < theSubShapeID) {
     SetErrorCode("Invalid sub-shape index: out of range");
     return;
@@ -184,6 +202,11 @@ void GEOMImpl_IGroupOperations::RemoveObject (Handle(GEOM_Object) theGroup, int
   SetErrorCode(KO);
   if(theGroup.IsNull()) return;
 
+  if ( theGroup->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return;
+  }
+
   Handle(GEOM_Function) aFunction = theGroup->GetLastFunction();
   if(aFunction.IsNull()) return;
 
@@ -263,6 +286,11 @@ void GEOMImpl_IGroupOperations::UnionList (Handle(GEOM_Object) theGroup,
   SetErrorCode(KO);
   if (theGroup.IsNull()) return;
 
+  if ( theGroup->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return;
+  }
+
   Standard_Integer aLen = theSubShapes->Length();
   if (aLen < 1) {
     //SetErrorCode("The list is empty");
@@ -413,6 +441,11 @@ void GEOMImpl_IGroupOperations::DifferenceList (Handle(GEOM_Object) theGroup,
   SetErrorCode(KO);
   if (theGroup.IsNull()) return;
 
+  if ( theGroup->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return;
+  }
+
   Standard_Integer aLen = theSubShapes->Length();
   if (aLen < 1) {
     //SetErrorCode("The list is empty");
@@ -558,6 +591,11 @@ void GEOMImpl_IGroupOperations::UnionIDs (Handle(GEOM_Object) theGroup,
   SetErrorCode(KO);
   if (theGroup.IsNull()) return;
 
+  if ( theGroup->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return;
+  }
+
   Standard_Integer aLen = theSubShapes->Length();
   if (aLen < 1) {
     //SetErrorCode("The list is empty");
@@ -657,6 +695,11 @@ void GEOMImpl_IGroupOperations::DifferenceIDs (Handle(GEOM_Object) theGroup,
   SetErrorCode(KO);
   if (theGroup.IsNull()) return;
 
+  if ( theGroup->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return;
+  }
+
   Standard_Integer aLen = theSubShapes->Length();
   if (aLen < 1) {
     //SetErrorCode("The list is empty");
@@ -760,6 +803,11 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::UnionGroups (Handle(GEOM_Object)
   SetErrorCode(KO);
   if (theGroup1.IsNull() || theGroup2.IsNull()) return NULL;
 
+  if ( theGroup1->GetType() != GEOM_GROUP || theGroup2->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return NULL;
+  }
+
   // Get group type
   TopAbs_ShapeEnum aType1 = GetType(theGroup1);
   TopAbs_ShapeEnum aType2 = GetType(theGroup2);
@@ -866,6 +914,11 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::IntersectGroups (Handle(GEOM_Obje
   SetErrorCode(KO);
   if (theGroup1.IsNull() || theGroup2.IsNull()) return NULL;
 
+  if ( theGroup1->GetType() != GEOM_GROUP || theGroup2->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return NULL;
+  }
+
   // Get group type
   TopAbs_ShapeEnum aType1 = GetType(theGroup1);
   TopAbs_ShapeEnum aType2 = GetType(theGroup2);
@@ -972,6 +1025,11 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::CutGroups (Handle(GEOM_Object) th
   SetErrorCode(KO);
   if (theGroup1.IsNull() || theGroup2.IsNull()) return NULL;
 
+  if ( theGroup1->GetType() != GEOM_GROUP || theGroup2->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return NULL;
+  }
+
   // Get group type
   TopAbs_ShapeEnum aType1 = GetType(theGroup1);
   TopAbs_ShapeEnum aType2 = GetType(theGroup2);
@@ -1092,7 +1150,10 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::UnionListOfGroups
   // Iterate on the initial groups
   for (i = 1; i <= aLen; i++) {
     Handle(GEOM_Object) aGr_i = Handle(GEOM_Object)::DownCast(theGList->Value(i));
-
+    if ( aGr_i->GetType() != GEOM_GROUP ) {
+         SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+         return NULL;
+    }
     // Get group type
     aType_i = GetType(aGr_i);
     if (i == 1)
@@ -1204,7 +1265,10 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::IntersectListOfGroups
   // Iterate on the initial groups
   for (i = 1; i <= aLen; i++) {
     Handle(GEOM_Object) aGr_i = Handle(GEOM_Object)::DownCast(theGList->Value(i));
-
+    if ( aGr_i->GetType() != GEOM_GROUP ) {
+      SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+      return NULL;
+    }
     // Get group type
     aType_i = GetType(aGr_i);
     if (i == 1)
@@ -1342,7 +1406,10 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::CutListOfGroups
   // 1. Collect indices to be excluded (from theGList2) into the mapIDs
   for (i = 1; i <= aLen2; i++) {
     Handle(GEOM_Object) aGr_i = Handle(GEOM_Object)::DownCast(theGList2->Value(i));
-
+    if ( aGr_i->GetType() != GEOM_GROUP ) {
+      SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+      return NULL;
+    }
     // Get group type
     aType_i = GetType(aGr_i);
     if (i == 1)
@@ -1393,7 +1460,10 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::CutListOfGroups
   // 2. Collect indices from theGList1, avoiding indices from theGList2 (mapIDs)
   for (i = 1; i <= aLen1; i++) {
     Handle(GEOM_Object) aGr_i = Handle(GEOM_Object)::DownCast(theGList1->Value(i));
-
+    if ( aGr_i->GetType() != GEOM_GROUP ) {
+      SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+      return NULL;
+    }
     // Get group type
     aType_i = GetType(aGr_i);
     if (i == 1 && aLen2 < 1)
@@ -1513,7 +1583,10 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::GetMainShape (Handle(GEOM_Object)
   SetErrorCode(KO);
 
   if(theGroup.IsNull()) return NULL;
-
+  if ( theGroup->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return NULL;
+  }
   Handle(GEOM_Function) aGroupFunction = theGroup->GetFunction(1);
   if (aGroupFunction.IsNull()) return NULL;
 
@@ -1543,7 +1616,10 @@ Handle(TColStd_HArray1OfInteger) GEOMImpl_IGroupOperations::GetObjects(Handle(GE
   SetErrorCode(KO);
 
   if(theGroup.IsNull()) return NULL;
-
+  if ( theGroup->GetType() != GEOM_GROUP ) {
+    SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+    return NULL;
+  }
   Handle(GEOM_Function) aFunction = theGroup->GetLastFunction();
   if(aFunction.IsNull()) return NULL;
 
index 7bcf8af96c2cae7fa85e731196b796066d21b802..63d94554952a27ab92c8f12a501d892e47509664 100644 (file)
@@ -77,20 +77,20 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const
   Standard_Integer aType = aFunction->GetType();
 
   TopoDS_Shape aShape;
-
-  if (aType == OFFSET_SHAPE || aType == OFFSET_SHAPE_COPY) {
-    Handle(GEOM_Function) aRefShape = aCI.GetShape();
-    TopoDS_Shape aShapeBase = aRefShape->GetValue();
-    Standard_Real anOffset = aCI.GetValue();
-    Standard_Real aTol = Precision::Confusion();
-
-    if (Abs(anOffset) < aTol) {
+  
+  Handle(GEOM_Function) aRefShape = aCI.GetShape();
+  TopoDS_Shape aShapeBase = aRefShape->GetValue();
+  Standard_Real anOffset = aCI.GetValue();
+  Standard_Real aTol = Precision::Confusion();
+  
+  if (Abs(anOffset) < aTol) {
       TCollection_AsciiString aMsg ("Absolute value of offset can not be less than the tolerance value (");
       aMsg += TCollection_AsciiString(aTol);
       aMsg += ")";
       StdFail_NotDone::Raise(aMsg.ToCString());
-    }
+  }
 
+  if (aType == OFFSET_SHAPE || aType == OFFSET_SHAPE_COPY) {  
     BRepOffsetAPI_MakeOffsetShape MO (aShapeBase,
                                       aCI.GetValue(),
                                       aTol);
@@ -114,7 +114,17 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const
     else {
       StdFail_NotDone::Raise("Offset construction failed");
     }
-  } else {
+  } 
+  else if (aType == OFFSET_THICKENING || aType == OFFSET_THICKENING_COPY)
+  {
+    BRepOffset_MakeOffset myOffsetShape(aShapeBase, anOffset, aTol, BRepOffset_Skin,
+                                        Standard_False, Standard_False, GeomAbs_Intersection, Standard_True);
+  
+    if (!myOffsetShape.IsDone())
+    {
+      StdFail_NotDone::Raise("Thickening construction failed");
+    }
+    aShape = myOffsetShape.Shape();
   }
 
   if (aShape.IsNull()) return 0;
index 9812da16af8b6518df08ad6fb722c75c6fe71e5c..c03d62d5c39a3ea25fc491a0cae09d40fc18cab8 100644 (file)
 
 #include "utilities.h"
 
-//////////////////////////////////////////////////////////////////////////
-// Uncomment below macro to perform gluing in the end of MakePipe operation
-// as fix of issue 0020207.
-//////////////////////////////////////////////////////////////////////////
-//#define GLUE_0020207
-
 
 //=======================================================================
 //function : GetID
@@ -2483,23 +2477,22 @@ Standard_Integer GEOMImpl_PipeDriver::Execute (TFunction_Logbook& log) const
       Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result");
   }
 
-  // Glue (for bug 0020207)
-  // No gluing is needed as the bug 0020207 is fixed in OCCT.
-#ifdef GLUE_0020207
-  TopExp_Explorer anExpV (aShape, TopAbs_VERTEX);
-  if (anExpV.More()) {
-    Standard_Real aVertMaxTol = -RealLast();
-    for (; anExpV.More(); anExpV.Next()) {
-      TopoDS_Vertex aVertex = TopoDS::Vertex(anExpV.Current());
-      Standard_Real aTol = BRep_Tool::Tolerance(aVertex);
-      if (aTol > aVertMaxTol)
-        aVertMaxTol = aTol;
-    }
-    aVertMaxTol += Precision::Confusion();
-    aShape = GEOMImpl_GlueDriver::GlueFaces(aShape, aVertMaxTol, Standard_True);
-    //aShape = GEOMImpl_GlueDriver::GlueFaces(aShape, Precision::Confusion(), Standard_True);
+  if (aType != PIPE_BASE_PATH &&
+      aType != PIPE_SHELLS_WITHOUT_PATH) {
+    TopExp_Explorer anExpV (aShape, TopAbs_VERTEX);
+    if (anExpV.More()) {
+      Standard_Real aVertMaxTol = -RealLast();
+      for (; anExpV.More(); anExpV.Next()) {
+        TopoDS_Vertex aVertex = TopoDS::Vertex(anExpV.Current());
+        Standard_Real aTol = BRep_Tool::Tolerance(aVertex);
+        if (aTol > aVertMaxTol)
+          aVertMaxTol = aTol;
+      }
+      aVertMaxTol += Precision::Confusion();
+      aShape = GEOMImpl_GlueDriver::GlueFaces(aShape, aVertMaxTol, Standard_True);
+      //aShape = GEOMImpl_GlueDriver::GlueFaces(aShape, Precision::Confusion(), Standard_True);
+    }
   }
-#endif
 
   TopoDS_Shape aRes = GEOMUtils::CompsolidToCompound(aShape);
   aFunction->SetValue(aRes);
index 0419dd16927b92d130efb41ebb15ceef64e9edc1..a1155892082e7ba95c995fa58af2fd0208a01220 100755 (executable)
 
 #define GEOM_PIPE_PATH 48
 
+#define GEOM_THICKENING 49
+
 //GEOM_Function types
 
 #define COPY_WITH_REF    1
 
 #define OFFSET_SHAPE      1
 #define OFFSET_SHAPE_COPY 2
+#define OFFSET_THICKENING 3
+#define OFFSET_THICKENING_COPY 4
 
 #define PROJECTION_COPY 1
 
index 6c04a9be5ffe36f4508925c5ca993517b48c1aef..6e7e2f9b4d52ee61aaaeded094f2a93095f3d9d4 100644 (file)
@@ -60,8 +60,6 @@ public:
 
   enum ActionType { SHOWDLG, INCR, DECR };
 
-  static void  SetColor( const QString&, const QColor&, bool );
-
 private:
   // Import and export topology methods
   bool         Import();
@@ -99,18 +97,6 @@ private:
                                          _PTR(Study),
                                          QList<SALOME_View*>,
                                          GEOM_Displayer* );
-
-  static void setVtkColor( SalomeApp_Study* study,
-                          int mgrId,
-                          SVTK_View* view,
-                          const Handle_SALOME_InteractiveObject& IO,
-                          const QColor& color );
-
-  static void setOccColor( SalomeApp_Study* study,
-                          int mgrId,
-                          const Handle_AIS_InteractiveContext& ic,
-                          const Handle_SALOME_InteractiveObject& IO,
-                          const QColor& color );
 };
 
 #endif // GEOMTOOLSGUI_H
index 268c101c1d9fba3d114a179d63c69f6add9ff774..1d87448c47bb1058d39ae5926830b17919b8a6f1 100644 (file)
@@ -131,40 +131,36 @@ void GEOMToolsGUI::OnCheckGeometry()
 
 void GEOMToolsGUI::OnAutoColor()
 {
-  SALOME_ListIO selected;
-  SalomeApp_Application* app =
-    dynamic_cast< SalomeApp_Application* >(SUIT_Session::session()->activeApplication());
-  if (!app)
-    return;
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  if ( !app ) return;
+
+  SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if ( !appStudy ) return;
 
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
-  if (!aSelMgr || !appStudy)
-    return;
+  if ( !aSelMgr ) return;
 
-  aSelMgr->selectedObjects(selected);
-  if (selected.IsEmpty())
-    return;
+  SALOME_ListIO selected;
+  aSelMgr->selectedObjects( selected );
+  if ( selected.IsEmpty() ) return;
 
   Handle(SALOME_InteractiveObject) anIObject = selected.First();
 
   _PTR(Study) aStudy = appStudy->studyDS();
   _PTR(SObject) aMainSObject(aStudy->FindObjectID(anIObject->getEntry()));
   GEOM::GEOM_Object_var aMainObject = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aMainSObject));
-  if (CORBA::is_nil(aMainObject))
-    return;
+  if (CORBA::is_nil(aMainObject)) return;
 
   aMainObject->SetAutoColor( true );
 
   QList<SALOMEDS::Color> aReservedColors;
 
-  GEOM_Displayer aDisp (appStudy);
+  GEOM_Displayer displayer ( appStudy );
 
-  SALOME_View* vf = aDisp.GetActiveView();
+  SALOME_View* window = displayer.GetActiveView();
+  if ( !window ) return;
 
-  SUIT_ViewWindow* window = app->desktop()->activeWindow();
-  bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-  bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
+  int aMgrId = dynamic_cast< SUIT_ViewModel* >( window )->getViewManager()->getGlobalId();
 
   for( _PTR(ChildIterator) it( aStudy->NewChildIterator( aMainSObject ) ); it->More(); it->Next() )
   {
@@ -185,76 +181,19 @@ void GEOMToolsGUI::OnAutoColor()
     aReservedColors.append( aColor );
 #endif                    // SIMPLE_AUTOCOLOR
     aChildObject->SetColor( aColor );
-
+  
     QColor c( (int)( aColor.R * 255.0 ), (int)( aColor.G * 255.0 ), (int)( aColor.B * 255.0 ) );
 
-    SALOME_Prs* aPrs = vf->CreatePrs( aChildSObject->GetID().c_str() );
-
-    if ( isVTK )
-    {
-      SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );
-      if ( !vtkVW )
-        return;
-      SVTK_View* aView = vtkVW->getView();
-      SUIT_OverrideCursor();
-      for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() )
-        aView->SetColor( It.Value(), c );
-    }
-    else if ( isOCC )
-    {
-      OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>( window->getViewManager()->getViewModel() );
-      Handle(AIS_InteractiveContext) ic = vm->getAISContext();
-
-      SOCC_Prs* anOCCPrs = dynamic_cast<SOCC_Prs*>( aPrs );
-      if( !anOCCPrs )
-        continue;
-
-      AIS_ListOfInteractive aList;
-      anOCCPrs->GetObjects( aList );
-      if( !aList.Extent() )
-        continue;
-
-      Handle(AIS_InteractiveObject) io = aList.First();
-      if( io.IsNull() )
-        continue;
-
-      Quantity_Color aQuanColor( c.red() / 255., c.green() / 255., c.blue() / 255., Quantity_TOC_RGB );
-
-      // Set color for a point
-      Handle(AIS_Drawer) aCurDrawer = io->Attributes();
-      Handle(Prs3d_PointAspect) aCurPointAspect = aCurDrawer->PointAspect();
-      Quantity_Color aCurColor;
-      Standard_Real aCurScale;
-      Aspect_TypeOfMarker aCurTypeOfMarker;
-      aCurPointAspect->Aspect()->Values( aCurColor, aCurTypeOfMarker, aCurScale );
-      if ( aCurTypeOfMarker != Aspect_TOM_USERDEFINED ) {
-        aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aCurTypeOfMarker, aQuanColor, aCurScale) );
-      }
-      else {
-        Standard_Integer aWidth, aHeight;
-        aCurPointAspect->GetTextureSize( aWidth, aHeight );
-
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
-        Handle(TColStd_HArray1OfByte) aTexture = aCurPointAspect->GetTexture();
-#else
-        Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture();
-#endif
-
-        aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aQuanColor, 1, aWidth, aHeight, aTexture ) );
-      }
-      ic->SetLocalAttributes( io, aCurDrawer );
-
-      io->SetColor( aQuanColor );
-      if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) ) {
-       Handle(GEOM_AISShape) aGAISShape = Handle(GEOM_AISShape)::DownCast( io );
-        aGAISShape->SetShadingColor( aQuanColor );
-       aGAISShape->storeBoundaryColors();
-      }
-
-      io->Redisplay( Standard_True );
-    }
+    SUIT_OverrideCursor();
+    
+    appStudy->setObjectProperty( aMgrId, aChildObject->GetEntry(), GEOM::propertyName( GEOM::Color ), c );
+    Handle( SALOME_InteractiveObject ) io = new SALOME_InteractiveObject( aChildObject->GetEntry(), "GEOM", "" );
+    if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
   }
+  displayer.UpdateViewer();
 
+  // update actions
+  appStudy->Modified();
   app->updateActions(); //SRN: To update a Save button in the toolbar
 }
 
@@ -285,282 +224,89 @@ void GEOMToolsGUI::OnDisableAutoColor()
   aMainObject->SetAutoColor( false );
 }
 
-void GEOMToolsGUI::SetColor( const QString& entry, const QColor& color, bool updateViewer )
+void GEOMToolsGUI::OnColor()
 {
-  if ( entry.isEmpty() || !color.isValid() ) return;
-
   // get active application
   SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   if ( !app ) return;
 
   // get current study
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+  SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
   if ( !appStudy ) return;
 
+  // get selection manager
+  LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
+  if ( !aSelMgr ) return;
+
+  // get selection
+  SALOME_ListIO selected;
+  aSelMgr->selectedObjects( selected );
+  if ( selected.IsEmpty() ) return;
+
+  GEOM_Displayer displayer( appStudy );
+
   // get active view
-  SUIT_ViewWindow* window = app->desktop()->activeWindow();
+  SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
-  
-  bool isOCC = window->getViewManager()->getType() == OCCViewer_Viewer::Type();
-  bool isVTK = window->getViewManager()->getType() == SVTK_Viewer::Type();
 
   // get view id
-  int mgrId = window->getViewManager()->getGlobalId();
+  int aMgrId = dynamic_cast< SUIT_ViewModel* >( window )->getViewManager()->getGlobalId();
 
-  Handle(SALOME_InteractiveObject) IO =
-    new SALOME_InteractiveObject( entry.toLatin1().data(), "GEOM", "");
+  QColor color;
+  QVariant v = appStudy->getObjectProperty( aMgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::Color ), color );
 
-  if ( isVTK ) {
-    SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );
-    if ( !vtkVW ) return;
-    SVTK_View* aView = vtkVW->getView();
+  // show Choose Color dialog box
+  color = QColorDialog::getColor( v.value<QColor>(), app->desktop() );
+  if ( !color.isValid() ) return;
 
-    GEOMToolsGUI::setVtkColor( appStudy, mgrId, aView, IO, color );
-    if ( updateViewer ) aView->Repaint();
-  }
-  else if ( isOCC ) {
-    OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*> ( window->getViewManager()->getViewModel() );
-    Handle (AIS_InteractiveContext) ic = vm->getAISContext();
-    GEOMToolsGUI::setOccColor( appStudy, mgrId, ic, IO, color ); 
-    if ( updateViewer ) ic->UpdateCurrentViewer();
+  // iterate through list of objects and assign new color
+  SUIT_OverrideCursor();
+  for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    appStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::Color ), color );
+    if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
   }
-
-  // mark study as modified
+  displayer.UpdateViewer();
   GeometryGUI::Modified();
-  
+
   // update actions
   app->updateActions(); //SRN: To update a Save button in the toolbar
 }
 
-void GEOMToolsGUI::OnColor()
+void GEOMToolsGUI::OnTexture()
 {
-  // get active application
   SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   if ( !app ) return;
 
-  // get current study
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+  SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
   if ( !appStudy ) return;
 
-  // get selection manager
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
   if ( !aSelMgr ) return;
 
-  // get selection
-  SALOME_ListIO selected;
+  SALOME_ListIO selected;  
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
-  
-  // get active view
-  SUIT_ViewWindow* window = app->desktop()->activeWindow();
-  bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-  bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
 
-  // get view id
-  int mgrId = window ? window->getViewManager()->getGlobalId() : -1;
-
-  if ( isVTK ) {
-    SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );
-    if ( !vtkVW ) return;
-
-    // get initial color (use first object from selection)
-    SVTK_View* aView = vtkVW->getView();
-    QColor color = aView->GetColor( selected.First()  );
-    QVariant v = appStudy->getObjectProperty( mgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::Color ), color );
+  GEOM_Displayer displayer( appStudy );
+  SALOME_View* window = displayer.GetActiveView();
+  if ( !window ) return;
 
-    // show Choose Color dialog box
-    color = QColorDialog::getColor( v.value<QColor>(), app->desktop() );
-    if ( !color.isValid() ) return;
+  int aMgrId = dynamic_cast< SUIT_ViewModel* >( window )->getViewManager()->getGlobalId();
 
-    // iterate through list of objects and assign new color
-    SUIT_OverrideCursor();
+  QString aTexture = QFileDialog::getOpenFileName( dynamic_cast< SUIT_ViewWindow* >( window ),tr("GEOM_SELECT_IMAGE"),QString(), tr("OCC_TEXTURE_FILES"));
+  if( !aTexture.isEmpty() ) {
+    displayer.SetTexture( aTexture.toStdString() );
     for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
-      GEOMToolsGUI::setVtkColor( appStudy, mgrId, aView, It.Value(), color ); 
+      Handle( SALOME_InteractiveObject ) io = It.Value();
+      appStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::DisplayMode ), 3 );
+      if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
     }
-    aView->Repaint();
   }
-  else if ( isOCC ) {
-    // find AIS interactive object (for first item in selection)
-    Handle(AIS_InteractiveObject) io = GEOMBase::GetAIS( selected.First() );
-    if ( io.IsNull() ) return;
-
-    // get initial color (use first object from selection)
-    Quantity_Color aColor;
-    io->Color( aColor ); 
-    QColor color = QColor((int)( aColor.Red()   * 255.0 ),
-                         (int)( aColor.Green() * 255.0 ),
-                         (int)( aColor.Blue()  * 255.0 ));
-    QVariant v = appStudy->getObjectProperty( mgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::Color ), color );
-
-    // show Choose Color dialog box
-    color = QColorDialog::getColor( v.value<QColor>(), app->desktop() );
-    if ( !color.isValid() ) return;
-
-    // iterate through list of objects and assign new color
-    SUIT_OverrideCursor();
-    OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*> ( window->getViewManager()->getViewModel() );
-    Handle (AIS_InteractiveContext) ic = vm->getAISContext();
-    for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
-      GEOMToolsGUI::setOccColor( appStudy, mgrId, ic, It.Value(), color ); 
-    }
-    ic->UpdateCurrentViewer();
-  }
-
-  // mark study as modified
+  displayer.UpdateViewer();
   GeometryGUI::Modified();
-  
-  // update actions
-  app->updateActions(); //SRN: To update a Save button in the toolbar
-}
-
-
-void GEOMToolsGUI::setVtkColor( SalomeApp_Study* study,                     // study
-                               int mgrId,                                  // view window id
-                               SVTK_View* view,                            // VTK view
-                               const Handle(SALOME_InteractiveObject)& IO, // interactive object
-                               const QColor& color )                       // color 
-{
-  // get material property
-  QString matProp;
-  matProp = study->getObjectProperty( mgrId, IO->getEntry(), GEOM::propertyName( GEOM::Material ), matProp ).toString();
-  Material_Model material;
-  material.fromProperties( matProp );
-
-  // change color only for shapes with not physical type of material
-  if ( !material.isPhysical() ) {
-    view->SetColor( IO, color );
-    study->setObjectProperty( mgrId, IO->getEntry(), GEOM::propertyName( GEOM::Color ), color );
-  }
-
-  // store color to GEOM_Object
-  _PTR(Study) aStudy = study->studyDS();
-  _PTR(SObject) aSObject( aStudy->FindObjectID( IO->getEntry() ) );
-  if ( !aSObject ) return;
-
-  GEOM::GEOM_Object_var anObject =
-    GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObject));
-
-  if ( CORBA::is_nil( anObject ) ) return;
-
-  SALOMEDS::Color aSColor;
-  aSColor.R = (double)color.red() / 255.0;
-  aSColor.G = (double)color.green() / 255.0;
-  aSColor.B = (double)color.blue() / 255.0;
-  anObject->SetColor( aSColor );
-  anObject->SetAutoColor( false );
-}
-
-void GEOMToolsGUI::setOccColor( SalomeApp_Study* study,                     // study
-                               int mgrId,                                  // view window id
-                               const Handle(AIS_InteractiveContext)& ic,   // OCC interactive context
-                               const Handle(SALOME_InteractiveObject)& IO, // interactive object
-                               const QColor& color )                       // color 
-{
-  // get AIS object
-  Handle(AIS_InteractiveObject) io = GEOMBase::GetAIS( IO, true );
-  if ( io.IsNull() ) return;
-
-  // get material property
-  QString matProp;
-  matProp = study->getObjectProperty( mgrId, IO->getEntry(), GEOM::propertyName( GEOM::Material ), matProp ).toString();
-  Material_Model material;
-  material.fromProperties( matProp );
-
-  Quantity_Color aColor = Quantity_Color( color.red() / 255., color.green() / 255., color.blue() / 255., Quantity_TOC_RGB );
-             
-  // change color only for shapes with not physical type of material
-  if ( !material.isPhysical() ) {
-    if ( io->IsKind( STANDARD_TYPE(AIS_Shape) ) ) {
-      TopoDS_Shape theShape = Handle(AIS_Shape)::DownCast( io )->Shape();
-      bool onlyVertex = (theShape.ShapeType() == TopAbs_VERTEX || GEOM_Displayer::isCompoundOfVertices( theShape ));
-      if ( onlyVertex ) {
-       // set color for a point
-       Handle(AIS_Drawer) aCurDrawer = io->Attributes();
-       Handle(Prs3d_PointAspect) aCurPointAspect =  aCurDrawer->PointAspect();
-       Quantity_Color aCurColor;
-       Standard_Real aCurScale;
-       Aspect_TypeOfMarker aCurTypeOfMarker;
-       aCurPointAspect->Aspect()->Values( aCurColor, aCurTypeOfMarker, aCurScale );
-       if ( aCurTypeOfMarker != Aspect_TOM_USERDEFINED ) {
-         aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aCurTypeOfMarker, aColor, aCurScale ) );
-       }
-       else {
-         Standard_Integer aWidth, aHeight;
-         aCurPointAspect->GetTextureSize( aWidth, aHeight );
-#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1
-         Handle(TColStd_HArray1OfByte) aTexture = aCurPointAspect->GetTexture();
-#else
-         Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture();
-#endif
-         aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aColor, 1, aWidth, aHeight, aTexture ) );
-       }
-       ic->SetLocalAttributes( io, aCurDrawer, Standard_False );
-      }
-    }
-    
-    io->SetColor( aColor );
-    if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) ) {
-      Handle(GEOM_AISShape) aGAISShape = Handle(GEOM_AISShape)::DownCast( io );
-      aGAISShape->SetShadingColor( aColor );
-      aGAISShape->storeBoundaryColors();
-    }
-
-    io->Redisplay( Standard_True );
-
-    study->setObjectProperty( mgrId, IO->getEntry(), GEOM::propertyName( GEOM::Color ), color );
-  }    
-
-  // store color to GEOM_Object
-  _PTR(Study) aStudy = study->studyDS();
-  _PTR(SObject) aSObject( aStudy->FindObjectID( IO->getEntry() ) );
-  GEOM::GEOM_Object_var anObject =
-    GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObject));
-  SALOMEDS::Color aSColor;
-  aSColor.R = (double)color.red() / 255.0;
-  aSColor.G = (double)color.green() / 255.0;
-  aSColor.B = (double)color.blue() / 255.0;
-  anObject->SetColor( aSColor );
-  anObject->SetAutoColor( false );              
-}
-
-void GEOMToolsGUI::OnTexture()
-{
-  SALOME_ListIO selected;
-  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( app && appStudy ) {
-    LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
-    if ( aSelMgr ) {
-      aSelMgr->selectedObjects( selected );
-      if ( !selected.IsEmpty() ) {
-        SUIT_ViewWindow* window = app->desktop()->activeWindow();
-        bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-        if ( isOCC ) {
-          QString aTexture = QFileDialog::getOpenFileName(window,tr( "GEOM_SELECT_IMAGE"),QString(), tr("OCC_TEXTURE_FILES"));
-          if( !aTexture.isEmpty() )
-          {
-            SUIT_OverrideCursor();
-            OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*> ( window->getViewManager()->getViewModel() );
-            Handle (AIS_InteractiveContext) ic = vm->getAISContext();
-            Handle(AIS_InteractiveObject) io ;
-            for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
-              io = GEOMBase::GetAIS( It.Value(), true );
-              if ( !io.IsNull() ) {
-                if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) )
-                  Handle(GEOM_AISShape)::DownCast( io )->SetTextureFileName(TCollection_AsciiString(aTexture.toStdString().c_str()));
-                io->Redisplay( Standard_True );
-              } // if ( !io.IsNull() )
-            } // for
-            ic->UpdateCurrentViewer();
-            GeometryGUI::Modified();
-            GeometryGUI* myGeomGUI = getGeometryGUI();
-            myGeomGUI->OnGUIEvent(GEOMOp::OpTexture);
-          } // if ( !selFile.isEmpty() )
-        } // if ( isOCC )
-      } // if ( selection not empty )
-    }
-  }
 
+  // update actions
   app->updateActions(); //SRN: To update a Save button in the toolbar
 }
 
@@ -572,377 +318,158 @@ void GEOMToolsGUI::OnTransparency()
 
 void GEOMToolsGUI::OnChangeTransparency( bool increase )
 {
- SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
-  if ( !app )
-    return;
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  if ( !app ) return;
+
+  SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if( !appStudy) return;
+
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
-  if ( !aSelMgr )
-    return;
+  if ( !aSelMgr ) return;
+
   SALOME_ListIO selected;
   aSelMgr->selectedObjects( selected );
-  if ( selected.IsEmpty() )
-    return;
+  if ( selected.IsEmpty() ) return;
 
-  Handle(SALOME_InteractiveObject) FirstIOS =  selected.First();
-  if ( FirstIOS.IsNull() )
-    return;
+  GEOM_Displayer displayer( appStudy );
+  SALOME_View* window = displayer.GetActiveView();
+  if ( !window ) return;
+
+  int aMgrId = dynamic_cast< SUIT_ViewModel* >( window )->getViewManager()->getGlobalId();
 
   // Delta
   float delta = 0.1; // VSR: 23/11/2010 (transparency value <= 0.05 is ignored)
   if ( !increase )
     delta *= -1;
-        
-  SUIT_ViewWindow* window = app->desktop()->activeWindow();
-  bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-  bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
-
-  if ( isVTK ) {
-    SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );
-    if ( !vtkVW )
-      return;
-    SVTK_View* aView = vtkVW->getView();
-   
-    float transp = aView->GetTransparency(FirstIOS);
-    
-    // Compute new transparency value
-    transp = transp + delta;
-    if ( transp < 0 )
-      transp = 0;
-    else if ( transp > 1 )
-      transp = 1;
 
-    for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
-      aView->SetTransparency( It.Value(), transp );
-    }
-    aView->Repaint();
-    GeometryGUI::Modified();
-  } // if ( isVTK )
-        
-  else if ( isOCC ) {
-    GEOMBase* gb = new GEOMBase();
-    Handle(GEOM_AISShape) aisShape;
-   
-    aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, true );
-    if( aisShape.IsNull() )
-      return;
-    float transp = aisShape->Transparency();
+  QVariant v = appStudy->getObjectProperty( aMgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::Transparency ), QVariant() );
+  float transp  = v.isValid() ? v.toFloat() : 1;
 
-    // Compute new transparency value
-    transp = transp + delta;
-    if ( transp < 0 )
-      transp = 0;
-    else if ( transp > 1 )
-      transp = 1;
+  // Compute new transparency value
+  transp = transp + delta;
+  if ( transp < 0 )
+    transp = 0;
+  else if ( transp > 1 )
+    transp = 1;
 
-    OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>( window->getViewManager()->getViewModel() );
-    if ( !vm )
-      return;
-    Handle(AIS_InteractiveContext) ic = vm->getAISContext();
-    for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
-      aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), true );
-      if ( !aisShape.IsNull() ) {
-        ic->SetTransparency( aisShape, transp, false );
-        ic->Redisplay( aisShape, Standard_False, Standard_True );
-      }
-    } // for...
-    ic->UpdateCurrentViewer();
-    GeometryGUI::Modified();
-  } // if ( isOCC )
+  for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    appStudy->setObjectProperty( aMgrId ,io->getEntry(), GEOM::propertyName( GEOM::Transparency ), transp );
+    if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
+  }
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
 }
 
 void GEOMToolsGUI::OnNbIsos( ActionType actionType )
 {
-  SalomeApp_Application* app =
-    dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
-  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  SUIT_ViewWindow* window = app->desktop()->activeWindow();
-
-  bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-  bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
-
-  if(isOCC){ // if is OCCViewer
-
-    OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>( window->getViewManager()->getViewModel() );
-    Handle (AIS_InteractiveContext) ic = vm->getAISContext();
-    int aMgrId = window->getViewManager()->getGlobalId();
-
-    ic->InitCurrent();
-    if ( ic->MoreCurrent() ) {
-      Handle(GEOM_AISShape) CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
-      CurObject->restoreIsoNumbers();
-      Handle(AIS_Drawer)    CurDrawer = CurObject->Attributes();
-
-      int UIso = CurDrawer->UIsoAspect()->Number();
-      int VIso = CurDrawer->VIsoAspect()->Number();
-
-      int newNbUIso = -1;
-      int newNbVIso = -1;
-
-      if ( actionType == SHOWDLG ) {
-        GEOMToolsGUI_NbIsosDlg * NbIsosDlg =
-          new GEOMToolsGUI_NbIsosDlg( SUIT_Session::session()->activeApplication()->desktop() );
-
-        NbIsosDlg->setU( UIso );
-        NbIsosDlg->setV( VIso );
-
-        if ( NbIsosDlg->exec() ) {
-          SUIT_OverrideCursor();
-          
-          newNbUIso = NbIsosDlg->getU();
-          newNbVIso = NbIsosDlg->getV();
-        } else //Cancel case
-          return;
-      }
-      else if ( actionType == INCR || actionType == DECR ) {
-        int delta = 1;
-        if (actionType == DECR)
-          delta = -1;
-        
-        newNbUIso = UIso + delta;
-        newNbVIso = VIso + delta;
-
-        if ( newNbUIso < 0 || newNbVIso < 0 || newNbUIso > 99 || newNbVIso > 99 )
-          return;
-      }
-
-      for(; ic->MoreCurrent(); ic->NextCurrent()) {
-        CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
-
-        Handle(AIS_Drawer) CurDrawer = CurObject->Attributes();
-
-       QVariant v = aStudy->getObjectProperty( aMgrId, CurObject->getIO()->getEntry(), GEOM::propertyName( GEOM::LineWidth ) , QVariant() );
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  if ( !app ) return;
 
-       int width = v.isValid() ? v.toInt() : 1;
+  SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if ( !appStudy ) return;
 
-        CurDrawer->SetUIsoAspect( new Prs3d_IsoAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, width , newNbUIso) );
-        CurDrawer->SetVIsoAspect( new Prs3d_IsoAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, width , newNbVIso) );
+  LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
+  if ( !aSelMgr ) return;
 
-       CurObject->storeIsoNumbers();
-        
-        ic->SetLocalAttributes(CurObject, CurDrawer);
-        ic->Redisplay(CurObject);
+  SALOME_ListIO selected;
+  aSelMgr->selectedObjects( selected );
+  if ( selected.IsEmpty() ) return;
 
-        QString anIsos = QString("%1%2%3").arg(newNbUIso).arg(GEOM::subSectionSeparator()).arg(newNbVIso);
-        aStudy->setObjectProperty(aMgrId ,CurObject->getIO()->getEntry(), GEOM::propertyName( GEOM::NbIsos ), anIsos);
-      }
-    }
-    GeometryGUI::Modified();
+  GEOM_Displayer displayer( appStudy );
+  SALOME_View* window = displayer.GetActiveView();
+  if ( !window ) return;
+  int aMgrId = dynamic_cast< SUIT_ViewModel* >( window )->getViewManager()->getGlobalId();
+
+  QVariant v = appStudy->getObjectProperty( aMgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::NbIsos ) , QVariant() );
+  QString aStr = v.toString();
+  QStringList aStrList = aStr.split( GEOM::subSectionSeparator() );
+  int UIso = SUIT_Session::session()->resourceMgr()->integerValue( "Geometry", "iso_number_u", 1 );
+  int VIso = SUIT_Session::session()->resourceMgr()->integerValue( "Geometry", "iso_number_v", 1 );
+  if ( aStrList.count() == 2 ) {
+    if ( !aStrList[0].isEmpty() ) UIso = aStrList[0].toInt();
+    if ( !aStrList[1].isEmpty() ) VIso = aStrList[1].toInt();
   }
-  else if(isVTK){ // if is VTKViewer
-    //
-    // Warning. It's works incorrect. must be recheked.
-    //
-    SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >
-      ( SUIT_Session::session()->activeApplication() );
-    if ( !app )
-      return;
-    LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
-    if ( !aSelMgr )
-      return;
-    SALOME_ListIO selected;
-    aSelMgr->selectedObjects( selected );
-    if ( selected.IsEmpty() )
-      return;
-
-    SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );
-    if ( !vtkVW )
-      return;
 
-    int aMgrId = window->getViewManager()->getGlobalId();
+  int newNbUIso = -1;
+  int newNbVIso = -1;
 
-    SALOME_View* view = GEOM_Displayer::GetActiveView();
+  if ( actionType == SHOWDLG ) {
+    GEOMToolsGUI_NbIsosDlg * NbIsosDlg =
+      new GEOMToolsGUI_NbIsosDlg( SUIT_Session::session()->activeApplication()->desktop() );
 
-    vtkActorCollection* aCollection = vtkActorCollection::New();
+    NbIsosDlg->setU( UIso );
+    NbIsosDlg->setV( VIso );
 
-    for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
-      Handle(SALOME_InteractiveObject) anIObject = It.Value();
-      SALOME_Prs* aPrs = view->CreatePrs( anIObject->getEntry() );
-      SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( aPrs );
-      if ( vtkPrs ) {
-        vtkActorCollection* anActors = vtkPrs->GetObjects();
-        anActors->InitTraversal();
-        vtkActor* anAct = anActors->GetNextActor();
-        aCollection->AddItem(anAct);
-      }
-    }
-
-    if(aCollection)
-      aCollection->InitTraversal();
-    else
+    if ( NbIsosDlg->exec() ) {
+      SUIT_OverrideCursor();     
+      newNbUIso = NbIsosDlg->getU();
+      newNbVIso = NbIsosDlg->getV();
+    } else //Cancel case
       return;
+  }
+  else if ( actionType == INCR || actionType == DECR ) {
+    int delta = 1;
+    if (actionType == DECR)
+      delta = -1;
 
-    int UIso = 0;
-    int VIso = 0;
+    newNbUIso = UIso + delta;
+    newNbVIso = VIso + delta;
 
-    vtkActor* anAct = aCollection->GetNextActor();
-    if (GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)) {
-      anActor->RestoreIsoNumbers();
-      anActor->GetNbIsos(UIso,VIso);
-    }
-    else
+    if ( newNbUIso < 0 || newNbVIso < 0 || newNbUIso > 99 || newNbVIso > 99 )
       return;
-    
-    int newNbUIso = -1;
-    int newNbVIso = -1;
-
-    if ( actionType == SHOWDLG ) {
-      GEOMToolsGUI_NbIsosDlg* NbIsosDlg =
-        new GEOMToolsGUI_NbIsosDlg( SUIT_Session::session()->activeApplication()->desktop() );
-
-      NbIsosDlg->setU( UIso );
-      NbIsosDlg->setV( VIso );
-
-      if ( NbIsosDlg->exec() ) {
-        SUIT_OverrideCursor();
+  }
 
-        newNbUIso = NbIsosDlg->getU();
-        newNbVIso = NbIsosDlg->getV();
-      } else 
-        return; //Cancel case 
-    }
-    else if ( actionType == INCR || actionType == DECR ) {
-      int delta = 1;
-      if (actionType == DECR)
-        delta = -1;
-      
-      newNbUIso = UIso + delta;
-      newNbVIso = VIso + delta;
-      
-      if ( newNbUIso < 0 || newNbVIso < 0 || newNbUIso > 99 || newNbVIso > 99 )
-        return;
-    } 
-    
-    while( anAct!=NULL ) {
-      if(GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)){
-        // There are no casting to needed actor.
-        int aIsos[2]={newNbUIso,newNbVIso};
-        anActor->SetNbIsos(aIsos);
-       anActor->StoreIsoNumbers();
-
-        QString anIsos = QString("%1%2%3").arg(newNbUIso).arg(GEOM::subSectionSeparator()).arg(newNbVIso);
-        aStudy->setObjectProperty(aMgrId ,anActor->getIO()->getEntry(), GEOM::propertyName( GEOM::NbIsos ), anIsos);
-      }
-      anAct = aCollection->GetNextActor();
-    }
-    view->Repaint();
-    GeometryGUI::Modified();
-  } // end vtkviewer
+  for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    QString anIsos = QString( "%1%2%3" ).arg( newNbUIso ).arg( GEOM::subSectionSeparator() ).arg( newNbVIso );
+    appStudy->setObjectProperty( aMgrId ,io->getEntry(), GEOM::propertyName( GEOM::NbIsos ), anIsos );
+    if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
+  }
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
 }
 
 void GEOMToolsGUI::OnDeflection()
 {
-  SUIT_ViewWindow* window = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
-
-
-  bool isOCC = (window && window->getViewManager()->getType() == OCCViewer_Viewer::Type());
-  bool isVTK = (window && window->getViewManager()->getType() == SVTK_Viewer::Type());
-  int mgrId = window ? window->getViewManager()->getGlobalId() : -1;
-
-  if (isOCC) { // if is OCCViewer
-    OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>(window->getViewManager()->getViewModel());
-    Handle (AIS_InteractiveContext) ic = vm->getAISContext();
-
-    ic->InitCurrent();
-    if (ic->MoreCurrent()) {
-      Handle(GEOM_AISShape) CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
-
-      Standard_Real aDC, aPrevDC;
-      Standard_Boolean isOwnDC = CurObject->OwnDeviationCoefficient(aDC, aPrevDC);
-      if (!isOwnDC)
-        aDC = ic->DeviationCoefficient();
-
-      GEOMToolsGUI_DeflectionDlg * DeflectionDlg = new GEOMToolsGUI_DeflectionDlg
-        (SUIT_Session::session()->activeApplication()->desktop());
-      DeflectionDlg->setTheDC(aDC);
-      double aNewDC = 0.0;
-      bool ok = false;
-      while (!ok) {
-        if (DeflectionDlg->exec()) {
-          SUIT_OverrideCursor();
-          aNewDC = DeflectionDlg->getTheDC();
-          ok = (1e-07 <= aNewDC && aNewDC <= 1.0); // spinbox can return zero
-          if (ok) {
-            for (; ic->MoreCurrent(); ic->NextCurrent()) {
-              CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
-              ic->SetDeviationCoefficient(CurObject, aNewDC, Standard_True);
-              ic->Redisplay(CurObject);
-              appStudy->setObjectProperty(mgrId,CurObject->getIO()->getEntry(), GEOM::propertyName( GEOM::Deflection ), aNewDC);
-            }
-          }
-        }
-        else {
-          ok = true;
-        }
-      }
-    }
-    GeometryGUI::Modified();
-  }
-  else if (isVTK) { // if is VTKViewer
-    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
-      (SUIT_Session::session()->activeApplication());
-    if (!app)
-      return;
-
-    LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
-    if (!aSelMgr)
-      return;
-
-    SALOME_ListIO selected;
-    aSelMgr->selectedObjects(selected);
-    if (selected.IsEmpty())
-      return;
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  if ( !app ) return;
 
-    SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>(window);
-    if (!vtkVW)
-      return;
+  SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if ( !appStudy ) return;
 
-    SALOME_View* view = GEOM_Displayer::GetActiveView();
+  LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
+  if ( !aSelMgr ) return;
 
-    vtkActorCollection* aCollection = vtkActorCollection::New();
+  SALOME_ListIO selected;
+  aSelMgr->selectedObjects( selected );
+  if ( selected.IsEmpty() ) return;
 
-    for (SALOME_ListIteratorOfListIO It (selected); It.More(); It.Next()) {
-      Handle(SALOME_InteractiveObject) anIObject = It.Value();
-      SALOME_Prs* aPrs = view->CreatePrs(anIObject->getEntry());
-      SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>(aPrs);
-      if (vtkPrs) {
-        vtkActorCollection* anActors = vtkPrs->GetObjects();
-        anActors->InitTraversal();
-        vtkActor* anAct = anActors->GetNextActor();
-        aCollection->AddItem(anAct);
-      }
-    }
+  GEOM_Displayer displayer( appStudy );
+  SALOME_View* window = displayer.GetActiveView();
+  if ( !window ) return;
 
-    if (aCollection)
-      aCollection->InitTraversal();
-    else
-      return;
+  int aMgrId = dynamic_cast< SUIT_ViewModel* >( window )->getViewManager()->getGlobalId();
 
-    double aDC = 0.;
+  QVariant v = appStudy->getObjectProperty( aMgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::Deflection ), QVariant() );
+  double aDC =  v.isValid() ? v.toDouble() : SUIT_Session::session()->resourceMgr()->doubleValue( "Geometry", "deflection_coef", 0.001 );
 
-    vtkActor* anAct = aCollection->GetNextActor();
-    if (GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct))
-      aDC = anActor->GetDeflection();
-    else
-      return;
+  GEOMToolsGUI_DeflectionDlg * DeflectionDlg = new GEOMToolsGUI_DeflectionDlg
+    ( SUIT_Session::session()->activeApplication()->desktop() );
+  DeflectionDlg->setTheDC( aDC );
+  if ( DeflectionDlg->exec() ) {
+    SUIT_OverrideCursor();
+    aDC = DeflectionDlg->getTheDC();
 
-    GEOMToolsGUI_DeflectionDlg* DeflectionDlg = new GEOMToolsGUI_DeflectionDlg
-      (SUIT_Session::session()->activeApplication()->desktop());
-    DeflectionDlg->setTheDC(aDC);
-    if (DeflectionDlg->exec()) {
-      SUIT_OverrideCursor();
-      aDC = DeflectionDlg->getTheDC();
-      while (anAct != NULL) {
-        if (GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)) {
-          // There are no casting to needed actor.
-          anActor->SetDeflection(aDC);
-          appStudy->setObjectProperty(mgrId, anActor->getIO()->getEntry(), GEOM::propertyName( GEOM::Deflection ), aDC);
-        }
-        anAct = aCollection->GetNextActor();
-      }
+    for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
+      Handle( SALOME_InteractiveObject ) io = It.Value();
+      appStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::Deflection ), aDC );
+      if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
     }
-    GeometryGUI::Modified();
-  } // end vtkviewer
+  }
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
 }
 
 void GEOMToolsGUI::OnSelectOnly(int mode)
@@ -1098,361 +625,148 @@ void GEOMToolsGUI::OnPublishObject() {
 
 void GEOMToolsGUI::OnEdgeWidth()
 {
-  SUIT_ViewWindow* window = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( SUIT_Session::session()->activeApplication()->activeStudy() );
-
-
-  bool isOCC = (window && window->getViewManager()->getType() == OCCViewer_Viewer::Type());
-  bool isVTK = (window && window->getViewManager()->getType() == SVTK_Viewer::Type());
-  int mgrId = window ? window->getViewManager()->getGlobalId() : -1;
-
-  if (isOCC) { // if is OCCViewer
-    OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>(window->getViewManager()->getViewModel());
-    Handle (AIS_InteractiveContext) ic = vm->getAISContext();
-    SALOME_View* view = GEOM_Displayer::GetActiveView();
-    ic->InitCurrent();
-    if (ic->MoreCurrent()) {
-      Handle(GEOM_AISShape) CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
-
-      int aWidth = (int)CurObject->Width();
-
-      GEOMToolsGUI_LineWidthDlg * Dlg = new GEOMToolsGUI_LineWidthDlg
-        (SUIT_Session::session()->activeApplication()->desktop(),"EDGE_WIDTH_TLT");
-      Dlg->setTheLW(aWidth);
-      int aNewWidth = 0;
-      if (Dlg->exec()) {
-               aNewWidth = Dlg->getTheLW();
-               bool ok = (aNewWidth != aWidth && aNewWidth != 0 );
-               if (ok) {
-                 for(; ic->MoreCurrent(); ic->NextCurrent()) {
-                       CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
-                               SOCC_Prs* aPrs =  dynamic_cast<SOCC_Prs*>(view->CreatePrs(CurObject->getIO()->getEntry()));
-                               AIS_ListOfInteractive anAISObjects;
-                               aPrs->GetObjects( anAISObjects );
-                               AIS_ListIteratorOfListOfInteractive aIter( anAISObjects );
-                               for ( ; aIter.More(); aIter.Next() ) {
-                                 Handle(SALOME_AISShape) cur =  Handle(SALOME_AISShape)::DownCast(aIter.Value());
-                                 if ( !cur.IsNull() ) {
-                                       cur->SetWidth(aNewWidth);
-                                       ic->Redisplay(cur);
-                                 }
-                               }
-                       appStudy->setObjectProperty(mgrId, CurObject->getIO()->getEntry(), GEOM::propertyName( GEOM::LineWidth ), aNewWidth);
-                 }
-               }
-         }
-    }
-    else {
-      return;
-    }
-    GeometryGUI::Modified();
-  }
-  else if (isVTK) { // if is VTKViewer
-    SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
-      (SUIT_Session::session()->activeApplication());
-    if (!app)
-      return;
-
-    LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
-    if (!aSelMgr)
-      return;
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  if ( !app ) return;
 
-    SALOME_ListIO selected;
-    aSelMgr->selectedObjects(selected);
-    if (selected.IsEmpty())
-      return;
+  SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if ( !appStudy ) return;
 
-    SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>(window);
-    if (!vtkVW)
-      return;
+  LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
+  if ( !aSelMgr ) return;
 
-    SALOME_View* view = GEOM_Displayer::GetActiveView();
+  SALOME_ListIO selected;
+  aSelMgr->selectedObjects( selected );
+  if ( selected.IsEmpty() ) return;
 
-    vtkActorCollection* aCollection = vtkActorCollection::New();
+  GEOM_Displayer displayer( appStudy );
 
-    for (SALOME_ListIteratorOfListIO It (selected); It.More(); It.Next()) {
-      Handle(SALOME_InteractiveObject) anIObject = It.Value();
-      SALOME_Prs* aPrs = view->CreatePrs(anIObject->getEntry());
-      SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>(aPrs);
-      if (vtkPrs) {
-        vtkActorCollection* anActors = vtkPrs->GetObjects();
-        anActors->InitTraversal();
-        vtkActor* anAct = anActors->GetNextActor();
-        aCollection->AddItem(anAct);
-      }
-    }
+  SALOME_View* window = displayer.GetActiveView();
+  if ( !window ) return;
 
-    if (aCollection)
-      aCollection->InitTraversal();
-    else
-      return;
+  int aMgrId = dynamic_cast< SUIT_ViewModel* >( window )->getViewManager()->getGlobalId();
 
-    int aWidth = 1;
+  GEOMToolsGUI_LineWidthDlg* Dlg =
+    new GEOMToolsGUI_LineWidthDlg( SUIT_Session::session()->activeApplication()->desktop(), "EDGE_WIDTH_TLT" );
 
-    vtkActor* anAct = aCollection->GetNextActor();
-    if (GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct))
-      aWidth = anActor->GetWidth();
-    else
-      return;
+  QVariant v = appStudy->getObjectProperty( aMgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::LineWidth ), QVariant() );
+  int aWidth = v.isValid() ? v.toInt() : SUIT_Session::session()->resourceMgr()->integerValue( "Geometry", "edge_width", 1 );
 
-    GEOMToolsGUI_LineWidthDlg * Dlg = new GEOMToolsGUI_LineWidthDlg
-      (SUIT_Session::session()->activeApplication()->desktop(),"EDGE_WIDTH_TLT");
-    
-    Dlg->setTheLW(aWidth);
-    if (Dlg->exec()) {
-      SUIT_OverrideCursor();
-      aWidth = Dlg->getTheLW();
-      while (anAct != NULL) {
-        if (GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)) {
-          // There are no casting to needed actor.
-          anActor->SetWidth(aWidth);
-          appStudy->setObjectProperty(mgrId, anActor->getIO()->getEntry(), GEOM::propertyName( GEOM::LineWidth ), aWidth);
-        }
-        anAct = aCollection->GetNextActor();
-      }
+  Dlg->setTheLW( aWidth );
+  if ( Dlg->exec() ) {
+    SUIT_OverrideCursor();
+    aWidth = Dlg->getTheLW();
+  } else
+    return; //Cancel case
+  for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    appStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::LineWidth ), aWidth );
+    if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
     }
-    GeometryGUI::Modified();
-  } // end vtkviewer
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
 }
 
 
 void GEOMToolsGUI::OnIsosWidth() {
-  SalomeApp_Application* app =
-    dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
-  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  SUIT_ViewWindow* window = app->desktop()->activeWindow();
-
-  bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-  bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
-
-  if(isOCC){ // if is OCCViewer
-
-    OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>( window->getViewManager()->getViewModel() );
-    Handle (AIS_InteractiveContext) ic = vm->getAISContext();
-    int aMgrId = window->getViewManager()->getGlobalId();
-
-    ic->InitCurrent();
-    if ( ic->MoreCurrent() ) {
-      Handle(GEOM_AISShape) CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
-      CurObject->restoreIsoNumbers();
-      Handle(AIS_Drawer)    CurDrawer = CurObject->Attributes();
-
-      Handle(Graphic3d_AspectLine3d) asp = CurDrawer->UIsoAspect()->Aspect();
-      
-      Quantity_Color C;
-      Aspect_TypeOfLine T;
-      Standard_Real W;
-      asp->Values(C,T,W);
-
-      int aWidth = (int)W;
-
-      GEOMToolsGUI_LineWidthDlg * Dlg =
-       new GEOMToolsGUI_LineWidthDlg( SUIT_Session::session()->activeApplication()->desktop(),"ISOS_WIDTH_TLT" );
-
-      Dlg->setTheLW( aWidth );
-
-      if ( Dlg->exec() ) {
-       SUIT_OverrideCursor();          
-       aWidth = Dlg->getTheLW();
-      } else //Cancel case
-       return;
-      
-      for(; ic->MoreCurrent(); ic->NextCurrent()) {
-       CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current());
-       
-       Handle(AIS_Drawer) CurDrawer = CurObject->Attributes();
-       
-       CurObject->Attributes()->UIsoAspect()->SetWidth(aWidth);
-       CurObject->Attributes()->VIsoAspect()->SetWidth(aWidth);
-       
-       ic->Redisplay(CurObject);
-       
-       aStudy->setObjectProperty(aMgrId ,CurObject->getIO()->getEntry(), GEOM::propertyName( GEOM::IsosWidth ), aWidth);
-      }
-      GeometryGUI::Modified();
-    }
-  }
-  else if(isVTK){ // if is VTKViewer
-    //
-    // Warning. It's works incorrect. must be recheked.
-    //
-    SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >
-      ( SUIT_Session::session()->activeApplication() );
-    if ( !app )
-      return;
-    LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
-    if ( !aSelMgr )
-      return;
-    SALOME_ListIO selected;
-    aSelMgr->selectedObjects( selected );
-    if ( selected.IsEmpty() )
-      return;
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  if ( !app ) return;
 
-    SVTK_ViewWindow* vtkVW = dynamic_cast<SVTK_ViewWindow*>( window );
-    if ( !vtkVW )
-      return;
+  SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if ( !appStudy ) return;
 
-    int aMgrId = window->getViewManager()->getGlobalId();
+  LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
+  if ( !aSelMgr ) return;
 
-    SALOME_View* view = GEOM_Displayer::GetActiveView();
+  SALOME_ListIO selected;
+  aSelMgr->selectedObjects( selected );
+  if ( selected.IsEmpty() ) return;
 
-    vtkActorCollection* aCollection = vtkActorCollection::New();
+  GEOM_Displayer displayer( appStudy );
 
-    for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
-      Handle(SALOME_InteractiveObject) anIObject = It.Value();
-      SALOME_Prs* aPrs = view->CreatePrs( anIObject->getEntry() );
-      SVTK_Prs* vtkPrs = dynamic_cast<SVTK_Prs*>( aPrs );
-      if ( vtkPrs ) {
-        vtkActorCollection* anActors = vtkPrs->GetObjects();
-        anActors->InitTraversal();
-        vtkActor* anAct = anActors->GetNextActor();
-        aCollection->AddItem(anAct);
-      }
-    }
+  SALOME_View* window = displayer.GetActiveView();
+  if ( !window ) return;
 
-    if(aCollection)
-      aCollection->InitTraversal();
-    else
-      return;
+  int aMgrId = dynamic_cast< SUIT_ViewModel* >( window )->getViewManager()->getGlobalId();
 
-    int aWidth = 1;
+  GEOMToolsGUI_LineWidthDlg* Dlg =
+    new GEOMToolsGUI_LineWidthDlg( SUIT_Session::session()->activeApplication()->desktop(), "ISOS_WIDTH_TLT" );
 
-    vtkActor* anAct = aCollection->GetNextActor();
-    if (GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)) {
-      aWidth = anActor->GetIsosWidth();
-    }
-    else
-      return;
-    
-    GEOMToolsGUI_LineWidthDlg* Dlg =
-      new GEOMToolsGUI_LineWidthDlg( SUIT_Session::session()->activeApplication()->desktop(), "ISOS_WIDTH_TLT" );
-    
-    Dlg->setTheLW( aWidth );
-    if (Dlg->exec() ) {
-      SUIT_OverrideCursor();
-      aWidth = Dlg->getTheLW();
-    } else 
-      return; //Cancel case 
-    
-    while( anAct!= NULL ) {
-      if(GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)) {
-        // There are no casting to needed actor.
-       anActor->SetIsosWidth(aWidth);
-        aStudy->setObjectProperty(aMgrId ,anActor->getIO()->getEntry(), GEOM::propertyName( GEOM::IsosWidth ), aWidth);
-      }
-      anAct = aCollection->GetNextActor();
-    }
-    
-    view->Repaint();
-    GeometryGUI::Modified();
-  } // end vtkviewer  
+  QVariant v = appStudy->getObjectProperty( aMgrId, selected.First()->getEntry(), GEOM::propertyName( GEOM::IsosWidth ), QVariant() );
+  int aWidth = v.isValid() ? v.toInt() : SUIT_Session::session()->resourceMgr()->integerValue( "Geometry", "isolines_width", 1 );
+
+  Dlg->setTheLW( aWidth );
+  if ( Dlg->exec() ) {
+    SUIT_OverrideCursor();
+    aWidth = Dlg->getTheLW();
+  } else
+    return; //Cancel case
+  for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    appStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::IsosWidth ), aWidth );
+    if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
+  }
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
 }
 
 void GEOMToolsGUI::OnBringToFront() {
- SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
-  if ( !app )
-    return;
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  if ( !app ) return;
+
+  SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy());  
+  if (!appStudy) return;
 
-  SalomeApp_Module* mod = dynamic_cast<SalomeApp_Module*>(app->activeModule());
-  if(!mod)
-    return;
-  
-  GEOM_Displayer* disp  = dynamic_cast<GEOM_Displayer*>(mod->displayer());
-  
-  if(!disp)
-    return;
-  
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
-  if ( !aSelMgr )
-    return;
+  if ( !aSelMgr ) return;
 
   SALOME_ListIO selected;
   aSelMgr->selectedObjects( selected );
-  if ( selected.IsEmpty() )
-    return;
+  if ( selected.IsEmpty() ) return;
 
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());  
-  if(!appStudy)
-    return;
+  GEOM_Displayer displayer( appStudy );
 
-  SUIT_ViewWindow* window = app->desktop()->activeWindow();
+  SALOME_View* window = displayer.GetActiveView();
+  if ( !window ) return;
 
-  OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>( window->getViewManager()->getViewModel() );
-  if ( !vm )
-    return;
-  
-  bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
+  int aMgrId = dynamic_cast< SUIT_ViewModel* >( window )->getViewManager()->getGlobalId();
 
   QAction* a = getGeometryGUI()->getAction( GEOMOp::OpBringToFront );
   bool checked = a->isChecked();
-  
-  if ( isOCC ) {
-    GEOMBase* gb = new GEOMBase();
-    Handle(GEOM_AISShape) aisShape;
-    int aMgrId = window->getViewManager()->getGlobalId();
-   
-    Handle(AIS_InteractiveContext) ic = vm->getAISContext();
-    SALOME_ListIO anIOlst;
-    for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
-      aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), true );
-      if ( !aisShape.IsNull() ) {
-       appStudy->setObjectProperty( aMgrId, aisShape->getIO()->getEntry(), GEOM::propertyName( GEOM::TopLevel ), checked );
-       aisShape->setTopLevel(checked);
-       anIOlst.Append(aisShape->getIO());
-      }
-    } // for...
-    disp->Redisplay(anIOlst);
-    GeometryGUI::Modified();
-  } // if ( isOCC )
+
+  for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    appStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::TopLevel ), checked );
+    if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
+  }
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
 }
 
 void GEOMToolsGUI::OnClsBringToFront() {
-  SalomeApp_Application* app =
-    dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
-  if(!app)
-    return;
+  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+  if ( !app ) return;
 
-  SalomeApp_Module* mod = dynamic_cast<SalomeApp_Module*>(app->activeModule());
-  if(!mod)
-    return;
-  
-  GEOM_Displayer* disp  = dynamic_cast<GEOM_Displayer*>(mod->displayer());
-  
-  if(!disp)
-    return;
+  SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
+  if ( !appStudy ) return;
 
+  GEOM_Displayer displayer( appStudy );
 
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());  
-  if(!appStudy)
-    return;
-  
-  SUIT_ViewWindow* window = app->desktop()->activeWindow();  
-  
-  bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() );
-  
-  if(isOCC){ // if is OCCViewer
-    
-    OCCViewer_Viewer* vm = dynamic_cast<OCCViewer_Viewer*>( window->getViewManager()->getViewModel() );
-    Handle (AIS_InteractiveContext) ic = vm->getAISContext();
-    int aMgrId = window->getViewManager()->getGlobalId();
-    
-    SALOME_ListIO anIOlst;
-    AIS_ListOfInteractive aList;
-    ic->DisplayedObjects( aList );
-    for ( AIS_ListIteratorOfListOfInteractive it( aList ); it.More(); it.Next() ) {
-      
-      Handle(GEOM_AISShape) CurObject = Handle(GEOM_AISShape)::DownCast(it.Value());
-      
-      if(CurObject.IsNull())
-       continue;
-      
-      appStudy->setObjectProperty( aMgrId, QString(CurObject->getIO()->getEntry()), GEOM::propertyName( GEOM::TopLevel ), Standard_False );
-      CurObject->setTopLevel(Standard_False);
-      anIOlst.Append(CurObject->getIO());
-    }
-    disp->Redisplay(anIOlst);
-    GeometryGUI::Modified();
+  SALOME_View* window = displayer.GetActiveView();
+  if ( !window ) return;
+
+  int aMgrId = dynamic_cast< SUIT_ViewModel* >( window )->getViewManager()->getGlobalId();
+
+  SALOME_ListIO anIOlst;
+  window->GetVisible( anIOlst );
+
+  for ( SALOME_ListIteratorOfListIO It( anIOlst ); It.More(); It.Next() ) {
+    Handle( SALOME_InteractiveObject ) io = It.Value();
+    appStudy->setObjectProperty( aMgrId, QString( io->getEntry() ), GEOM::propertyName( GEOM::TopLevel ), Standard_False );
+    if ( window->isVisible( io ) ) displayer.Redisplay( io, false );
   }
+  displayer.Redisplay( anIOlst );
+  displayer.UpdateViewer();
+  GeometryGUI::Modified();
 }
   
 void GEOMToolsGUI::OnSetMaterial( const QVariant& theParam )
index 021ce1bcba72d97164b1e6ba58425101e9f07b6c..0f45c54fe62438f0956517ce20e839ad85c22a4b 100644 (file)
@@ -85,6 +85,11 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi
   // generic method to be put in a super class
   void register_name(char * name);
 
+  // Get ORB object
+  CORBA::ORB_ptr GetORB() { return CORBA::ORB::_duplicate(_orb); }
+
+  // Get Naming Service object
+  SALOME_NamingService* GetNS() { return name_service; }
 
   //-----------------------------------------------------------------------//
   // Inherited methods from SALOMEDS::Driver                               //
index 95948ed249580031a06345d6162eaf0140f509f2..ee9ee2e4bb2dbe0096b3f11bccd13fd7bb6955a5 100644 (file)
@@ -30,6 +30,8 @@
 #include "GEOM_Engine.hxx"
 #include "GEOM_Object.hxx"
 
+#define SUBSHAPE_ERROR "Sub shape cannot be transformed"
+
 //=============================================================================
 /*!
  *   constructor:
@@ -1126,6 +1128,56 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipeBiNormalAlongVector
   return GetObject(anObject);
 }
 
+//=============================================================================
+/*!
+ *  MakeThickening
+ */
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeThickening
+                 (GEOM::GEOM_Object_ptr theObject,
+                  CORBA::Double theOffset,
+                  CORBA::Boolean doCopy)
+{
+  GEOM::GEOM_Object_var aGEOMObject;
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  if (CORBA::is_nil(theObject)) return aGEOMObject._retn();
+
+  //check if the object is a sub-shape
+  if (!theObject->IsMainShape() && !doCopy) {
+    GetOperations()->SetErrorCode(SUBSHAPE_ERROR);
+    return aGEOMObject._retn();
+  }
+  
+  if (!doCopy)
+    aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject);
+
+  //Get the basic object
+  Handle(GEOM_Object) aBasicObject = GetObjectImpl(theObject);
+  if (aBasicObject.IsNull()) return aGEOMObject._retn();
+  
+  //Create the thickened shape
+  if (doCopy)
+  {
+    Handle(GEOM_Object) anObject = GetOperations()->MakeThickening(
+      aBasicObject, theOffset, doCopy);
+    if (!GetOperations()->IsDone() || anObject.IsNull())
+      return aGEOMObject._retn();
+    
+    return GetObject(anObject);
+  }
+  else
+  {
+    GetOperations()->MakeThickening(aBasicObject, theOffset, doCopy);
+    
+    // Update GUI.
+    UpdateGUIForObject(theObject);
+    
+    return aGEOMObject._retn();
+  }
+}
+
 //=============================================================================
 /*!
  *  RestorePath
index 5b274671bd9e96682afb41aee8c7499fc2a936c9..6a03d8d4226be26c89f0dbd321cdb2d399af1ff6 100644 (file)
@@ -186,6 +186,10 @@ class GEOM_I_EXPORT GEOM_I3DPrimOperations_i :
   GEOM::GEOM_Object_ptr MakePipeBiNormalAlongVector (GEOM::GEOM_Object_ptr theBase,
                                                     GEOM::GEOM_Object_ptr thePath,
                                                     GEOM::GEOM_Object_ptr theVec);
+  
+  GEOM::GEOM_Object_ptr MakeThickening (GEOM::GEOM_Object_ptr theObject,
+                                        CORBA::Double theOffset,
+                                        CORBA::Boolean isCopy);
 
   GEOM::GEOM_Object_ptr RestorePath (GEOM::GEOM_Object_ptr theShape,
                                      GEOM::GEOM_Object_ptr theBase1,
index 60a26e129bece1f5fd8fdf3bfe7d60900f3aead4..c129da9361a846b733e97c43731daef60f0e951c 100644 (file)
@@ -99,6 +99,9 @@ void GEOM_IGroupOperations_i::AddObject(GEOM::GEOM_Object_ptr theGroup, CORBA::L
   if (aGroupRef.IsNull()) return;
 
   GetOperations()->AddObject(aGroupRef, theSubShapeId);
+
+  // Update GUI.
+  UpdateGUIForObject(theGroup);
 }
 
 //=============================================================================
@@ -116,6 +119,9 @@ void GEOM_IGroupOperations_i::RemoveObject(GEOM::GEOM_Object_ptr theGroup, CORBA
   if (aGroupRef.IsNull()) return;
 
   GetOperations()->RemoveObject(aGroupRef, theSubShapeId);
+
+  // Update GUI.
+  UpdateGUIForObject(theGroup);
 }
 
 //=============================================================================
index b56c32942bf903c859ba1c79cf1ebdb727bccfa1..aecbee269204ce71af4f7a618d3d3d613298f715 100644 (file)
@@ -23,6 +23,8 @@
 #include "GEOM_IOperations_i.hh"
 
 #include "GEOM_Engine.hxx"
+#include "GEOM_Gen_i.hh"
+#include <SALOME_NamingService.hxx>
 
 #include "utilities.h"
 #include "OpUtil.hxx"
@@ -32,6 +34,8 @@
 #include <TCollection_AsciiString.hxx>
 #include <TDF_Tool.hxx>
 
+#include CORBA_SERVER_HEADER(SALOME_Session)
+
 //=============================================================================
 /*!
  *  default constructor:
@@ -155,3 +159,32 @@ Handle(GEOM_Object) GEOM_IOperations_i::GetObjectImpl(GEOM::GEOM_Object_ptr theO
   }
   return anImpl;
 }
+
+//=============================================================================
+/*!
+ *  UpdateGUIForObject
+ */
+//=============================================================================
+void GEOM_IOperations_i::UpdateGUIForObject(GEOM::GEOM_Object_ptr theObj)
+{
+  if (!CORBA::is_nil (theObj)) {
+    // Cast _engine to GEOM_Gen_i type.
+    PortableServer::Servant aServant = myPOA->reference_to_servant(_engine.in());
+    GEOM_Gen_i *anEngine = dynamic_cast<GEOM_Gen_i *>(aServant);
+
+    if (anEngine) {
+      SALOME_NamingService *aNameService = anEngine->GetNS();
+      CORBA::Object_var aSessionObj = aNameService->Resolve("/Kernel/Session");
+      SALOME::Session_var aSession = SALOME::Session::_narrow(aSessionObj);
+  
+      if (!aSession->_is_nil())
+      {
+        std::string aMsg("GEOM/modified/");
+        CORBA::String_var anIOR = anEngine->GetORB()->object_to_string(theObj);
+  
+        aMsg += anIOR.in();
+        aSession->emitMessageOneWay(aMsg.c_str());
+      }
+    }
+  }
+}
index dc45fffa31ebd64bbf81c3f9069a72c5f2b8b8c3..9c1ea32b22ff3a87a54620827bf0a99a35380544 100644 (file)
@@ -59,6 +59,8 @@ class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperatio
 
    ::GEOM_IOperations* GetImpl() { return _impl; }
 
+  virtual void UpdateGUIForObject(GEOM::GEOM_Object_ptr theObj);
+
  private:
  
   ::GEOM_IOperations* _impl;
index 05b132959ad78713b27b2a04287ba62246093fc4..27a3893bf5675e1b3aa28bd6e25e82e95b9de72a 100644 (file)
@@ -100,6 +100,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPoints
   //Perform the translation
   GetOperations()->TranslateTwoPoints(anObject, aPoint1, aPoint2);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return aGEOMObject._retn();
 }
 
@@ -169,6 +172,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ
   //Perform the translation
   GetOperations()->TranslateDXDYDZ(anObject, theDX, theDY, theDZ);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return aGEOMObject._retn();
 }
 
@@ -233,6 +239,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVector
   //Perform the translation
   GetOperations()->TranslateVector(anObject, aVector);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return aGEOMObject._retn();
 }
 
@@ -310,6 +319,10 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorDistance
   }
 
   GetOperations()->TranslateVectorDistance(aBasicObject, aVector, theDistance, theCopy);
+
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return aGEOMObject._retn();
 }
 
@@ -347,6 +360,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::Rotate (GEOM::GEOM_Object_ptr
   //Perform the rotation
   GetOperations()->Rotate(anObject, anAxis, theAngle);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return aGEOMObject._retn();
 }
 
@@ -413,6 +429,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlane
   //Perform the mirror
   GetOperations()->MirrorPlane(anObject, aPlane);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return aGEOMObject._retn();
 }
 
@@ -479,6 +498,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxis
   //Perform the mirror
   GetOperations()->MirrorAxis(anObject, aAxis);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return aGEOMObject._retn();
 }
 
@@ -545,6 +567,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPoint
   //Perform the mirror
   GetOperations()->MirrorPoint(anObject, aPoint);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return aGEOMObject._retn();
 }
 
@@ -607,6 +632,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShape
   //Create the offset shape
   GetOperations()->OffsetShape(aBasicObject, theOffset);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return aGEOMObject._retn();
 }
 
@@ -700,6 +728,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShape
   //Perform the scale
   GetOperations()->ScaleShape(anObject, aPoint, theFactor);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return  aGEOMObject._retn();
 }
 
@@ -778,6 +809,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeAlongAxes
   GetOperations()->ScaleShapeAlongAxes
     (anObject, aPoint, theFactorX, theFactorY, theFactorZ, /*doCopy*/false);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return  aGEOMObject._retn();
 }
 
@@ -860,6 +894,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShape
   //Perform the Position
   GetOperations()->PositionShape(anObject, aStartLCS, aEndLCS);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return  aGEOMObject._retn();
 }
 
@@ -933,6 +970,11 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionAlongPath
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
+  if (!theCopy) {
+    // Update GUI.
+    UpdateGUIForObject(theObject);
+  }
+
   return GetObject(anObject);
 }
 
@@ -1209,6 +1251,9 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePoints
   //Perform the translation
   GetOperations()->RotateThreePoints(anObject, aCentPoint, aPoint1, aPoint2);
 
+  // Update GUI.
+  UpdateGUIForObject(theObject);
+
   return aGEOMObject._retn();
 }
 
index bf66f2e21b511326a13ca36aeb60bfca61753e58..a5959bf6e1e33458cb1dcda0ee6d16db1a40d7ff 100644 (file)
@@ -3714,6 +3714,61 @@ class geompyDC(GEOM._objref_GEOM_Gen):
             RaiseIfFailed("MakePipeBiNormalAlongVector", self.PrimOp)
             self._autoPublish(anObj, theName, "pipe")
             return anObj
+              
+        ## Makes a thick solid from a face or a shell
+        #  @param theShape Face or Shell to be thicken
+        #  @param theThickness Thickness of the resulting solid
+        #  @param theName Object name; when specified, this parameter is used
+        #         for result publication in the study. Otherwise, if automatic
+        #         publication is switched on, default value is used for result name.
+        #
+        #  @return New GEOM.GEOM_Object, containing the created solid
+        #
+        def MakeThickSolid(self, theShape, theThickness, theName=None):
+            """
+            Make a thick solid from a face or a shell
+
+            Parameters:
+                 theShape Face or Shell to be thicken
+                 theThickness Thickness of the resulting solid
+                 theName Object name; when specified, this parameter is used
+                 for result publication in the study. Otherwise, if automatic
+                 publication is switched on, default value is used for result name.
+                 
+            Returns:
+                New GEOM.GEOM_Object, containing the created solid
+            """
+            # Example: see GEOM_TestAll.py
+            anObj = self.PrimOp.MakeThickening(theShape, theThickness, True)
+            RaiseIfFailed("MakeThickening", self.PrimOp)
+            self._autoPublish(anObj, theName, "pipe")
+            return anObj
+            
+
+        ## Modifies a face or a shell to make it a thick solid
+        #  @param theShape Face or Shell to be thicken
+        #  @param theThickness Thickness of the resulting solid
+        #
+        #  @return The modified shape
+        #
+        def Thicken(self, theShape, theThickness):
+            """
+            Modifies a face or a shell to make it a thick solid
+
+            Parameters:
+                theBase Base shape to be extruded.
+                thePath Path shape to extrude the base shape along it.
+                theName Object name; when specified, this parameter is used
+                        for result publication in the study. Otherwise, if automatic
+                        publication is switched on, default value is used for result name.
+
+            Returns:
+                The modified shape
+            """
+            # Example: see GEOM_TestAll.py
+            anObj = self.PrimOp.MakeThickening(theShape, theThickness, False)
+            RaiseIfFailed("MakeThickening", self.PrimOp)
+            return anObj
 
         ## Build a middle path of a pipe-like shape.
         #  The path shape can be a wire or an edge.
index a3810ae06ec7e49cce3619272aa19c491e47b7d3..f0354e8c3478b518cc9eeae2474e8c26d20e92a2 100644 (file)
@@ -45,8 +45,8 @@ class Sketcher3D:
         sk = geompy.Sketcher3D()
         sk.addPointsAbsolute(0,0,0, 70,0,0)
         sk.addPointsRelative(0, 0, 130)
-        sk.addPointAnglesLength("OXY", 50, 0, 100)
-        sk.addPointAnglesLength("OXZ", 30, 80, 130)
+        sk.addPointRadiusAnglesRelative(50, 0, 100, 'OXY')
+        sk.addPointRadiusAnglesRelative(30, 80, 130, 'OXZ')
         sk.close()
         a3D_Sketcher_1 = sk.wire()
     """
index b5cc5e31a97392d73263e0b2ed30f29a8b31ecc5..c14903c946535caad7fcac80379896464caf0c6e 100644 (file)
@@ -109,12 +109,19 @@ GenerationGUI_PrismDlg::GenerationGUI_PrismDlg (GeometryGUI* theGeometryGUI, QWi
   GroupDXDYDZ->TextLabel5->setText(tr("GEOM_SCALE_FACTOR"));
   GroupDXDYDZ->CheckBox1->setText(tr("GEOM_BOTHWAY"));
   GroupDXDYDZ->CheckBox2->setText(tr("GEOM_SCALE_PRISM"));
+  
+  GroupThickening = new DlgRef_1Check1Spin1Check(centralWidget());
+  GroupThickening->GroupBox1->setTitle("Thickening");
+  GroupThickening->checkButton1->setText("Add thickness (edges or wires only)");
+  GroupThickening->checkButton2->setText("Thicken towards outside");
+  GroupThickening->TextLabel1->setText("Thickness");
 
   QVBoxLayout* layout = new QVBoxLayout(centralWidget());
   layout->setMargin(0); layout->setSpacing(6);
   layout->addWidget(GroupVecH);
   layout->addWidget(Group2Points);
   layout->addWidget(GroupDXDYDZ);
+  layout->addWidget(GroupThickening);
   /***************************************************************/
 
   setHelpFileName("create_extrusion_page.html");
@@ -145,6 +152,9 @@ void GenerationGUI_PrismDlg::Init()
   double aScaleFactor = 2.0;
   double aScaleStep = 0.5;
   double aScaleMin = Precision::Confusion() * 10.0;
+  
+  double aThickness = 10;
+  double aThicknessMin = Precision::Confusion() * 10.0;
 
   initSpinBox(GroupVecH->SpinBox_DX, COORD_MIN, COORD_MAX, step, "length_precision" );
   GroupVecH->SpinBox_DX->setValue(100.0);
@@ -163,6 +173,9 @@ void GenerationGUI_PrismDlg::Init()
   GroupVecH->SpinBox_DY->setValue(aScaleFactor);
   Group2Points->SpinBox1->setValue(aScaleFactor);
   GroupDXDYDZ->SpinBox_SC->setValue(aScaleFactor);
+  
+  initSpinBox(GroupThickening->SpinBox_DX, aThicknessMin, COORD_MAX, step, "length_precision" );
+  GroupThickening->SpinBox_DX->setValue(aThickness);
 
   // hide not used controls
   Group2Points->TextLabel5->hide();
@@ -190,6 +203,19 @@ void GenerationGUI_PrismDlg::Init()
   Group2Points->LineEdit3->setText("");
 
   GroupDXDYDZ->LineEdit1->setText("");
+  
+  GroupThickening->SpinBox_DX->hide();
+  GroupThickening->checkButton2->hide();
+  GroupThickening->TextLabel1->hide();
+  
+  GroupVecH->TextLabel4->hide();
+  GroupVecH->SpinBox_DY->hide();
+
+  Group2Points->TextLabel4->hide();
+  Group2Points->SpinBox1->hide();
+
+  GroupDXDYDZ->TextLabel5->hide();
+  GroupDXDYDZ->SpinBox_SC->hide();
 
   myBaseObjects.clear();
   myPoint1.nullify();
@@ -212,14 +238,14 @@ void GenerationGUI_PrismDlg::Init()
 
   connect(GroupVecH->CheckBox1,  SIGNAL(toggled(bool)), this, SLOT(onBothway()));
   connect(GroupVecH->CheckBox2,  SIGNAL(toggled(bool)), this, SLOT(onReverse()));
-  connect(GroupVecH->CheckBox3,  SIGNAL(toggled(bool)), this, SLOT(onScalePrism()));
+  connect(GroupVecH->CheckBox3,  SIGNAL(toggled(bool)), this, SLOT(onScalePrism(bool)));
   connect(GroupVecH->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
 
   connect(Group2Points->PushButton1, SIGNAL(clicked()),       this, SLOT(SetEditCurrentArgument()));
   connect(Group2Points->PushButton2, SIGNAL(clicked()),       this, SLOT(SetEditCurrentArgument()));
   connect(Group2Points->PushButton3, SIGNAL(clicked()),       this, SLOT(SetEditCurrentArgument()));
   connect(Group2Points->CheckBox1,   SIGNAL(toggled(bool)),   this, SLOT(onBothway()));
-  connect(Group2Points->CheckBox2,   SIGNAL(toggled(bool)),   this, SLOT(onScalePrism()));
+  connect(Group2Points->CheckBox2,   SIGNAL(toggled(bool)),   this, SLOT(onScalePrism(bool)));
   connect(Group2Points->SpinBox1,    SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
 
   connect(GroupDXDYDZ->PushButton1, SIGNAL(clicked()),            this, SLOT(SetEditCurrentArgument()));
@@ -228,7 +254,11 @@ void GenerationGUI_PrismDlg::Init()
   connect(GroupDXDYDZ->SpinBox_DZ,  SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
   connect(GroupDXDYDZ->SpinBox_SC,  SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
   connect(GroupDXDYDZ->CheckBox1,   SIGNAL(toggled(bool)),        this, SLOT(onBothway()));
-  connect(GroupDXDYDZ->CheckBox2,   SIGNAL(toggled(bool)),        this, SLOT(onScalePrism()));
+  connect(GroupDXDYDZ->CheckBox2,   SIGNAL(toggled(bool)),        this, SLOT(onScalePrism(bool)));
+  
+  connect(GroupThickening->SpinBox_DX,   SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox()));
+  connect(GroupThickening->checkButton1, SIGNAL(toggled(bool)),        this, SLOT(onAddThickening(bool)));
+  connect(GroupThickening->checkButton2, SIGNAL(toggled(bool)),        this, SLOT(onChangeDirection(bool)));
 
   initName(tr("GEOM_EXTRUSION"));
 
@@ -335,11 +365,19 @@ void GenerationGUI_PrismDlg::SelectionIntoArgument()
        myEditCurrentArgument == Group2Points->LineEdit1 ||
        myEditCurrentArgument == GroupDXDYDZ->LineEdit1 ) {
     myBaseObjects.clear();
+    GroupThickening->checkButton1->setEnabled(true);
+  
     QList<GEOM::GeomObjPtr> objects = getSelected( TopAbs_SHAPE, -1 );
     for ( int i = 0; i < objects.count(); i++ ) {
       GEOM::shape_type stype = objects[i]->GetMaxShapeType();
       if ( stype < GEOM::SHELL || stype > GEOM::VERTEX )
         continue;
+      if ( stype > GEOM::EDGE || stype < GEOM::WIRE )
+      {
+        GroupThickening->checkButton1->setChecked(false);
+        GroupThickening->checkButton1->setEnabled(false);
+      }
+        
       myBaseObjects << objects[i];
     }
     if ( !myBaseObjects.isEmpty() ) {
@@ -561,20 +599,53 @@ void GenerationGUI_PrismDlg::onBothway()
 // function : onScalePrism()
 // purpose  :
 //=================================================================================
-void GenerationGUI_PrismDlg::onScalePrism()
+void GenerationGUI_PrismDlg::onScalePrism(bool isChecked)
 {
-  GroupVecH->TextLabel4->setEnabled(GroupVecH->CheckBox3->isChecked());
-  GroupVecH->SpinBox_DY->setEnabled(GroupVecH->CheckBox3->isChecked());
+  GroupVecH->TextLabel4->setVisible(isChecked);
+  GroupVecH->SpinBox_DY->setVisible(isChecked);
+
+  Group2Points->TextLabel4->setVisible(isChecked);
+  Group2Points->SpinBox1->setVisible(isChecked);
 
-  Group2Points->TextLabel4->setEnabled(Group2Points->CheckBox2->isChecked());
-  Group2Points->SpinBox1->setEnabled(Group2Points->CheckBox2->isChecked());
+  GroupDXDYDZ->TextLabel5->setVisible(isChecked);
+  GroupDXDYDZ->SpinBox_SC->setVisible(isChecked);
+  
+  GroupVecH->TextLabel4->setEnabled(isChecked);
+  GroupVecH->SpinBox_DY->setEnabled(isChecked);
 
-  GroupDXDYDZ->TextLabel5->setEnabled(GroupDXDYDZ->CheckBox2->isChecked());
-  GroupDXDYDZ->SpinBox_SC->setEnabled(GroupDXDYDZ->CheckBox2->isChecked());
+  Group2Points->TextLabel4->setEnabled(isChecked);
+  Group2Points->SpinBox1->setEnabled(isChecked);
+
+  GroupDXDYDZ->TextLabel5->setEnabled(isChecked);
+  GroupDXDYDZ->SpinBox_SC->setEnabled(isChecked);
 
   processPreview();
 }
 
+//=================================================================================
+// function : onAddThickening(bool)
+// purpose  :
+//=================================================================================
+void GenerationGUI_PrismDlg::onAddThickening(bool isChecked)
+{
+  GroupThickening->SpinBox_DX->setVisible(isChecked);
+  GroupThickening->checkButton2->setVisible(isChecked);
+  GroupThickening->TextLabel1->setVisible(isChecked);
+  updateGeometry();
+  resize(minimumSizeHint());
+  processPreview();
+}
+
+//=================================================================================
+// function : onChangeDirection(bool)
+// purpose  :
+//=================================================================================
+void GenerationGUI_PrismDlg::onChangeDirection(bool isChecked)
+{
+  processPreview();
+}
+
 //=================================================================================
 // function : execute
 // purpose  :
@@ -585,6 +656,7 @@ bool GenerationGUI_PrismDlg::execute (ObjectList& objects)
   GEOM::GEOM_Object_var anObj;
 
   GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
+  GEOM::GEOM_I3DPrimOperations_var anotherOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
 
   for (int i = 0; i < myBaseObjects.count(); i++) {
     switch (getConstructorId()) {
@@ -641,7 +713,19 @@ bool GenerationGUI_PrismDlg::execute (ObjectList& objects)
       }
       break;
     }
-
+    
+    if(GroupThickening->checkButton1->isChecked())
+    { 
+      double aThickness = 0.0;
+      
+      if(GroupThickening->checkButton2->isChecked() ^ GroupVecH->CheckBox2->isChecked()) // if "towards outside" XOR "reversed" is checked
+        aThickness = -1.0*(GroupThickening->SpinBox_DX->value());                        // change the offset sign to negative
+      else
+        aThickness = GroupThickening->SpinBox_DX->value();                          
+      
+      anObj = anotherOper->MakeThickening(anObj, aThickness, /*copy=*/false);    
+    }
+    
     if (!anObj->_is_nil())
       objects.push_back(anObj._retn());
   }
index 5b1524517ec763b142bce27d60f51bd548db5863..01f3deff88aff4d5388d5b748a83c3696cdeda88 100644 (file)
@@ -33,6 +33,7 @@
 class DlgRef_2Sel1Spin3Check1Spin;
 class DlgRef_3Sel2Check3Spin;
 class DlgRef_1Sel3Spin2Check1Spin;
+class DlgRef_1Check1Spin1Check;
 
 //=================================================================================
 // class    : GenerationGUI_PrismDlg
@@ -66,6 +67,7 @@ private:
   DlgRef_2Sel1Spin3Check1Spin*       GroupVecH;
   DlgRef_3Sel2Check3Spin*            Group2Points;
   DlgRef_1Sel3Spin2Check1Spin*       GroupDXDYDZ;
+  DlgRef_1Check1Spin1Check*          GroupThickening;
   
 private slots:
   void                               ClickOnOk();
@@ -78,7 +80,9 @@ private slots:
   void                               SetDoubleSpinBoxStep( double );
   void                               onReverse();
   void                               onBothway();
-  void                               onScalePrism();
+  void                               onScalePrism(bool);
+  void                               onAddThickening( bool );
+  void                               onChangeDirection( bool );
 };
 
 #endif // GENERATIONGUI_PRISMDLG_H
index a49f2789d008dc7798ceeeb4da2f13ff66fdd367..d46f94206cb96ae95025add1641e6e97437247d4 100644 (file)
@@ -36,6 +36,7 @@
 #include <SUIT_ViewWindow.h>
 #include <SUIT_ViewManager.h>
 #include <SUIT_OverrideCursor.h>
+#include <SUIT_MessageBox.h>
 #include <SOCC_Prs.h>
 #include <SOCC_ViewModel.h>
 #include <SalomeApp_Tools.h>
@@ -433,9 +434,37 @@ bool MeasureGUI_DistanceDlg::execute (ObjectList& objects)
   int nbSols = anOper->ClosestPoints(myObj1, myObj2, aDbls);
 
   if (anOper->IsDone()) {
-    for (int i = 0; i < nbSols; i++) {
-      GEOM::GEOM_Object_var anObj1 = aBasicOper->MakePointXYZ(aDbls[i*6 + 0], aDbls[i*6 + 1], aDbls[i*6 + 2]);
-      GEOM::GEOM_Object_var anObj2 = aBasicOper->MakePointXYZ(aDbls[i*6 + 3], aDbls[i*6 + 4], aDbls[i*6 + 5]);
+    bool doPublishAll = true;
+    if (nbSols > 1) {
+      QMessageBox::StandardButton anAnswer =
+        SUIT_MessageBox::question(this, tr("GEOM_MINDIST_PUBLISH_TITLE"),
+                                  tr("GEOM_MINDIST_PUBLISH_TEXT"),
+                                  QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
+                                  QMessageBox::No);
+      if (anAnswer == QMessageBox::No)
+        doPublishAll = false;
+      else if (anAnswer != QMessageBox::Yes)
+        return true;
+    }
+    if (doPublishAll) {
+      for (int i = 0; i < nbSols; i++) {
+        GEOM::GEOM_Object_var anObj1 =
+          aBasicOper->MakePointXYZ(aDbls[i*6 + 0], aDbls[i*6 + 1], aDbls[i*6 + 2]);
+        GEOM::GEOM_Object_var anObj2 =
+          aBasicOper->MakePointXYZ(aDbls[i*6 + 3], aDbls[i*6 + 4], aDbls[i*6 + 5]);
+
+        if (!anObj1->_is_nil() && !anObj2->_is_nil()) {
+          objects.push_back(anObj1._retn());
+          objects.push_back(anObj2._retn());
+        }
+      }
+    }
+    else {
+      int i = myGrp->ComboBox1->currentIndex();
+      GEOM::GEOM_Object_var anObj1 =
+        aBasicOper->MakePointXYZ(aDbls[i*6 + 0], aDbls[i*6 + 1], aDbls[i*6 + 2]);
+      GEOM::GEOM_Object_var anObj2 =
+        aBasicOper->MakePointXYZ(aDbls[i*6 + 3], aDbls[i*6 + 4], aDbls[i*6 + 5]);
 
       if (!anObj1->_is_nil() && !anObj2->_is_nil()) {
         objects.push_back(anObj1._retn());