]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
INT PAL 0052642: Notebook variables are not dumped to script with Fillet1D, Fillet2D...
authormpa <mpa@opencascade.com>
Fri, 27 Mar 2015 12:46:09 +0000 (15:46 +0300)
committermpa <mpa@opencascade.com>
Fri, 27 Mar 2015 12:46:09 +0000 (15:46 +0300)
15 files changed:
idl/GEOM_Gen.idl
src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx
src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx
src/GEOMImpl/GEOMImpl_IOffset.hxx
src/GEOMImpl/GEOMImpl_IPrism.hxx
src/GEOMImpl/GEOMImpl_OffsetDriver.cxx
src/GEOMImpl/GEOMImpl_PrismDriver.cxx
src/GEOMImpl/GEOMImpl_PrismDriver.hxx
src/GEOM_I/GEOM_I3DPrimOperations_i.cc
src/GEOM_I/GEOM_I3DPrimOperations_i.hh
src/GEOM_SWIG/geomBuilder.py
src/GenerationGUI/GenerationGUI_PrismDlg.cxx
src/GenerationGUI/GenerationGUI_ThicknessDlg.cxx
src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx
src/TransformationGUI/TransformationGUI_ExtensionDlg.cxx

index eaea443701b31856ce2db8a14007ece6ec181ed7..42d188d5492f7a0eaa2d03bf7b9ea82645a3febc 100644 (file)
@@ -1711,13 +1711,15 @@ module GEOM
      *  \param theHeight Prism dimension along the normal of the face.
      *  \param theAngle Draft angel in degrees
      *  \param theFuse If true material is added else material is removed
+     *  \param theInvert If true material changes the direction 
      *  \return New GEOM_Object, containing the modified shape
      */
     GEOM_Object MakeDraftPrism (in GEOM_Object theInitShape,
                                 in GEOM_Object theBase,
                                 in double theHeight, 
                                 in double theAngle,
-                                in boolean theFuse);
+                                in boolean theFuse,
+                                in boolean theInvert);
 
     /*!
      *  \brief Create a shape by extrusion of the base shape along
@@ -1865,13 +1867,15 @@ module GEOM
      *          It can be empty.
      *  \param theThickness Value of the thickness
      *  \param isCopy To make a copy of \a theObject or to modify \a theObject
+     *  \param isInside If true the thickness is applied towards inside
      *  \return New GEOM_Object, containing the created pipe if isCopy = true
      *          or the modified object if isCopy = false
      */
     GEOM_Object MakeThickening (in GEOM_Object theObject,
                                 in ListOfLong  theFacesIDs,
                                 in double      theThickness,
-                                in boolean     isCopy);
+                                in boolean     isCopy,
+                                in boolean     isInside);
 
     
     /*!
index 6cc3e28d9544fedfd15e489387725d8ebf770737..eb9eb15aa94cdd000f0ab918bd29a71653de23c0 100644 (file)
@@ -1367,7 +1367,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismDXDYDZ2Ways
  */
 //=============================================================================
 Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDraftPrism
-       (Handle(GEOM_Object) theInitShape ,Handle(GEOM_Object) theBase, double theHeight, double theAngle, bool theFuse)
+       (Handle(GEOM_Object) theInitShape ,Handle(GEOM_Object) theBase, double theHeight, double theAngle, bool theFuse, bool theInvert)
 {
   SetErrorCode(KO);
 
@@ -1410,6 +1410,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDraftPrism
     aCI.SetFuseFlag(1);
   else
     aCI.SetFuseFlag(0);
+  aCI.SetInvertFlag(theInvert);
   
   //Compute the Draft Prism Feature value
   try {
@@ -1426,16 +1427,20 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDraftPrism
   }
   
   //Make a Python command
+  GEOM::TPythonDump pd (aFunction);
   if(theFuse)
   {
-    GEOM::TPythonDump(aFunction) << aPrism << " = geompy.MakeExtrudedBoss("
-      << theInitShape << ", " << theBase << ", " << theHeight << ", " << theAngle << ")";
+    pd << aPrism << " = geompy.MakeExtrudedBoss(" << theInitShape << ", " << theBase << ", "
+      << theHeight << ", " << theAngle;
   }
   else
   {   
-    GEOM::TPythonDump(aFunction) << aPrism << " = geompy.MakeExtrudedCut("
-      << theInitShape << ", " << theBase << ", " << theHeight << ", " << theAngle << ")";
+    pd << aPrism << " = geompy.MakeExtrudedCut(" << theInitShape << ", " << theBase << ", "
+      << theHeight << ", " << theAngle;
   }
+  if (theInvert)
+    pd << ", " << theInvert;
+  pd << ")";
 
   SetErrorCode(OK);
   return aPrism;
@@ -2291,7 +2296,8 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThickening
                 (Handle(GEOM_Object)                     theObject,
                  const Handle(TColStd_HArray1OfInteger) &theFacesIDs,
                  double                                  theOffset,
-                 bool                                    isCopy)
+                 bool                                    isCopy,
+                 bool                                    theInside)
 {
   SetErrorCode(KO);
 
@@ -2320,6 +2326,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThickening
   GEOMImpl_IOffset aTI (aFunction);
   aTI.SetShape(anOriginal);
   aTI.SetValue(theOffset);
+  aTI.SetParam(theInside);
 
   if (theFacesIDs.IsNull() == Standard_False) {
     aTI.SetFaceIDs(theFacesIDs);
@@ -2352,19 +2359,21 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThickening
     aResult = theObject;
   }
 
+  pd << ", [";
   if (theFacesIDs.IsNull() == Standard_False) {
     // Dump faces IDs.
     Standard_Integer i;
 
-    pd << ", [";
-
     for (i = theFacesIDs->Lower(); i < theFacesIDs->Upper(); ++i) {
       pd << theFacesIDs->Value(i) << ", ";
     }
-
     // Dump the last value.
-    pd << theFacesIDs->Value(i) << "]";
+    pd << theFacesIDs->Value(i);
   }
+  pd << "]";
+
+  if (theInside)
+    pd << ", " << theInside;
 
   pd << ")";
   SetErrorCode(OK);
index 3de3f3240d7bf0c74517f452770b57651c1dbc81..80c8ff4f8181d46f36ed26eb4efb3337d002f02a 100644 (file)
@@ -96,7 +96,7 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
                                                             double theDX, double theDY, double theDZ);
   
   Standard_EXPORT Handle(GEOM_Object) MakeDraftPrism  (Handle(GEOM_Object) theInitShape, Handle(GEOM_Object) theBase,
-                                                       double theHeight, double theAngle, bool theFuse);
+                                                       double theHeight, double theAngle, bool theFuse, bool theInvert = false );
   
   Standard_EXPORT Handle(GEOM_Object) MakePipe (Handle(GEOM_Object) theBase,
                                                 Handle(GEOM_Object) thePath);
@@ -148,7 +148,8 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
                 (Handle(GEOM_Object)                     theObject,
                  const Handle(TColStd_HArray1OfInteger) &theFacesIDs,
                  double                                  theOffset,
-                 bool                                    isCopy);
+                 bool                                    isCopy,
+                 bool                                    theInside = false);
 
   Standard_EXPORT Handle(GEOM_Object) RestorePath (Handle(GEOM_Object) theShape,
                                                    Handle(GEOM_Object) theBase1,
index dfddeb2b23b76e01f0993ac15cc964b22a7c3998..82c8bc5fee319e6cd60c20128588dd7c0714d209 100644 (file)
@@ -28,6 +28,7 @@
 #define OFF_ARG_SHAPE 1
 #define OFF_ARG_VALUE 2
 #define OFF_ARG_IDS   3
+#define OFF_ARG_PARAM 4
 
 class GEOMImpl_IOffset
 {
@@ -43,6 +44,10 @@ class GEOMImpl_IOffset
 
   double GetValue() { return _func->GetReal(OFF_ARG_VALUE); }
 
+  void SetParam(Standard_Boolean theParam) { _func->SetInteger(OFF_ARG_PARAM, theParam ? 1 : 0); }
+
+  Standard_Boolean GetParam() { return _func->GetInteger(OFF_ARG_PARAM); }
+
   void SetFaceIDs(const Handle(TColStd_HArray1OfInteger)& theFaceIDs)
     { _func->SetIntegerArray(OFF_ARG_IDS, theFaceIDs); }
 
index 523a836c14a90aeab8eddb1c8208c5d89bd199a5..4153cc29fbd50697ff0faf722b09b2b89f7898fb 100644 (file)
@@ -38,6 +38,7 @@
 #define PRISM_ARG_FUSE     11
 #define PRISM_ARG_INIT     12
 #define PRISM_ARG_MODE     13
+#define PRISM_ARG_INVERT   14
 
 class GEOMImpl_IPrism
 {
@@ -75,9 +76,11 @@ class GEOMImpl_IPrism
   
   void SetFuseFlag(int theFlag) { _func->SetInteger(PRISM_ARG_FUSE, theFlag); }
 //   void SetMode(GEOMImpl_Mode theMode) { _func->SetInteger(PRISM_ARG_MODE, theMode); }  //TEST
+  void SetInvertFlag(Standard_Boolean theInvert) { _func->SetInteger(PRISM_ARG_INVERT, theInvert ? 1 : 0);}
 
   int  GetFuseFlag()      { return _func->GetInteger(PRISM_ARG_FUSE); }
 //   GEOMImpl_Mode GetMode() { return _func->GetInteger(PRISM_ARG_MODE); }   //TEST
+  Standard_Boolean GetInvertFlag() { return _func->GetInteger(PRISM_ARG_INVERT); }
 
  private:
 
index 495d6294ed614e4e2b57a9d14c936d28bc9bc167..da393a67edf988bda4bff539398ff33a0b79f6ac 100644 (file)
@@ -73,8 +73,12 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const
   Handle(GEOM_Function) aRefShape = aCI.GetShape();
   TopoDS_Shape aShapeBase = aRefShape->GetValue();
   Standard_Real anOffset = aCI.GetValue();
+  Standard_Boolean isInside = aCI.GetParam();
   Standard_Real aTol = Precision::Confusion();
 
+  if (isInside)
+    anOffset = -anOffset;
+
   if (Abs(anOffset) < aTol) {
     TCollection_AsciiString aMsg ("Absolute value of offset can not be less than the tolerance value (");
     aMsg += TCollection_AsciiString(aTol);
@@ -208,7 +212,7 @@ GetCreationInformation(std::string&             theOperationName,
   case OFFSET_THICKENING_COPY:
     theOperationName = "MakeThickening";
     AddParam( theParams, "Object", aCI.GetShape() );
-    AddParam( theParams, "Offset", aCI.GetValue() );
+    AddParam( theParams, "Offset", aCI.GetParam() ? -aCI.GetValue() : aCI.GetValue() );
     {
       Handle(TColStd_HArray1OfInteger) aFacesIDs = aCI.GetFaceIDs();
 
index 205a130cf5c5a59524cf5b0475a9472ba3fc205c..52f6d21092126981c0e0a40ea4701018eff7af49 100644 (file)
@@ -196,6 +196,7 @@ Standard_Integer GEOMImpl_PrismDriver::Execute(TFunction_Logbook& log) const
     Standard_Real aHeight    = aCI.GetH();                  // Height of the extrusion
     Standard_Real anAngle    = aCI.GetDraftAngle();         // Draft angle
     Standard_Boolean isProtrusion = (aCI.GetFuseFlag()==1); 
+    Standard_Boolean isInvert = aCI.GetInvertFlag();
     // Flag to know wether the feature is a protrusion (fuse) or a depression (cut)
     
     // history of the Base wire (RefBase)
@@ -217,7 +218,7 @@ Standard_Integer GEOMImpl_PrismDriver::Execute(TFunction_Logbook& log) const
     if(!aSuppObj.IsNull())      // If the wire has a support
       aSupport = aSuppObj->GetValue();
     
-    aShape = MakeDraftPrism(anInitShape, aSketch, aHeight, anAngle, isProtrusion, aSupport); 
+    aShape = MakeDraftPrism(anInitShape, aSketch, aHeight, anAngle, isProtrusion, aSupport, isInvert);
   }
 
   if (aShape.IsNull()) return 0;
@@ -411,7 +412,8 @@ TopoDS_Shape GEOMImpl_PrismDriver::MakeDraftPrism ( const TopoDS_Shape& theInitS
                                                     const Standard_Real theHeight,
                                                     const Standard_Real theAngle,
                                                     bool                isProtrusion,
-                                                    const TopoDS_Shape& theSupport)
+                                                    const TopoDS_Shape& theSupport,
+                                                    bool                isInvert)
 {
   TopoDS_Shape aShape;
   
@@ -470,11 +472,11 @@ TopoDS_Shape GEOMImpl_PrismDriver::MakeDraftPrism ( const TopoDS_Shape& theInitS
     } 
     
     // Invert height and angle if the operation is an extruded cut
-    bool invert = !isProtrusion; 
+    bool invert = isInvert? isProtrusion : !isProtrusion;
     
     // If the face has a reversed orientation invert for extruded boss operations
     if(aFaceBase.Orientation() == TopAbs_REVERSED)
-      invert = isProtrusion;
+      invert = !invert;
 
     Standard_Real anAngle = theAngle;
     Standard_Real aHeight = theHeight;
index 529d91afef770cb72b3bb633f39f2414f117a52b..2d771557824603bb7f0b23c26d8ea17524b4e489 100644 (file)
@@ -93,7 +93,8 @@ public:
                                                       const Standard_Real theHeight,
                                                       const Standard_Real theAngle,
                                                       bool                isProtrusion,
-                                                      const TopoDS_Shape& theSupport);
+                                                      const TopoDS_Shape& theSupport,
+                                                      bool                isInvert = false);
 
   Standard_EXPORT virtual
   bool GetCreationInformation(std::string&             theOperationName,
index 3a67fc1828e144af431295205a3ab2c1eb0d1c26..66e4b809f75920b2a279b972350ff5fb160fe5f6 100644 (file)
@@ -766,7 +766,8 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeDraftPrism
                       (GEOM::GEOM_Object_ptr theInitShape, GEOM::GEOM_Object_ptr theBase, 
                        CORBA::Double  theHeight,
                        CORBA::Double  theAngle,
-                       CORBA::Boolean theFuse)
+                       CORBA::Boolean theFuse,
+                       CORBA::Boolean theInvert)
 {
   GEOM::GEOM_Object_var aGEOMObject;
   
@@ -780,7 +781,7 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeDraftPrism
   if (aBase.IsNull() || aInit.IsNull()) return aGEOMObject._retn();
 
   //Create the Prism
-  Handle(GEOM_Object) anObject = GetOperations()->MakeDraftPrism(aInit, aBase, theHeight, theAngle, theFuse);
+  Handle(GEOM_Object) anObject = GetOperations()->MakeDraftPrism(aInit, aBase, theHeight, theAngle, theFuse, theInvert);
  
   if (!GetOperations()->IsDone() || anObject.IsNull())
     return aGEOMObject._retn();
@@ -1187,7 +1188,8 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeThickening
                  (GEOM::GEOM_Object_ptr   theObject,
                   const GEOM::ListOfLong &theFacesIDs,
                   CORBA::Double           theOffset,
-                  CORBA::Boolean          doCopy)
+                  CORBA::Boolean          doCopy,
+                  CORBA::Boolean          theInside)
 {
   GEOM::GEOM_Object_var aGEOMObject;
   //Set a not done flag
@@ -1225,7 +1227,7 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeThickening
   if (doCopy)
   {
     Handle(GEOM_Object) anObject = GetOperations()->MakeThickening(
-      aBasicObject, aFaceIDs, theOffset, doCopy);
+      aBasicObject, aFaceIDs, theOffset, doCopy, theInside);
     if (!GetOperations()->IsDone() || anObject.IsNull())
       return aGEOMObject._retn();
     
@@ -1233,7 +1235,7 @@ GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeThickening
   }
   else
   {
-    GetOperations()->MakeThickening(aBasicObject, aFaceIDs, theOffset, doCopy);
+    GetOperations()->MakeThickening(aBasicObject, aFaceIDs, theOffset, doCopy, theInside);
     
     // Update GUI.
     UpdateGUIForObject(theObject);
index ab2f135f01aa3ff1d320c48bd9549913b4cd5c48..733e62833bd7a2c4cfa87950843f0d9d32136492 100644 (file)
@@ -153,7 +153,8 @@ class GEOM_I_EXPORT GEOM_I3DPrimOperations_i :
                                         GEOM::GEOM_Object_ptr theBase,
                                         CORBA::Double         theHeight,
                                         CORBA::Double         theAngle,
-                                        CORBA::Boolean        theFuse);
+                                        CORBA::Boolean        theFuse,
+                                        CORBA::Boolean        theInvert);
                             
   GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase,
                                  GEOM::GEOM_Object_ptr thePath);
@@ -201,7 +202,8 @@ class GEOM_I_EXPORT GEOM_I3DPrimOperations_i :
   GEOM::GEOM_Object_ptr MakeThickening (GEOM::GEOM_Object_ptr   theObject,
                                         const GEOM::ListOfLong &theFacesIDs,
                                         CORBA::Double           theOffset,
-                                        CORBA::Boolean          isCopy);
+                                        CORBA::Boolean          isCopy,
+                                        CORBA::Boolean          theInside);
 
   GEOM::GEOM_Object_ptr RestorePath (GEOM::GEOM_Object_ptr theShape,
                                      GEOM::GEOM_Object_ptr theBase1,
index e5c2bd608d27b2ff85f5bbab04df8bdbc473ff87..fabb95341a9d00540ae4da746c91fd3ac2232fd6 100644 (file)
@@ -4149,6 +4149,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  @param theFacesIDs the list of face IDs to be removed from the
         #         result. It is ignored if \a theShape is a face or a shell.
         #         It is empty by default. 
+        #  @param theInside If true the thickness is applied towards inside
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
@@ -4158,7 +4159,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  @ref tui_creation_thickness "Example"
         @ManageTransactions("PrimOp")
         def MakeThickSolid(self, theShape, theThickness,
-                           theFacesIDs=[], theName=None):
+                           theFacesIDs=[], theInside=False, theName=None):
             """
             Make a thick solid from a shape. If the input is a surface shape
             (face or shell) the result is a thick solid. If an input shape is
@@ -4171,6 +4172,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                  theFacesIDs the list of face IDs to be removed from the
                           result. It is ignored if theShape is a face or a
                           shell. It is empty by default. 
+                 theInside If true the thickness is applied towards inside
                  theName Object name; when specified, this parameter is used
                          for result publication in the study. Otherwise, if automatic
                          publication is switched on, default value is used for result name.
@@ -4179,9 +4181,11 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 New GEOM.GEOM_Object, containing the created solid
             """
             # Example: see GEOM_TestAll.py
+            theThickness,Parameters = ParseParameters(theThickness)
             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
-                                               theThickness, True)
+                                               theThickness, True, theInside)
             RaiseIfFailed("MakeThickSolid", self.PrimOp)
+            anObj.SetParameters(Parameters)
             self._autoPublish(anObj, theName, "thickSolid")
             return anObj
 
@@ -4195,12 +4199,13 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  @param theFacesIDs the list of face IDs to be removed from the
         #         result. It is ignored if \a theShape is a face or a shell.
         #         It is empty by default. 
+        #  @param theInside If true the thickness is applied towards inside
         #
         #  @return The modified shape
         #
         #  @ref tui_creation_thickness "Example"
         @ManageTransactions("PrimOp")
-        def Thicken(self, theShape, theThickness, theFacesIDs=[]):
+        def Thicken(self, theShape, theThickness, theFacesIDs=[], theInside=False):
             """
             Modifies a shape to make it a thick solid. If the input is a
             surface shape (face or shell) the result is a thick solid. If
@@ -4214,14 +4219,17 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 theFacesIDs the list of face IDs to be removed from the
                          result. It is ignored if \a theShape is a face or
                          a shell. It is empty by default. 
+                theInside If true the thickness is applied towards inside
 
             Returns:
                 The modified shape
             """
             # Example: see GEOM_TestAll.py
+            theThickness,Parameters = ParseParameters(theThickness)
             anObj = self.PrimOp.MakeThickening(theShape, theFacesIDs,
-                                               theThickness, False)
+                                               theThickness, False, theInside)
             RaiseIfFailed("Thicken", self.PrimOp)
+            anObj.SetParameters(Parameters)
             return anObj
 
         ## Build a middle path of a pipe-like shape.
@@ -5835,8 +5843,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             Returns:
                 New GEOM.GEOM_Object, containing the created edge.
             """
+            theMin, theMax, Parameters = ParseParameters(theMin, theMax)
             anObj = self.ShapesOp.ExtendEdge(theEdge, theMin, theMax)
             RaiseIfFailed("ExtendEdge", self.ShapesOp)
+            anObj.SetParameters(Parameters)
             self._autoPublish(anObj, theName, "edge")
             return anObj
 
@@ -5883,9 +5893,11 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             Returns:
                 New GEOM.GEOM_Object, containing the created face.
             """
+            theUMin, theUMax, theVMin, theVMax, Parameters = ParseParameters(theUMin, theUMax, theVMin, theVMax)
             anObj = self.ShapesOp.ExtendFace(theFace, theUMin, theUMax,
                                              theVMin, theVMax)
             RaiseIfFailed("ExtendFace", self.ShapesOp)
+            anObj.SetParameters(Parameters)
             self._autoPublish(anObj, theName, "face")
             return anObj
 
@@ -10059,6 +10071,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  @param theBase Closed edge or wire defining the base shape to be extruded.
         #  @param theH Prism dimension along the normal to theBase
         #  @param theAngle Draft angle in degrees.
+        #  @param theInvert If true material changes the direction
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
@@ -10067,7 +10080,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #
         #  @ref tui_creation_prism "Example"
         @ManageTransactions("PrimOp")
-        def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theName=None):
+        def MakeExtrudedCut(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
             """
             Add material to a solid by extrusion of the base shape on the given distance.
 
@@ -10076,6 +10089,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 theBase Closed edge or wire defining the base shape to be extruded.
                 theH Prism dimension along the normal  to theBase
                 theAngle Draft angle in degrees.
+                theInvert If true material changes the direction.
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
@@ -10084,10 +10098,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 New GEOM.GEOM_Object,  containing the initial shape with removed material.
             """
             # Example: see GEOM_TestAll.py
-            #theH,Parameters = ParseParameters(theH)
-            anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
+            theH,theAngle,Parameters = ParseParameters(theH,theAngle)
+            anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False, theInvert)
             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
-            #anObj.SetParameters(Parameters)
+            anObj.SetParameters(Parameters)
             self._autoPublish(anObj, theName, "extrudedCut")
             return anObj
 
@@ -10097,6 +10111,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #  @param theBase Closed edge or wire defining the base shape to be extruded.
         #  @param theH Prism dimension along the normal to theBase
         #  @param theAngle Draft angle in degrees.
+        #  @param theInvert If true material changes the direction
         #  @param theName Object name; when specified, this parameter is used
         #         for result publication in the study. Otherwise, if automatic
         #         publication is switched on, default value is used for result name.
@@ -10105,7 +10120,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
         #
         #  @ref tui_creation_prism "Example"
         @ManageTransactions("PrimOp")
-        def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theName=None):
+        def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle, theInvert=False, theName=None):
             """
             Add material to a solid by extrusion of the base shape on the given distance.
 
@@ -10114,6 +10129,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 theBase Closed edge or wire defining the base shape to be extruded.
                 theH Prism dimension along the normal  to theBase
                 theAngle Draft angle in degrees.
+                theInvert If true material changes the direction.
                 theName Object name; when specified, this parameter is used
                         for result publication in the study. Otherwise, if automatic
                         publication is switched on, default value is used for result name.
@@ -10122,10 +10138,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 New GEOM.GEOM_Object,  containing the initial shape with added material.
             """
             # Example: see GEOM_TestAll.py
-            #theH,Parameters = ParseParameters(theH)
-            anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
+            theH,theAngle,Parameters = ParseParameters(theH,theAngle)
+            anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True, theInvert)
             RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
-            #anObj.SetParameters(Parameters)
+            anObj.SetParameters(Parameters)
             self._autoPublish(anObj, theName, "extrudedBoss")
             return anObj
 
index ecdfae3fa08e6652163648fdb02c64440a05921e..e2de726115184b83f83793e7a82e14f313b4ccc1 100644 (file)
@@ -717,15 +717,15 @@ bool GenerationGUI_PrismDlg::execute (ObjectList& objects)
     if(GroupThickening->checkButton1->isChecked())
     { 
       double aThickness = GroupThickening->SpinBox_DX->value();
-      if (GroupThickening->checkButton2->isChecked())
-      {
-        aThickness = -aThickness;  
-      }
+      bool isInside = GroupThickening->checkButton2->isChecked();
 
       GEOM::ListOfLong_var anArray = new GEOM::ListOfLong;
 
       anObj = anotherOper->MakeThickening
-        (anObj, anArray, aThickness, /*copy=*/false);    
+        (anObj, anArray, aThickness, /*copy=*/false, isInside);
+
+      if (!anObj->_is_nil() && !IsPreview())
+        anObj->SetParameters(GroupThickening->SpinBox_DX->text().toUtf8().constData());
     }
     
     if (!anObj->_is_nil())
index f743fa63151979dc40d8683a689bbf93309c5dd8..650024b3d1a2004984b234ad1147cd4fd001a464 100644 (file)
@@ -421,6 +421,7 @@ bool GenerationGUI_ThicknessDlg::execute (ObjectList& objects)
   GEOM::GEOM_I3DPrimOperations_var anOper       =
     GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
   double                           aThickness   = myThicknessSpin->value();
+  bool                             anInside = myInsideCheck->isChecked();
   GEOM::ListOfLong_var             anObjIDsList = new GEOM::ListOfLong();
   TopoDS_Shape                     aShape;
 
@@ -452,14 +453,15 @@ bool GenerationGUI_ThicknessDlg::execute (ObjectList& objects)
     }
   }
 
-  if (myInsideCheck->isChecked()) {
-    aThickness = -aThickness;  
-  }
-
   anObj = anOper->MakeThickening
-    (myObject.get(), anObjIDsList.in(), aThickness, true);
+    (myObject.get(), anObjIDsList.in(), aThickness, true, anInside);
     
   if (!anObj->_is_nil()) {
+    if (!IsPreview()) {
+      QStringList aParameters;
+      aParameters << myThicknessSpin->text();
+      anObj->SetParameters(aParameters.join(":").toUtf8().constData());
+    }
     objects.push_back(anObj._retn());
   }
 
index d8d36b167001f7f63b4515791e1a4c0f75331c4f..8812cd5ee0e6d96ebf1fe0c0ab2a9541597ea2dd 100644 (file)
@@ -365,14 +365,9 @@ bool OperationGUI_ExtrudedFeatureDlg::execute (ObjectList& objects)
   
   if (myGroup->PushButton3->isChecked())
     angle=myGroup->SpinBox_DY->value();
-  
-  if (myGroup->PushButton4->isChecked())
-  {
-    aHeight = -aHeight;
-    angle   = -angle;
-  }
     
-  bool isProtrusion = (myOperation == OperationGUI::BOSS);  
+  bool isProtrusion = (myOperation == OperationGUI::BOSS);
+  bool isInvert = myGroup->PushButton4->isChecked();
   
   // Hide the initial shape in order to see the modifications on the preview
   erase(myObject1.get(),false); 
@@ -380,9 +375,18 @@ bool OperationGUI_ExtrudedFeatureDlg::execute (ObjectList& objects)
   GEOM::GEOM_Object_var anObj = anOper->MakeDraftPrism(myObject1.get(), myObject2.get(), 
                                                        aHeight,
                                                        angle,
-                                                       isProtrusion);
-  if (!anObj->_is_nil())
+                                                       isProtrusion,
+                                                       isInvert);
+  if (!anObj->_is_nil()) {
+    if (!IsPreview()) {
+      QStringList aParameters;
+      aParameters << myGroup->SpinBox_DX->text();
+      if (myGroup->PushButton3->isChecked())
+        aParameters << myGroup->SpinBox_DY->text();
+      anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+    }
     objects.push_back(anObj._retn());
+  }
 
   return true;
 }
index 41f45306312e01e86d29a0a0b0c6030c52b065d3..130060b9d7c98c7e4fa69a839e75dcee5567b6d1 100644 (file)
@@ -390,6 +390,13 @@ bool TransformationGUI_ExtensionDlg::execute(ObjectList& objects)
   case 0:
     anObj = anOper->ExtendEdge(myBase.get(), myUMinSpinBox->value(),
                                myUMaxSpinBox->value());
+    if (!anObj->_is_nil() && !IsPreview())
+    {
+         QStringList aParameters;
+         aParameters << myUMinSpinBox->text();
+         aParameters << myUMaxSpinBox->text();
+         anObj->SetParameters(aParameters.join(":").toUtf8().constData());
+    }
     res   = true;
     break;
   case 1:
@@ -397,6 +404,15 @@ bool TransformationGUI_ExtensionDlg::execute(ObjectList& objects)
                                myUMaxSpinBox->value(),
                                myVMinSpinBox->value(),
                                myVMaxSpinBox->value());
+    if (!anObj->_is_nil() && !IsPreview())
+    {
+         QStringList aParameters;
+         aParameters << myUMinSpinBox->text();
+         aParameters << myUMaxSpinBox->text();
+         aParameters << myVMinSpinBox->text();
+         aParameters << myVMaxSpinBox->text();
+         anObj->SetParameters(aParameters.join(":").toUtf8().constData());
+    }
     res   = true;
     break;
   default: