]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Add methods for creatin thrusections and pipe with different sections and getting...
authorgka <gka@opencascade.com>
Mon, 24 Apr 2006 07:59:25 +0000 (07:59 +0000)
committergka <gka@opencascade.com>
Mon, 24 Apr 2006 07:59:25 +0000 (07:59 +0000)
idl/GEOM_Gen.idl
idl/GEOM_Superv.idl
src/GEOM_I_Superv/GEOM_Superv_i.cc
src/GEOM_I_Superv/GEOM_Superv_i.hh
src/GEOM_SWIG/geompy.py

index 24023fa50fab518f2eb5c4cdb0ff38bb39e61768..cd043a6083b75ed623d4551982e01b828e1e8dc7 100644 (file)
@@ -254,7 +254,7 @@ module GEOM
      */
     GEOM_Object MakePointWithReference (in GEOM_Object theReference,
                                        in double theX, in double theY, in double theZ);
-
+    
     /*!
      *  Create a point, corresponding to the given parameter on the given curve.
      *  \param theRefCurve The referenced curve.
@@ -264,6 +264,18 @@ module GEOM
     GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
                                  in double theParameter);
 
+    
+     /*!
+     *  Create a vector, corresponding to tangent to the given parameter on the given curve.
+     *  \param theRefCurve The referenced curve.
+     *  \param theParameter Value of parameter on the referenced curve.This value should be have value
+     *  \between 0. and 1.. Value of 0. corresponds first parameter of curve value 1. corresponds
+     *  \last parameter of curve. 
+     *  \return New GEOM_Object, containing the created point.
+     */
+     GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
+                                    in double theParameter);
+
     /*!
      *  Create a vector with the given components.
      *  \param theDX X component of the vector.
@@ -271,6 +283,7 @@ module GEOM
      *  \param theDZ Z component of the vector.
      *  \return New GEOM_Object, containing the created vector.
      */
+    
     GEOM_Object MakeVectorDXDYDZ (in double theDX,
                                  in double theDY,
                                  in double theDZ);
@@ -781,6 +794,41 @@ module GEOM
                             in long theMinDeg, in long theMaxDeg,
                             in double theTol2D, in double theTol3D,
                             in long theNbIter);
+
+    /*!
+     *  Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
+     *  \param theSeqSections - set of specified sections.
+     *  \param theModeSolid - mode defining building solid or shell
+     *  \param thePreci - precision 3D used for smoothing by default 1.e-6
+     *  \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
+     *  \return New GEOM_Object, containing the created shell or solid.
+     */
+    GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
+                                in boolean theModeSolid,
+                                in double thePreci,
+                                 in boolean theRuled);
+
+      /*!
+     *  Create a shape by extrusion of the profile shape along
+     *  the path shape. The path shape can be a wire or an edge.
+     *  the several profiles can be specified in the several locations of path.        
+     *  \param theSeqBases - list of  Bases shape to be extruded.
+     *  \param theLocations - list of locations on the path corresponding
+     *                        specified list of the Bases shapes. Number of locations
+     *                        should be equal to number of bases or list of locations can be empty.
+     *  \param thePath - Path shape to extrude the base shape along it.
+     *  \param theWithContact - the mode defining that the section is translated to be in
+     *                          contact with the spine.
+     *  \param - WithCorrection - defining that the section is rotated to be
+     *                          orthogonal to the spine tangent in the correspondent point
+     *  \return New GEOM_Object, containing the created pipe.
+     */
+    GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
+                                              in ListOfGO theLocations,
+                                              in GEOM_Object thePath,
+                                              in boolean theWithContact ,
+                                              in boolean theWithCorrection );
+    
   };
 
   /*!
index 4f2c94f366182b6d5f46cbfcbaa0c442ea6d5e28..40faded970c682363c058d9f5cc5066665c749ca 100644 (file)
@@ -72,6 +72,10 @@ module GEOM
                                        in double theZ) ;
     GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve,
                                  in double theParameter) ;
+
+    GEOM_Object MakeTangentOnCurve (in GEOM_Object theRefCurve,
+                                    in double theParameter);
+
     GEOM_Object MakeVectorDXDYDZ (in double theDX,
                                  in double theDY,
                                  in double theDZ) ;
@@ -148,7 +152,17 @@ module GEOM
                             in long theMinDeg, in long theMaxDeg,
                             in double theTol2D, in double theTol3D,
                             in long theNbIter) ;
+    GEOM_Object MakeThruSections(in ListOfGO theSeqSections,
+                                in boolean theModeSolid,
+                                in double thePreci,
+                                 in boolean theRuled);
 
+    GEOM_Object MakePipeWithDifferentSections (in ListOfGO theSeqBases,
+                                              in ListOfGO theLocations,
+                                              in GEOM_Object thePath,
+                                              in boolean theWithContact ,
+                                              in boolean theWithCorrection );
+    
     //-----------------------------------------------------------//
     // BooleanOperations                                         //
     //-----------------------------------------------------------//
index 38455e4ce7088d97954df29dce49385d3b561ccb..0150c5e9dab5cd80811bedd363c81eec80b52214 100644 (file)
@@ -536,6 +536,17 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr the
   return myBasicOp->MakePointOnCurve(theRefCurve, theParameter);
 }
 
+//=============================================================================
+//  MakeTangentOnCurve:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
+                                                        CORBA::Double theParameter)
+{
+  MESSAGE("GEOM_Superv_i::MakeTangentOnCurve");
+  getBasicOp();
+  return myBasicOp->MakeTangentOnCurve(theRefCurve, theParameter);
+}
+
 //=============================================================================
 //  MakeVectorDXDYDZ:
 //=============================================================================
@@ -845,6 +856,32 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape
   return myBoolOp->MakeBoolean(theShape1, theShape2, theOperation);
 }
 
+//=============================================================================
+//  MakeThruSections:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeThruSections(const GEOM::ListOfGO& theSeqSections,
+                                        CORBA::Boolean theModeSolid,
+                                        CORBA::Double thePreci,
+                                        CORBA::Boolean theRuled)
+{
+  MESSAGE("GEOM_Superv_i::MakeThruSections");
+  get3DPrimOp();
+  return my3DPrimOp->MakeThruSections(theSeqSections, theModeSolid,thePreci,theRuled);
+}
+
+//=============================================================================
+//  MakePipe:
+//=============================================================================
+GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
+                                                     const GEOM::ListOfGO& theLocations,
+                                                     GEOM::GEOM_Object_ptr thePath,
+                                                     CORBA::Boolean theWithContact,
+                                                     CORBA::Boolean theWithCorrections)
+{
+  MESSAGE("GEOM_Superv_i::MakePipeWithDifferentSections");
+  get3DPrimOp();
+  return my3DPrimOp->MakePipeWithDifferentSections(theBases,theLocations, thePath,theWithContact,theWithCorrections);
+}
 //=============================================================================
 //  MakeFuse:
 //=============================================================================
index d64bfb9121e07d87faad6abe3c35ba6b8bc5ae4b..6b143ff665523e17fc2da2f4ccf843a65b155bc6 100644 (file)
@@ -142,6 +142,8 @@ public:
                                                CORBA::Double theZ);
   GEOM::GEOM_Object_ptr MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
                                          CORBA::Double theParameter);
+  GEOM::GEOM_Object_ptr MakeTangentOnCurve (GEOM::GEOM_Object_ptr theRefCurve,
+                                            CORBA::Double theParameter);
   GEOM::GEOM_Object_ptr MakeVectorDXDYDZ (CORBA::Double theDX,
                                          CORBA::Double theDY,
                                          CORBA::Double theDZ);
@@ -218,6 +220,17 @@ public:
                                     CORBA::Long theMinDeg, CORBA::Long theMaxDeg,
                                     CORBA::Double theTol2D, CORBA::Double theTol3D,
                                     CORBA::Long theNbIter);
+
+  GEOM::GEOM_Object_ptr MakeThruSections(const GEOM::ListOfGO& theSeqSections,
+                                        CORBA::Boolean theModeSolid,
+                                        CORBA::Double thePreci,
+                                        CORBA::Boolean theRuled);
+  
+  GEOM::GEOM_Object_ptr MakePipeWithDifferentSections(const GEOM::ListOfGO& theBases,
+                                                     const GEOM::ListOfGO& theLocations,
+                                                     GEOM::GEOM_Object_ptr thePath,
+                                                     CORBA::Boolean theWithContact,
+                                                     CORBA::Boolean theWithCorrections);
   
   //-----------------------------------------------------------//
   // BooleanOperations                                         //
index e34d3163e37efbb2aa23208135cddd4ab4bd61db..cef51da440dcbdcab88b164e93ab2f09e76db670 100644 (file)
@@ -196,6 +196,20 @@ def MakeVertexOnCurve(theRefCurve, theParameter):
       print "MakePointOnCurve : ", BasicOp.GetErrorCode()
     return anObj
 
+def MakeTangentOnCurve(theRefCurve, theParameter):
+    """
+     *  Create a tangent, corresponding to the given parameter on the given curve.
+     *  \param theRefCurve The referenced curve.
+     *  \param theParameter Value of parameter on the referenced curve.
+     *  \return New GEOM_Object, containing the created tangent.
+
+     *  
+    """
+    anObj = BasicOp.MakeTangentOnCurve(theRefCurve, theParameter)
+    if BasicOp.IsDone() == 0:
+      print "MakeTangentOnCurve : ", BasicOp.GetErrorCode()
+    return anObj
+
 def MakeVectorDXDYDZ(theDX, theDY, theDZ):
     """
      *  Create a vector with the given components.
@@ -748,6 +762,45 @@ def MakeRevolution(theBase, theAxis, theAngle):
       print "MakeRevolutionAxisAngle : ", PrimOp.GetErrorCode()
     return anObj
 
+def MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled):
+    """
+     *  Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
+     *  \param theSeqSections - set of specified sections.
+     *  \param theModeSolid - mode defining building solid or shell
+     *  \param thePreci - precision 3D used for smoothing by default 1.e-6
+     *  \param theRuled - mode defining type of the result surfaces (ruled or smoothed).
+     *  \return New GEOM_Object, containing the created shell or solid.
+
+     *  Example: see GEOM_TestAll.py
+    """
+    anObj = PrimOp.MakeThruSections(theSeqSections,theModeSolid,thePreci,theRuled)
+    if PrimOp.IsDone() == 0:
+      print "MakeThruSections : ", PrimOp.GetErrorCode()
+    return anObj
+
+def MakePipeWithDifferentSections(theSeqBases, theLocations,thePath,theWithContact,theWithCorrection):
+    """
+     *  Create a shape by extrusion of the profile shape along
+     *  the path shape. The path shape can be a wire or an edge.
+     *  the several profiles can be specified in the several locations of path.        
+     *  \param theSeqBases - list of  Bases shape to be extruded.
+     *  \param theLocations - list of locations on the path corresponding
+     *                        specified list of the Bases shapes. Number of locations
+     *                        should be equal to number of bases or list of locations can be empty.
+     *  \param thePath - Path shape to extrude the base shape along it.
+     *  \param theWithContact - the mode defining that the section is translated to be in
+     *                          contact with the spine.
+     *  \param - WithCorrection - defining that the section is rotated to be
+     *                          orthogonal to the spine tangent in the correspondent point
+     *  \return New GEOM_Object, containing the created pipe.
+
+     *  Example: see GEOM_TestAll.py
+    """
+    anObj = PrimOp.MakePipeWithDifferentSections(theSeqBases, theLocations,thePath,theWithContact,theWithCorrection)
+    if PrimOp.IsDone() == 0:
+      print "MakePipeWithDifferentSections : ", PrimOp.GetErrorCode()
+    return anObj
+
 # -----------------------------------------------------------------------------
 # Create base shapes
 # -----------------------------------------------------------------------------