SALOME documentation central

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.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:
theObject The object to be translated.
thePoint1 Start point of translation vector.
thePoint2 End 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:
theObject The object to be translated.
theDX,theDY,theDZ Components 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:
theObject The object to be translated.
theDX,theDY,theDZ Components 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:
theObject The object to be translated.
theVector The 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:
theObject The object to be translated.
theVector The translation vector.
theDistance The translation distance.
theCopy Flag 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:
theObject The object to be translated.
theVector The translation vector.
theDistance The 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:
theObject The object to be rotated.
theAxis Rotation axis.
theAngle Rotation 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:
theObject The object to be rotated.
theAxis Rotation axis.
theAngle Rotation 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:
theObject The object to be rotated.
theCentPoint central 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:
theObject The object to be scaled.
thePoint Center point for scaling. Passing None for it means scaling relatively the origin of global CS.
theFactor Scaling 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:
theObject The object to be scaled.
thePoint Center point for scaling. Passing None for it means scaling relatively the origin of global CS.
theFactorX,theFactorY,theFactorZ Scaling 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:
theObject The object to be mirrored.
thePlane Plane 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:
theObject The object to be mirrored.
theAxis Axis 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:
theObject The object to be mirrored.
thePoint Point 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:
theObject The object to be displaced.
theStartLCS Coordinate 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.
theEndLCS Coordinate 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:
theObject The object to be displaced.
thePath Wire or Edge along that the object will be translated.
theDistance progress of Path (0 = start location, 1 = end of path location).
theCopy is 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:
theObject The base object for the offset.
theOffset Offset value.
Returns:
New GEOM_Object, containing the offset object.

Example

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

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

Parameters:
theObject The object to be translated.
theVector Direction of the translation.
theStep Distance to translate on.
theNbTimes Quantity 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:
theObject The object to be translated.
theVector1 Direction of the first translation.
theStep1 Step of the first translation.
theNbTimes1 Quantity of translations to be done along theVector1.
theVector2 Direction of the second translation.
theStep2 Step of the second translation.
theNbTimes2 Quantity 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:
theObject The object to be rotated.
theAxis The rotation axis.
theNbTimes Quantity 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:
theObject The object to be rotated.
theAxis Rotation axis.
theAngle Rotation angle in graduces.
theNbTimes1 Quantity of rotations to be done.
theStep Translation distance.
theNbTimes2 Quantity 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-2008 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