]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Bug on IMP NPAL 16548 in Salome 4.1.X
authordmv <dmv@opencascade.com>
Mon, 18 Feb 2008 14:29:08 +0000 (14:29 +0000)
committerdmv <dmv@opencascade.com>
Mon, 18 Feb 2008 14:29:08 +0000 (14:29 +0000)
src/GEOM_SWIG/GEOM_TestAll.py
src/GEOM_SWIG/geompyDC.py

index 67188c761ae3bd37df5ec70d0ec93497943e5449..4c2d3675aa55891043393d4f62a7f57c5b76746c 100644 (file)
@@ -160,7 +160,9 @@ def TestAll (geompy, math):
   #Create advanced objects
   Copy       = geompy.MakeCopy(Box)                      #(GEOM_Object_ptr)->GEOM_Object_ptr
   Prism      = geompy.MakePrismVecH(Face, vz, 100.0)     #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr
+  Prism2Ways = geompy.MakePrismVecH2Ways(Face, vz, 10.0) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr
   Revolution = geompy.MakeRevolution(Face, vz, angle2)   #
+  Revolution2Ways = geompy.MakeRevolution(Face, vz, angle1)   #
   Filling    = geompy.MakeFilling(Compound, mindeg, maxdeg,
                                   tol2d, tol3d, nbiter)  #(GEOM_Object_ptr, 4 Doubles, Short)->GEOM_Object_ptr
   Pipe       = geompy.MakePipe(Wire, Edge)               #(2 GEOM_Object_ptr)->GEOM_Object_ptr
@@ -304,7 +306,9 @@ def TestAll (geompy, math):
 
   id_Copy       = geompy.addToStudy(Copy,       "Copy")
   id_Prism      = geompy.addToStudy(Prism,      "Prism")
+  id_Prism2Ways = geompy.addToStudy(Prism2Ways, "Prism2Ways")
   id_Revolution = geompy.addToStudy(Revolution, "Revolution")
+  id_Revolution2Ways = geompy.addToStudy(Revolution2Ways, "Revolution2Ways")
   id_Filling    = geompy.addToStudy(Filling,    "Filling")
   id_Pipe       = geompy.addToStudy(Pipe,       "Pipe")
   id_Sewing     = geompy.addToStudy(Sewing,     "Sewing")
index 2f37c4e86c241faa2bde0a99054000c992adbefb..20a6e120c9cc369385d2e779af47ba8ddf191e34 100644 (file)
@@ -666,6 +666,20 @@ class geompyDC(GEOM._objref_GEOM_Gen):
             anObj = self.PrimOp.MakePrismVecH(theBase, theVec, theH)
             RaiseIfFailed("MakePrismVecH", self.PrimOp)
             return anObj
+
+        ## Create a shape by extrusion of the base shape along the vector,
+        #  i.e. all the space, transfixed by the base shape during its translation
+        #  along the vector on the given distance in 2 Ways (forward/backward) .
+        #  @param theBase Base shape to be extruded.
+        #  @param theVec Direction of extrusion.
+        #  @param theH Prism dimension along theVec in forward direction.
+        #  @return New GEOM_Object, containing the created prism.
+        #
+        #  Example: see GEOM_TestAll.py
+        def MakePrismVecH2Ways(self, theBase, theVec, theH):
+            anObj = self.PrimOp.MakePrismVecH2Ways(theBase, theVec, theH)
+            RaiseIfFailed("MakePrismVecH2Ways", self.PrimOp)
+            return anObj
         
         ## Create a shape by extrusion of the base shape along
         #  the path shape. The path shape can be a wire or an edge.
@@ -692,6 +706,11 @@ class geompyDC(GEOM._objref_GEOM_Gen):
             anObj = self.PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle)
             RaiseIfFailed("MakeRevolutionAxisAngle", self.PrimOp)
             return anObj
+        ## The Same Revolution but in both ways forward&backward.
+        def MakeRevolution2Ways(self, theBase, theAxis, theAngle):
+            anObj = self.PrimOp.MakeRevolutionAxisAngle2Ways(theBase, theAxis, theAngle)
+            RaiseIfFailed("MakeRevolutionAxisAngle2Ways", self.PrimOp)
+            return anObj
         
         ## Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
         #  @param theSeqSections - set of specified sections.
@@ -1595,7 +1614,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
             anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector)
             RaiseIfFailed("TranslateVectorCopy", self.TrsfOp)
             return anObj
-        
+
         ## Rotate the given object around the given axis
         #  on the given angle, creating its copy before the rotatation.
         #  @param theObject The object to be rotated.