Back to index

salome-geom  6.5.0
Modules | Functions
Creating Advanced Geometrical Objects
Creating geometrical objects
Collaboration diagram for Creating Advanced Geometrical Objects:

Modules

 Decompose objects
 Decompose objects deprecated methods
 Access to sub-shapes by their unique IDs inside the main shape
 Access to sub-shapes by a criteria
 Advanced objects creation functions

Functions

def geompyDC.geompyDC.MakeEdge
 Create a linear edge with specified ends.
def geompyDC.geompyDC.MakeEdgeOnCurveByLength
 Create a new edge, corresponding to the given length on the given curve.
def geompyDC.geompyDC.MakeEdgeWire
 Create an edge from specified wire.
def geompyDC.geompyDC.MakeWire
 Create a wire from the set of edges and wires.
def geompyDC.geompyDC.MakeFace
 Create a face on the given wire.
def geompyDC.geompyDC.MakeFaceWires
 Create a face on the given wires set.
def geompyDC.geompyDC.MakeFaces
 See MakeFaceWires() method for details.
def geompyDC.geompyDC.MakeShell
 Create a shell from the set of faces and shells.
def geompyDC.geompyDC.MakeSolid
 Create a solid, bounded by the given shells.
def geompyDC.geompyDC.MakeCompound
 Create a compound of the given shapes.

Function Documentation

def geompyDC.geompyDC.MakeCompound (   self,
  theShapes 
)

Create a compound of the given shapes.

Parameters:
theShapesList of shapes to put in compound.
Returns:
New GEOM.GEOM_Object, containing the created compound.

Example

Create a compound of the given shapes.

Parameters:
    theShapes List of shapes to put in compound.

Returns:
    New GEOM.GEOM_Object, containing the created compound.

Definition at line 3004 of file geompyDC.py.

03004 
03005         def MakeCompound(self,theShapes):
03006             """
03007             Create a compound of the given shapes.
03008 
03009             Parameters:
03010                 theShapes List of shapes to put in compound.
03011 
03012             Returns:
03013                 New GEOM.GEOM_Object, containing the created compound.
03014             """
03015             # Example: see GEOM_TestAll.py
03016             anObj = self.ShapesOp.MakeCompound(theShapes)
03017             RaiseIfFailed("MakeCompound", self.ShapesOp)
03018             return anObj

Here is the call graph for this function:

Here is the caller graph for this function:

def geompyDC.geompyDC.MakeEdge (   self,
  thePnt1,
  thePnt2 
)

Create a linear edge with specified ends.

Parameters:
thePnt1Point for the first end of edge.
thePnt2Point for the second end of edge.
Returns:
New GEOM.GEOM_Object, containing the created edge.

Example

Create a linear edge with specified ends.

Parameters:
    thePnt1 Point for the first end of edge.
    thePnt2 Point for the second end of edge.

Returns:           
    New GEOM.GEOM_Object, containing the created edge.

Definition at line 2787 of file geompyDC.py.

02787 
02788         def MakeEdge(self,thePnt1, thePnt2):
02789             """
02790             Create a linear edge with specified ends.
02791 
02792             Parameters:
02793                 thePnt1 Point for the first end of edge.
02794                 thePnt2 Point for the second end of edge.
02795 
02796             Returns:           
02797                 New GEOM.GEOM_Object, containing the created edge.
02798             """
02799             # Example: see GEOM_TestAll.py
02800             anObj = self.ShapesOp.MakeEdge(thePnt1, thePnt2)
02801             RaiseIfFailed("MakeEdge", self.ShapesOp)
02802             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeEdgeOnCurveByLength (   self,
  theRefCurve,
  theLength,
  theStartPoint = None 
)

Create a new edge, corresponding to the given length on the given curve.

Parameters:
theRefCurveThe referenced curve (edge).
theLengthLength on the referenced curve. It can be negative.
theStartPointAny point can be selected for it, the new edge will begin at the end of theRefCurve, close to the selected point. If None, start from the first point of theRefCurve.
Returns:
New GEOM.GEOM_Object, containing the created edge.

Example

Create a new edge, corresponding to the given length on the given curve.

Parameters:
    theRefCurve The referenced curve (edge).
    theLength Length on the referenced curve. It can be negative.
    theStartPoint Any point can be selected for it, the new edge will begin
      at the end of theRefCurve, close to the selected point.
      If None, start from the first point of theRefCurve.

Returns:              
    New GEOM.GEOM_Object, containing the created edge.

Definition at line 2812 of file geompyDC.py.

02812 
02813         def MakeEdgeOnCurveByLength(self, theRefCurve, theLength, theStartPoint = None):
02814             """
02815             Create a new edge, corresponding to the given length on the given curve.
02816 
02817             Parameters:
02818                 theRefCurve The referenced curve (edge).
02819                 theLength Length on the referenced curve. It can be negative.
02820                 theStartPoint Any point can be selected for it, the new edge will begin
02821                               at the end of theRefCurve, close to the selected point.
02822                               If None, start from the first point of theRefCurve.
02823 
02824             Returns:              
02825                 New GEOM.GEOM_Object, containing the created edge.
02826             """
02827             # Example: see GEOM_TestAll.py
02828             theLength, Parameters = ParseParameters(theLength)
02829             anObj = self.ShapesOp.MakeEdgeOnCurveByLength(theRefCurve, theLength, theStartPoint)
02830             RaiseIfFailed("MakeEdgeOnCurveByLength", self.ShapesOp)
02831             anObj.SetParameters(Parameters)
02832             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeEdgeWire (   self,
  theWire,
  theLinearTolerance = 1e-07,
  theAngularTolerance = 1e-12 
)

Create an edge from specified wire.

Parameters:
theWiresource Wire
theLinearTolerancelinear tolerance value (default = 1e-07)
theAngularToleranceangular tolerance value (default = 1e-12)
Returns:
New GEOM.GEOM_Object, containing the created edge.

Example

Create an edge from specified wire.

Parameters:
    theWire source Wire
    theLinearTolerance linear tolerance value (default = 1e-07)
    theAngularTolerance angular tolerance value (default = 1e-12)

Returns:
    New GEOM.GEOM_Object, containing the created edge.

Definition at line 2840 of file geompyDC.py.

02840 
02841         def MakeEdgeWire(self, theWire, theLinearTolerance = 1e-07, theAngularTolerance = 1e-12):
02842             """
02843             Create an edge from specified wire.
02844 
02845             Parameters:
02846                 theWire source Wire
02847                 theLinearTolerance linear tolerance value (default = 1e-07)
02848                 theAngularTolerance angular tolerance value (default = 1e-12)
02849 
02850             Returns:
02851                 New GEOM.GEOM_Object, containing the created edge.
02852             """
02853             # Example: see GEOM_TestAll.py
02854             anObj = self.ShapesOp.MakeEdgeWire(theWire, theLinearTolerance, theAngularTolerance)
02855             RaiseIfFailed("MakeEdgeWire", self.ShapesOp)
02856             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeFace (   self,
  theWire,
  isPlanarWanted 
)

Create a face on the given wire.

Parameters:
theWireclosed Wire or Edge to build the face on.
isPlanarWantedIf TRUE, the algorithm tries to build a planar face. If the tolerance of the obtained planar face is less than 1e-06, this face will be returned, otherwise the algorithm tries to build any suitable face on the given wire and prints a warning message.
Returns:
New GEOM.GEOM_Object, containing the created face.

Example

Create a face on the given wire.

Parameters:
    theWire closed Wire or Edge to build the face on.
    isPlanarWanted If TRUE, the algorithm tries to build a planar face.
       If the tolerance of the obtained planar face is less
       than 1e-06, this face will be returned, otherwise the
       algorithm tries to build any suitable face on the given
       wire and prints a warning message.

Returns:
    New GEOM.GEOM_Object, containing the created face.

Definition at line 2891 of file geompyDC.py.

02891 
02892         def MakeFace(self, theWire, isPlanarWanted):
02893             """
02894             Create a face on the given wire.
02895 
02896             Parameters:
02897                 theWire closed Wire or Edge to build the face on.
02898                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
02899                                If the tolerance of the obtained planar face is less
02900                                than 1e-06, this face will be returned, otherwise the
02901                                algorithm tries to build any suitable face on the given
02902                                wire and prints a warning message.
02903 
02904             Returns:
02905                 New GEOM.GEOM_Object, containing the created face.
02906             """
02907             # Example: see GEOM_TestAll.py
02908             anObj = self.ShapesOp.MakeFace(theWire, isPlanarWanted)
02909             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
02910                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
02911             else:
02912                 RaiseIfFailed("MakeFace", self.ShapesOp)
02913             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeFaces (   self,
  theWires,
  isPlanarWanted 
)

See MakeFaceWires() method for details.

Example 1
Example 2

See geompy.MakeFaceWires() method for details.

Definition at line 2951 of file geompyDC.py.

02951 
02952         def MakeFaces(self, theWires, isPlanarWanted):
02953             """
02954             See geompy.MakeFaceWires() method for details.
02955             """
02956             # Example: see GEOM_TestOthers.py
02957             anObj = self.MakeFaceWires(theWires, isPlanarWanted)
02958             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeFaceWires (   self,
  theWires,
  isPlanarWanted 
)

Create a face on the given wires set.

Parameters:
theWiresList of closed wires or edges to build the face on.
isPlanarWantedIf TRUE, the algorithm tries to build a planar face. If the tolerance of the obtained planar face is less than 1e-06, this face will be returned, otherwise the algorithm tries to build any suitable face on the given wire and prints a warning message.
Returns:
New GEOM.GEOM_Object, containing the created face.

Example

Create a face on the given wires set.

Parameters:
    theWires List of closed wires or edges to build the face on.
    isPlanarWanted If TRUE, the algorithm tries to build a planar face.
       If the tolerance of the obtained planar face is less
       than 1e-06, this face will be returned, otherwise the
       algorithm tries to build any suitable face on the given
       wire and prints a warning message.

Returns: 
    New GEOM.GEOM_Object, containing the created face.

Definition at line 2924 of file geompyDC.py.

02924 
02925         def MakeFaceWires(self, theWires, isPlanarWanted):
02926             """
02927             Create a face on the given wires set.
02928 
02929             Parameters:
02930                 theWires List of closed wires or edges to build the face on.
02931                 isPlanarWanted If TRUE, the algorithm tries to build a planar face.
02932                                If the tolerance of the obtained planar face is less
02933                                than 1e-06, this face will be returned, otherwise the
02934                                algorithm tries to build any suitable face on the given
02935                                wire and prints a warning message.
02936 
02937             Returns: 
02938                 New GEOM.GEOM_Object, containing the created face.
02939             """
02940             # Example: see GEOM_TestAll.py
02941             anObj = self.ShapesOp.MakeFaceWires(theWires, isPlanarWanted)
02942             if isPlanarWanted and anObj is not None and self.ShapesOp.GetErrorCode() == "MAKE_FACE_TOLERANCE_TOO_BIG":
02943                 print "WARNING: Cannot build a planar face: required tolerance is too big. Non-planar face is built."
02944             else:
02945                 RaiseIfFailed("MakeFaceWires", self.ShapesOp)
02946             return anObj

Here is the call graph for this function:

Here is the caller graph for this function:

def geompyDC.geompyDC.MakeShell (   self,
  theFacesAndShells 
)

Create a shell from the set of faces and shells.

Parameters:
theFacesAndShellsList of faces and/or shells.
Returns:
New GEOM.GEOM_Object, containing the created shell.

Example

Create a shell from the set of faces and shells.

Parameters:
    theFacesAndShells List of faces and/or shells.

Returns:
    New GEOM.GEOM_Object, containing the created shell.

Definition at line 2964 of file geompyDC.py.

02964 
02965         def MakeShell(self,theFacesAndShells):
02966             """
02967             Create a shell from the set of faces and shells.
02968 
02969             Parameters:
02970                 theFacesAndShells List of faces and/or shells.
02971 
02972             Returns:
02973                 New GEOM.GEOM_Object, containing the created shell.
02974             """
02975             # Example: see GEOM_TestAll.py
02976             anObj = self.ShapesOp.MakeShell(theFacesAndShells)
02977             RaiseIfFailed("MakeShell", self.ShapesOp)
02978             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeSolid (   self,
  theShells 
)

Create a solid, bounded by the given shells.

Parameters:
theShellsSequence of bounding shells.
Returns:
New GEOM.GEOM_Object, containing the created solid.

Example

Create a solid, bounded by the given shells.

Parameters:
    theShells Sequence of bounding shells.

Returns:
    New GEOM.GEOM_Object, containing the created solid.

Definition at line 2984 of file geompyDC.py.

02984 
02985         def MakeSolid(self,theShells):
02986             """
02987             Create a solid, bounded by the given shells.
02988 
02989             Parameters:
02990                 theShells Sequence of bounding shells.
02991 
02992             Returns:
02993                 New GEOM.GEOM_Object, containing the created solid.
02994             """
02995             # Example: see GEOM_TestAll.py
02996             anObj = self.ShapesOp.MakeSolidShells(theShells)
02997             RaiseIfFailed("MakeSolidShells", self.ShapesOp)
02998             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeWire (   self,
  theEdgesAndWires,
  theTolerance = 1e-07 
)

Create a wire from the set of edges and wires.

Parameters:
theEdgesAndWiresList of edges and/or wires.
theToleranceMaximum distance between vertices, that will be merged. Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion())
Returns:
New GEOM.GEOM_Object, containing the created wire.

Example

Create a wire from the set of edges and wires.

Parameters:
    theEdgesAndWires List of edges and/or wires.
    theTolerance Maximum distance between vertices, that will be merged.
     Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).

Returns:                    
    New GEOM.GEOM_Object, containing the created wire.

Definition at line 2864 of file geompyDC.py.

02864 
02865         def MakeWire(self, theEdgesAndWires, theTolerance = 1e-07):
02866             """
02867             Create a wire from the set of edges and wires.
02868 
02869             Parameters:
02870                 theEdgesAndWires List of edges and/or wires.
02871                 theTolerance Maximum distance between vertices, that will be merged.
02872                              Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
02873 
02874             Returns:                    
02875                 New GEOM.GEOM_Object, containing the created wire.
02876             """
02877             # Example: see GEOM_TestAll.py
02878             anObj = self.ShapesOp.MakeWire(theEdgesAndWires, theTolerance)
02879             RaiseIfFailed("MakeWire", self.ShapesOp)
02880             return anObj

Here is the call graph for this function: