Back to index

salome-geom  6.5.0
Functions
Creating Curves
Creating Basic Geometric Objects
Collaboration diagram for Creating Curves:

Functions

def geompyDC.geompyDC.MakeArc
 Create an arc of circle, passing through three given points.
def geompyDC.geompyDC.MakeArcCenter
 Create an arc of circle from a center and 2 points.
def geompyDC.geompyDC.MakeArcOfEllipse
 Create an arc of ellipse, of center and two points.
def geompyDC.geompyDC.MakeCircle
 Create a circle with given center, normal vector and radius.
def geompyDC.geompyDC.MakeCircleR
 Create a circle with given radius.
def geompyDC.geompyDC.MakeCircleThreePnt
 Create a circle, passing through three given points.
def geompyDC.geompyDC.MakeCircleCenter2Pnt
 Create a circle, with given point1 as center, passing through the point2 as radius and laying in the plane, defined by all three given points.
def geompyDC.geompyDC.MakeEllipse
 Create an ellipse with given center, normal vector and radiuses.
def geompyDC.geompyDC.MakeEllipseRR
 Create an ellipse with given radiuses.
def geompyDC.geompyDC.MakePolyline
 Create a polyline on the set of points.
def geompyDC.geompyDC.MakeBezier
 Create bezier curve on the set of points.
def geompyDC.geompyDC.MakeInterpol
 Create B-Spline curve on the set of points.
def geompyDC.geompyDC.MakeCurveParametric
 Creates a curve using the parametric definition of the basic points.

Function Documentation

def geompyDC.geompyDC.MakeArc (   self,
  thePnt1,
  thePnt2,
  thePnt3 
)

Create an arc of circle, passing through three given points.

Parameters:
thePnt1Start point of the arc.
thePnt2Middle point of the arc.
thePnt3End point of the arc.
Returns:
New GEOM.GEOM_Object, containing the created arc.

Example

Create an arc of circle, passing through three given points.

Parameters:
    thePnt1 Start point of the arc.
    thePnt2 Middle point of the arc.
    thePnt3 End point of the arc.

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

Definition at line 1260 of file geompyDC.py.

01260 
01261         def MakeArc(self,thePnt1, thePnt2, thePnt3):
01262             """
01263             Create an arc of circle, passing through three given points.
01264 
01265             Parameters:
01266                 thePnt1 Start point of the arc.
01267                 thePnt2 Middle point of the arc.
01268                 thePnt3 End point of the arc.
01269 
01270             Returns: 
01271                 New GEOM.GEOM_Object, containing the created arc.
01272             """
01273             # Example: see GEOM_TestAll.py
01274             anObj = self.CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3)
01275             RaiseIfFailed("MakeArc", self.CurvesOp)
01276             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeArcCenter (   self,
  thePnt1,
  thePnt2,
  thePnt3,
  theSense = False 
)

Create an arc of circle from a center and 2 points.

Parameters:
thePnt1Center of the arc
thePnt2Start point of the arc. (Gives also the radius of the arc)
thePnt3End point of the arc (Gives also a direction)
theSenseOrientation of the arc
Returns:
New GEOM.GEOM_Object, containing the created arc.

Example

Create an arc of circle from a center and 2 points.

Parameters:
    thePnt1 Center of the arc
    thePnt2 Start point of the arc. (Gives also the radius of the arc)
    thePnt3 End point of the arc (Gives also a direction)
    theSense Orientation of the arc

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

Definition at line 1285 of file geompyDC.py.

01285 
01286         def MakeArcCenter(self, thePnt1, thePnt2, thePnt3, theSense=False):
01287             """
01288             Create an arc of circle from a center and 2 points.
01289 
01290             Parameters:
01291                 thePnt1 Center of the arc
01292                 thePnt2 Start point of the arc. (Gives also the radius of the arc)
01293                 thePnt3 End point of the arc (Gives also a direction)
01294                 theSense Orientation of the arc
01295 
01296             Returns:
01297                 New GEOM.GEOM_Object, containing the created arc.
01298             """
01299             # Example: see GEOM_TestAll.py
01300             anObj = self.CurvesOp.MakeArcCenter(thePnt1, thePnt2, thePnt3, theSense)
01301             RaiseIfFailed("MakeArcCenter", self.CurvesOp)
01302             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeArcOfEllipse (   self,
  theCenter,
  thePnt1,
  thePnt2 
)

Create an arc of ellipse, of center and two points.

Parameters:
theCenterCenter of the arc.
thePnt1defines major radius of the arc by distance from Pnt1 to Pnt2.
thePnt2defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
Returns:
New GEOM.GEOM_Object, containing the created arc.

Example

Create an arc of ellipse, of center and two points.

Parameters:
    theCenter Center of the arc.
    thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
    thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.

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

Definition at line 1310 of file geompyDC.py.

01310 
01311         def MakeArcOfEllipse(self,theCenter, thePnt1, thePnt2):
01312             """
01313             Create an arc of ellipse, of center and two points.
01314 
01315             Parameters:
01316                 theCenter Center of the arc.
01317                 thePnt1 defines major radius of the arc by distance from Pnt1 to Pnt2.
01318                 thePnt2 defines plane of ellipse and minor radius as distance from Pnt3 to line from Pnt1 to Pnt2.
01319 
01320             Returns:
01321                 New GEOM.GEOM_Object, containing the created arc.
01322             """
01323             # Example: see GEOM_TestAll.py
01324             anObj = self.CurvesOp.MakeArcOfEllipse(theCenter, thePnt1, thePnt2)
01325             RaiseIfFailed("MakeArcOfEllipse", self.CurvesOp)
01326             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeBezier (   self,
  thePoints,
  theIsClosed = False 
)

Create bezier curve on the set of points.

Parameters:
thePointsSequence of points for the bezier curve.
theIsClosedIf True, build a closed curve.
Returns:
New GEOM.GEOM_Object, containing the created bezier curve.

Example

Create bezier curve on the set of points.

Parameters:
    thePoints Sequence of points for the bezier curve.
    theIsClosed If True, build a closed curve.

Returns:
    New GEOM.GEOM_Object, containing the created bezier curve.

Definition at line 1503 of file geompyDC.py.

01503 
01504         def MakeBezier(self, thePoints, theIsClosed=False):
01505             """
01506             Create bezier curve on the set of points.
01507 
01508             Parameters:
01509                 thePoints Sequence of points for the bezier curve.
01510                 theIsClosed If True, build a closed curve.
01511 
01512             Returns:
01513                 New GEOM.GEOM_Object, containing the created bezier curve.
01514             """
01515             # Example: see GEOM_TestAll.py
01516             anObj = self.CurvesOp.MakeSplineBezier(thePoints, theIsClosed)
01517             RaiseIfFailed("MakeSplineBezier", self.CurvesOp)
01518             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeCircle (   self,
  thePnt,
  theVec,
  theR 
)

Create a circle with given center, normal vector and radius.

Parameters:
thePntCircle center.
theVecVector, normal to the plane of the circle.
theRCircle radius.
Returns:
New GEOM.GEOM_Object, containing the created circle.

Example

Create a circle with given center, normal vector and radius.

Parameters:
    thePnt Circle center.
    theVec Vector, normal to the plane of the circle.
    theR Circle radius.

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

Definition at line 1334 of file geompyDC.py.

01334 
01335         def MakeCircle(self, thePnt, theVec, theR):
01336             """
01337             Create a circle with given center, normal vector and radius.
01338 
01339             Parameters:
01340                 thePnt Circle center.
01341                 theVec Vector, normal to the plane of the circle.
01342                 theR Circle radius.
01343 
01344             Returns:
01345                 New GEOM.GEOM_Object, containing the created circle.
01346             """
01347             # Example: see GEOM_TestAll.py
01348             theR, Parameters = ParseParameters(theR)
01349             anObj = self.CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR)
01350             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
01351             anObj.SetParameters(Parameters)
01352             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeCircleCenter2Pnt (   self,
  thePnt1,
  thePnt2,
  thePnt3 
)

Create a circle, with given point1 as center, passing through the point2 as radius and laying in the plane, defined by all three given points.

Parameters:
thePnt1,thePnt2,thePnt3Points, defining the circle.
Returns:
New GEOM.GEOM_Object, containing the created circle.

Example

Create a circle, with given point1 as center,
passing through the point2 as radius and laying in the plane,
defined by all three given points.

Parameters:
    thePnt1,thePnt2,thePnt3 Points, defining the circle.

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

Definition at line 1401 of file geompyDC.py.

01401 
01402         def MakeCircleCenter2Pnt(self,thePnt1, thePnt2, thePnt3):
01403             """
01404             Create a circle, with given point1 as center,
01405             passing through the point2 as radius and laying in the plane,
01406             defined by all three given points.
01407 
01408             Parameters:
01409                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
01410 
01411             Returns:
01412                 New GEOM.GEOM_Object, containing the created circle.
01413             """
01414             # Example: see GEOM_example6.py
01415             anObj = self.CurvesOp.MakeCircleCenter2Pnt(thePnt1, thePnt2, thePnt3)
01416             RaiseIfFailed("MakeCircleCenter2Pnt", self.CurvesOp)
01417             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeCircleR (   self,
  theR 
)

Create a circle with given radius.

Center of the circle will be in the origin of global coordinate system and normal vector will be codirected with Z axis

Parameters:
theRCircle radius.
Returns:
New GEOM.GEOM_Object, containing the created circle.
Create a circle with given radius.
Center of the circle will be in the origin of global
coordinate system and normal vector will be codirected with Z axis

Parameters:
    theR Circle radius.

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

Definition at line 1358 of file geompyDC.py.

01358 
01359         def MakeCircleR(self, theR):
01360             """
01361             Create a circle with given radius.
01362             Center of the circle will be in the origin of global
01363             coordinate system and normal vector will be codirected with Z axis
01364 
01365             Parameters:
01366                 theR Circle radius.
01367 
01368             Returns:
01369                 New GEOM.GEOM_Object, containing the created circle.
01370             """
01371             anObj = self.CurvesOp.MakeCirclePntVecR(None, None, theR)
01372             RaiseIfFailed("MakeCirclePntVecR", self.CurvesOp)
01373             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeCircleThreePnt (   self,
  thePnt1,
  thePnt2,
  thePnt3 
)

Create a circle, passing through three given points.

Parameters:
thePnt1,thePnt2,thePnt3Points, defining the circle.
Returns:
New GEOM.GEOM_Object, containing the created circle.

Example

Create a circle, passing through three given points

Parameters:
    thePnt1,thePnt2,thePnt3 Points, defining the circle.

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

Definition at line 1379 of file geompyDC.py.

01379 
01380         def MakeCircleThreePnt(self,thePnt1, thePnt2, thePnt3):
01381             """
01382             Create a circle, passing through three given points
01383 
01384             Parameters:
01385                 thePnt1,thePnt2,thePnt3 Points, defining the circle.
01386 
01387             Returns:
01388                 New GEOM.GEOM_Object, containing the created circle.
01389             """
01390             # Example: see GEOM_TestAll.py
01391             anObj = self.CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3)
01392             RaiseIfFailed("MakeCircleThreePnt", self.CurvesOp)
01393             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeCurveParametric (   self,
  thexExpr,
  theyExpr,
  thezExpr,
  theParamMin,
  theParamMax,
  theParamStep,
  theCurveType,
  theNewMethod = False 
)

Creates a curve using the parametric definition of the basic points.

Parameters:
thexExprparametric equation of the coordinates X.
theyExprparametric equation of the coordinates Y.
thezExprparametric equation of the coordinates Z.
theParamMinthe minimal value of the parameter.
theParamMaxthe maximum value of the parameter.
theParamStepthe number of steps if theNewMethod = True, else step value of the parameter.
theCurveTypethe type of the curve.
theNewMethodflag for switching to the new method if the flag is set to false a deprecated method is used which can lead to a bug.
Returns:
New GEOM.GEOM_Object, containing the created curve.

Example

Creates a curve using the parametric definition of the basic points.

Parameters:
    thexExpr parametric equation of the coordinates X.
    theyExpr parametric equation of the coordinates Y.
    thezExpr parametric equation of the coordinates Z.
    theParamMin the minimal value of the parameter.
    theParamMax the maximum value of the parameter.
    theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
    theCurveType the type of the curve.
    theNewMethod flag for switching to the new method if the flag is set to false a deprecated
     method is used which can lead to a bug.

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

Definition at line 1559 of file geompyDC.py.

01559 
01560                                 theParamMin, theParamMax, theParamStep, theCurveType, theNewMethod=False ):
01561             """
01562             Creates a curve using the parametric definition of the basic points.
01563 
01564             Parameters:
01565                 thexExpr parametric equation of the coordinates X.
01566                 theyExpr parametric equation of the coordinates Y.
01567                 thezExpr parametric equation of the coordinates Z.
01568                 theParamMin the minimal value of the parameter.
01569                 theParamMax the maximum value of the parameter.
01570                 theParamStep the number of steps if theNewMethod = True, else step value of the parameter.
01571                 theCurveType the type of the curve.
01572                 theNewMethod flag for switching to the new method if the flag is set to false a deprecated
01573                              method is used which can lead to a bug.
01574 
01575             Returns:
01576                 New GEOM.GEOM_Object, containing the created curve.
01577             """
01578             theParamMin,theParamMax,theParamStep,Parameters = ParseParameters(theParamMin,theParamMax,theParamStep)
01579             if theNewMethod:
01580               anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
01581             else:
01582               anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)   
01583             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
01584             anObj.SetParameters(Parameters)
01585             return anObj
01586             
01587 

Here is the call graph for this function:

Here is the caller graph for this function:

def geompyDC.geompyDC.MakeEllipse (   self,
  thePnt,
  theVec,
  theRMajor,
  theRMinor,
  theVecMaj = None 
)

Create an ellipse with given center, normal vector and radiuses.

Parameters:
thePntEllipse center.
theVecVector, normal to the plane of the ellipse.
theRMajorMajor ellipse radius.
theRMinorMinor ellipse radius.
theVecMajVector, direction of the ellipse's main axis.
Returns:
New GEOM.GEOM_Object, containing the created ellipse.

Example

Create an ellipse with given center, normal vector and radiuses.

Parameters:
    thePnt Ellipse center.
    theVec Vector, normal to the plane of the ellipse.
    theRMajor Major ellipse radius.
    theRMinor Minor ellipse radius.
    theVecMaj Vector, direction of the ellipse's main axis.

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

Definition at line 1427 of file geompyDC.py.

01427 
01428         def MakeEllipse(self, thePnt, theVec, theRMajor, theRMinor, theVecMaj=None):
01429             """
01430             Create an ellipse with given center, normal vector and radiuses.
01431 
01432             Parameters:
01433                 thePnt Ellipse center.
01434                 theVec Vector, normal to the plane of the ellipse.
01435                 theRMajor Major ellipse radius.
01436                 theRMinor Minor ellipse radius.
01437                 theVecMaj Vector, direction of the ellipse's main axis.
01438 
01439             Returns:    
01440                 New GEOM.GEOM_Object, containing the created ellipse.
01441             """
01442             # Example: see GEOM_TestAll.py
01443             theRMajor, theRMinor, Parameters = ParseParameters(theRMajor, theRMinor)
01444             if theVecMaj is not None:
01445                 anObj = self.CurvesOp.MakeEllipseVec(thePnt, theVec, theRMajor, theRMinor, theVecMaj)
01446             else:
01447                 anObj = self.CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor)
01448                 pass
01449             RaiseIfFailed("MakeEllipse", self.CurvesOp)
01450             anObj.SetParameters(Parameters)
01451             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeEllipseRR (   self,
  theRMajor,
  theRMinor 
)

Create an ellipse with given radiuses.

Center of the ellipse will be in the origin of global coordinate system and normal vector will be codirected with Z axis

Parameters:
theRMajorMajor ellipse radius.
theRMinorMinor ellipse radius.
Returns:
New GEOM.GEOM_Object, containing the created ellipse.
Create an ellipse with given radiuses.
Center of the ellipse will be in the origin of global
coordinate system and normal vector will be codirected with Z axis

Parameters:
    theRMajor Major ellipse radius.
    theRMinor Minor ellipse radius.

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

Definition at line 1458 of file geompyDC.py.

01458 
01459         def MakeEllipseRR(self, theRMajor, theRMinor):
01460             """
01461             Create an ellipse with given radiuses.
01462             Center of the ellipse will be in the origin of global
01463             coordinate system and normal vector will be codirected with Z axis
01464 
01465             Parameters:
01466                 theRMajor Major ellipse radius.
01467                 theRMinor Minor ellipse radius.
01468 
01469             Returns:
01470                 New GEOM.GEOM_Object, containing the created ellipse.
01471             """
01472             anObj = self.CurvesOp.MakeEllipse(None, None, theRMajor, theRMinor)
01473             RaiseIfFailed("MakeEllipse", self.CurvesOp)
01474             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MakeInterpol (   self,
  thePoints,
  theIsClosed = False,
  theDoReordering = False 
)

Create B-Spline curve on the set of points.

Parameters:
thePointsSequence of points for the B-Spline curve.
theIsClosedIf True, build a closed curve.
theDoReorderingIf TRUE, the algo does not follow the order of thePoints but searches for the closest vertex.
Returns:
New GEOM.GEOM_Object, containing the created B-Spline curve.

Example

Create B-Spline curve on the set of points.

Parameters:
    thePoints Sequence of points for the B-Spline curve.
    theIsClosed If True, build a closed curve.
    theDoReordering If True, the algo does not follow the order of
        thePoints but searches for the closest vertex.

Returns:                     
    New GEOM.GEOM_Object, containing the created B-Spline curve.

Definition at line 1527 of file geompyDC.py.

01527 
01528         def MakeInterpol(self, thePoints, theIsClosed=False, theDoReordering=False):
01529             """
01530             Create B-Spline curve on the set of points.
01531 
01532             Parameters:
01533                 thePoints Sequence of points for the B-Spline curve.
01534                 theIsClosed If True, build a closed curve.
01535                 theDoReordering If True, the algo does not follow the order of
01536                                 thePoints but searches for the closest vertex.
01537 
01538             Returns:                     
01539                 New GEOM.GEOM_Object, containing the created B-Spline curve.
01540             """
01541             # Example: see GEOM_TestAll.py
01542             anObj = self.CurvesOp.MakeSplineInterpolation(thePoints, theIsClosed, theDoReordering)
01543             RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
01544             return anObj
01545 

Here is the call graph for this function:

def geompyDC.geompyDC.MakePolyline (   self,
  thePoints,
  theIsClosed = False 
)

Create a polyline on the set of points.

Parameters:
thePointsSequence of points for the polyline.
theIsClosedIf True, build a closed wire.
Returns:
New GEOM.GEOM_Object, containing the created polyline.

Example

Create a polyline on the set of points.

Parameters:
    thePoints Sequence of points for the polyline.
    theIsClosed If True, build a closed wire.

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

Definition at line 1481 of file geompyDC.py.

01481 
01482         def MakePolyline(self, thePoints, theIsClosed=False):
01483             """
01484             Create a polyline on the set of points.
01485 
01486             Parameters:
01487                 thePoints Sequence of points for the polyline.
01488                 theIsClosed If True, build a closed wire.
01489 
01490             Returns:
01491                 New GEOM.GEOM_Object, containing the created polyline.
01492             """
01493             # Example: see GEOM_TestAll.py
01494             anObj = self.CurvesOp.MakePolyline(thePoints, theIsClosed)
01495             RaiseIfFailed("MakePolyline", self.CurvesOp)
01496             return anObj

Here is the call graph for this function: