From: dmv Date: Mon, 18 Feb 2008 14:29:08 +0000 (+0000) Subject: Bug on IMP NPAL 16548 in Salome 4.1.X X-Git-Tag: V4_1_1rc2~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8bc0ec2d0d01c82ba95f303522caaac56049575b;p=modules%2Fgeom.git Bug on IMP NPAL 16548 in Salome 4.1.X --- diff --git a/src/GEOM_SWIG/GEOM_TestAll.py b/src/GEOM_SWIG/GEOM_TestAll.py index 67188c761..4c2d3675a 100644 --- a/src/GEOM_SWIG/GEOM_TestAll.py +++ b/src/GEOM_SWIG/GEOM_TestAll.py @@ -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") diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py index 2f37c4e86..20a6e120c 100644 --- a/src/GEOM_SWIG/geompyDC.py +++ b/src/GEOM_SWIG/geompyDC.py @@ -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.