Version: 6.3.1
Home
Functions

Transformation Operations

Transforming geometrical objects

Functions

def geompy.MakeTranslationTwoPoints
 Translate the given object along the vector, specified by its end points, creating its copy before the translation.
def geompy.TranslateDXDYDZ
 Translate the given object along the vector, specified by its components.
def geompy.MakeTranslation
 Translate the given object along the vector, specified by its components, creating its copy before the translation.
def geompy.MakeTranslationVector
 Translate the given object along the given vector, creating its copy before the translation.
def geompy.TranslateVectorDistance
 Translate the given object along the given vector on given distance.
def geompy.MakeTranslationVectorDistance
 Translate the given object along the given vector on given distance, creating its copy before the translation.
def geompy.Rotate
 Rotate the given object around the given axis on the given angle.
def geompy.MakeRotation
 Rotate the given object around the given axis on the given angle, creating its copy before the rotatation.
def geompy.MakeRotationThreePoints
 Rotate given object around vector perpendicular to plane containing three points, creating its copy before the rotatation.
def geompy.MakeScaleTransform
 Scale the given object by the factor, creating its copy before the scaling.
def geompy.MakeScaleAlongAxes
 Scale the given object by different factors along coordinate axes, creating its copy before the scaling.
def geompy.MakeMirrorByPlane
 Create an object, symmetrical to the given one relatively the given plane.
def geompy.MakeMirrorByAxis
 Create an object, symmetrical to the given one relatively the given axis.
def geompy.MakeMirrorByPoint
 Create an object, symmetrical to the given one relatively the given point.
def geompy.MakePosition
 Modify the Location of the given object by LCS, creating its copy before the setting.
def geompy.PositionAlongPath
 Modify the Location of the given object by Path,.
def geompy.MakeOffset
 Create new object as offset of the given one.
def geompy.MakeProjection
 Create new object as projection of the given one on a 2D surface.
def geompy.MakeMultiTranslation1D
 Translate the given object along the given vector a given number times.
def geompy.MakeMultiTranslation2D
 Conseqently apply two specified translations to theObject specified number of times.
def geompy.MultiRotate1D
 Rotate the given object around the given axis a given number times.
def geompy.MultiRotate2D
 Rotate the given object around the given axis on the given angle a given number times and multi-translate each rotation result.
def geompy.MakeMultiRotation1D
 The same, as MultiRotate1D(), but axis is given by direction and point Example.
def geompy.MakeMultiRotation2D
 The same, as MultiRotate2D(), but axis is given by direction and point Example.

Function Documentation

def geompy.MakeTranslationTwoPoints (   self,
  theObject,
  thePoint1,
  thePoint2 
)

Translate the given object along the vector, specified by its end points, creating its copy before the translation.

Parameters:
theObjectThe object to be translated.
thePoint1Start point of translation vector.
thePoint2End point of translation vector.
Returns:
New GEOM_Object, containing the translated object.

Example 1
Example 2

def geompy.TranslateDXDYDZ (   self,
  theObject,
  theDX,
  theDY,
  theDZ 
)

Translate the given object along the vector, specified by its components.

Parameters:
theObjectThe object to be translated.
theDX,theDY,theDZComponents of translation vector.
Returns:
Translated GEOM_Object.

Example

def geompy.MakeTranslation (   self,
  theObject,
  theDX,
  theDY,
  theDZ 
)

Translate the given object along the vector, specified by its components, creating its copy before the translation.

Parameters:
theObjectThe object to be translated.
theDX,theDY,theDZComponents of translation vector.
Returns:
New GEOM_Object, containing the translated object.

Example

def geompy.MakeTranslationVector (   self,
  theObject,
  theVector 
)

Translate the given object along the given vector, creating its copy before the translation.

Parameters:
theObjectThe object to be translated.
theVectorThe translation vector.
Returns:
New GEOM_Object, containing the translated object.

Example

def geompy.TranslateVectorDistance (   self,
  theObject,
  theVector,
  theDistance,
  theCopy 
)

Translate the given object along the given vector on given distance.

Parameters:
theObjectThe object to be translated.
theVectorThe translation vector.
theDistanceThe translation distance.
theCopyFlag used to translate object itself or create a copy.
Returns:
Translated GEOM_Object.

Example

def geompy.MakeTranslationVectorDistance (   self,
  theObject,
  theVector,
  theDistance 
)

Translate the given object along the given vector on given distance, creating its copy before the translation.

Parameters:
theObjectThe object to be translated.
theVectorThe translation vector.
theDistanceThe translation distance.
Returns:
New GEOM_Object, containing the translated object.

Example

def geompy.Rotate (   self,
  theObject,
  theAxis,
  theAngle 
)

Rotate the given object around the given axis on the given angle.

Parameters:
theObjectThe object to be rotated.
theAxisRotation axis.
theAngleRotation angle in radians.
Returns:
Rotated GEOM_Object.

Example

def geompy.MakeRotation (   self,
  theObject,
  theAxis,
  theAngle 
)

Rotate the given object around the given axis on the given angle, creating its copy before the rotatation.

Parameters:
theObjectThe object to be rotated.
theAxisRotation axis.
theAngleRotation angle in radians.
Returns:
New GEOM_Object, containing the rotated object.

Example

def geompy.MakeRotationThreePoints (   self,
  theObject,
  theCentPoint,
  thePoint1,
  thePoint2 
)

Rotate given object around vector perpendicular to plane containing three points, creating its copy before the rotatation.

Parameters:
theObjectThe object to be rotated.
theCentPointcentral point - the axis is the vector perpendicular to the plane containing the three points.
thePoint1,thePoint2- in a perpendicular plane of the axis.
Returns:
New GEOM_Object, containing the rotated object.

Example

def geompy.MakeScaleTransform (   self,
  theObject,
  thePoint,
  theFactor 
)

Scale the given object by the factor, creating its copy before the scaling.

Parameters:
theObjectThe object to be scaled.
thePointCenter point for scaling. Passing None for it means scaling relatively the origin of global CS.
theFactorScaling factor value.
Returns:
New GEOM_Object, containing the scaled shape.

Example

def geompy.MakeScaleAlongAxes (   self,
  theObject,
  thePoint,
  theFactorX,
  theFactorY,
  theFactorZ 
)

Scale the given object by different factors along coordinate axes, creating its copy before the scaling.

Parameters:
theObjectThe object to be scaled.
thePointCenter point for scaling. Passing None for it means scaling relatively the origin of global CS.
theFactorX,theFactorY,theFactorZScaling factors along each axis.
Returns:
New GEOM_Object, containing the scaled shape.

Example

def geompy.MakeMirrorByPlane (   self,
  theObject,
  thePlane 
)

Create an object, symmetrical to the given one relatively the given plane.

Parameters:
theObjectThe object to be mirrored.
thePlanePlane of symmetry.
Returns:
New GEOM_Object, containing the mirrored shape.

Example

def geompy.MakeMirrorByAxis (   self,
  theObject,
  theAxis 
)

Create an object, symmetrical to the given one relatively the given axis.

Parameters:
theObjectThe object to be mirrored.
theAxisAxis of symmetry.
Returns:
New GEOM_Object, containing the mirrored shape.

Example

def geompy.MakeMirrorByPoint (   self,
  theObject,
  thePoint 
)

Create an object, symmetrical to the given one relatively the given point.

Parameters:
theObjectThe object to be mirrored.
thePointPoint of symmetry.
Returns:
New GEOM_Object, containing the mirrored shape.

Example

def geompy.MakePosition (   self,
  theObject,
  theStartLCS,
  theEndLCS 
)

Modify the Location of the given object by LCS, creating its copy before the setting.

Parameters:
theObjectThe object to be displaced.
theStartLCSCoordinate system to perform displacement from it. If theStartLCS is NULL, displacement will be performed from global CS. If theObject itself is used as theStartLCS, its location will be changed to theEndLCS.
theEndLCSCoordinate system to perform displacement to it.
Returns:
New GEOM_Object, containing the displaced shape.

Example

def geompy.PositionAlongPath (   self,
  theObject,
  thePath,
  theDistance,
  theCopy,
  theReverse 
)

Modify the Location of the given object by Path,.

Parameters:
theObjectThe object to be displaced.
thePathWire or Edge along that the object will be translated.
theDistanceprogress of Path (0 = start location, 1 = end of path location).
theCopyis to create a copy objects if true.
theReverse- 0 for usual direction, 1 to reverse path direction.
Returns:
New GEOM_Object, containing the displaced shape.

Example

def geompy.MakeOffset (   self,
  theObject,
  theOffset 
)

Create new object as offset of the given one.

Parameters:
theObjectThe base object for the offset.
theOffsetOffset value.
Returns:
New GEOM_Object, containing the offset object.

Example

def geompy.MakeProjection (   self,
  theSource,
  theTarget 
)

Create new object as projection of the given one on a 2D surface.

Parameters:
theSourceThe source object for the projection. It can be a point, edge or wire.
theTargetThe target object. It can be planar or cylindrical face.
Returns:
New GEOM_Object, containing the projection.

Example

def geompy.MakeMultiTranslation1D (   self,
  theObject,
  theVector,
  theStep,
  theNbTimes 
)

Translate the given object along the given vector a given number times.

Parameters:
theObjectThe object to be translated.
theVectorDirection of the translation.
theStepDistance to translate on.
theNbTimesQuantity of translations to be done.
Returns:
New GEOM_Object, containing compound of all the shapes, obtained after each translation.

Example

def geompy.MakeMultiTranslation2D (   self,
  theObject,
  theVector1,
  theStep1,
  theNbTimes1,
  theVector2,
  theStep2,
  theNbTimes2 
)

Conseqently apply two specified translations to theObject specified number of times.

Parameters:
theObjectThe object to be translated.
theVector1Direction of the first translation.
theStep1Step of the first translation.
theNbTimes1Quantity of translations to be done along theVector1.
theVector2Direction of the second translation.
theStep2Step of the second translation.
theNbTimes2Quantity of translations to be done along theVector2.
Returns:
New GEOM_Object, containing compound of all the shapes, obtained after each translation.

Example

def geompy.MultiRotate1D (   self,
  theObject,
  theAxis,
  theNbTimes 
)

Rotate the given object around the given axis a given number times.

Rotation angle will be 2*PI/theNbTimes.

Parameters:
theObjectThe object to be rotated.
theAxisThe rotation axis.
theNbTimesQuantity of rotations to be done.
Returns:
New GEOM_Object, containing compound of all the shapes, obtained after each rotation.

Example

def geompy.MultiRotate2D (   self,
  theObject,
  theAxis,
  theAngle,
  theNbTimes1,
  theStep,
  theNbTimes2 
)

Rotate the given object around the given axis on the given angle a given number times and multi-translate each rotation result.

Translation direction passes through center of gravity of rotated shape and its projection on the rotation axis.

Parameters:
theObjectThe object to be rotated.
theAxisRotation axis.
theAngleRotation angle in graduces.
theNbTimes1Quantity of rotations to be done.
theStepTranslation distance.
theNbTimes2Quantity of translations to be done.
Returns:
New GEOM_Object, containing compound of all the shapes, obtained after each transformation.

Example

def geompy.MakeMultiRotation1D (   self,
  aShape,
  aDir,
  aPoint,
  aNbTimes 
)

The same, as MultiRotate1D(), but axis is given by direction and point Example.

def geompy.MakeMultiRotation2D (   self,
  aShape,
  aDir,
  aPoint,
  anAngle,
  nbtimes1,
  aStep,
  nbtimes2 
)

The same, as MultiRotate2D(), but axis is given by direction and point Example.

 All Data Structures Namespaces Files Functions Variables
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS