Back to index

salome-geom  6.5.0
Functions
Using measurement tools
All package methods, grouped by their purpose
Collaboration diagram for Using measurement tools:

Functions

def geompyDC.geompyDC.NumberOfFaces
 Gives quantity of faces in the given shape.
def geompyDC.geompyDC.NumberOfEdges
 Gives quantity of edges in the given shape.
def geompyDC.geompyDC.NumberOfSubShapes
 Gives quantity of sub-shapes of type theShapeType in the given shape.
def geompyDC.geompyDC.NumberOfSolids
 Gives quantity of solids in the given shape.
def geompyDC.geompyDC.PointCoordinates
 Get point coordinates.
def geompyDC.geompyDC.BasicProperties
 Get summarized length of all wires, area of surface and volume of the given shape.
def geompyDC.geompyDC.BoundingBox
 Get parameters of bounding box of the given shape.
def geompyDC.geompyDC.Inertia
 Get inertia matrix and moments of inertia of theShape.
def geompyDC.geompyDC.AreCoordsInside
 Get if coords are included in the shape (ST_IN or ST_ON)
def geompyDC.geompyDC.MinDistance
 Get minimal distance between the given shapes.
def geompyDC.geompyDC.MinDistanceComponents
 Get minimal distance between the given shapes.
def geompyDC.geompyDC.GetAngle
 Get angle between the given shapes in degrees.
def geompyDC.geompyDC.GetAngleRadians
 Get angle between the given shapes in radians.
def geompyDC.geompyDC.Tolerance
 Get min and max tolerances of sub-shapes of theShape.
def geompyDC.geompyDC.WhatIs
 Obtain description of the given shape (number of sub-shapes of each type)
def geompyDC.geompyDC.NbShapes
 Obtain quantity of shapes of the given type in theShape.
def geompyDC.geompyDC.ShapeInfo
 Obtain quantity of shapes of each type in theShape.
def geompyDC.geompyDC.MakeCDG
 Get a point, situated at the centre of mass of theShape.
def geompyDC.geompyDC.GetVertexByIndex
 Get a vertex sub-shape by index depended with orientation.
def geompyDC.geompyDC.GetFirstVertex
 Get the first vertex of wire/edge depended orientation.
def geompyDC.geompyDC.GetLastVertex
 Get the last vertex of wire/edge depended orientation.
def geompyDC.geompyDC.GetNormal
 Get a normale to the given face.
def geompyDC.geompyDC.CheckShape
 Check a topology of the given shape.
def geompyDC.geompyDC.CheckSelfIntersections
 Detect self-intersections in the given shape.
def geompyDC.geompyDC.GetPosition
 Get position (LCS) of theShape.
def geompyDC.geompyDC.KindOfShape
 Get kind of theShape.

Curve Curvature Measurement

Methods for receiving radius of curvature of curves in the given point

def geompyDC.geompyDC.CurveCurvatureByParam
 Measure curvature of a curve at a point, set by parameter.
def geompyDC.geompyDC.CurveCurvatureByPoint
 Measure curvature of a curve at a point.

Surface Curvature Measurement

Methods for receiving max and min radius of curvature of surfaces in the given point

def geompyDC.geompyDC.MaxSurfaceCurvatureByParam
 Measure max radius of curvature of surface.
def geompyDC.geompyDC.MaxSurfaceCurvatureByPoint
 Measure max radius of curvature of surface in the given point.
def geompyDC.geompyDC.MinSurfaceCurvatureByParam
 Measure min radius of curvature of surface.
def geompyDC.geompyDC.MinSurfaceCurvatureByPoint
 Measure min radius of curvature of surface in the given point.

Function Documentation

def geompyDC.geompyDC.AreCoordsInside (   self,
  theShape,
  coords,
  tolerance = 1.e-7 
)

Get if coords are included in the shape (ST_IN or ST_ON)

Parameters:
theShapeShape
coordslist of points coordinates [x1, y1, z1, x2, y2, z2, ...]
toleranceto be used (default is 1.0e-7)
Returns:
list_of_boolean = [res1, res2, ...]
Get if coords are included in the shape (ST_IN or ST_ON)

Parameters: 
    theShape Shape
    coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
    tolerance to be used (default is 1.0e-7)

Returns:
    list_of_boolean = [res1, res2, ...]

Definition at line 6463 of file geompyDC.py.

06463 
06464         def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
06465             """
06466             Get if coords are included in the shape (ST_IN or ST_ON)
06467             
06468             Parameters: 
06469                 theShape Shape
06470                 coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
06471                 tolerance to be used (default is 1.0e-7)
06472 
06473             Returns:
06474                 list_of_boolean = [res1, res2, ...]
06475             """
06476             return self.MeasuOp.AreCoordsInside(theShape, coords, tolerance)

def geompyDC.geompyDC.BasicProperties (   self,
  theShape 
)

Get summarized length of all wires, area of surface and volume of the given shape.

Parameters:
theShapeShape to define properties of.
Returns:
[theLength, theSurfArea, theVolume]
theLength: Summarized length of all wires of the given shape.
theSurfArea: Area of surface of the given shape.
theVolume: Volume of the given shape.

Example

Get summarized length of all wires,
area of surface and volume of the given shape.

Parameters: 
    theShape Shape to define properties of.

Returns:
    [theLength, theSurfArea, theVolume]
     theLength:   Summarized length of all wires of the given shape.
     theSurfArea: Area of surface of the given shape.
     theVolume:   Volume of the given shape.

Definition at line 6389 of file geompyDC.py.

06389 
06390         def BasicProperties(self,theShape):
06391             """
06392             Get summarized length of all wires,
06393             area of surface and volume of the given shape.
06394 
06395             Parameters: 
06396                 theShape Shape to define properties of.
06397 
06398             Returns:
06399                 [theLength, theSurfArea, theVolume]
06400                  theLength:   Summarized length of all wires of the given shape.
06401                  theSurfArea: Area of surface of the given shape.
06402                  theVolume:   Volume of the given shape.
06403             """
06404             # Example: see GEOM_TestMeasures.py
06405             aTuple = self.MeasuOp.GetBasicProperties(theShape)
06406             RaiseIfFailed("GetBasicProperties", self.MeasuOp)
06407             return aTuple

Here is the call graph for this function:

Here is the caller graph for this function:

def geompyDC.geompyDC.BoundingBox (   self,
  theShape 
)

Get parameters of bounding box of the given shape.

Parameters:
theShapeShape to obtain bounding box of.
Returns:
[Xmin,Xmax, Ymin,Ymax, Zmin,Zmax] Xmin,Xmax: Limits of shape along OX axis. Ymin,Ymax: Limits of shape along OY axis. Zmin,Zmax: Limits of shape along OZ axis.

Example

Get parameters of bounding box of the given shape

Parameters: 
    theShape Shape to obtain bounding box of.

Returns:
    [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
     Xmin,Xmax: Limits of shape along OX axis.
     Ymin,Ymax: Limits of shape along OY axis.
     Zmin,Zmax: Limits of shape along OZ axis.

Definition at line 6416 of file geompyDC.py.

06416 
06417         def BoundingBox(self,theShape):
06418             """
06419             Get parameters of bounding box of the given shape
06420 
06421             Parameters: 
06422                 theShape Shape to obtain bounding box of.
06423 
06424             Returns:
06425                 [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax]
06426                  Xmin,Xmax: Limits of shape along OX axis.
06427                  Ymin,Ymax: Limits of shape along OY axis.
06428                  Zmin,Zmax: Limits of shape along OZ axis.
06429             """
06430             # Example: see GEOM_TestMeasures.py
06431             aTuple = self.MeasuOp.GetBoundingBox(theShape)
06432             RaiseIfFailed("GetBoundingBox", self.MeasuOp)
06433             return aTuple

Here is the call graph for this function:

def geompyDC.geompyDC.CheckSelfIntersections (   self,
  theShape 
)

Detect self-intersections in the given shape.

Parameters:
theShapeShape to check.
Returns:
TRUE, if the shape contains no self-intersections.

Example

Detect self-intersections in the given shape.

Parameters: 
    theShape Shape to check.

Returns:   
    TRUE, if the shape contains no self-intersections.

Definition at line 6975 of file geompyDC.py.

06975 
06976         def CheckSelfIntersections(self, theShape):
06977             """
06978             Detect self-intersections in the given shape.
06979 
06980             Parameters: 
06981                 theShape Shape to check.
06982 
06983             Returns:   
06984                 TRUE, if the shape contains no self-intersections.
06985             """
06986             # Example: see GEOM_TestMeasures.py
06987             (IsValid, Pairs) = self.MeasuOp.CheckSelfIntersections(theShape)
06988             RaiseIfFailed("CheckSelfIntersections", self.MeasuOp)
06989             return IsValid

Here is the call graph for this function:

def geompyDC.geompyDC.CheckShape (   self,
  theShape,
  theIsCheckGeom = 0,
  theReturnStatus = 0 
)

Check a topology of the given shape.

Parameters:
theShapeShape to check validity of.
theIsCheckGeomIf FALSE, only the shape's topology will be checked,
if TRUE, the shape's geometry will be checked also.
theReturnStatusIf FALSE and if theShape is invalid, a description
of problem is printed. if TRUE and if theShape is invalid, the description of problem is also returned.
Returns:
TRUE, if the shape "seems to be valid".

Example

Check a topology of the given shape.

Parameters: 
    theShape Shape to check validity of.
    theIsCheckGeom If FALSE, only the shape's topology will be checked,
       if TRUE, the shape's geometry will be checked also.
    theReturnStatus If FALSE and if theShape is invalid, a description
        of problem is printed.
        if TRUE and if theShape is invalid, the description 
        of problem is returned.

Returns:   
    TRUE, if the shape "seems to be valid".
    If theShape is invalid, prints a description of problem.
    This description can also be returned.

Definition at line 6938 of file geompyDC.py.

06938 
06939         def CheckShape(self,theShape, theIsCheckGeom = 0, theReturnStatus = 0):
06940             """
06941             Check a topology of the given shape.
06942 
06943             Parameters: 
06944                 theShape Shape to check validity of.
06945                 theIsCheckGeom If FALSE, only the shape's topology will be checked,
06946                                if TRUE, the shape's geometry will be checked also.
06947                 theReturnStatus If FALSE and if theShape is invalid, a description
06948                                 of problem is printed.
06949                                 if TRUE and if theShape is invalid, the description 
06950                                 of problem is returned.
06951 
06952             Returns:   
06953                 TRUE, if the shape "seems to be valid".
06954                 If theShape is invalid, prints a description of problem.
06955                 This description can also be returned.
06956             """
06957             # Example: see GEOM_TestMeasures.py
06958             if theIsCheckGeom:
06959                 (IsValid, Status) = self.MeasuOp.CheckShapeWithGeometry(theShape)
06960                 RaiseIfFailed("CheckShapeWithGeometry", self.MeasuOp)
06961             else:
06962                 (IsValid, Status) = self.MeasuOp.CheckShape(theShape)
06963                 RaiseIfFailed("CheckShape", self.MeasuOp)
06964             if IsValid == 0:
06965                 if theReturnStatus == 0:
06966                     print Status
06967             if theReturnStatus == 1:
06968               return (IsValid, Status)
06969             return IsValid

Here is the call graph for this function:

def geompyDC.geompyDC.CurveCurvatureByParam (   self,
  theCurve,
  theParam 
)

Measure curvature of a curve at a point, set by parameter.

Parameters:
theCurvea curve.
theParamparameter.
Returns:
radius of curvature of theCurve.

Example

Measure curvature of a curve at a point, set by parameter.

Parameters: 
    theCurve a curve.
    theParam parameter.

Returns: 
    radius of curvature of theCurve.

Definition at line 6582 of file geompyDC.py.

06582 
06583         def CurveCurvatureByParam(self, theCurve, theParam):
06584             """
06585             Measure curvature of a curve at a point, set by parameter.
06586 
06587             Parameters: 
06588                 theCurve a curve.
06589                 theParam parameter.
06590 
06591             Returns: 
06592                 radius of curvature of theCurve.
06593             """
06594             # Example: see GEOM_TestMeasures.py
06595             aCurv = self.MeasuOp.CurveCurvatureByParam(theCurve,theParam)
06596             RaiseIfFailed("CurveCurvatureByParam", self.MeasuOp)
06597             return aCurv

Here is the call graph for this function:

def geompyDC.geompyDC.CurveCurvatureByPoint (   self,
  theCurve,
  thePoint 
)

Measure curvature of a curve at a point.

Parameters:
theCurvea curve.
thePointgiven point.
Returns:
radius of curvature of theCurve.

Example

Measure curvature of a curve at a point.

Parameters: 
    theCurve a curve.
    thePoint given point.

Returns: 
    radius of curvature of theCurve.           

Definition at line 6604 of file geompyDC.py.

06604 
06605         def CurveCurvatureByPoint(self, theCurve, thePoint):
06606             """
06607             Measure curvature of a curve at a point.
06608 
06609             Parameters: 
06610                 theCurve a curve.
06611                 thePoint given point.
06612 
06613             Returns: 
06614                 radius of curvature of theCurve.           
06615             """
06616             aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
06617             RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
            return aCurv

Here is the call graph for this function:

def geompyDC.geompyDC.GetAngle (   self,
  theShape1,
  theShape2 
)

Get angle between the given shapes in degrees.

Parameters:
theShape1,theShape2Lines or linear edges to find angle between.
Note:
If both arguments are vectors, the angle is computed in accordance with their orientations, otherwise the minimum angle is computed.
Returns:
Value of the angle between the given shapes in degrees.

Example

Get angle between the given shapes in degrees.

Parameters: 
    theShape1,theShape2 Lines or linear edges to find angle between.

Note:
    If both arguments are vectors, the angle is computed in accordance
    with their orientations, otherwise the minimum angle is computed.

Returns:  
    Value of the angle between the given shapes in degrees.

Definition at line 6525 of file geompyDC.py.

06525 
06526         def GetAngle(self, theShape1, theShape2):
06527             """
06528             Get angle between the given shapes in degrees.
06529 
06530             Parameters: 
06531                 theShape1,theShape2 Lines or linear edges to find angle between.
06532 
06533             Note:
06534                 If both arguments are vectors, the angle is computed in accordance
06535                 with their orientations, otherwise the minimum angle is computed.
06536 
06537             Returns:  
06538                 Value of the angle between the given shapes in degrees.
06539             """
06540             # Example: see GEOM_TestMeasures.py
06541             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)
06542             RaiseIfFailed("GetAngle", self.MeasuOp)
06543             return anAngle

Here is the call graph for this function:

def geompyDC.geompyDC.GetAngleRadians (   self,
  theShape1,
  theShape2 
)

Get angle between the given shapes in radians.

Parameters:
theShape1,theShape2Lines or linear edges to find angle between.
Note:
If both arguments are vectors, the angle is computed in accordance with their orientations, otherwise the minimum angle is computed.
Returns:
Value of the angle between the given shapes in radians.

Example

Get angle between the given shapes in radians.

Parameters: 
    theShape1,theShape2 Lines or linear edges to find angle between.

    
Note:
    If both arguments are vectors, the angle is computed in accordance
    with their orientations, otherwise the minimum angle is computed.

Returns:  
    Value of the angle between the given shapes in radians.

Definition at line 6551 of file geompyDC.py.

06551 
06552         def GetAngleRadians(self, theShape1, theShape2):
06553             """
06554             Get angle between the given shapes in radians.
06555 
06556             Parameters: 
06557                 theShape1,theShape2 Lines or linear edges to find angle between.
06558 
06559                 
06560             Note:
06561                 If both arguments are vectors, the angle is computed in accordance
06562                 with their orientations, otherwise the minimum angle is computed.
06563 
06564             Returns:  
06565                 Value of the angle between the given shapes in radians.
06566             """
06567             # Example: see GEOM_TestMeasures.py
06568             anAngle = self.MeasuOp.GetAngle(theShape1, theShape2)*math.pi/180.
06569             RaiseIfFailed("GetAngle", self.MeasuOp)
06570             return anAngle

Here is the call graph for this function:

def geompyDC.geompyDC.GetFirstVertex (   self,
  theShape 
)

Get the first vertex of wire/edge depended orientation.

Parameters:
theShapeShape to find first vertex.
Returns:
New GEOM.GEOM_Object, containing the created vertex.

Example

Get the first vertex of wire/edge depended orientation.

Parameters:
    theShape Shape to find first vertex.

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

Definition at line 6867 of file geompyDC.py.

06867 
06868         def GetFirstVertex(self,theShape):
06869             """
06870             Get the first vertex of wire/edge depended orientation.
06871 
06872             Parameters:
06873                 theShape Shape to find first vertex.
06874 
06875             Returns:    
06876                 New GEOM.GEOM_Object, containing the created vertex.
06877             """
06878             # Example: see GEOM_TestMeasures.py
06879             anObj = self.GetVertexByIndex(theShape, 0)
06880             RaiseIfFailed("GetFirstVertex", self.MeasuOp)
06881             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.GetLastVertex (   self,
  theShape 
)

Get the last vertex of wire/edge depended orientation.

Parameters:
theShapeShape to find last vertex.
Returns:
New GEOM.GEOM_Object, containing the created vertex.

Example

Get the last vertex of wire/edge depended orientation.

Parameters: 
    theShape Shape to find last vertex.

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

Definition at line 6887 of file geompyDC.py.

06887 
06888         def GetLastVertex(self,theShape):
06889             """
06890             Get the last vertex of wire/edge depended orientation.
06891 
06892             Parameters: 
06893                 theShape Shape to find last vertex.
06894 
06895             Returns:   
06896                 New GEOM.GEOM_Object, containing the created vertex.
06897             """
06898             # Example: see GEOM_TestMeasures.py
06899             nb_vert =  self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["VERTEX"])
06900             anObj = self.GetVertexByIndex(theShape, (nb_vert-1))
06901             RaiseIfFailed("GetLastVertex", self.MeasuOp)
06902             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.GetNormal (   self,
  theFace,
  theOptionalPoint = None 
)

Get a normale to the given face.

If the point is not given, the normale is calculated at the center of mass.

Parameters:
theFaceFace to define normale of.
theOptionalPointPoint to compute the normale at.
Returns:
New GEOM.GEOM_Object, containing the created vector.

Example

Get a normale to the given face. If the point is not given,
the normale is calculated at the center of mass.

Parameters: 
    theFace Face to define normale of.
    theOptionalPoint Point to compute the normale at.

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

Definition at line 6910 of file geompyDC.py.

06910 
06911         def GetNormal(self, theFace, theOptionalPoint = None):
06912             """
06913             Get a normale to the given face. If the point is not given,
06914             the normale is calculated at the center of mass.
06915             
06916             Parameters: 
06917                 theFace Face to define normale of.
06918                 theOptionalPoint Point to compute the normale at.
06919 
06920             Returns:   
06921                 New GEOM.GEOM_Object, containing the created vector.
06922             """
06923             # Example: see GEOM_TestMeasures.py
06924             anObj = self.MeasuOp.GetNormal(theFace, theOptionalPoint)
06925             RaiseIfFailed("GetNormal", self.MeasuOp)
06926             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.GetPosition (   self,
  theShape 
)

Get position (LCS) of theShape.

Origin of the LCS is situated at the shape's center of mass. Axes of the LCS are obtained from shape's location or, if the shape is a planar face, from position of its plane.

Parameters:
theShapeShape to calculate position of.
Returns:
[Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz]. Ox,Oy,Oz: Coordinates of shape's LCS origin. Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction. Xx,Xy,Xz: Coordinates of shape's LCS X direction.

Example

Get position (LCS) of theShape.
Origin of the LCS is situated at the shape's center of mass.
Axes of the LCS are obtained from shape's location or,
if the shape is a planar face, from position of its plane.

Parameters: 
    theShape Shape to calculate position of.

Returns:  
    [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
     Ox,Oy,Oz: Coordinates of shape's LCS origin.
     Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
     Xx,Xy,Xz: Coordinates of shape's LCS X direction.

Definition at line 7003 of file geompyDC.py.

07003 
07004         def GetPosition(self,theShape):
07005             """
07006             Get position (LCS) of theShape.
07007             Origin of the LCS is situated at the shape's center of mass.
07008             Axes of the LCS are obtained from shape's location or,
07009             if the shape is a planar face, from position of its plane.
07010 
07011             Parameters: 
07012                 theShape Shape to calculate position of.
07013 
07014             Returns:  
07015                 [Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz].
07016                  Ox,Oy,Oz: Coordinates of shape's LCS origin.
07017                  Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction.
07018                  Xx,Xy,Xz: Coordinates of shape's LCS X direction.
07019             """
07020             # Example: see GEOM_TestMeasures.py
07021             aTuple = self.MeasuOp.GetPosition(theShape)
07022             RaiseIfFailed("GetPosition", self.MeasuOp)
07023             return aTuple

Here is the call graph for this function:

def geompyDC.geompyDC.GetVertexByIndex (   self,
  theShape,
  theIndex 
)

Get a vertex sub-shape by index depended with orientation.

Parameters:
theShapeShape to find sub-shape.
theIndexIndex to find vertex by this index (starting from zero)
Returns:
New GEOM.GEOM_Object, containing the created vertex.

Example

Get a vertex sub-shape by index depended with orientation.

Parameters:
    theShape Shape to find sub-shape.
    theIndex Index to find vertex by this index (starting from zero)

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

Definition at line 6846 of file geompyDC.py.

06846 
06847         def GetVertexByIndex(self,theShape, theIndex):
06848             """
06849             Get a vertex sub-shape by index depended with orientation.
06850 
06851             Parameters:
06852                 theShape Shape to find sub-shape.
06853                 theIndex Index to find vertex by this index (starting from zero)
06854 
06855             Returns:
06856                 New GEOM.GEOM_Object, containing the created vertex.
06857             """
06858             # Example: see GEOM_TestMeasures.py
06859             anObj = self.MeasuOp.GetVertexByIndex(theShape, theIndex)
06860             RaiseIfFailed("GetVertexByIndex", self.MeasuOp)
06861             return anObj

Here is the call graph for this function:

Here is the caller graph for this function:

def geompyDC.geompyDC.Inertia (   self,
  theShape 
)

Get inertia matrix and moments of inertia of theShape.

Parameters:
theShapeShape to calculate inertia of.
Returns:
[I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz] I(1-3)(1-3): Components of the inertia matrix of the given shape. Ix,Iy,Iz: Moments of inertia of the given shape.

Example

Get inertia matrix and moments of inertia of theShape.

Parameters: 
    theShape Shape to calculate inertia of.

Returns:
    [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
     I(1-3)(1-3): Components of the inertia matrix of the given shape.
     Ix,Iy,Iz:    Moments of inertia of the given shape.

Definition at line 6441 of file geompyDC.py.

06441 
06442         def Inertia(self,theShape):
06443             """
06444             Get inertia matrix and moments of inertia of theShape.
06445 
06446             Parameters: 
06447                 theShape Shape to calculate inertia of.
06448 
06449             Returns:
06450                 [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz]
06451                  I(1-3)(1-3): Components of the inertia matrix of the given shape.
06452                  Ix,Iy,Iz:    Moments of inertia of the given shape.
06453             """
06454             # Example: see GEOM_TestMeasures.py
06455             aTuple = self.MeasuOp.GetInertia(theShape)
06456             RaiseIfFailed("GetInertia", self.MeasuOp)
06457             return aTuple

Here is the call graph for this function:

def geompyDC.geompyDC.KindOfShape (   self,
  theShape 
)

Get kind of theShape.

Parameters:
theShapeShape to get a kind of.
Returns:
Returns a kind of shape in terms of GEOM.GEOM_IKindOfShape.shape_kind enumeration and a list of parameters, describing the shape.
Note:
Concrete meaning of each value, returned via theIntegers or theDoubles list depends on the kind() of the shape.

Example

Get kind of theShape.
         
Parameters: 
    theShape Shape to get a kind of.

Returns:
    a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
        and a list of parameters, describing the shape.
Note:
    Concrete meaning of each value, returned via theIntegers
    or theDoubles list depends on the geompy.kind of the shape

Definition at line 7033 of file geompyDC.py.

07033 
07034         def KindOfShape(self,theShape):
07035             """
07036             Get kind of theShape.
07037          
07038             Parameters: 
07039                 theShape Shape to get a kind of.
07040 
07041             Returns:
07042                 a kind of shape in terms of GEOM_IKindOfShape.shape_kind enumeration
07043                     and a list of parameters, describing the shape.
07044             Note:
07045                 Concrete meaning of each value, returned via theIntegers
07046                 or theDoubles list depends on the geompy.kind of the shape
07047             """
07048             # Example: see GEOM_TestMeasures.py
07049             aRoughTuple = self.MeasuOp.KindOfShape(theShape)
07050             RaiseIfFailed("KindOfShape", self.MeasuOp)
07051 
07052             aKind  = aRoughTuple[0]
07053             anInts = aRoughTuple[1]
07054             aDbls  = aRoughTuple[2]
07055 
07056             # Now there is no exception from this rule:
07057             aKindTuple = [aKind] + aDbls + anInts
07058 
07059             # If they are we will regroup parameters for such kind of shape.
07060             # For example:
07061             #if aKind == kind.SOME_KIND:
07062             #    #  SOME_KIND     int int double int double double
07063             #    aKindTuple = [aKind, anInts[0], anInts[1], aDbls[0], anInts[2], aDbls[1], aDbls[2]]
07064 
07065             return aKindTuple

Here is the call graph for this function:

def geompyDC.geompyDC.MakeCDG (   self,
  theShape 
)

Get a point, situated at the centre of mass of theShape.

Parameters:
theShapeShape to define centre of mass of.
Returns:
New GEOM.GEOM_Object, containing the created point.

Example

Get a point, situated at the centre of mass of theShape.

Parameters:
    theShape Shape to define centre of mass of.

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

Definition at line 6825 of file geompyDC.py.

06825 
06826         def MakeCDG(self,theShape):
06827             """
06828             Get a point, situated at the centre of mass of theShape.
06829 
06830             Parameters:
06831                 theShape Shape to define centre of mass of.
06832 
06833             Returns:
06834                 New GEOM.GEOM_Object, containing the created point.
06835             """
06836             # Example: see GEOM_TestMeasures.py
06837             anObj = self.MeasuOp.GetCentreOfMass(theShape)
06838             RaiseIfFailed("GetCentreOfMass", self.MeasuOp)
06839             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.MaxSurfaceCurvatureByParam (   self,
  theSurf,
  theUParam,
  theVParam 
)

Measure max radius of curvature of surface.

Parameters:
theSurfthe given surface.
theUParamValue of U-parameter on the referenced surface.
theVParamValue of V-parameter on the referenced surface.
Returns:
max radius of curvature of theSurf.

Example

Measure max radius of curvature of surface.

Parameters: 
    theSurf the given surface.
    theUParam Value of U-parameter on the referenced surface.
    theVParam Value of V-parameter on the referenced surface.
    
Returns:     
    max radius of curvature of theSurf.

Definition at line 6632 of file geompyDC.py.

06632 
06633         def MaxSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
06634             """
06635             Measure max radius of curvature of surface.
06636 
06637             Parameters: 
06638                 theSurf the given surface.
06639                 theUParam Value of U-parameter on the referenced surface.
06640                 theVParam Value of V-parameter on the referenced surface.
06641                 
06642             Returns:     
06643                 max radius of curvature of theSurf.
06644             """
06645             # Example: see GEOM_TestMeasures.py
06646             aSurf = self.MeasuOp.MaxSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
06647             RaiseIfFailed("MaxSurfaceCurvatureByParam", self.MeasuOp)
06648             return aSurf

Here is the call graph for this function:

def geompyDC.geompyDC.MaxSurfaceCurvatureByPoint (   self,
  theSurf,
  thePoint 
)

Measure max radius of curvature of surface in the given point.

Parameters:
theSurfthe given surface.
thePointgiven point.
Returns:
max radius of curvature of theSurf.

Example

Measure max radius of curvature of surface in the given point.

Parameters: 
    theSurf the given surface.
    thePoint given point.
    
Returns:     
    max radius of curvature of theSurf.          

Definition at line 6655 of file geompyDC.py.

06655 
06656         def MaxSurfaceCurvatureByPoint(self, theSurf, thePoint):
06657             """
06658             Measure max radius of curvature of surface in the given point.
06659 
06660             Parameters: 
06661                 theSurf the given surface.
06662                 thePoint given point.
06663                 
06664             Returns:     
06665                 max radius of curvature of theSurf.          
06666             """
06667             aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
06668             RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
06669             return aSurf

Here is the call graph for this function:

def geompyDC.geompyDC.MinDistance (   self,
  theShape1,
  theShape2 
)

Get minimal distance between the given shapes.

Parameters:
theShape1,theShape2Shapes to find minimal distance between.
Returns:
Value of the minimal distance between the given shapes.

Example

Get minimal distance between the given shapes.

Parameters: 
    theShape1,theShape2 Shapes to find minimal distance between.

Returns:    
    Value of the minimal distance between the given shapes.

Definition at line 6482 of file geompyDC.py.

06482 
06483         def MinDistance(self, theShape1, theShape2):
06484             """
06485             Get minimal distance between the given shapes.
06486             
06487             Parameters: 
06488                 theShape1,theShape2 Shapes to find minimal distance between.
06489 
06490             Returns:    
06491                 Value of the minimal distance between the given shapes.
06492             """
06493             # Example: see GEOM_TestMeasures.py
06494             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
06495             RaiseIfFailed("GetMinDistance", self.MeasuOp)
06496             return aTuple[0]

Here is the call graph for this function:

def geompyDC.geompyDC.MinDistanceComponents (   self,
  theShape1,
  theShape2 
)

Get minimal distance between the given shapes.

Parameters:
theShape1,theShape2Shapes to find minimal distance between.
Returns:
Value of the minimal distance between the given shapes.

Example

Get minimal distance between the given shapes.

Parameters: 
    theShape1,theShape2 Shapes to find minimal distance between.

Returns:  
    Value of the minimal distance between the given shapes.

Definition at line 6502 of file geompyDC.py.

06502 
06503         def MinDistanceComponents(self, theShape1, theShape2):
06504             """
06505             Get minimal distance between the given shapes.
06506 
06507             Parameters: 
06508                 theShape1,theShape2 Shapes to find minimal distance between.
06509 
06510             Returns:  
06511                 Value of the minimal distance between the given shapes.
06512             """
06513             # Example: see GEOM_TestMeasures.py
06514             aTuple = self.MeasuOp.GetMinDistance(theShape1, theShape2)
06515             RaiseIfFailed("GetMinDistance", self.MeasuOp)
06516             aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
06517             return aRes

Here is the call graph for this function:

def geompyDC.geompyDC.MinSurfaceCurvatureByParam (   self,
  theSurf,
  theUParam,
  theVParam 
)

Measure min radius of curvature of surface.

Parameters:
theSurfthe given surface.
theUParamValue of U-parameter on the referenced surface.
theVParamValue of V-parameter on the referenced surface.
Returns:
min radius of curvature of theSurf.

Example

Measure min radius of curvature of surface.

Parameters: 
    theSurf the given surface.
    theUParam Value of U-parameter on the referenced surface.
    theVParam Value of V-parameter on the referenced surface.
    
Returns:     
    Min radius of curvature of theSurf.

Definition at line 6677 of file geompyDC.py.

06677 
06678         def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
06679             """
06680             Measure min radius of curvature of surface.
06681 
06682             Parameters: 
06683                 theSurf the given surface.
06684                 theUParam Value of U-parameter on the referenced surface.
06685                 theVParam Value of V-parameter on the referenced surface.
06686                 
06687             Returns:     
06688                 Min radius of curvature of theSurf.
06689             """
06690             aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
06691             RaiseIfFailed("MinSurfaceCurvatureByParam", self.MeasuOp)
06692             return aSurf

Here is the call graph for this function:

def geompyDC.geompyDC.MinSurfaceCurvatureByPoint (   self,
  theSurf,
  thePoint 
)

Measure min radius of curvature of surface in the given point.

Parameters:
theSurfthe given surface.
thePointgiven point.
Returns:
min radius of curvature of theSurf.

Example

Measure min radius of curvature of surface in the given point.

Parameters: 
    theSurf the given surface.
    thePoint given point.
    
Returns:     
    Min radius of curvature of theSurf.          

Definition at line 6699 of file geompyDC.py.

06699 
06700         def MinSurfaceCurvatureByPoint(self, theSurf, thePoint):
06701             """
06702             Measure min radius of curvature of surface in the given point.
06703 
06704             Parameters: 
06705                 theSurf the given surface.
06706                 thePoint given point.
06707                 
06708             Returns:     
06709                 Min radius of curvature of theSurf.          
06710             """
06711             aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
06712             RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
            return aSurf

Here is the call graph for this function:

def geompyDC.geompyDC.NbShapes (   self,
  theShape,
  theType 
)

Obtain quantity of shapes of the given type in theShape.

If theShape is of type theType, it is also counted.

Parameters:
theShapeShape to be described.
theTypethe given ShapeType().
Returns:
Quantity of shapes of type theType in theShape.

Example

Obtain quantity of shapes of the given type in theShape.
If theShape is of type theType, it is also counted.

Parameters:
    theShape Shape to be described.
    theType the given geompy.ShapeType

Returns:
    Quantity of shapes of type theType in theShape.

Definition at line 6768 of file geompyDC.py.

06768 
06769         def NbShapes (self, theShape, theType):
06770             """
06771             Obtain quantity of shapes of the given type in theShape.
06772             If theShape is of type theType, it is also counted.
06773 
06774             Parameters:
06775                 theShape Shape to be described.
06776                 theType the given geompy.ShapeType
06777 
06778             Returns:
06779                 Quantity of shapes of type theType in theShape.
06780             """
06781             # Example: see GEOM_TestMeasures.py
06782             listSh = self.SubShapeAllIDs(theShape, theType)
06783             Nb = len(listSh)
06784             t       = EnumToLong(theShape.GetShapeType())
06785             theType = EnumToLong(theType)
06786             if t == theType:
06787                 Nb = Nb + 1
06788                 pass
06789             return Nb

Here is the call graph for this function:

def geompyDC.geompyDC.NumberOfEdges (   self,
  theShape 
)

Gives quantity of edges in the given shape.

Parameters:
theShapeShape to count edges of.
Returns:
Quantity of edges.

Example

Gives quantity of edges in the given shape.

Parameters:
    theShape Shape to count edges of.

Returns:    
    Quantity of edges.

Definition at line 3050 of file geompyDC.py.

03050 
03051         def NumberOfEdges(self, theShape):
03052             """
03053             Gives quantity of edges in the given shape.
03054 
03055             Parameters:
03056                 theShape Shape to count edges of.
03057 
03058             Returns:    
03059                 Quantity of edges.
03060             """
03061             # Example: see GEOM_TestOthers.py
03062             nb_edges = self.ShapesOp.NumberOfEdges(theShape)
03063             RaiseIfFailed("NumberOfEdges", self.ShapesOp)
03064             return nb_edges

Here is the call graph for this function:

def geompyDC.geompyDC.NumberOfFaces (   self,
  theShape 
)

Gives quantity of faces in the given shape.

Parameters:
theShapeShape to count faces of.
Returns:
Quantity of faces.

Example

Gives quantity of faces in the given shape.

Parameters:
    theShape Shape to count faces of.

Returns:    
    Quantity of faces.

Definition at line 3030 of file geompyDC.py.

03030 
03031         def NumberOfFaces(self, theShape):
03032             """
03033             Gives quantity of faces in the given shape.
03034 
03035             Parameters:
03036                 theShape Shape to count faces of.
03037 
03038             Returns:    
03039                 Quantity of faces.
03040             """
03041             # Example: see GEOM_TestOthers.py
03042             nb_faces = self.ShapesOp.NumberOfFaces(theShape)
03043             RaiseIfFailed("NumberOfFaces", self.ShapesOp)
03044             return nb_faces

Here is the call graph for this function:

def geompyDC.geompyDC.NumberOfSolids (   self,
  theShape 
)

Gives quantity of solids in the given shape.

Parameters:
theShapeShape to count solids in.
Returns:
Quantity of solids.

Example

Gives quantity of solids in the given shape.

Parameters:
    theShape Shape to count solids in.

Returns:
    Quantity of solids.

Definition at line 3092 of file geompyDC.py.

03092 
03093         def NumberOfSolids(self, theShape):
03094             """
03095             Gives quantity of solids in the given shape.
03096 
03097             Parameters:
03098                 theShape Shape to count solids in.
03099 
03100             Returns:
03101                 Quantity of solids.
03102             """
03103             # Example: see GEOM_TestOthers.py
03104             nb_solids = self.ShapesOp.NumberOfSubShapes(theShape, ShapeType["SOLID"])
03105             RaiseIfFailed("NumberOfSolids", self.ShapesOp)
03106             return nb_solids

Here is the call graph for this function:

def geompyDC.geompyDC.NumberOfSubShapes (   self,
  theShape,
  theShapeType 
)

Gives quantity of sub-shapes of type theShapeType in the given shape.

Parameters:
theShapeShape to count sub-shapes of.
theShapeTypeType of sub-shapes to count (see ShapeType())
Returns:
Quantity of sub-shapes of given type.

Example

Gives quantity of sub-shapes of type theShapeType in the given shape.

Parameters:
    theShape Shape to count sub-shapes of.
    theShapeType Type of sub-shapes to count (see geompy.ShapeType)

Returns:
    Quantity of sub-shapes of given type.

Definition at line 3071 of file geompyDC.py.

03071 
03072         def NumberOfSubShapes(self, theShape, theShapeType):
03073             """
03074             Gives quantity of sub-shapes of type theShapeType in the given shape.
03075 
03076             Parameters:
03077                 theShape Shape to count sub-shapes of.
03078                 theShapeType Type of sub-shapes to count (see geompy.ShapeType)
03079 
03080             Returns:
03081                 Quantity of sub-shapes of given type.
03082             """
03083             # Example: see GEOM_TestOthers.py
03084             nb_ss = self.ShapesOp.NumberOfSubShapes(theShape, theShapeType)
03085             RaiseIfFailed("NumberOfSubShapes", self.ShapesOp)
03086             return nb_ss

Here is the call graph for this function:

def geompyDC.geompyDC.PointCoordinates (   self,
  Point 
)

Get point coordinates.

Returns:
[x, y, z]

Example

Get point coordinates

Returns:
    [x, y, z]

Definition at line 6368 of file geompyDC.py.

06368 
06369         def PointCoordinates(self,Point):
06370             """
06371             Get point coordinates
06372 
06373             Returns:
06374                 [x, y, z]
06375             """
06376             # Example: see GEOM_TestMeasures.py
06377             aTuple = self.MeasuOp.PointCoordinates(Point)
06378             RaiseIfFailed("PointCoordinates", self.MeasuOp)
06379             return aTuple

Here is the call graph for this function:

Here is the caller graph for this function:

def geompyDC.geompyDC.ShapeInfo (   self,
  theShape 
)

Obtain quantity of shapes of each type in theShape.

The theShape is also counted.

Parameters:
theShapeShape to be described.
Returns:
Dictionary of ShapeType() with bound quantities of shapes.

Example

Obtain quantity of shapes of each type in theShape.
The theShape is also counted.

Parameters:
    theShape Shape to be described.

Returns:
    Dictionary of geompy.ShapeType with bound quantities of shapes.

Definition at line 6796 of file geompyDC.py.

06796 
06797         def ShapeInfo (self, theShape):
06798             """
06799             Obtain quantity of shapes of each type in theShape.
06800             The theShape is also counted.
06801 
06802             Parameters:
06803                 theShape Shape to be described.
06804 
06805             Returns:
06806                 Dictionary of geompy.ShapeType with bound quantities of shapes.
06807             """
06808             # Example: see GEOM_TestMeasures.py
06809             aDict = {}
06810             for typeSh in ShapeType:
06811                 if typeSh in ( "AUTO", "SHAPE" ): continue
06812                 listSh = self.SubShapeAllIDs(theShape, ShapeType[typeSh])
06813                 Nb = len(listSh)
06814                 if EnumToLong(theShape.GetShapeType()) == ShapeType[typeSh]:
06815                     Nb = Nb + 1
06816                     pass
06817                 aDict[typeSh] = Nb
06818                 pass
06819             return aDict

Here is the call graph for this function:

def geompyDC.geompyDC.Tolerance (   self,
  theShape 
)

Get min and max tolerances of sub-shapes of theShape.

Parameters:
theShapeShape, to get tolerances of.
Returns:
[FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
FaceMin,FaceMax: Min and max tolerances of the faces.
EdgeMin,EdgeMax: Min and max tolerances of the edges.
VertMin,VertMax: Min and max tolerances of the vertices.

Example

Get min and max tolerances of sub-shapes of theShape

Parameters: 
    theShape Shape, to get tolerances of.

Returns:    
    [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
     FaceMin,FaceMax: Min and max tolerances of the faces.
     EdgeMin,EdgeMax: Min and max tolerances of the edges.
     VertMin,VertMax: Min and max tolerances of the vertices.

Definition at line 6723 of file geompyDC.py.

06723 
06724         def Tolerance(self,theShape):
06725             """
06726             Get min and max tolerances of sub-shapes of theShape
06727 
06728             Parameters: 
06729                 theShape Shape, to get tolerances of.
06730 
06731             Returns:    
06732                 [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
06733                  FaceMin,FaceMax: Min and max tolerances of the faces.
06734                  EdgeMin,EdgeMax: Min and max tolerances of the edges.
06735                  VertMin,VertMax: Min and max tolerances of the vertices.
06736             """
06737             # Example: see GEOM_TestMeasures.py
06738             aTuple = self.MeasuOp.GetTolerance(theShape)
06739             RaiseIfFailed("GetTolerance", self.MeasuOp)
06740             return aTuple

Here is the call graph for this function:

def geompyDC.geompyDC.WhatIs (   self,
  theShape 
)

Obtain description of the given shape (number of sub-shapes of each type)

Parameters:
theShapeShape to be described.
Returns:
Description of the given shape.

Example

Obtain description of the given shape (number of sub-shapes of each type)

Parameters:
    theShape Shape to be described.

Returns:
    Description of the given shape.

Definition at line 6746 of file geompyDC.py.

06746 
06747         def WhatIs(self,theShape):
06748             """
06749             Obtain description of the given shape (number of sub-shapes of each type)
06750 
06751             Parameters:
06752                 theShape Shape to be described.
06753 
06754             Returns:
06755                 Description of the given shape.
06756             """
06757             # Example: see GEOM_TestMeasures.py
06758             aDescr = self.MeasuOp.WhatIs(theShape)
06759             RaiseIfFailed("WhatIs", self.MeasuOp)
06760             return aDescr

Here is the call graph for this function: