]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Merge from branch BR_Dev_For_4_0 (from tag mergeto_BR_QT4_Dev_12Feb08)
authorvsr <vsr@opencascade.com>
Tue, 12 Feb 2008 15:57:45 +0000 (15:57 +0000)
committervsr <vsr@opencascade.com>
Tue, 12 Feb 2008 15:57:45 +0000 (15:57 +0000)
61 files changed:
doc/salome/gui/GEOM/images/extrusion1.png
doc/salome/gui/GEOM/images/extrusion2.png
doc/salome/gui/GEOM/images/filling.png
doc/salome/gui/GEOM/images/line.png [deleted file]
doc/salome/gui/GEOM/images/line1.png [new file with mode: 0755]
doc/salome/gui/GEOM/images/line2.png [new file with mode: 0755]
doc/salome/gui/GEOM/images/point1.png
doc/salome/gui/GEOM/images/point2.png [new file with mode: 0755]
doc/salome/gui/GEOM/images/point3.png
doc/salome/gui/GEOM/images/point4.png [new file with mode: 0755]
doc/salome/gui/GEOM/images/revolution.png
doc/salome/gui/GEOM/input/creating_complex_obj.doc
doc/salome/gui/GEOM/input/creating_extrusion.doc
doc/salome/gui/GEOM/input/creating_filling.doc
doc/salome/gui/GEOM/input/creating_geom_objects.doc
doc/salome/gui/GEOM/input/creating_line.doc
doc/salome/gui/GEOM/input/creating_point.doc
doc/salome/gui/GEOM/input/creating_revolution.doc
doc/salome/gui/GEOM/input/index.doc
idl/GEOM_Gen.idl
idl/GEOM_Superv.idl
resources/GEOMCatalog.xml.in
src/BooleanGUI/BooleanGUI_Dialog.cxx
src/DlgRef/DlgRef.cxx
src/DlgRef/DlgRef.h
src/DlgRef/DlgRef_1Sel1Spin_QTD.ui
src/DlgRef/DlgRef_1Sel3Spin_QTD.ui
src/DlgRef/DlgRef_1Sel4Spin_QTD.ui
src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.ui [new file with mode: 0644]
src/DlgRef/DlgRef_3Spin_QTD.ui
src/DlgRef/DlgRef_Skeleton_QTD.ui
src/DlgRef/Makefile.am
src/EntityGUI/EntityGUI_SubShapeDlg.cxx
src/GEOM/GEOM_Engine.cxx
src/GEOM/GEOM_Engine.hxx
src/GEOM/GEOM_Gen_i.cc
src/GEOMGUI/GEOM_msg_en.ts
src/GEOMImpl/GEOMImpl_BoxDriver.cxx
src/GEOMImpl/GEOMImpl_FillingDriver.cxx
src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx
src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx
src/GEOMImpl/GEOMImpl_IFilling.hxx
src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
src/GEOMImpl/GEOMImpl_RotateDriver.cxx
src/GEOMImpl/GEOMImpl_ShapeDriver.cxx
src/GEOMImpl/GEOMImpl_TranslateDriver.cxx
src/GEOM_I/GEOM_Gen_i.cc
src/GEOM_I/GEOM_I3DPrimOperations_i.cc
src/GEOM_I/GEOM_I3DPrimOperations_i.hh
src/GEOM_I/GEOM_IBooleanOperations_i.cc
src/GEOM_I/GEOM_IOperations_i.cc
src/GEOM_I/GEOM_IOperations_i.hh
src/GEOM_I/GEOM_Object_i.cc
src/GEOM_I/GEOM_Object_i.hh
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/GEOM_I_Superv/GEOM_Superv_i.hh
src/GEOM_SWIG/batchmode_geompy.py
src/GEOM_SWIG/geompyDC.py
src/GenerationGUI/GenerationGUI_FillingDlg.cxx
src/GenerationGUI/GenerationGUI_FillingDlg.h
src/RepairGUI/RepairGUI_GlueDlg.cxx

index 673e863252848904ca8257f1530b55f95c9dc636..44a1822256c87e8809a85cd8de872f03b1d5551e 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/extrusion1.png and b/doc/salome/gui/GEOM/images/extrusion1.png differ
index b56dc5d49f5c5ccc0f5d2c5b65f9aec1462b8b75..53dbe7d72b5970fa5624a1a93645980a4b957931 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/extrusion2.png and b/doc/salome/gui/GEOM/images/extrusion2.png differ
index 418c22431a22619f4dc692f96e22f5621d389b47..1fb29455c8d99228329e0b9270bf785770f81fb7 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/filling.png and b/doc/salome/gui/GEOM/images/filling.png differ
diff --git a/doc/salome/gui/GEOM/images/line.png b/doc/salome/gui/GEOM/images/line.png
deleted file mode 100755 (executable)
index 3c931a1..0000000
Binary files a/doc/salome/gui/GEOM/images/line.png and /dev/null differ
diff --git a/doc/salome/gui/GEOM/images/line1.png b/doc/salome/gui/GEOM/images/line1.png
new file mode 100755 (executable)
index 0000000..139809a
Binary files /dev/null and b/doc/salome/gui/GEOM/images/line1.png differ
diff --git a/doc/salome/gui/GEOM/images/line2.png b/doc/salome/gui/GEOM/images/line2.png
new file mode 100755 (executable)
index 0000000..f5d68da
Binary files /dev/null and b/doc/salome/gui/GEOM/images/line2.png differ
index 39bca25f4e9874b254099f7d58eade9b2cb631ba..e359819c551674f173bcefe816a468ff0f4a9245 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/point1.png and b/doc/salome/gui/GEOM/images/point1.png differ
diff --git a/doc/salome/gui/GEOM/images/point2.png b/doc/salome/gui/GEOM/images/point2.png
new file mode 100755 (executable)
index 0000000..df151ab
Binary files /dev/null and b/doc/salome/gui/GEOM/images/point2.png differ
index 0a2e325c64a4c0b6c2697790750ee6911bcb6ec7..14e9827c7b36738eab8dd4328bdb40c5e4aff745 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/point3.png and b/doc/salome/gui/GEOM/images/point3.png differ
diff --git a/doc/salome/gui/GEOM/images/point4.png b/doc/salome/gui/GEOM/images/point4.png
new file mode 100755 (executable)
index 0000000..b29de10
Binary files /dev/null and b/doc/salome/gui/GEOM/images/point4.png differ
index c02c859b1bf80dc0eead7039ff9111d4bec9e9c4..68761025a732b4a3ad42bc323b6069fda7c39efb 100755 (executable)
Binary files a/doc/salome/gui/GEOM/images/revolution.png and b/doc/salome/gui/GEOM/images/revolution.png differ
index 23927a4a90d78a709c15d608790ed689bb9562ea..6edbfd9c558351d4f7661f09657731daa9744c68 100644 (file)
@@ -5,8 +5,8 @@
 <ul>
 <li>\subpage create_extrusion_page</li>
 <li>\subpage create_revolution_page</li>
-<li>\subpage creaet_filling_page</li>
+<li>\subpage create_filling_page</li>
 <li>\subpage create_extrusion_alongpath_page</li>
 </ul>
 
-*/
\ No newline at end of file
+*/
index 4b2c0ac0c8fba4dcd1e2a19da1f7ac166c0e94bd..3f3435ca63af7db30460688b174d26850399e8c6 100644 (file)
@@ -12,7 +12,11 @@ solid or compsolid).
 \n Firstly, you can define the <b>Base Shape</b> (a basis of the
 extrusion), the \b Vector (a direction of the extrusion) and the \b
 Height of extrusion.
-\b <b>TUI Command:</b> <em>geompy.MakePrismVecH(Base, Vector, Height)</em>
+\n The \b Result of the operation will be a GEOM_Object (edge, face,
+shell, solid or compsolid).
+\n <b> Both Directions </b> checkbox allows extruiding the source
+object both forward and backward. 
+\n <b>TUI Command:</b> <em>geompy.MakePrismVecH(Base, Vector, Height)</em>
 \n <b>Arguments:</b> Name + 1 shape (vertex, edge, planar wire, face or
 shell) serving as base object + 1 vector (for direction of the
 extrusion) + 1 value (dimension).
@@ -22,6 +26,8 @@ extrusion) + 1 value (dimension).
 \n Secondly, you can define the \b Extrusion by the <b>Base Shape</b>
 and the \b Start and <b>End Point</b> of the \b Vector (in this way
 you don't need to create it in advance).
+\n <b> Both Directions </b> checkbox allows extruiding the source
+object both forward and backward. 
 \n <b>TUI Command:</b> <em>geompy.MakePrism(Base, Point1, Point2)</em>
 \n <b>Arguments:</b> Name + 1 shape (vertex, edge, planar wire, face or
 shell) serving as base object + 2 vertices.
index 25c99395a142a004d1a42ddacbf27140ebfd7b07..82d446f2c31c8812b6cc41190c4b47280dca4939 100644 (file)
@@ -1,18 +1,20 @@
 /*!
 
-\page creaet_filling_page Filling Surface with Edges
+\page create_filling_page Filling Surface with Edges
 
 To generate a \b Filling in the <b>Main Menu</b> select <b>New Entity - > Generation  - > Filling</b>
 
 \n To create a curving face using several edges you need to define the
 <b>Edges Compound</b>, \b Minimum and <b>Maximum Degree</b>, \b
-Tolerance for \b 2D and for \b 3D  and the <b>Number of Iterations</b>.
+Tolerance for \b 2D and for \b 3D , the <b>Number of Iterations</b>
+and <b>Approximation</b>.
 \n The \b Result of the operation will be a GEOM_Object (face).
 
-\n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter)</em>
-\n <b>Arguments:</b> Name + 1 List of edges + 5 Parameters
+\n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree,
+MaxDegree, Tol2D, Tol3D, NbIter, isApprox)</em>
+\n <b>Arguments:</b> Name + 1 List of edges + 6 Parameters
 (Min. degree, Max. degree, Number of iterations, 2D tolerance, 3D
-tolerance, Number of iterations).
+tolerance, Number of iterations, Approximation).
 
 \image html filling.png
 
index bc66bed97314ae397579f33576fd97d5e7c72a38..1c804ae7102c61f018717113b65c0362fff97a3a 100644 (file)
@@ -28,7 +28,7 @@
 <ul>
 <li>\ref create_extrusion_page</li>
 <li>\ref create_revolution_page</li>
-<li>\ref creaet_filling_page</li>
+<li>\ref create_filling_page</li>
 <li>\ref create_extrusion_alongpath_page</li>
 </ul>
 <li>\subpage work_with_groups_page</li>
@@ -46,4 +46,4 @@
 </ul>
 </ul>
 
-*/
\ No newline at end of file
+*/
index befde32ed1c0c1c422e36457afefb2c103e88144..fafdfcea9d5760a922d24763e540e12b8e5285cf 100644 (file)
@@ -4,14 +4,24 @@
 
 To create a \b Line in the <b>Main Menu</b> select <b>New Entity - >Basic - > Line</b>
 
-\n To create a \b Line you should define \b Point1 and \b Point2,
-which are the points through  which the \b Line passes.
-\n The \b Result of the operation will be a GEOM_Object (edge).
 
+There are 2 algorithms to create a \b Line in the 3D space.
+The Result of each operation will be a GEOM_Object (edge).
+
+\n Firstly you can define a \b Line through \b Point1 and \b Point2,
+which are the points through  which the \b Line passes.
 \n <b>TUI Command:</b> <em>geompy.MakeLineTwoPnt(Point1, Point2)</em>
 \n <b>Arguments:</b> Name + 2 vertices.
 
-\image html line.png
+\image html line1.png
+
+\n Secondly you can define a \b Line as intersection of  \b Plane1 and
+\b Plane2.
+\n <b>TUI Command:</b> <em>geompy.MakeLineTwoFaces(myFace1, myFace2)</em>
+\n <b>Arguments:</b> Name + 2 faces.
+
+\image html line2.png
+
 
 <b>Example:</b>
 
index 0f91a0f05e0f191f7d7618a33e67732449ff232e..5e170327046556b193c2c3e5963f77c341be847b 100644 (file)
@@ -5,7 +5,7 @@
 To create a \b Point in the <b>Main Menu</b> select <b>New Entity - >
 Basic - > Point</b>
 
-\n There are three algorithms to create a \b Point in the 3D space.
+\n There are four algorithms to create a \b Point in the 3D space.
 \n Each time the \b Result of the operation will be a GEOM_Object
 (vertex).
 
@@ -23,9 +23,9 @@ coordinates of the old one.
 \n <b>Arguments:</b> Name + 1 reference point + 3 coordinates defining
 the position of this point regarding the reference one.
 
-\image html neo-point2.png
+\image html point2.png
 
-\n Finally, we can define a point by an \b Edge and a \b Parameter
+\n Thirdly, we can define a point by an \b Edge and a \b Parameter
 indicating its position on the Edge, ranging from 0.0 to 1.0. For example, 0.5 means that the
 point is located in the middle of the edge.
 \n <b>TUI Command:</b> <em>geompy.MakeVertexOnCurve(Edge,Parameter).</em>
@@ -34,6 +34,11 @@ position of the point on the given edge.
 
 \image html point3.png
 
+\n Finally, we can define a point by intersection of two \b  Lines.
+\n <b>TUI Command:</b> <em>geompy.MakePointOnLinesIntersection(myLine1,myLine2).</em>
+\n <b>Arguments:</b> Name + 2 lines
+
+\image html point4.png
 <b>Example:</b>
 
 \image html points.png
index dfe8c7ca5aae93773caa7a9ad67d946dc7fe0707..b9d2d7086d871d82fbcdbf07426ee6fb7b7558df 100644 (file)
@@ -8,6 +8,8 @@ select <b>New Entity - > Generation  - > Revolution</b>
 \n To create an extruded shape by \b Revolution you need to define the
 source \b Object to rotate, the \b Axis of revolution and the \b Angle by which
 the \b Shape has to be rotated around the \b Axis (in degrees).
+\n <b> Both Directions </b> checkbox allows extruding the source
+object both forward and backward.
 \n The \b Result of the operation will be a GEOM_Object (edge, face, shell,
 solid or compsolid).
 
index 3d2d5d102d7535300e0514e056c41c919ede0e19..45eb2ac656c7dd711982a4b491946bc5d6e5ed0e 100644 (file)
@@ -32,7 +32,7 @@
 <ul>
 <li>\ref create_extrusion_page</li>
 <li>\ref create_revolution_page</li>
-<li>\ref creaet_filling_page</li>
+<li>\ref create_filling_page</li>
 <li>\ref create_extrusion_alongpath_page</li>
 </ul>
 <li>\ref work_with_groups_page</li>
 </ul>
 </ul>
 
-*/
\ No newline at end of file
+*/
index ff1d4044ab0cc35d4ed76aa18b27d16a654d0d71..de4600e277da9ea6ae230fbd74fa6e7802544ebc 100644 (file)
@@ -902,7 +902,7 @@ module GEOM
     GEOM_Object MakeFilling (in GEOM_Object theShape,
                             in long theMinDeg, in long theMaxDeg,
                             in double theTol2D, in double theTol3D,
-                            in long theNbIter);
+                            in long theNbIter, in boolean theApprox);
 
     /*!
      *  Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
index dcaecd95f154c65e4c2c4b893ec6640a2bd6440a..98d819daf53cf3e67e8be321cef78a42e1d00ac6 100644 (file)
@@ -176,7 +176,7 @@ module GEOM
     GEOM_Object MakeFilling (in GEOM_Object theShape,
                             in long theMinDeg, in long theMaxDeg,
                             in double theTol2D, in double theTol3D,
-                            in long theNbIter) ;
+                            in long theNbIter, in boolean theApprox) ;
     GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
                                 in boolean theModeSolid,
                                 in double thePreci,
index 2a3f4aa094b9279903d727f6c2b952175675fbb1..2739da315910312cb578874abbe03712dc3ec01f 100644 (file)
@@ -8,6 +8,35 @@
 <path-prefix-list>
 </path-prefix-list>
 
+<!-- Geom data types  -->
+<type-list>
+  <type name="BCErrorType" kind="int"/>
+  <objref name="GEOM_Object" id="IDL:GEOM/GEOM_Object:1.0" />
+  <objref name="GEOM_List"  id="IDL:GEOM/GEOM_List:1.0" />
+  <objref name="GEOM_Gen"  id="IDL:GEOM/GEOM_Gen:1.0" />
+  <objref name="GEOM_Shape"  id="IDL:GEOM/GEOM_Object:1.0" />
+  <objref name="GEOM_Superv"  id="IDL:GEOM/GEOM_Superv:1.0" />
+  <objref name="GEOM_IBasicOperations"  id="IDL:GEOM/GEOM_IBasicOperations:1.0" />
+  <objref name="GEOM_ITransformOperations"  id="IDL:GEOM/GEOM_ITransformOperations:1.0" />
+  <objref name="GEOM_I3DPrimOperations"  id="IDL:GEOM/GEOM_I3DPrimOperations:1.0" />
+  <objref name="GEOM_IShapesOperations"  id="IDL:GEOM/GEOM_IShapesOperations:1.0" />
+  <objref name="GEOM_IBooleanOperations"  id="IDL:GEOM/GEOM_IBooleanOperations:1.0" />
+  <objref name="GEOM_ICurvesOperations"  id="IDL:GEOM/GEOM_ICurvesOperations:1.0" />
+  <objref name="GEOM_ILocalOperations"  id="IDL:GEOM/GEOM_ILocalOperations:1.0" />
+  <objref name="GEOM_IHealingOperations"  id="IDL:GEOM/GEOM_IHealingOperations:1.0" />
+  <objref name="GEOM_IInsertOperations"  id="IDL:GEOM/GEOM_IInsertOperations:1.0" />
+  <objref name="GEOM_IMeasureOperations"  id="IDL:GEOM/GEOM_IMeasureOperations:1.0" />
+  <objref name="GEOM_IBlocksOperations"  id="IDL:GEOM/GEOM_IBlocksOperations:1.0" />
+  <objref name="GEOM_IGroupOperations"  id="IDL:GEOM/GEOM_IGroupOperations:1.0" />
+  <sequence name="ListOfLong" content="int"  />
+  <sequence name="ListOfGO" content="GEOM_Object"  />
+  <sequence name="string_array" content="string"  />
+  <struct name="BCError" >
+    <member name="incriminated" type="ListOfLong"/>
+  </struct>
+  <sequence name="BCErrors" content="BCError"  />
+</type-list>
+
 <!-- Component list -->
 <component-list>
     <component>
index ad3c7195bc27e66a7c2368c5189ffb47509f69a8..216809e30b7f84952625840827bce854f15060be 100644 (file)
@@ -147,6 +147,12 @@ void BooleanGUI_Dialog::Init()
 
   initName( mainFrame()->GroupConstructors->title() );
 
+  setTabOrder( mainFrame()->GroupConstructors, mainFrame()->GroupBoxName );
+  setTabOrder( mainFrame()->GroupBoxName, mainFrame()->GroupMedium );
+  setTabOrder( mainFrame()->GroupMedium, mainFrame()->GroupButtons );
+
+  mainFrame()->RadioButton1->setFocus();
+
   globalSelection( GEOM_ALLSHAPES );
 }
 
index eea049df63a6afd902a7b3f9d4a39dfd5054f07f..8acd7cc9ea50583fd0b1f24675b9ff21166cc69a 100644 (file)
@@ -191,6 +191,20 @@ DlgRef_1Sel4Spin::~DlgRef_1Sel4Spin()
 {
 }
 
+//////////////////////////////////////////
+// DlgRef_1Sel5Spin1Check
+//////////////////////////////////////////
+
+DlgRef_1Sel5Spin1Check::DlgRef_1Sel5Spin1Check( QWidget* parent, Qt::WindowFlags f )
+: QWidget( parent, f )
+{
+  setupUi( this );
+}
+
+DlgRef_1Sel5Spin1Check::~DlgRef_1Sel5Spin1Check()
+{
+}
+
 //////////////////////////////////////////
 // DlgRef_1Sel5Spin
 //////////////////////////////////////////
index 91266adfe911e3c2ab5bbc6e6a73626b85617be1..f3f42a6cf3a8e11e6552d1cc44ab7ecb60ee5e55 100644 (file)
@@ -226,6 +226,22 @@ public:
   ~DlgRef_1Sel4Spin();
 };
 
+//////////////////////////////////////////
+// DlgRef_1Sel5Spin1Check
+//////////////////////////////////////////
+
+#include "ui_DlgRef_1Sel5Spin1Check_QTD.h"
+
+class DLGREF_EXPORT DlgRef_1Sel5Spin1Check : public QWidget, 
+                                             public Ui::DlgRef_1Sel5Spin1Check_QTD
+{
+  Q_OBJECT
+
+public:
+  DlgRef_1Sel5Spin1Check( QWidget* = 0, Qt::WindowFlags = 0 );
+  ~DlgRef_1Sel5Spin1Check();
+};
+
 //////////////////////////////////////////
 // DlgRef_1Sel5Spin
 //////////////////////////////////////////
index 09c6d0baf900007f0c542b3575ef922ba4411789..7c8dc21453fffcba5fb9923a6c1f2479e2dac32b 100644 (file)
    <string/>
   </property>
   <layout class="QGridLayout" >
-   <property name="margin" >
+   <property name="leftMargin" >
     <number>0</number>
    </property>
-   <property name="spacing" >
+   <property name="topMargin" >
+    <number>0</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>0</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>0</number>
+   </property>
+   <property name="verticalSpacing" >
     <number>0</number>
    </property>
    <item row="0" column="0" >
       <string/>
      </property>
      <layout class="QGridLayout" >
-      <property name="margin" >
+      <property name="leftMargin" >
        <number>9</number>
       </property>
-      <property name="spacing" >
+      <property name="topMargin" >
+       <number>9</number>
+      </property>
+      <property name="rightMargin" >
+       <number>9</number>
+      </property>
+      <property name="bottomMargin" >
+       <number>9</number>
+      </property>
+      <property name="horizontalSpacing" >
+       <number>6</number>
+      </property>
+      <property name="verticalSpacing" >
        <number>6</number>
       </property>
       <item row="0" column="0" >
        <widget class="QLabel" name="TextLabel1" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
@@ -55,9 +77,7 @@
       <item row="0" column="1" >
        <widget class="QPushButton" name="PushButton1" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
@@ -70,9 +90,7 @@
       <item row="1" column="0" >
        <widget class="QLabel" name="TextLabel2" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
  </widget>
  <layoutdefault spacing="6" margin="11" />
  <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+ </tabstops>
  <resources/>
  <connections/>
 </ui>
index b24ce527e84a1beb02885defe3e9adc708802d0c..43a3485468cf8d088d34a44c0a035187375328db 100644 (file)
    <string/>
   </property>
   <layout class="QGridLayout" >
-   <property name="margin" >
+   <property name="leftMargin" >
     <number>0</number>
    </property>
-   <property name="spacing" >
+   <property name="topMargin" >
+    <number>0</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>0</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>6</number>
+   </property>
+   <property name="verticalSpacing" >
     <number>6</number>
    </property>
    <item row="0" column="0" >
       <string/>
      </property>
      <layout class="QGridLayout" >
-      <property name="margin" >
+      <property name="leftMargin" >
        <number>9</number>
       </property>
-      <property name="spacing" >
+      <property name="topMargin" >
+       <number>9</number>
+      </property>
+      <property name="rightMargin" >
+       <number>9</number>
+      </property>
+      <property name="bottomMargin" >
+       <number>9</number>
+      </property>
+      <property name="horizontalSpacing" >
+       <number>6</number>
+      </property>
+      <property name="verticalSpacing" >
        <number>6</number>
       </property>
       <item row="2" column="1" colspan="2" >
@@ -43,9 +67,7 @@
       <item row="1" column="0" >
        <widget class="QLabel" name="TextLabel2" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
@@ -61,9 +83,7 @@
       <item row="3" column="0" >
        <widget class="QLabel" name="TextLabel4" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
@@ -79,9 +99,7 @@
       <item row="2" column="0" >
        <widget class="QLabel" name="TextLabel3" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
       <item row="0" column="0" >
        <widget class="QLabel" name="TextLabel1" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
       <item row="0" column="1" >
        <widget class="QPushButton" name="PushButton1" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
  </widget>
  <layoutdefault spacing="6" margin="11" />
  <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+ </tabstops>
  <resources/>
  <connections/>
 </ui>
index 95a35fc01ea7b53f10444f4256c37034cd6c0583..dc922e69b990ec091254821b9dc8f8bfe5105705 100644 (file)
    <string/>
   </property>
   <layout class="QGridLayout" >
-   <property name="margin" >
+   <property name="leftMargin" >
     <number>0</number>
    </property>
-   <property name="spacing" >
+   <property name="topMargin" >
+    <number>0</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>0</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>6</number>
+   </property>
+   <property name="verticalSpacing" >
     <number>6</number>
    </property>
    <item row="0" column="0" >
       <string/>
      </property>
      <layout class="QGridLayout" >
-      <property name="margin" >
+      <property name="leftMargin" >
+       <number>9</number>
+      </property>
+      <property name="topMargin" >
+       <number>9</number>
+      </property>
+      <property name="rightMargin" >
+       <number>9</number>
+      </property>
+      <property name="bottomMargin" >
        <number>9</number>
       </property>
-      <property name="spacing" >
+      <property name="horizontalSpacing" >
+       <number>6</number>
+      </property>
+      <property name="verticalSpacing" >
        <number>6</number>
       </property>
       <item row="2" column="0" >
        <widget class="QLabel" name="TextLabel6" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
          <string/>
         </property>
         <layout class="QHBoxLayout" >
-         <property name="margin" >
-          <number>9</number>
-         </property>
          <property name="spacing" >
           <number>6</number>
          </property>
+         <property name="leftMargin" >
+          <number>9</number>
+         </property>
+         <property name="topMargin" >
+          <number>9</number>
+         </property>
+         <property name="rightMargin" >
+          <number>9</number>
+         </property>
+         <property name="bottomMargin" >
+          <number>9</number>
+         </property>
          <item>
           <widget class="QLabel" name="TextLabel3" >
            <property name="sizePolicy" >
-            <sizepolicy>
-             <hsizetype>0</hsizetype>
-             <vsizetype>0</vsizetype>
+            <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
          <item>
           <widget class="QLabel" name="TextLabel4" >
            <property name="sizePolicy" >
-            <sizepolicy>
-             <hsizetype>0</hsizetype>
-             <vsizetype>0</vsizetype>
+            <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
          <item>
           <widget class="QLabel" name="TextLabel5" >
            <property name="sizePolicy" >
-            <sizepolicy>
-             <hsizetype>0</hsizetype>
-             <vsizetype>0</vsizetype>
+            <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
       <item row="0" column="1" >
        <widget class="QPushButton" name="PushButton1" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
       <item row="0" column="0" >
        <widget class="QLabel" name="TextLabel1" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
  </widget>
  <layoutdefault spacing="6" margin="11" />
  <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+  <tabstop>SpinBox_S</tabstop>
+ </tabstops>
  <resources/>
  <connections/>
 </ui>
diff --git a/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.ui b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.ui
new file mode 100644 (file)
index 0000000..f6bd86a
--- /dev/null
@@ -0,0 +1,189 @@
+<ui version="4.0" >
+ <class>DlgRef_1Sel5Spin1Check_QTD</class>
+ <widget class="QWidget" name="DlgRef_1Sel5Spin1Check_QTD" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>165</width>
+    <height>125</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string/>
+  </property>
+  <layout class="QGridLayout" >
+   <property name="leftMargin" >
+    <number>0</number>
+   </property>
+   <property name="topMargin" >
+    <number>0</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>0</number>
+   </property>
+   <item row="0" column="0" >
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="title" >
+      <string/>
+     </property>
+     <layout class="QGridLayout" >
+      <item row="0" column="0" >
+       <widget class="QLabel" name="TextLabel1" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="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="0" column="1" >
+       <widget class="QPushButton" name="PushButton1" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text" >
+         <string/>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="2" >
+       <widget class="QLineEdit" name="LineEdit1" />
+      </item>
+      <item row="1" column="0" colspan="3" >
+       <layout class="QGridLayout" >
+        <item row="0" column="0" >
+         <widget class="QLabel" name="TextLabel2" >
+          <property name="sizePolicy" >
+           <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text" >
+           <string>TL2</string>
+          </property>
+          <property name="wordWrap" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QDoubleSpinBox" name="SpinBox1" />
+        </item>
+        <item row="0" column="2" >
+         <widget class="QLabel" name="TextLabel3" >
+          <property name="sizePolicy" >
+           <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text" >
+           <string>TL3</string>
+          </property>
+          <property name="wordWrap" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="3" >
+         <widget class="QDoubleSpinBox" name="SpinBox2" />
+        </item>
+        <item row="1" column="0" >
+         <widget class="QLabel" name="TextLabel5" >
+          <property name="sizePolicy" >
+           <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text" >
+           <string>TL5</string>
+          </property>
+          <property name="wordWrap" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QDoubleSpinBox" name="SpinBox4" />
+        </item>
+        <item row="1" column="2" >
+         <widget class="QLabel" name="TextLabel6" >
+          <property name="sizePolicy" >
+           <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text" >
+           <string>TL6</string>
+          </property>
+          <property name="wordWrap" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="3" >
+         <widget class="QDoubleSpinBox" name="SpinBox5" />
+        </item>
+        <item row="2" column="0" >
+         <widget class="QLabel" name="TextLabel4" >
+          <property name="sizePolicy" >
+           <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+          <property name="text" >
+           <string>TL4</string>
+          </property>
+          <property name="wordWrap" >
+           <bool>false</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QDoubleSpinBox" name="SpinBox3" />
+        </item>
+        <item row="2" column="2" colspan="2" >
+         <widget class="QCheckBox" name="CheckBox1" >
+          <property name="text" >
+           <string/>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <tabstops>
+  <tabstop>PushButton1</tabstop>
+  <tabstop>LineEdit1</tabstop>
+  <tabstop>SpinBox1</tabstop>
+  <tabstop>SpinBox2</tabstop>
+  <tabstop>SpinBox4</tabstop>
+  <tabstop>SpinBox5</tabstop>
+  <tabstop>SpinBox3</tabstop>
+  <tabstop>CheckBox1</tabstop>
+ </tabstops>
+ <resources/>
+ <connections/>
+</ui>
index 30bca472d00b7ff582279deb57375250afebdce0..8eab2dbf2c901014c1151866e523e05fe2988304 100644 (file)
    <string/>
   </property>
   <layout class="QGridLayout" >
-   <property name="margin" >
+   <property name="leftMargin" >
     <number>0</number>
    </property>
-   <property name="spacing" >
+   <property name="topMargin" >
+    <number>0</number>
+   </property>
+   <property name="rightMargin" >
+    <number>0</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>0</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>0</number>
+   </property>
+   <property name="verticalSpacing" >
     <number>0</number>
    </property>
    <item row="0" column="0" >
       <string/>
      </property>
      <layout class="QGridLayout" >
-      <property name="margin" >
+      <property name="leftMargin" >
        <number>9</number>
       </property>
-      <property name="spacing" >
+      <property name="topMargin" >
+       <number>9</number>
+      </property>
+      <property name="rightMargin" >
+       <number>9</number>
+      </property>
+      <property name="bottomMargin" >
+       <number>9</number>
+      </property>
+      <property name="horizontalSpacing" >
+       <number>6</number>
+      </property>
+      <property name="verticalSpacing" >
        <number>6</number>
       </property>
       <item row="2" column="1" >
@@ -43,9 +67,7 @@
       <item row="1" column="0" >
        <widget class="QLabel" name="TextLabel2" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
@@ -61,9 +83,7 @@
       <item row="0" column="0" >
        <widget class="QLabel" name="TextLabel1" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
@@ -79,9 +99,7 @@
       <item row="2" column="0" >
        <widget class="QLabel" name="TextLabel3" >
         <property name="sizePolicy" >
-         <sizepolicy>
-          <hsizetype>0</hsizetype>
-          <vsizetype>0</vsizetype>
+         <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
  </widget>
  <layoutdefault spacing="6" margin="11" />
  <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+  <tabstop>SpinBox_DX</tabstop>
+  <tabstop>SpinBox_DY</tabstop>
+  <tabstop>SpinBox_DZ</tabstop>
+ </tabstops>
  <resources/>
  <connections/>
 </ui>
index a249ecde2b7e0904bdad618e9f9678b9eb8b9344..251a152355a4af7e8bbae16f0ae46f2960213ddb 100644 (file)
    <string/>
   </property>
   <layout class="QGridLayout" >
-   <property name="margin" >
+   <property name="leftMargin" >
     <number>9</number>
    </property>
-   <property name="spacing" >
+   <property name="topMargin" >
+    <number>9</number>
+   </property>
+   <property name="rightMargin" >
+    <number>9</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>9</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>6</number>
+   </property>
+   <property name="verticalSpacing" >
     <number>6</number>
    </property>
    <item row="1" column="0" >
     <widget class="QGroupBox" name="GroupBoxName" >
      <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>5</hsizetype>
-       <vsizetype>0</vsizetype>
+      <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
       <string>Result name</string>
      </property>
      <layout class="QHBoxLayout" >
-      <property name="margin" >
-       <number>9</number>
-      </property>
       <property name="spacing" >
        <number>6</number>
       </property>
+      <property name="leftMargin" >
+       <number>9</number>
+      </property>
+      <property name="topMargin" >
+       <number>9</number>
+      </property>
+      <property name="rightMargin" >
+       <number>9</number>
+      </property>
+      <property name="bottomMargin" >
+       <number>9</number>
+      </property>
       <item>
        <widget class="QLabel" name="NameLabel" >
         <property name="text" >
@@ -58,9 +77,7 @@
    <item row="0" column="0" >
     <widget class="QGroupBox" name="GroupConstructors" >
      <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>5</hsizetype>
-       <vsizetype>0</vsizetype>
+      <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
       <string/>
      </property>
      <layout class="QHBoxLayout" >
-      <property name="margin" >
-       <number>9</number>
-      </property>
       <property name="spacing" >
        <number>6</number>
       </property>
+      <property name="leftMargin" >
+       <number>9</number>
+      </property>
+      <property name="topMargin" >
+       <number>9</number>
+      </property>
+      <property name="rightMargin" >
+       <number>9</number>
+      </property>
+      <property name="bottomMargin" >
+       <number>9</number>
+      </property>
       <item>
        <widget class="QRadioButton" name="RadioButton1" >
         <property name="text" >
    <item row="3" column="0" >
     <widget class="QGroupBox" name="GroupButtons" >
      <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>0</vsizetype>
+      <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
       <string/>
      </property>
      <layout class="QHBoxLayout" >
-      <property name="margin" >
-       <number>9</number>
-      </property>
       <property name="spacing" >
        <number>6</number>
       </property>
+      <property name="leftMargin" >
+       <number>9</number>
+      </property>
+      <property name="topMargin" >
+       <number>9</number>
+      </property>
+      <property name="rightMargin" >
+       <number>9</number>
+      </property>
+      <property name="bottomMargin" >
+       <number>9</number>
+      </property>
       <item>
        <widget class="QPushButton" name="buttonOk" >
         <property name="text" >
    <item row="2" column="0" >
     <widget class="QWidget" native="1" name="GroupMedium" >
      <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>7</vsizetype>
+      <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
    </item>
   </layout>
  </widget>
+ <tabstops>
+  <tabstop>RadioButton1</tabstop>
+  <tabstop>RadioButton2</tabstop>
+  <tabstop>RadioButton3</tabstop>
+  <tabstop>RadioButton4</tabstop>
+  <tabstop>ResultName</tabstop>
+  <tabstop>buttonOk</tabstop>
+  <tabstop>buttonApply</tabstop>
+  <tabstop>buttonCancel</tabstop>
+  <tabstop>buttonHelp</tabstop>
+ </tabstops>
  <resources/>
  <connections/>
 </ui>
index a99e7bbcd9f6f11963329e362a786849860456f5..62716c8d81e5eefa9c33e15ba76773d794a21f22 100644 (file)
@@ -50,6 +50,7 @@ UIC_FILES = \
        ui_DlgRef_1Sel3Check_QTD.h              \
        ui_DlgRef_1Sel3Spin_QTD.h               \
        ui_DlgRef_1Sel4Spin_QTD.h               \
+       ui_DlgRef_1Sel5Spin1Check_QTD.h         \
        ui_DlgRef_1Sel5Spin_QTD.h               \
        ui_DlgRef_1Sel_QTD.h                    \
        ui_DlgRef_1SelExt_QTD.h                 \
index 44927437bbe516f69dc64e1d633a2861a1c2da11..d13fadff77887c79d9d08ac580688f83292758ff 100644 (file)
@@ -518,6 +518,13 @@ GEOM::GEOM_IOperations_ptr EntityGUI_SubShapeDlg::createOperation()
 bool EntityGUI_SubShapeDlg::isValid( QString& msg )
 {
   bool isOk = false;
+  Handle(SALOME_InteractiveObject) IO = firstIObject();
+  Standard_Boolean testResult;
+  myObject = GEOMBase::ConvertIOinGEOMObject( IO, testResult );
+  if ( !testResult || myObject->_is_nil() )  {
+    updateButtonState();
+    return isOk;
+  }
   if ( !myObject->_is_nil() ) {
     if ( isAllSubShapes() )
       isOk = true;
index 3ac30e5ab278290a3290f74e1b87562b62897be4..ec1a8a6600358399daead05a13046d9912ebeeed 100644 (file)
@@ -116,6 +116,25 @@ GEOM_Engine::GEOM_Engine()
   _UndoLimit = 10;
 }
 
+/*!
+ *  Destructor
+ */
+GEOM_Engine::~GEOM_Engine()
+{ 
+  GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It(_objects);
+  for(; It.More(); It.Next()) 
+    {
+      RemoveObject(Handle(GEOM_Object)::DownCast(It.Value()));
+    }
+
+  //Close all documents not closed
+  for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next())
+    Close(anItr.Key());
+
+  _mapIDDocument.Clear();
+  _objects.Clear();
+}
+
 //=============================================================================
 /*!
  *  GetDocument
@@ -176,18 +195,33 @@ Handle(GEOM_Object) GEOM_Engine::GetObject(int theDocID, char* theEntry)
 //=============================================================================
 Handle(GEOM_Object) GEOM_Engine::AddObject(int theDocID, int theType)
 {
-    Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
-    Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
+  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
 
-    TDF_Label aChild = TDF_TagSource::NewChild(aDoc->Main());
-    Handle(GEOM_Object) anObject = new GEOM_Object(aChild, theType);
+  // NPAL18604: use existing label to decrease memory usage,
+  //            if this label has been freed (object deleted)
+  bool useExisting = false;
+  TDF_Label aChild;
+  if (!_lastCleared.IsNull()) {
+    if (_lastCleared.Root() == aDoc->Main().Root()) {
+      useExisting = true;
+      aChild = _lastCleared;
+      _lastCleared.Nullify();
+    }
+  }
+  if (!useExisting) {
+    // create new label
+    aChild = TDF_TagSource::NewChild(aDoc->Main());
+  }
+
+  Handle(GEOM_Object) anObject = new GEOM_Object(aChild, theType);
 
-    //Put an object in the map of created objects
-    TCollection_AsciiString anID = BuildIDFromObject(anObject);
-    if(_objects.IsBound(anID)) _objects.UnBind(anID);
-    _objects.Bind(anID, anObject);
+  //Put an object in the map of created objects
+  TCollection_AsciiString anID = BuildIDFromObject(anObject);
+  if(_objects.IsBound(anID)) _objects.UnBind(anID);
+  _objects.Bind(anID, anObject);
 
-    return anObject;
+  return anObject;
 }
 
 //=============================================================================
@@ -204,7 +238,21 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
   Handle(TDocStd_Document) aDoc = GetDocument(theMainShape->GetDocID());
   Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
 
-  TDF_Label aChild = TDF_TagSource::NewChild(aDoc->Main());
+  // NPAL18604: use existing label to decrease memory usage,
+  //            if this label has been freed (object deleted)
+  bool useExisting = false;
+  TDF_Label aChild;
+  if (!_lastCleared.IsNull()) {
+    if (_lastCleared.Root() == aDoc->Main().Root()) {
+      useExisting = true;
+      aChild = _lastCleared;
+      _lastCleared.Nullify();
+    }
+  }
+  if (!useExisting) {
+    // create new label
+    aChild = TDF_TagSource::NewChild(aDoc->Main());
+  }
 
   Handle(GEOM_Function) aMainShape = theMainShape->GetLastFunction();
   Handle(GEOM_Object) anObject = new GEOM_Object(aChild, 28); //28 is SUBSHAPE type
@@ -258,22 +306,23 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape,
 //=============================================================================
 bool GEOM_Engine::RemoveObject(Handle(GEOM_Object) theObject)
 {
-  if(!theObject) return false;
+  if (!theObject) return false;
 
   //Remove an object from the map of available objects
   TCollection_AsciiString anID = BuildIDFromObject(theObject);
-  if(_objects.IsBound(anID)) _objects.UnBind(anID);
+  if (_objects.IsBound(anID)) _objects.UnBind(anID);
 
   int nb = theObject->GetNbFunctions();
   Handle(TDataStd_TreeNode) aNode;
-  for(int i = 1; i<=nb; i++) {
+  for (int i = 1; i<=nb; i++) {
     Handle(GEOM_Function) aFunction = theObject->GetFunction(i);
-    if(aFunction->GetEntry().FindAttribute(GEOM_Function::GetFunctionTreeID(), aNode)) 
+    if (aFunction->GetEntry().FindAttribute(GEOM_Function::GetFunctionTreeID(), aNode)) 
       aNode->Remove();
   }
 
   TDF_Label aLabel = theObject->GetEntry();
   aLabel.ForgetAllAttributes(Standard_True);
+  _lastCleared = aLabel;
 
   theObject.Nullify();
 
@@ -344,20 +393,22 @@ bool GEOM_Engine::Load(int theDocID, char* theFileName)
 //=============================================================================
 void GEOM_Engine::Close(int theDocID)
 {
-  if(_mapIDDocument.IsBound(theDocID)) {
+  if (_mapIDDocument.IsBound(theDocID)) {
     Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
 
     //Remove all GEOM Objects associated to the given document
     TColStd_SequenceOfAsciiString aSeq;
-    GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It(_objects);
-    for(; It.More(); It.Next()) {
-      TCollection_AsciiString anObjID(It.Key());
+    GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It (_objects);
+    for (; It.More(); It.Next()) {
+      TCollection_AsciiString anObjID (It.Key());
       Standard_Integer anID = ExtractDocID(anObjID);
-      if(theDocID == anID) aSeq.Append(It.Key());
+      if (theDocID == anID) aSeq.Append(It.Key());
     }
-    for(Standard_Integer i=1; i<=aSeq.Length(); i++) _objects.UnBind(aSeq.Value(i));
+    for (Standard_Integer i=1; i<=aSeq.Length(); i++) _objects.UnBind(aSeq.Value(i));
+
+    _lastCleared.Nullify();
 
-   _mapIDDocument.UnBind(theDocID);
+    _mapIDDocument.UnBind(theDocID);
     _OCAFApp->Close(aDoc);
     aDoc.Nullify();
   }
index 662bd242fce296e51fdafdb7fd67e50cc8493a74..ab6b8282117288344670e1d9dfc0a58292c0fe2c 100644 (file)
 #include <TDocStd_Document.hxx>
 #include <TColStd_HArray1OfInteger.hxx>
 #include <TColStd_HSequenceOfAsciiString.hxx>
+#include <TDF_Label.hxx>
 
 class GEOM_Engine
 {
  public:
   Standard_EXPORT GEOM_Engine();
-  Standard_EXPORT ~GEOM_Engine() { _mapIDDocument.Clear(); _objects.Clear(); }
+  Standard_EXPORT virtual ~GEOM_Engine();
 
   //Retuns the engine    
   Standard_EXPORT static GEOM_Engine* GetEngine();   
@@ -101,6 +102,8 @@ class GEOM_Engine
   GEOM_DataMapOfAsciiStringTransient _objects;
 
   Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap;
+
+  TDF_Label _lastCleared;
 };
 
 #endif
index 5e85a61954defd7241b599c291ec8928dfcbf135..f07429df9bb4b351530f3f42f32b9a1864be0736 100644 (file)
@@ -3014,7 +3014,8 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFilling(GEOM::GEOM_Shape_ptr myShape,
                                       CORBA::Short maxdeg,
                                       CORBA::Double tol3d,
                                       CORBA::Double tol2d,
-                                      CORBA::Short nbiter)
+                                      CORBA::Short nbiter,
+                                      CORBA::Boolean theApprox)
   throw (SALOME::SALOME_Exception)
 {
   Unexpect aCatch(SALOME_SalomeException);
@@ -3053,7 +3054,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFilling(GEOM::GEOM_Shape_ptr myShape,
     Handle(GeomFill_Line) Line = new GeomFill_Line(i) ;
     
     GeomFill_AppSurf App(mindeg, maxdeg, tol3d, tol2d, nbiter) ; /* user parameters */
-    App.Perform(Line, Section) ;
+    App.Perform(Line, Section, theApprox) ;
     
     if (!App.IsDone()) {
       THROW_SALOME_CORBA_EXCEPTION("Filling aborted : non valid shape result", SALOME::BAD_PARAM);
index e2e290bc70a30683a81cd0f81dcc179ba9860aa9..4986a79c2777603845294df4273fc4bf6440bf1e 100644 (file)
             <source>GEOM_RESULT_NAME_LBL</source>
             <translation>Name</translation>
         </message>
+        <message>
+            <source>GEOM_FILLING_APPROX</source>
+            <translation>Approximation</translation>
+        </message>
     </context>
     <context>
         <name>BasicGUI_MarkerDlg</name>
index 16e26a843425cfea947da9ad0beb1988e3e0d7bc..f35350788433d6b7addf52da3779e2edc03c3fb3 100644 (file)
@@ -86,6 +86,12 @@ Standard_Integer GEOMImpl_BoxDriver::Execute(TFunction_Logbook& log) const
         aShape2.ShapeType() == TopAbs_VERTEX) {
       gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(aShape1));
       gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(aShape2));
+
+      if (P1.X() == P2.X() || P1.Y() == P2.Y() || P1.Z() == P2.Z()) {
+       StdFail_NotDone::Raise("Box can not be created, the points belong to the same plane");
+       return 0;
+      }
+
       BRepPrimAPI_MakeBox MB (P1,P2);
       MB.Build();
 
index f37a2176ac618bf4dac1aeabbdc8e6a44a29c70b..d17febfd2406184c13cafbb5d5e9bf3efad2d902 100644 (file)
@@ -88,6 +88,7 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const
   Standard_Real tol3d = IF.GetTol2D();
   Standard_Real tol2d = IF.GetTol3D();
   Standard_Integer nbiter = IF.GetNbIter();
+  Standard_Boolean isApprox = IF.GetApprox();
 
   if (mindeg > maxdeg) {
     Standard_RangeError::Raise("Minimal degree can not be more than maximal degree");
@@ -115,7 +116,7 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const
   Handle(GeomFill_Line) Line = new GeomFill_Line(i);
 
   GeomFill_AppSurf App (mindeg, maxdeg, tol3d, tol2d, nbiter); /* user parameters */
-  App.Perform(Line, Section);
+  App.Perform(Line, Section, isApprox);
 
   if (!App.IsDone()) return 0;
   Standard_Integer UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots;
index 6eefda984d37440e759d320cfa42e569db60bb7b..a1c554544528d6aa825ae2b810144f72ca162eb0 100644 (file)
@@ -1110,7 +1110,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSolidShell (Handle(GEOM_Obje
 //=============================================================================
 Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling
        (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg,
-        double theTol2D, double theTol3D, int theNbIter)
+        double theTol2D, double theTol3D, int theNbIter, bool isApprox)
 {
   SetErrorCode(KO);
 
@@ -1138,6 +1138,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling
   aFI.SetTol2D(theTol2D);
   aFI.SetTol3D(theTol3D);
   aFI.SetNbIter(theNbIter);
+  aFI.SetApprox(isApprox);
 
   //Compute the Solid value
   try {
@@ -1159,9 +1160,13 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling
   }
 
   //Make a Python command
-  GEOM::TPythonDump(aFunction) << aFilling << " = geompy.MakeFilling("
+  GEOM::TPythonDump pd (aFunction);
+  pd << aFilling << " = geompy.MakeFilling("
     << theShape << ", " << theMinDeg << ", " << theMaxDeg << ", "
-      << theTol2D << ", " << theTol3D << ", " << theNbIter << ")";
+      << theTol2D << ", " << theTol3D << ", " << theNbIter;
+  if(isApprox)
+    pd << ", " << isApprox;
+  pd << ")";
 
   SetErrorCode(OK);
   return aFilling;
index f87ddd5d500a599cfc5e318da3c1f992d94dfa50..5f1f52f36411681bc3dcef256689134ea7fa8dfe 100644 (file)
@@ -83,7 +83,7 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
 
   Standard_EXPORT Handle(GEOM_Object) MakeSolidShell (Handle(GEOM_Object) theShell);
 
-  Standard_EXPORT Handle(GEOM_Object) MakeFilling (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg, double theTol2D, double theTol3D, int theNbIter);
+  Standard_EXPORT Handle(GEOM_Object) MakeFilling (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg, double theTol2D, double theTol3D, int theNbIter, bool isApprox);
 
   Standard_EXPORT Handle(GEOM_Object) MakeThruSections(const Handle(TColStd_HSequenceOfTransient)& theSeqSections,
                                                       bool theModeSolid,
index d4269bf1911dde4a601d6da9ccdca1721c6e9be8..f8fbae6454f280a4780f855f5ca28210ac74fa81 100644 (file)
@@ -28,6 +28,7 @@
 #define FILL_ARG_TOL3D    4
 #define FILL_ARG_SHAPE    5
 #define FILL_ARG_NBITER   6
+#define FILL_ARG_APPROX   7
 
 class GEOMImpl_IFilling
 {
@@ -47,6 +48,9 @@ class GEOMImpl_IFilling
   void SetNbIter(int theNbIter) { _func->SetInteger(FILL_ARG_NBITER, theNbIter); }
   int GetNbIter() { return _func->GetInteger(FILL_ARG_NBITER); } 
 
+  void SetApprox(bool theApprox) { _func->SetInteger(FILL_ARG_APPROX, theApprox); }
+  bool GetApprox() { return _func->GetInteger(FILL_ARG_APPROX); } 
+
   void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(FILL_ARG_SHAPE, theShape); }
   Handle(GEOM_Function) GetShape() { return _func->GetReference(FILL_ARG_SHAPE); }
 
index 4f09b784d91fdc481ba8c13eabf6f66bba81d48f..b2b8dc364d8c2d94b81ea551411117fdde1acd22 100644 (file)
@@ -638,7 +638,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetGlueFaces
   Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
   GEOM::TPythonDump pd (aFunction, /*append=*/true);
   pd << "[" << anAsciiList.ToCString();
-  pd << "] = geompy.GetGlueFaces" << theShape << ", " << theTolerance << ")";
+  pd << "] = geompy.GetGlueFaces(" << theShape << ", " << theTolerance << ")";
 
   SetErrorCode(OK);
 
index 94f949129b83f1541cf4dc62483659c29db199e8..c6655fa58abc42fb8b13a8c46cad6fffed55b021 100644 (file)
@@ -1,18 +1,18 @@
 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-// 
+//
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either 
+// License as published by the Free Software Foundation; either
 // version 2.1 of the License.
-// 
-// This library is distributed in the hope that it will be useful 
-// but WITHOUT ANY WARRANTY; without even the implied warranty of 
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 // Lesser General Public License for more details.
 //
-// You should have received a copy of the GNU Lesser General Public  
-// License along with this library; if not, write to the Free Software 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //=======================================================================
 //function : GetID
 //purpose  :
-//======================================================================= 
+//=======================================================================
 const Standard_GUID& GEOMImpl_RotateDriver::GetID()
 {
   static Standard_GUID aRotateDriver("FF1BBB56-5D14-4df2-980B-3A668264EA16");
-  return aRotateDriver; 
+  return aRotateDriver;
 }
 
 
 //=======================================================================
 //function : GEOMImpl_RotateDriver
-//purpose  : 
+//purpose  :
 //=======================================================================
 
-GEOMImpl_RotateDriver::GEOMImpl_RotateDriver() 
+GEOMImpl_RotateDriver::GEOMImpl_RotateDriver()
 {
 }
 
 //=======================================================================
 //function : Execute
 //purpose  :
-//======================================================================= 
+//=======================================================================
 Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
 {
-  if(Label().IsNull())  return 0;    
+  if (Label().IsNull()) return 0;
   Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
 
-  if(aFunction.IsNull()) return 0;
+  if (aFunction.IsNull()) return 0;
 
   GEOMImpl_IRotate RI(aFunction);
   gp_Trsf aTrsf;
   gp_Pnt aCP, aP1, aP2;
   Standard_Integer aType = aFunction->GetType();
   Handle(GEOM_Function) anOriginalFunction = RI.GetOriginal();
-  if(anOriginalFunction.IsNull()) return 0;
+  if (anOriginalFunction.IsNull()) return 0;
   TopoDS_Shape aShape, anOriginal = anOriginalFunction->GetValue();
-  if(anOriginal.IsNull()) return 0;
+  if (anOriginal.IsNull()) return 0;
 
-  if(aType == ROTATE || aType == ROTATE_COPY) {
+  if (aType == ROTATE || aType == ROTATE_COPY) {
     Handle(GEOM_Function) anAxis = RI.GetAxis();
-    if(anAxis.IsNull()) return 0;
+    if (anAxis.IsNull()) return 0;
     TopoDS_Shape A = anAxis->GetValue();
-    if(A.IsNull() || A.ShapeType() != TopAbs_EDGE) return 0;
+    if (A.IsNull() || A.ShapeType() != TopAbs_EDGE) return 0;
     TopoDS_Edge anEdge = TopoDS::Edge(A);
 
     gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge));
@@ -99,11 +99,17 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
     gp_Ax1 anAx1(aP1, aDir);
     Standard_Real anAngle = RI.GetAngle();
     aTrsf.SetRotation(anAx1, anAngle);
-    
-    BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
-    aShape = aTransformation.Shape();
+
+    //NPAL18620: performance problem: multiple locations are accumulated
+    //           in shape and need a great time to process
+    //BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
+    //aShape = aTransformation.Shape();
+    TopLoc_Location aLocOrig = anOriginal.Location();
+    gp_Trsf aTrsfOrig = aLocOrig.Transformation();
+    TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+    aShape = anOriginal.Located(aLocRes);
   }
-  else if(aType ==  ROTATE_THREE_POINTS || aType == ROTATE_THREE_POINTS_COPY) {
+  else if (aType ==  ROTATE_THREE_POINTS || aType == ROTATE_THREE_POINTS_COPY) {
     Handle(GEOM_Function) aCentPoint = RI.GetCentPoint();
     Handle(GEOM_Function) aPoint1 = RI.GetPoint1();
     Handle(GEOM_Function) aPoint2 = RI.GetPoint2();
@@ -125,10 +131,16 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
     gp_Ax1 anAx1(aCP, aDir);
     Standard_Real anAngle = aVec1.Angle(aVec2);
     aTrsf.SetRotation(anAx1, anAngle);
-    BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
-    aShape = aTransformation.Shape();
+    //NPAL18620: performance problem: multiple locations are accumulated
+    //           in shape and need a great time to process
+    //BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
+    //aShape = aTransformation.Shape();
+    TopLoc_Location aLocOrig = anOriginal.Location();
+    gp_Trsf aTrsfOrig = aLocOrig.Transformation();
+    TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+    aShape = anOriginal.Located(aLocRes);
   }
-  else if(aType == ROTATE_1D) {
+  else if (aType == ROTATE_1D) {
     //Get direction
     Handle(GEOM_Function) anAxis = RI.GetAxis();
     if(anAxis.IsNull()) return 0;
@@ -138,27 +150,34 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
 
     gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge));
     gp_Pnt aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge));
-    gp_Dir D(gp_Vec(aP1, aP2)) ;
+    gp_Dir D(gp_Vec(aP1, aP2));
 
-    gp_Ax1 AX1(aP1, D) ;
+    gp_Ax1 AX1(aP1, D);
 
     Standard_Integer nbtimes = RI.GetNbIter1();
-    Standard_Real angle = 360.0/nbtimes ;
+    Standard_Real angle = 360.0/nbtimes;
 
     TopoDS_Compound aCompound;
     BRep_Builder B;
     B.MakeCompound( aCompound );
-    
+
+    TopLoc_Location aLocOrig = anOriginal.Location();
+    gp_Trsf aTrsfOrig = aLocOrig.Transformation();
+
     for (int i = 0; i < nbtimes; i++ ) {
-      aTrsf.SetRotation(AX1, i*angle*PI180) ;
-      BRepBuilderAPI_Transform myBRepTransformation(anOriginal, aTrsf, Standard_False) ;
-      B.Add( aCompound, myBRepTransformation.Shape() );
+      aTrsf.SetRotation(AX1, i*angle*PI180);
+      //NPAL18620: performance problem: multiple locations are accumulated
+      //           in shape and need a great time to process
+      //BRepBuilderAPI_Transform aBRepTransformation(anOriginal, aTrsf, Standard_False);
+      //B.Add(aCompound, aBRepTransformation.Shape());
+      TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+      B.Add(aCompound, anOriginal.Located(aLocRes));
     }
 
-    aShape = aCompound ;
+    aShape = aCompound;
   }
-  else if(aType == ROTATE_2D) {
-    Standard_Real DX, DY, DZ ;
+  else if (aType == ROTATE_2D) {
+    Standard_Real DX, DY, DZ;
 
     //Get direction
     Handle(GEOM_Function) anAxis = RI.GetAxis();
@@ -168,77 +187,81 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
     TopoDS_Edge anEdge = TopoDS::Edge(A);
     gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge));
     gp_Pnt aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge));
-    gp_Dir D(gp_Vec(aP1, aP2)) ;
+    gp_Dir D(gp_Vec(aP1, aP2));
+
+    gp_Ax1 AX1(aP1, D);
 
-    gp_Ax1 AX1(aP1, D) ;
 
+    gp_Trsf aTrsf1;
+    gp_Trsf aTrsf2;
+    gp_Pnt P1;
+    GProp_GProps System;
 
-    gp_Trsf theTransformation1 ;
-    gp_Trsf theTransformation2 ;
-    gp_Pnt P1 ;
-    GProp_GProps System ;
-    
-    if ( anOriginal.ShapeType() == TopAbs_VERTEX) {
+    if (anOriginal.ShapeType() == TopAbs_VERTEX) {
       P1 = BRep_Tool::Pnt(TopoDS::Vertex( anOriginal ));
-    } 
+    }
     else if ( anOriginal.ShapeType() == TopAbs_EDGE || anOriginal.ShapeType() == TopAbs_WIRE ) {
       BRepGProp::LinearProperties(anOriginal, System);
-      P1 = System.CentreOfMass() ;
+      P1 = System.CentreOfMass();
     }
     else if ( anOriginal.ShapeType() == TopAbs_FACE || anOriginal.ShapeType() == TopAbs_SHELL ) {
       BRepGProp::SurfaceProperties(anOriginal, System);
-      P1 = System.CentreOfMass() ;
+      P1 = System.CentreOfMass();
     }
     else {
       BRepGProp::VolumeProperties(anOriginal, System);
-      P1 = System.CentreOfMass() ;
+      P1 = System.CentreOfMass();
     }
-    
+
     Handle(Geom_Line) Line = new Geom_Line(AX1);
-    GeomAPI_ProjectPointOnCurve aPrjTool( P1, Line ) ;
+    GeomAPI_ProjectPointOnCurve aPrjTool( P1, Line );
     gp_Pnt P2 = aPrjTool.NearestPoint();
-    
+
     if ( P1.IsEqual(P2, Precision::Confusion() ) ) return 0;
-    
-    gp_Vec Vec(P1.X()-P2.X(), P1.Y()-P2.Y(), P1.Z()-P2.Z()) ;
+
+    gp_Vec Vec(P1.X()-P2.X(), P1.Y()-P2.Y(), P1.Z()-P2.Z());
     Vec.Normalize();
-    
+
     Standard_Integer nbtimes2 = RI.GetNbIter2();
     Standard_Integer nbtimes1 = RI.GetNbIter1();
     Standard_Real step = RI.GetStep();
     Standard_Real ang = RI.GetAngle();
 
-    gp_Vec myVec ;
+    TopLoc_Location aLocOrig = anOriginal.Location();
+    gp_Trsf aTrsfOrig = aLocOrig.Transformation();
+
+    gp_Vec aVec;
     TopoDS_Compound aCompound;
     BRep_Builder B;
     B.MakeCompound( aCompound );
     for (int i = 0; i < nbtimes2; i++ ) {
       for (int j = 0; j < nbtimes1; j++ ) {
-       DX = i * step * Vec.X() ;
-       DY = i * step * Vec.Y() ;
-       DZ = i * step * Vec.Z() ;
-       myVec.SetCoord( DX, DY, DZ ) ;
-       theTransformation1.SetTranslation(myVec) ;
-       theTransformation2.SetRotation(AX1, j*ang*PI180) ;
-       BRepBuilderAPI_Transform myBRepTransformation1(anOriginal, theTransformation1, Standard_False) ;
-       BRepBuilderAPI_Transform myBRepTransformation2(myBRepTransformation1.Shape(), theTransformation2, Standard_False) ;
-       B.Add( aCompound, myBRepTransformation2.Shape() );
+        DX = i * step * Vec.X();
+        DY = i * step * Vec.Y();
+        DZ = i * step * Vec.Z();
+        aVec.SetCoord( DX, DY, DZ );
+        aTrsf1.SetTranslation(aVec);
+        aTrsf2.SetRotation(AX1, j*ang*PI180);
+        //NPAL18620: performance problem: multiple locations are accumulated
+        //           in shape and need a great time to process
+        //BRepBuilderAPI_Transform aBRepTrsf1 (anOriginal, aTrsf1, Standard_False);
+        //BRepBuilderAPI_Transform aBRepTrsf2 (aBRepTrsf1.Shape(), aTrsf2, Standard_False);
+        //B.Add(aCompound, aBRepTrsf2.Shape());
+        TopLoc_Location aLocRes (aTrsf2 * aTrsf1 * aTrsfOrig);
+        B.Add(aCompound, anOriginal.Located(aLocRes));
       }
     }
 
     aShape = aCompound;
-
   }
   else return 0;
 
-
 
   if (aShape.IsNull()) return 0;
 
   aFunction->SetValue(aShape);
 
-  log.SetTouched(Label()); 
+  log.SetTouched(Label());
 
   return 1;
 }
@@ -247,17 +270,15 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const
 //=======================================================================
 //function :  GEOMImpl_RotateDriver_Type_
 //purpose  :
-//======================================================================= 
+//=======================================================================
 Standard_EXPORT Handle_Standard_Type& GEOMImpl_RotateDriver_Type_()
 {
-
   static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
   if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
   static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
-  if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); 
+  if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
   static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
   if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
 
   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
   static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_RotateDriver",
@@ -272,8 +293,7 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_RotateDriver_Type_()
 //=======================================================================
 //function : DownCast
 //purpose  :
-//======================================================================= 
-
+//=======================================================================
 const Handle(GEOMImpl_RotateDriver) Handle(GEOMImpl_RotateDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
 {
   Handle(GEOMImpl_RotateDriver) _anOtherObject;
@@ -284,7 +304,5 @@ const Handle(GEOMImpl_RotateDriver) Handle(GEOMImpl_RotateDriver)::DownCast(cons
      }
   }
 
-  return _anOtherObject ;
+  return _anOtherObject;
 }
-
-
index 4343903d5ed99bf381b465b8819a079b6e7669f2..349b59f09a25e0e321d5c60e29051a1d16c275a2 100644 (file)
@@ -147,7 +147,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
       aFW->Load(aWire);
       aFW->FixReorder();
 
-      if (aFW->StatusReorder(ShapeExtend_FAIL1)) {
+      if        (aFW->StatusReorder(ShapeExtend_FAIL1)) {
         Standard_ConstructionError::Raise("Wire construction failed: several loops detected");
       } else if (aFW->StatusReorder(ShapeExtend_FAIL)) {
         Standard_ConstructionError::Raise("Wire construction failed");
@@ -155,6 +155,13 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const
         Standard_ConstructionError::Raise("Wire construction failed: some gaps detected");
       } else {
       }
+
+      aFW->ClosedWireMode() = Standard_False;
+      aFW->FixConnected();
+      if (aFW->StatusConnected(ShapeExtend_FAIL)) {
+        Standard_ConstructionError::Raise("Wire construction failed: cannot build connected wire");
+      }
+
       aShape = aFW->WireAPIMake();
     }
   }
index 8bc498a2a3e8d3e1ca5562bef6e6ee3200f49c89..ad967865bd9c016b4aaba7fd45c6adc7a3bf8f1b 100644 (file)
@@ -1,18 +1,18 @@
 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-// 
+//
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either 
+// License as published by the Free Software Foundation; either
 // version 2.1 of the License.
-// 
-// This library is distributed in the hope that it will be useful 
-// but WITHOUT ANY WARRANTY; without even the implied warranty of 
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 // Lesser General Public License for more details.
 //
-// You should have received a copy of the GNU Lesser General Public  
-// License along with this library; if not, write to the Free Software 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //=======================================================================
 //function : GetID
 //purpose  :
-//======================================================================= 
+//=======================================================================
 const Standard_GUID& GEOMImpl_TranslateDriver::GetID()
 {
   static Standard_GUID aTranslateDriver("FF1BBB03-5D14-4df2-980B-3A668264EA16");
-  return aTranslateDriver; 
+  return aTranslateDriver;
 }
 
 
 //=======================================================================
 //function : GEOMImpl_TranslateDriver
-//purpose  : 
+//purpose  :
 //=======================================================================
 
-GEOMImpl_TranslateDriver::GEOMImpl_TranslateDriver() 
+GEOMImpl_TranslateDriver::GEOMImpl_TranslateDriver()
 {
 }
 
 //=======================================================================
 //function : Execute
 //purpose  :
-//======================================================================= 
+//=======================================================================
 Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
 {
-  if(Label().IsNull())  return 0;    
+  if (Label().IsNull()) return 0;
   Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
 
-  if(aFunction.IsNull()) return 0;
+  if (aFunction.IsNull()) return 0;
 
   GEOMImpl_ITranslate TI(aFunction);
   gp_Trsf aTrsf;
@@ -76,11 +76,11 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
   Standard_Integer aType = aFunction->GetType();
 
   Handle(GEOM_Function) anOriginalFunction = TI.GetOriginal();
-  if(anOriginalFunction.IsNull()) return 0;
+  if (anOriginalFunction.IsNull()) return 0;
   TopoDS_Shape aShape, anOriginal = anOriginalFunction->GetValue();
-  if(anOriginal.IsNull()) return 0;
+  if (anOriginal.IsNull()) return 0;
 
-  if(aType == TRANSLATE_TWO_POINTS || aType == TRANSLATE_TWO_POINTS_COPY) {
+  if (aType == TRANSLATE_TWO_POINTS || aType == TRANSLATE_TWO_POINTS_COPY) {
     Handle(GEOM_Function) aPoint1 = TI.GetPoint1();
     Handle(GEOM_Function) aPoint2 = TI.GetPoint2();
     if(aPoint1.IsNull() || aPoint2.IsNull()) return 0;
@@ -93,10 +93,16 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
     aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aV2));
 
     aTrsf.SetTranslation(aP1, aP2);
-    BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
-    aShape = aTransformation.Shape();
-
-  } else if(aType == TRANSLATE_VECTOR || aType == TRANSLATE_VECTOR_COPY) {
+    //NPAL18620: performance problem: multiple locations are accumulated
+    //           in shape and need a great time to process
+    //BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
+    //aShape = aTransformation.Shape();
+    TopLoc_Location aLocOrig = anOriginal.Location();
+    gp_Trsf aTrsfOrig = aLocOrig.Transformation();
+    TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+    aShape = anOriginal.Located(aLocRes);
+  }
+  else if (aType == TRANSLATE_VECTOR || aType == TRANSLATE_VECTOR_COPY) {
     Handle(GEOM_Function) aVector = TI.GetVector();
     if(aVector.IsNull()) return 0;
     TopoDS_Shape aV = aVector->GetValue();
@@ -107,19 +113,31 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
     aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge));
 
     aTrsf.SetTranslation(aP1, aP2);
-    BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
-    aShape = aTransformation.Shape();
+    //NPAL18620: performance problem: multiple locations are accumulated
+    //           in shape and need a great time to process
+    //BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
+    //aShape = aTransformation.Shape();
+    TopLoc_Location aLocOrig = anOriginal.Location();
+    gp_Trsf aTrsfOrig = aLocOrig.Transformation();
+    TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+    aShape = anOriginal.Located(aLocRes);
   }
-  else if(aType == TRANSLATE_XYZ || aType == TRANSLATE_XYZ_COPY) {
-    gp_Vec aVec(TI.GetDX(), TI.GetDY(), TI.GetDZ());
+  else if (aType == TRANSLATE_XYZ || aType == TRANSLATE_XYZ_COPY) {
+    gp_Vec aVec (TI.GetDX(), TI.GetDY(), TI.GetDZ());
     aTrsf.SetTranslation(aVec);
-    BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
-    aShape = aTransformation.Shape();
+    //NPAL18620: performance problem: multiple locations are accumulated
+    //           in shape and need a great time to process
+    //BRepBuilderAPI_Transform aTransformation (anOriginal, aTrsf, Standard_False);
+    //aShape = aTransformation.Shape();
+    TopLoc_Location aLocOrig = anOriginal.Location();
+    gp_Trsf aTrsfOrig = aLocOrig.Transformation();
+    TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+    aShape = anOriginal.Located(aLocRes);
   }
-  else if(aType == TRANSLATE_1D) {
+  else if (aType == TRANSLATE_1D) {
     Standard_Real DX, DY, DZ, step = TI.GetStep1();
     Standard_Integer nbtimes = TI.GetNbIter1();
-    gp_Vec myVec ;
+    gp_Vec aVec;
     TopoDS_Compound aCompound;
     BRep_Builder B;
     B.MakeCompound( aCompound );
@@ -133,21 +151,28 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
     gp_Vec Vec(BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)), BRep_Tool::Pnt(TopExp::LastVertex(anEdge)));
     Vec.Normalize();
 
-    for (int i = 0; i < nbtimes; i++ ) {
-      DX = i * step * Vec.X() ;
-      DY = i * step * Vec.Y() ;
-      DZ = i * step * Vec.Z() ;
-      myVec.SetCoord( DX, DY, DZ ) ;
-      aTrsf.SetTranslation(myVec) ;
-      BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False) ;
-      B.Add(aCompound , aTransformation.Shape() );
+    TopLoc_Location aLocOrig = anOriginal.Location();
+    gp_Trsf aTrsfOrig = aLocOrig.Transformation();
+
+    for (int i = 0; i < nbtimes; i++) {
+      DX = i * step * Vec.X();
+      DY = i * step * Vec.Y();
+      DZ = i * step * Vec.Z();
+      aVec.SetCoord( DX, DY, DZ );
+      aTrsf.SetTranslation(aVec);
+      //NPAL18620: performance problem: multiple locations are accumulated
+      //           in shape and need a great time to process
+      //BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False);
+      //B.Add(aCompound, aTransformation.Shape());
+      TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+      B.Add(aCompound, anOriginal.Located(aLocRes));
     }
-    aShape = aCompound;   
+    aShape = aCompound;
   }
-  else if(aType == TRANSLATE_2D) {
+  else if (aType == TRANSLATE_2D) {
     Standard_Integer nbtimes1 = TI.GetNbIter1(), nbtimes2 = TI.GetNbIter2();
     Standard_Real DX, DY, DZ,  step1 = TI.GetStep1(),  step2 = TI.GetStep2();
-    gp_Vec myVec ;
+    gp_Vec aVec;
     Handle(GEOM_Function) aVector = TI.GetVector();
     if(aVector.IsNull()) return 0;
     TopoDS_Shape aV = aVector->GetValue();
@@ -169,29 +194,35 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
     TopoDS_Compound aCompound;
     BRep_Builder B;
     B.MakeCompound( aCompound );
-    
-    for (int i = 0; i < nbtimes1; i++ ) {
-      for (int j = 0; j < nbtimes2; j++ ) {
-       DX = i * step1 * Vec1.X() + j * step2 * Vec2.X() ;
-       DY = i * step1 * Vec1.Y() + j * step2 * Vec2.Y() ;
-       DZ = i * step1 * Vec1.Z() + j * step2 * Vec2.Z() ;
-       myVec.SetCoord( DX, DY, DZ ) ;
-       aTrsf.SetTranslation(myVec) ;
-       BRepBuilderAPI_Transform myBRepTransformation(anOriginal, aTrsf, Standard_False) ;
-       B.Add(aCompound , myBRepTransformation.Shape() );
+
+    TopLoc_Location aLocOrig = anOriginal.Location();
+    gp_Trsf aTrsfOrig = aLocOrig.Transformation();
+
+    for (int i = 0; i < nbtimes1; i++) {
+      for (int j = 0; j < nbtimes2; j++) {
+        DX = i * step1 * Vec1.X() + j * step2 * Vec2.X();
+        DY = i * step1 * Vec1.Y() + j * step2 * Vec2.Y();
+        DZ = i * step1 * Vec1.Z() + j * step2 * Vec2.Z();
+        aVec.SetCoord( DX, DY, DZ );
+        aTrsf.SetTranslation(aVec);
+        //NPAL18620: performance problem: multiple locations are accumulated
+        //           in shape and need a great time to process
+        //BRepBuilderAPI_Transform aBRepTransformation(anOriginal, aTrsf, Standard_False);
+        //B.Add(aCompound, aBRepTransformation.Shape());
+        TopLoc_Location aLocRes (aTrsf * aTrsfOrig);
+        B.Add(aCompound, anOriginal.Located(aLocRes));
       }
     }
-   aShape = aCompound;  
+   aShape = aCompound;
   }
   else return 0;
 
 
   if (aShape.IsNull()) return 0;
 
   aFunction->SetValue(aShape);
 
-  log.SetTouched(Label()); 
+  log.SetTouched(Label());
 
   return 1;
 }
@@ -200,17 +231,16 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const
 //=======================================================================
 //function :  GEOMImpl_TranslateDriver_Type_
 //purpose  :
-//======================================================================= 
+//=======================================================================
 Standard_EXPORT Handle_Standard_Type& GEOMImpl_TranslateDriver_Type_()
 {
 
   static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
   if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
   static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
-  if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); 
+  if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
   static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
   if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
 
   static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
   static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_TranslateDriver",
@@ -225,8 +255,7 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_TranslateDriver_Type_()
 //=======================================================================
 //function : DownCast
 //purpose  :
-//======================================================================= 
-
+//=======================================================================
 const Handle(GEOMImpl_TranslateDriver) Handle(GEOMImpl_TranslateDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
 {
   Handle(GEOMImpl_TranslateDriver) _anOtherObject;
@@ -237,7 +266,5 @@ const Handle(GEOMImpl_TranslateDriver) Handle(GEOMImpl_TranslateDriver)::DownCas
      }
   }
 
-  return _anOtherObject ;
+  return _anOtherObject;
 }
-
-
index 0ba24697392e4faa08cb6a0e6133b4ffe8bc2705..106ee9ef66c6c80bba21633cf6ec80fbfe8231c5 100644 (file)
@@ -565,8 +565,8 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy(SALOMEDS::Study_ptr theStudy, GEOM:
 //============================================================================
 void GEOM_Gen_i::register_name(char * name)
 {
-  GEOM::GEOM_Gen_ptr g = GEOM::GEOM_Gen::_narrow(_this());
-  name_service->Register(g, CORBA::string_dup(name));
+  GEOM::GEOM_Gen_var g = _this();
+  name_service->Register(g, name);
 }
 
 //============================================================================
@@ -599,6 +599,7 @@ GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations(CORBA::Long theS
 
   GEOM::GEOM_Gen_ptr engine = _this();
 
+  //transfer reference on engine
   GEOM_IBasicOperations_i* aServant =
     new GEOM_IBasicOperations_i(_poa, engine, _impl->GetIBasicOperations(theStudyID));
 
@@ -928,7 +929,8 @@ GEOM_I_EXPORT
                                                const char * interfaceName)
   {
    GEOM_Gen_i * myGEOM_Gen_i = new GEOM_Gen_i(orb, poa, contId, instanceName, interfaceName);
-   myGEOM_Gen_i->register_name("/myGEOM_Gen"); // NRI : 11/07/2002 : Add for Supervision example
+   // Don't understand the reason of this register ????
+//   myGEOM_Gen_i->register_name("/myGEOM_Gen"); // NRI : 11/07/2002 : Add for Supervision example
    return myGEOM_Gen_i->getId();
   }
 }
index 276a9d556a1a5623b5c5defb2ca7142db494f2ee..55160f0fb836aaf88279c1fc7422fee5263b77f0 100644 (file)
@@ -247,8 +247,9 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeSpherePntR
   if (thePnt == NULL) return aGEOMObject._retn();
 
   //Get the reference point
+  CORBA::String_var entry=thePnt->GetEntry();
   Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject
-    (thePnt->GetStudyID(), thePnt->GetEntry());
+    (thePnt->GetStudyID(), entry);
 
   if (aPnt.IsNull()) return aGEOMObject._retn();
 
@@ -566,7 +567,8 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeFilling(GEOM::GEOM_Object_pt
                                                            CORBA::Long theMaxDeg,
                                                            CORBA::Double theTol2D,
                                                            CORBA::Double theTol3D,
-                                                           CORBA::Long theNbIter)
+                                                           CORBA::Long theNbIter,
+                                                           CORBA::Boolean theApprox)
 {
   GEOM::GEOM_Object_var aGEOMObject;
 
@@ -582,7 +584,7 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeFilling(GEOM::GEOM_Object_pt
   if (aShape.IsNull()) return aGEOMObject._retn();
 
   //Create the Solid
-  Handle(GEOM_Object) anObject = GetOperations()->MakeFilling(aShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
+  Handle(GEOM_Object) anObject = GetOperations()->MakeFilling(aShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox);
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
 
index f0397e5e9265d7ddf495bf064d176dbb429a4bba..330f4974b59b5300cb2d17321c46ed2b5da296be 100644 (file)
@@ -105,7 +105,7 @@ class GEOM_I_EXPORT GEOM_I3DPrimOperations_i :
                                                      GEOM::GEOM_Object_ptr theAxis,
                                                      CORBA::Double theAngle);
 
-  GEOM::GEOM_Object_ptr MakeFilling(GEOM::GEOM_Object_ptr theShape, CORBA::Long theMinDeg, CORBA::Long theMaxDeg, CORBA::Double theTol2D, CORBA::Double theTol3D, CORBA::Long theNbIter);
+  GEOM::GEOM_Object_ptr MakeFilling(GEOM::GEOM_Object_ptr theShape, CORBA::Long theMinDeg, CORBA::Long theMaxDeg, CORBA::Double theTol2D, CORBA::Double theTol3D, CORBA::Long theNbIter, CORBA::Boolean theApprox);
 
   GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
                                         CORBA::Boolean theModeSolid,
index 836451282d49f7b6cc464ca4701a8c1d02fe5fff..57dabf6a6ce2e2f85d84bd0a775adba439fc4f65 100644 (file)
@@ -72,10 +72,12 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeBoolean
   if (theShape1 == NULL || theShape2 == NULL) return aGEOMObject._retn();
 
   //Get the reference shapes
+  CORBA::String_var entry=theShape1->GetEntry();
   Handle(GEOM_Object) aSh1 = GetOperations()->GetEngine()->GetObject
-    (theShape1->GetStudyID(), theShape1->GetEntry());
+    (theShape1->GetStudyID(), entry);
+  entry=theShape2->GetEntry();
   Handle(GEOM_Object) aSh2 = GetOperations()->GetEngine()->GetObject
-    (theShape2->GetStudyID(), theShape2->GetEntry());
+    (theShape2->GetStudyID(), entry);
 
   if (aSh1.IsNull() || aSh2.IsNull()) return aGEOMObject._retn();
 
index 89b7fc5f82d694571763c965a0523e773248270a..3d5c87c468be22892a2cdb04f029c1dfb32e00e0 100644 (file)
@@ -114,7 +114,7 @@ void GEOM_IOperations_i::FinishOperation()
 
 //=============================================================================
 /*!
- *  AboutOperation
+ *  AbortOperation
  */
 //=============================================================================
 void GEOM_IOperations_i::AbortOperation()
@@ -132,6 +132,6 @@ GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObjec
   if(theObject.IsNull()) return NULL;
   TCollection_AsciiString anEntry;
   TDF_Tool::Entry(theObject->GetEntry(), anEntry);
-  GEOM::GEOM_Object_var GO = GEOM::GEOM_Object::_duplicate(_engine->GetObject(theObject->GetDocID(), anEntry.ToCString()));
+  GEOM::GEOM_Object_var GO = _engine->GetObject(theObject->GetDocID(), anEntry.ToCString());
   return GO._retn();
 }
index 9ad5fca9a6b0fe71a0a1acefeafc43f7630caa0d..c425449dc8406c26a60d7679f446398ced3006a4 100644 (file)
@@ -59,7 +59,7 @@ class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperatio
  private:
  
   ::GEOM_IOperations* _impl;
-  GEOM::GEOM_Gen_ptr _engine;     
+  GEOM::GEOM_Gen_var _engine;     
 };
 
 #endif
index d8794d7b99738dc4bd57169c2973a09933d89fe4..4a86443b64649dd578f5123654e9a25b3bff4c23 100644 (file)
@@ -61,7 +61,9 @@ GEOM_Object_i::GEOM_Object_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr
 //=============================================================================
 
 GEOM_Object_i::~GEOM_Object_i()
-{}
+{
+  GEOM_Engine::GetEngine()->RemoveObject(_impl);
+}
 
 
 //=============================================================================
index 43711eacd2c94c6ba8da3bc4ba57adf8e3a0838a..56631b7f0e7e8f1493cb124374b2584722c5358f 100644 (file)
@@ -85,7 +85,7 @@ class GEOM_I_EXPORT GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public
 
  private:
 
-  GEOM::GEOM_Gen_ptr _engine;
+  GEOM::GEOM_Gen_var _engine;
   Handle(GEOM_Object) _impl;
   TopoDS_Shape _geom;
 };
index 666ec08611870b4bc0b114ff8ac91c81daa2e4e7..520fbc2fe4bde0ec244836d3f5ab3e89d613d5fc 100644 (file)
@@ -70,6 +70,12 @@ GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb,
 GEOM_Superv_i::~GEOM_Superv_i()
 {
   MESSAGE("GEOM_Superv_i::~GEOM_Superv_i");
+  if (!CORBA::is_nil(myBasicOp))
+    myBasicOp->Destroy();
+  if (!CORBA::is_nil(myBoolOp))
+    myBoolOp->Destroy();
+  if (!CORBA::is_nil(my3DPrimOp))
+    my3DPrimOp->Destroy();
   delete name_service;
 }
 
@@ -79,8 +85,8 @@ GEOM_Superv_i::~GEOM_Superv_i()
 //============================================================================
 void GEOM_Superv_i::register_name(char * name)
 {
-  GEOM::GEOM_Superv_ptr g = GEOM::GEOM_Superv::_narrow(POA_GEOM::GEOM_Superv::_this());
-  name_service->Register(g, strdup(name)); 
+  GEOM::GEOM_Superv_var g = _this();
+  name_service->Register(g, name); 
 }
 
 //=============================================================================
@@ -88,9 +94,17 @@ void GEOM_Superv_i::register_name(char * name)
 //=============================================================================
 void GEOM_Superv_i::setGeomEngine()
 {
+  if ( !CORBA::is_nil(myGeomEngine) ) 
+    return;
   // get GEOM_Gen engine
+  /*
   SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service );
   Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" );
+  */
+
+  Engines::Container_var cont=GetContainerRef();
+  cont->load_component_Library("GEOM");
+  Engines::Component_var comp=cont->create_component_instance("GEOM",0);
 
   myGeomEngine = GEOM::GEOM_Gen::_narrow(comp);
 }
@@ -799,7 +813,9 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere  (CORBA::Double theX,
   MESSAGE("GEOM_Superv_i::MakeSphepe");
   getBasicOp();
   get3DPrimOp();
-  GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius);
+  GEOM::GEOM_Object_var o = myBasicOp->MakePointXYZ(theX, theY, theZ);
+  GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeSpherePntR(o, theRadius);
+  o->Destroy();
   endService( " GEOM_Superv_i::MakeSphepe" );
   return anObj;
 }
@@ -1003,12 +1019,12 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle2Ways (GEOM::GEOM_Ob
 GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape,
                                                  CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
                                                  CORBA::Double theTol2D, CORBA::Double theTol3D,
-                                                 CORBA::Long theNbIter)
+                                                 CORBA::Long theNbIter, CORBA::Boolean theApprox)
 {
   beginService( " GEOM_Superv_i::MakeFilling" );
   MESSAGE("GEOM_Superv_i::MakeFilling");
   get3DPrimOp();
-  GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter);
+  GEOM::GEOM_Object_ptr anObj = my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, theApprox);
   endService( " GEOM_Superv_i::MakeFilling" );
   return anObj;
 }
@@ -2737,7 +2753,8 @@ extern "C"
                                                      const char * interfaceName)
   {
     GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName);
-    myGEOM_Superv_i->register_name("/myGEOM_Superv");
+    //Don't understand the reason why this component is registered ???
+//    myGEOM_Superv_i->register_name("/myGEOM_Superv");
     return myGEOM_Superv_i->getId() ;
   }
 }
index 0d303970496751e0e5a07a2c15078bda6dd62567..3cb1ffd2520e892aa713092fbc4b7305e84686a8 100644 (file)
@@ -237,7 +237,7 @@ public:
   GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape,
                                     CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
                                     CORBA::Double theTol2D, CORBA::Double theTol3D,
-                                    CORBA::Long theNbIter);
+                                    CORBA::Long theNbIter, CORBA::Boolean theApprox);
 
   GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
                                         CORBA::Boolean theModeSolid,
@@ -566,21 +566,21 @@ public:
   
 private:
   SALOME_NamingService *  name_service; 
-  GEOM::GEOM_Gen_ptr      myGeomEngine;
+  GEOM::GEOM_Gen_var      myGeomEngine;
   CORBA::Long             myStudyID;
   CORBA::Long             myLastStudyID; // mkr : PAL10770
   PortableServer::POA_var myPOA;
   
-  GEOM::GEOM_IBasicOperations_ptr     myBasicOp;
-  GEOM::GEOM_I3DPrimOperations_ptr    my3DPrimOp;
-  GEOM::GEOM_IBooleanOperations_ptr   myBoolOp;
-  GEOM::GEOM_IInsertOperations_ptr    myInsOp;
-  GEOM::GEOM_ITransformOperations_ptr myTransfOp;
-  GEOM::GEOM_IShapesOperations_ptr    myShapesOp;
-  GEOM::GEOM_IBlocksOperations_ptr    myBlocksOp;
-  GEOM::GEOM_ICurvesOperations_ptr    myCurvesOp;
-  GEOM::GEOM_ILocalOperations_ptr     myLocalOp;
-  GEOM::GEOM_IGroupOperations_ptr     myGroupOp;
+  GEOM::GEOM_IBasicOperations_var     myBasicOp;
+  GEOM::GEOM_I3DPrimOperations_var    my3DPrimOp;
+  GEOM::GEOM_IBooleanOperations_var   myBoolOp;
+  GEOM::GEOM_IInsertOperations_var    myInsOp;
+  GEOM::GEOM_ITransformOperations_var myTransfOp;
+  GEOM::GEOM_IShapesOperations_var    myShapesOp;
+  GEOM::GEOM_IBlocksOperations_var    myBlocksOp;
+  GEOM::GEOM_ICurvesOperations_var    myCurvesOp;
+  GEOM::GEOM_ILocalOperations_var     myLocalOp;
+  GEOM::GEOM_IGroupOperations_var     myGroupOp;
 
 };
 
index 6485368cfe40729cd577b809f0bf3ca1cdf0a10b..3ca8d022fa5eb4f14465f12013d29fa760044fc5 100644 (file)
@@ -700,8 +700,8 @@ def MakeCopy(aShape):
       print "MakeCopy : ", InsertOp.GetErrorCode()
     return anObj
 
-def MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter):
-    anObj = PrimOp.MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter)
+def MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter,isApprox=0):
+    anObj = PrimOp.MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter,isApprox)
     if PrimOp.IsDone() == 0:
       print "MakeFilling : ", PrimOp.GetErrorCode()
     return anObj
index 415ff983baf4fab07e3b064ff80aa1dd9ff1804d..2f37c4e86c241faa2bde0a99054000c992adbefb 100644 (file)
@@ -1379,8 +1379,8 @@ class geompyDC(GEOM._objref_GEOM_Gen):
         #  @return New GEOM_Object, containing the created filling surface.
         #
         #  Example: see GEOM_TestAll.py
-        def MakeFilling(self,theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter):
-            anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter)
+        def MakeFilling(self,theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, isApprox=0):
+            anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, isApprox)
             RaiseIfFailed("MakeFilling", self.PrimOp)
             return anObj
         
index 8371188a6924d60d23c04357bc62a1fa1c7e7a3d..31882eb9e23f8f3d30cd6c1973bca1dcf45fa2f0 100644 (file)
@@ -61,7 +61,7 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg( GeometryGUI* theGeometryGUI,
   mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
   mainFrame()->RadioButton3->close();
 
-  GroupPoints = new DlgRef_1Sel5Spin( centralWidget() );
+  GroupPoints = new DlgRef_1Sel5Spin1Check( centralWidget() );
   GroupPoints->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
   GroupPoints->TextLabel1->setText( tr( "GEOM_FILLING_COMPOUND" ) );
   GroupPoints->TextLabel2->setText( tr( "GEOM_FILLING_MIN_DEG" ) );
@@ -69,6 +69,7 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg( GeometryGUI* theGeometryGUI,
   GroupPoints->TextLabel4->setText( tr( "GEOM_FILLING_NB_ITER" ) );
   GroupPoints->TextLabel5->setText( tr( "GEOM_FILLING_MAX_DEG" ) );
   GroupPoints->TextLabel6->setText( tr( "GEOM_FILLING_TOL_3D" ) );
+  GroupPoints->CheckBox1->setText( tr( "GEOM_FILLING_APPROX" ) );
   GroupPoints->PushButton1->setIcon( image1 );
   GroupPoints->LineEdit1->setReadOnly( true );
 
@@ -77,7 +78,7 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg( GeometryGUI* theGeometryGUI,
   layout->addWidget( GroupPoints  );
   /***************************************************************/
 
-  setHelpFileName( "creaet_filling_page.html" );
+  setHelpFileName( "create_filling_page.html" );
 
   /* Initialisations */
   Init();
@@ -107,6 +108,7 @@ void GenerationGUI_FillingDlg::Init()
   myTol3D = 0.0001;
   myTol2D = 0.0001;
   myNbIter = 5;
+  myIsApprox = false;
   myOkCompound = false;
 
   globalSelection( GEOM_COMPOUND );
@@ -139,6 +141,8 @@ void GenerationGUI_FillingDlg::Init()
   connect( GroupPoints->SpinBox4, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
   connect( GroupPoints->SpinBox5, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
 
+  connect( GroupPoints->CheckBox1, SIGNAL( stateChanged( int ) ), this, SLOT( ApproxChanged() ) );
+
   // VSR: TODO ->>
   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox1, SLOT( SetStep( double ) ) );
   connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox2, SLOT( SetStep( double ) ) );
@@ -300,6 +304,16 @@ void GenerationGUI_FillingDlg::ValueChangedInSpinBox( double newValue )
   displayPreview();
 }
 
+//=================================================================================
+// function : ApproxChanged()
+// purpose  :
+//=================================================================================
+void GenerationGUI_FillingDlg::ApproxChanged()
+{
+  myIsApprox = GroupPoints->CheckBox1->isChecked();
+  displayPreview();
+}
+
 //=================================================================================
 // function : createOperation
 // purpose  :
@@ -327,7 +341,7 @@ bool GenerationGUI_FillingDlg::execute( ObjectList& objects )
   GEOM::GEOM_Object_var anObj;
 
   anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation() )->MakeFilling(
-    myCompound, myMinDeg, myMaxDeg, myTol2D, myTol3D, myNbIter );
+    myCompound, myMinDeg, myMaxDeg, myTol2D, myTol3D, myNbIter, myIsApprox );
 
   if ( !anObj->_is_nil() )
     objects.push_back( anObj._retn() );
index 23be3e400edb26f86e9d0cd55613cf415232a0a4..03d602cd94b2940df8d63d8a99c49b2e3e62a706 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <GEOMBase_Skeleton.h>
 
-class DlgRef_1Sel5Spin;
+class DlgRef_1Sel5Spin1Check;
 
 //=================================================================================
 // class    : GenerationGUI_FillingDlg
@@ -59,9 +59,10 @@ private:
   Standard_Real                      myTol3D;
   Standard_Real                      myTol2D;
   Standard_Integer                   myNbIter;
+  bool                               myIsApprox;
   bool                               myOkCompound; /* to check when curv. compound is defined */
 
-  DlgRef_1Sel5Spin*                  GroupPoints;
+  DlgRef_1Sel5Spin1Check*            GroupPoints;
     
 private slots:
   void                               ClickOnOk();
@@ -71,6 +72,7 @@ private slots:
   void                               SelectionIntoArgument();
   void                               SetEditCurrentArgument();
   void                               ValueChangedInSpinBox( double );
+  void                               ApproxChanged();
 };
 
 #endif // GENERATIONGUI_FILLINGDLG_H
index 5b1feaced16a9909f614dd13adfe07fce7e453ed..207a02905985048e6b6536b00b0ebe6dbca00da1 100644 (file)
@@ -279,8 +279,10 @@ bool RepairGUI_GlueDlg::ClickOnApply()
 //=================================================================================
 void RepairGUI_GlueDlg::SelectionIntoArgument()
 {
-  if ( mySubShapesChk->isChecked() &&  getConstructorId() == 1 )
+  if ( mySubShapesChk->isChecked() &&  getConstructorId() == 1 ) {
+    updateButtonState();
     return;
+  }
   
   erasePreview();
   myEditCurrentArgument->setText( "" );
@@ -603,6 +605,8 @@ void RepairGUI_GlueDlg::onDetect()
     msg = tr( "THERE_ARE_NO_FACES_FOR_GLUING" );
   }
   
+  connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
+          SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()) ) ;
   SUIT_MessageBox::information( this, tr( "GEOM_FREE_BOUNDS_TLT" ), msg, tr( "Close" ) );
   updateButtonState();
   activateSelection();
@@ -635,10 +639,13 @@ void RepairGUI_GlueDlg::activateSelection()
       globalSelection( GEOM_ALLSHAPES );
     else {
       displayPreview( true, false, false, 2/*line width*/, 1/*display mode*/, Quantity_NOC_RED );
+      disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
+                 SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ) ;
       globalSelection( GEOM_PREVIEW );
-    }
+      connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
+              SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ) ;
+    } 
   }
-  
   updateViewer();
 }
 
@@ -656,9 +663,13 @@ void RepairGUI_GlueDlg::updateButtonState()
   }
   else
   {
+    bool wasSelected = false;
+    SALOME_ListIteratorOfListIO it ( selectedIO() );
+    if (it.More() > 0)
+      wasSelected = true;
     bool wasDetected = myTmpObjs.size() ? true : false;
-    buttonOk()->setEnabled( hasMainObj && wasDetected );
-    buttonApply()->setEnabled( hasMainObj && wasDetected );
+    buttonOk()->setEnabled( hasMainObj && wasDetected && wasSelected );
+    buttonApply()->setEnabled( hasMainObj && wasDetected && wasSelected );
     mySubShapesChk->setEnabled( hasMainObj && wasDetected );
     myDetectBtn->setEnabled( hasMainObj );
     if ( !hasMainObj || !wasDetected )