salomegeom
6.5.0

Functions  
def  geompyDC.geompyDC.MakeTranslationTwoPoints 
Translate the given object along the vector, specified by its end points, creating its copy before the translation.  
def  geompyDC.geompyDC.TranslateDXDYDZ 
Translate the given object along the vector, specified by its components.  
def  geompyDC.geompyDC.MakeTranslation 
Translate the given object along the vector, specified by its components, creating its copy before the translation.  
def  geompyDC.geompyDC.MakeTranslationVector 
Translate the given object along the given vector, creating its copy before the translation.  
def  geompyDC.geompyDC.TranslateVectorDistance 
Translate the given object along the given vector on given distance.  
def  geompyDC.geompyDC.MakeTranslationVectorDistance 
Translate the given object along the given vector on given distance, creating its copy before the translation.  
def  geompyDC.geompyDC.Rotate 
Rotate the given object around the given axis on the given angle.  
def  geompyDC.geompyDC.MakeRotation 
Rotate the given object around the given axis on the given angle, creating its copy before the rotatation.  
def  geompyDC.geompyDC.MakeRotationThreePoints 
Rotate given object around vector perpendicular to plane containing three points, creating its copy before the rotatation.  
def  geompyDC.geompyDC.MakeScaleTransform 
Scale the given object by the factor, creating its copy before the scaling.  
def  geompyDC.geompyDC.MakeScaleAlongAxes 
Scale the given object by different factors along coordinate axes, creating its copy before the scaling.  
def  geompyDC.geompyDC.MakeMirrorByPlane 
Create an object, symmetrical to the given one relatively the given plane.  
def  geompyDC.geompyDC.MakeMirrorByAxis 
Create an object, symmetrical to the given one relatively the given axis.  
def  geompyDC.geompyDC.MakeMirrorByPoint 
Create an object, symmetrical to the given one relatively the given point.  
def  geompyDC.geompyDC.MakePosition 
Modify the Location of the given object by LCS, creating its copy before the setting.  
def  geompyDC.geompyDC.PositionAlongPath 
Modify the Location of the given object by Path,.  
def  geompyDC.geompyDC.MakeOffset 
Create new object as offset of the given one.  
def  geompyDC.geompyDC.MakeProjection 
Create new object as projection of the given one on a 2D surface.  
def  geompyDC.geompyDC.MakeMultiTranslation1D 
Translate the given object along the given vector a given number times.  
def  geompyDC.geompyDC.MakeMultiTranslation2D 
Conseqently apply two specified translations to theObject specified number of times.  
def  geompyDC.geompyDC.MultiRotate1D 
Rotate the given object around the given axis a given number times.  
def  geompyDC.geompyDC.MultiRotate2D 
Rotate the given object around the given axis on the given angle a given number times and multitranslate each rotation result.  
def  geompyDC.geompyDC.MakeMultiRotation1D 
The same, as MultiRotate1D(), but axis is given by direction and point.  
def  geompyDC.geompyDC.MakeMultiRotation2D 
The same, as MultiRotate2D(), but axis is given by direction and point. 
def geompyDC.geompyDC.MakeMirrorByAxis  (  self,  
theObject,  
theAxis  
) 
Create an object, symmetrical to the given one relatively the given axis.
theObject  The object to be mirrored. 
theAxis  Axis of symmetry. 
Example
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.GEOM_Object, containing the mirrored shape.
Definition at line 5503 of file geompyDC.py.
05503 05504 def MakeMirrorByAxis(self,theObject, theAxis): 05505 """ 05506 Create an object, symmetrical to the given one relatively the given axis. 05507 05508 Parameters: 05509 theObject The object to be mirrored. 05510 theAxis Axis of symmetry. 05511 05512 Returns: 05513 New GEOM.GEOM_Object, containing the mirrored shape. 05514 """ 05515 # Example: see GEOM_TestAll.py 05516 anObj = self.TrsfOp.MirrorAxisCopy(theObject, theAxis) 05517 RaiseIfFailed("MirrorAxisCopy", self.TrsfOp) 05518 return anObj
def geompyDC.geompyDC.MakeMirrorByPlane  (  self,  
theObject,  
thePlane  
) 
Create an object, symmetrical to the given one relatively the given plane.
theObject  The object to be mirrored. 
thePlane  Plane of symmetry. 
Example
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.GEOM_Object, containing the mirrored shape.
Definition at line 5480 of file geompyDC.py.
05480 05481 def MakeMirrorByPlane(self,theObject, thePlane): 05482 """ 05483 Create an object, symmetrical to the given one relatively the given plane. 05484 05485 Parameters: 05486 theObject The object to be mirrored. 05487 thePlane Plane of symmetry. 05488 05489 Returns: 05490 New GEOM.GEOM_Object, containing the mirrored shape. 05491 """ 05492 # Example: see GEOM_TestAll.py 05493 anObj = self.TrsfOp.MirrorPlaneCopy(theObject, thePlane) 05494 RaiseIfFailed("MirrorPlaneCopy", self.TrsfOp) 05495 return anObj
def geompyDC.geompyDC.MakeMirrorByPoint  (  self,  
theObject,  
thePoint  
) 
Create an object, symmetrical to the given one relatively the given point.
theObject  The object to be mirrored. 
thePoint  Point of symmetry. 
Example
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.GEOM_Object, containing the mirrored shape.
Definition at line 5526 of file geompyDC.py.
05526 05527 def MakeMirrorByPoint(self,theObject, thePoint): 05528 """ 05529 Create an object, symmetrical 05530 to the given one relatively the given point. 05531 05532 Parameters: 05533 theObject The object to be mirrored. 05534 thePoint Point of symmetry. 05535 05536 Returns: 05537 New GEOM.GEOM_Object, containing the mirrored shape. 05538 """ 05539 # Example: see GEOM_TestAll.py 05540 anObj = self.TrsfOp.MirrorPointCopy(theObject, thePoint) 05541 RaiseIfFailed("MirrorPointCopy", self.TrsfOp) 05542 return anObj
def geompyDC.geompyDC.MakeMultiRotation1D  (  self,  
aShape,  
aDir,  
aPoint,  
aNbTimes  
) 
The same, as MultiRotate1D(), but axis is given by direction and point.
Example
The same, as geompy.MultiRotate1D, but axis is given by direction and point Example of usage: pz = geompy.MakeVertex(0, 0, 100) vy = geompy.MakeVectorDXDYDZ(0, 100, 0) MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6)
Definition at line 5824 of file geompyDC.py.
05824 05825 def MakeMultiRotation1D(self,aShape,aDir,aPoint,aNbTimes): 05826 """ 05827 The same, as geompy.MultiRotate1D, but axis is given by direction and point 05828 05829 Example of usage: 05830 pz = geompy.MakeVertex(0, 0, 100) 05831 vy = geompy.MakeVectorDXDYDZ(0, 100, 0) 05832 MultiRot1D = geompy.MakeMultiRotation1D(prism, vy, pz, 6) 05833 """ 05834 # Example: see GEOM_TestOthers.py 05835 aVec = self.MakeLine(aPoint,aDir) 05836 anObj = self.MultiRotate1D(aShape,aVec,aNbTimes) 05837 return anObj
def geompyDC.geompyDC.MakeMultiRotation2D  (  self,  
aShape,  
aDir,  
aPoint,  
anAngle,  
nbtimes1,  
aStep,  
nbtimes2  
) 
The same, as MultiRotate2D(), but axis is given by direction and point.
Example
The same, as MultiRotate2D(), but axis is given by direction and point Example of usage: pz = geompy.MakeVertex(0, 0, 100) vy = geompy.MakeVectorDXDYDZ(0, 100, 0) MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3)
Definition at line 5841 of file geompyDC.py.
05841 05842 def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2): 05843 """ 05844 The same, as MultiRotate2D(), but axis is given by direction and point 05845 05846 Example of usage: 05847 pz = geompy.MakeVertex(0, 0, 100) 05848 vy = geompy.MakeVectorDXDYDZ(0, 100, 0) 05849 MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3) 05850 """ 05851 # Example: see GEOM_TestOthers.py 05852 aVec = self.MakeLine(aPoint,aDir) 05853 anObj = self.MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2) 05854 return anObj
def geompyDC.geompyDC.MakeMultiTranslation1D  (  self,  
theObject,  
theVector,  
theStep,  
theNbTimes  
) 
Translate the given object along the given vector a given number times.
theObject  The object to be translated. 
theVector  Direction of the translation. 
theStep  Distance to translate on. 
theNbTimes  Quantity of translations to be done. 
Example
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.GEOM_Object, containing compound of all the shapes, obtained after each translation. Example of usage: r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4)
Definition at line 5678 of file geompyDC.py.
05678 05679 def MakeMultiTranslation1D(self,theObject, theVector, theStep, theNbTimes): 05680 """ 05681 Translate the given object along the given vector a given number times 05682 05683 Parameters: 05684 theObject The object to be translated. 05685 theVector Direction of the translation. 05686 theStep Distance to translate on. 05687 theNbTimes Quantity of translations to be done. 05688 05689 Returns: 05690 New GEOM.GEOM_Object, containing compound of all 05691 the shapes, obtained after each translation. 05692 05693 Example of usage: 05694 r1d = geompy.MakeMultiTranslation1D(prism, vect, 20, 4) 05695 """ 05696 # Example: see GEOM_TestAll.py 05697 theStep, theNbTimes, Parameters = ParseParameters(theStep, theNbTimes) 05698 anObj = self.TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes) 05699 RaiseIfFailed("MultiTranslate1D", self.TrsfOp) 05700 anObj.SetParameters(Parameters) 05701 return anObj
def geompyDC.geompyDC.MakeMultiTranslation2D  (  self,  
theObject,  
theVector1,  
theStep1,  
theNbTimes1,  
theVector2,  
theStep2,  
theNbTimes2  
) 
Conseqently apply two specified translations to theObject specified number of times.
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. 
Example
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.GEOM_Object, containing compound of all the shapes, obtained after each translation. Example of usage: tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3)
Definition at line 5715 of file geompyDC.py.
05715 05716 theVector2, theStep2, theNbTimes2): 05717 """ 05718 Conseqently apply two specified translations to theObject specified number of times. 05719 05720 Parameters: 05721 theObject The object to be translated. 05722 theVector1 Direction of the first translation. 05723 theStep1 Step of the first translation. 05724 theNbTimes1 Quantity of translations to be done along theVector1. 05725 theVector2 Direction of the second translation. 05726 theStep2 Step of the second translation. 05727 theNbTimes2 Quantity of translations to be done along theVector2. 05728 05729 Returns: 05730 New GEOM.GEOM_Object, containing compound of all 05731 the shapes, obtained after each translation. 05732 05733 Example of usage: 05734 tr2d = geompy.MakeMultiTranslation2D(prism, vect1, 20, 4, vect2, 80, 3) 05735 """ 05736 # Example: see GEOM_TestAll.py 05737 theStep1,theNbTimes1,theStep2,theNbTimes2, Parameters = ParseParameters(theStep1,theNbTimes1,theStep2,theNbTimes2) 05738 anObj = self.TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1, 05739 theVector2, theStep2, theNbTimes2) 05740 RaiseIfFailed("MultiTranslate2D", self.TrsfOp) 05741 anObj.SetParameters(Parameters) 05742 return anObj
def geompyDC.geompyDC.MakeOffset  (  self,  
theObject,  
theOffset  
) 
Create new object as offset of the given one.
theObject  The base object for the offset. 
theOffset  Offset value. 
Example
Create new object as offset of the given one. Parameters: theObject The base object for the offset. theOffset Offset value. Returns: New GEOM.GEOM_Object, containing the offset object. Example of usage: box = geompy.MakeBox(20, 20, 20, 200, 200, 200) # create a new object as offset of the given object offset = geompy.MakeOffset(box, 70.)
Definition at line 5620 of file geompyDC.py.
05620 05621 def MakeOffset(self,theObject, theOffset): 05622 """ 05623 Create new object as offset of the given one. 05624 05625 Parameters: 05626 theObject The base object for the offset. 05627 theOffset Offset value. 05628 05629 Returns: 05630 New GEOM.GEOM_Object, containing the offset object. 05631 05632 Example of usage: 05633 box = geompy.MakeBox(20, 20, 20, 200, 200, 200) 05634 # create a new object as offset of the given object 05635 offset = geompy.MakeOffset(box, 70.) 05636 """ 05637 # Example: see GEOM_TestAll.py 05638 theOffset, Parameters = ParseParameters(theOffset) 05639 anObj = self.TrsfOp.OffsetShapeCopy(theObject, theOffset) 05640 RaiseIfFailed("OffsetShapeCopy", self.TrsfOp) 05641 anObj.SetParameters(Parameters) 05642 return anObj
def geompyDC.geompyDC.MakePosition  (  self,  
theObject,  
theStartLCS,  
theEndLCS  
) 
Modify the Location of the given object by LCS, creating its copy before the setting.
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. 
Example
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.GEOM_Object, containing the displaced shape. Example of usage: # create local coordinate systems cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0) cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0) # modify the location of the given object position = geompy.MakePosition(cylinder, cs1, cs2)
Definition at line 5555 of file geompyDC.py.
05555 05556 def MakePosition(self,theObject, theStartLCS, theEndLCS): 05557 """ 05558 Modify the Location of the given object by LCS, creating its copy before the setting. 05559 05560 Parameters: 05561 theObject The object to be displaced. 05562 theStartLCS Coordinate system to perform displacement from it. 05563 If theStartLCS is NULL, displacement 05564 will be performed from global CS. 05565 If theObject itself is used as theStartLCS, 05566 its location will be changed to theEndLCS. 05567 theEndLCS Coordinate system to perform displacement to it. 05568 05569 Returns: 05570 New GEOM.GEOM_Object, containing the displaced shape. 05571 05572 Example of usage: 05573 # create local coordinate systems 05574 cs1 = geompy.MakeMarker( 0, 0, 0, 1,0,0, 0,1,0) 05575 cs2 = geompy.MakeMarker(30,40,40, 1,0,0, 0,1,0) 05576 # modify the location of the given object 05577 position = geompy.MakePosition(cylinder, cs1, cs2) 05578 """ 05579 # Example: see GEOM_TestAll.py 05580 anObj = self.TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS) 05581 RaiseIfFailed("PositionShapeCopy", self.TrsfOp) 05582 return anObj
def geompyDC.geompyDC.MakeProjection  (  self,  
theSource,  
theTarget  
) 
Create new object as projection of the given one on a 2D surface.
theSource  The source object for the projection. It can be a point, edge or wire. 
theTarget  The target object. It can be planar or cylindrical face. 
Example
Create new object as projection of the given one on a 2D surface. Parameters: theSource The source object for the projection. It can be a point, edge or wire. theTarget The target object. It can be planar or cylindrical face. Returns: New GEOM.GEOM_Object, containing the projection.
Definition at line 5649 of file geompyDC.py.
05649 05650 def MakeProjection(self, theSource, theTarget): 05651 """ 05652 Create new object as projection of the given one on a 2D surface. 05653 05654 Parameters: 05655 theSource The source object for the projection. It can be a point, edge or wire. 05656 theTarget The target object. It can be planar or cylindrical face. 05657 05658 Returns: 05659 New GEOM.GEOM_Object, containing the projection. 05660 """ 05661 # Example: see GEOM_TestAll.py 05662 anObj = self.TrsfOp.ProjectShapeCopy(theSource, theTarget) 05663 RaiseIfFailed("ProjectShapeCopy", self.TrsfOp) 05664 return anObj
def geompyDC.geompyDC.MakeRotation  (  self,  
theObject,  
theAxis,  
theAngle  
) 
Rotate the given object around the given axis on the given angle, creating its copy before the rotatation.
theObject  The object to be rotated. 
theAxis  Rotation axis. 
theAngle  Rotation angle in radians. 
Example
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.GEOM_Object, containing the rotated object.
Definition at line 5361 of file geompyDC.py.
05361 05362 def MakeRotation(self,theObject, theAxis, theAngle): 05363 """ 05364 Rotate the given object around the given axis 05365 on the given angle, creating its copy before the rotatation. 05366 05367 Parameters: 05368 theObject The object to be rotated. 05369 theAxis Rotation axis. 05370 theAngle Rotation angle in radians. 05371 05372 Returns: 05373 New GEOM.GEOM_Object, containing the rotated object. 05374 """ 05375 # Example: see GEOM_TestAll.py 05376 flag = False 05377 if isinstance(theAngle,str): 05378 flag = True 05379 theAngle, Parameters = ParseParameters(theAngle) 05380 if flag: 05381 theAngle = theAngle*math.pi/180.0 05382 anObj = self.TrsfOp.RotateCopy(theObject, theAxis, theAngle) 05383 RaiseIfFailed("RotateCopy", self.TrsfOp) 05384 anObj.SetParameters(Parameters) 05385 return anObj
def geompyDC.geompyDC.MakeRotationThreePoints  (  self,  
theObject,  
theCentPoint,  
thePoint1,  
thePoint2  
) 
Rotate given object around vector perpendicular to plane containing three points, creating its copy before the rotatation.
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. 
Example
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.GEOM_Object, containing the rotated object.
Definition at line 5395 of file geompyDC.py.
05395 05396 def MakeRotationThreePoints(self,theObject, theCentPoint, thePoint1, thePoint2): 05397 """ 05398 Rotate given object around vector perpendicular to plane 05399 containing three points, creating its copy before the rotatation. 05400 05401 Parameters: 05402 theObject The object to be rotated. 05403 theCentPoint central point the axis is the vector perpendicular to the plane 05404 containing the three points. 05405 thePoint1,thePoint2 in a perpendicular plane of the axis. 05406 05407 Returns: 05408 New GEOM.GEOM_Object, containing the rotated object. 05409 """ 05410 # Example: see GEOM_TestAll.py 05411 anObj = self.TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2) 05412 RaiseIfFailed("RotateThreePointsCopy", self.TrsfOp) 05413 return anObj
def geompyDC.geompyDC.MakeScaleAlongAxes  (  self,  
theObject,  
thePoint,  
theFactorX,  
theFactorY,  
theFactorZ  
) 
Scale the given object by different factors along coordinate axes, creating its copy before the scaling.
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. 
Example
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.GEOM_Object, containing the scaled shape.
Definition at line 5451 of file geompyDC.py.
05451 05452 def MakeScaleAlongAxes(self, theObject, thePoint, theFactorX, theFactorY, theFactorZ): 05453 """ 05454 Scale the given object by different factors along coordinate axes, 05455 creating its copy before the scaling. 05456 05457 Parameters: 05458 theObject The object to be scaled. 05459 thePoint Center point for scaling. 05460 Passing None for it means scaling relatively the origin of global CS. 05461 theFactorX,theFactorY,theFactorZ Scaling factors along each axis. 05462 05463 Returns: 05464 New GEOM.GEOM_Object, containing the scaled shape. 05465 """ 05466 # Example: see GEOM_TestAll.py 05467 theFactorX, theFactorY, theFactorZ, Parameters = ParseParameters(theFactorX, theFactorY, theFactorZ) 05468 anObj = self.TrsfOp.ScaleShapeAlongAxesCopy(theObject, thePoint, 05469 theFactorX, theFactorY, theFactorZ) 05470 RaiseIfFailed("MakeScaleAlongAxes", self.TrsfOp) 05471 anObj.SetParameters(Parameters) 05472 return anObj
def geompyDC.geompyDC.MakeScaleTransform  (  self,  
theObject,  
thePoint,  
theFactor  
) 
Scale the given object by the factor, creating its copy before the scaling.
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. 
Example
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.GEOM_Object, containing the scaled shape.
Definition at line 5422 of file geompyDC.py.
05422 05423 def MakeScaleTransform(self, theObject, thePoint, theFactor): 05424 """ 05425 Scale the given object by the factor, creating its copy before the scaling. 05426 05427 Parameters: 05428 theObject The object to be scaled. 05429 thePoint Center point for scaling. 05430 Passing None for it means scaling relatively the origin of global CS. 05431 theFactor Scaling factor value. 05432 05433 Returns: 05434 New GEOM.GEOM_Object, containing the scaled shape. 05435 """ 05436 # Example: see GEOM_TestAll.py 05437 theFactor, Parameters = ParseParameters(theFactor) 05438 anObj = self.TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor) 05439 RaiseIfFailed("ScaleShapeCopy", self.TrsfOp) 05440 anObj.SetParameters(Parameters) 05441 return anObj
def geompyDC.geompyDC.MakeTranslation  (  self,  
theObject,  
theDX,  
theDY,  
theDZ  
) 
Translate the given object along the vector, specified by its components, creating its copy before the translation.
theObject  The object to be translated. 
theDX,theDY,theDZ  Components of translation vector. 
Example
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.GEOM_Object, containing the translated object.
Definition at line 5223 of file geompyDC.py.
05223 05224 def MakeTranslation(self,theObject, theDX, theDY, theDZ): 05225 """ 05226 Translate the given object along the vector, specified 05227 by its components, creating its copy before the translation. 05228 05229 Parameters: 05230 theObject The object to be translated. 05231 theDX,theDY,theDZ Components of translation vector. 05232 05233 Returns: 05234 New GEOM.GEOM_Object, containing the translated object. 05235 """ 05236 # Example: see GEOM_TestAll.py 05237 theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ) 05238 anObj = self.TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ) 05239 anObj.SetParameters(Parameters) 05240 RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp) 05241 return anObj
def geompyDC.geompyDC.MakeTranslationTwoPoints  (  self,  
theObject,  
thePoint1,  
thePoint2  
) 
Translate the given object along the vector, specified by its end points, creating its copy before the translation.
theObject  The object to be translated. 
thePoint1  Start point of translation vector. 
thePoint2  End point of translation vector. 
Example 1
Example 2
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.GEOM_Object, containing the translated object.
Definition at line 5174 of file geompyDC.py.
05174 05175 def MakeTranslationTwoPoints(self,theObject, thePoint1, thePoint2): 05176 """ 05177 Translate the given object along the vector, specified 05178 by its end points, creating its copy before the translation. 05179 05180 Parameters: 05181 theObject The object to be translated. 05182 thePoint1 Start point of translation vector. 05183 thePoint2 End point of translation vector. 05184 05185 Returns: 05186 New GEOM.GEOM_Object, containing the translated object. 05187 """ 05188 # Example: see GEOM_TestAll.py 05189 anObj = self.TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2) 05190 RaiseIfFailed("TranslateTwoPointsCopy", self.TrsfOp) 05191 return anObj
def geompyDC.geompyDC.MakeTranslationVector  (  self,  
theObject,  
theVector  
) 
Translate the given object along the given vector, creating its copy before the translation.
theObject  The object to be translated. 
theVector  The translation vector. 
Example
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.GEOM_Object, containing the translated object.
Definition at line 5249 of file geompyDC.py.
05249 05250 def MakeTranslationVector(self,theObject, theVector): 05251 """ 05252 Translate the given object along the given vector, 05253 creating its copy before the translation. 05254 05255 Parameters: 05256 theObject The object to be translated. 05257 theVector The translation vector. 05258 05259 Returns: 05260 New GEOM.GEOM_Object, containing the translated object. 05261 """ 05262 # Example: see GEOM_TestAll.py 05263 anObj = self.TrsfOp.TranslateVectorCopy(theObject, theVector) 05264 RaiseIfFailed("TranslateVectorCopy", self.TrsfOp) 05265 return anObj
def geompyDC.geompyDC.MakeTranslationVectorDistance  (  self,  
theObject,  
theVector,  
theDistance  
) 
Translate the given object along the given vector on given distance, creating its copy before the translation.
theObject  The object to be translated. 
theVector  The translation vector. 
theDistance  The translation distance. 
Example
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.GEOM_Object, containing the translated object.
Definition at line 5302 of file geompyDC.py.
05302 05303 def MakeTranslationVectorDistance(self, theObject, theVector, theDistance): 05304 """ 05305 Translate the given object along the given vector on given distance, 05306 creating its copy before the translation. 05307 05308 Parameters: 05309 theObject The object to be translated. 05310 theVector The translation vector. 05311 theDistance The translation distance. 05312 05313 Returns: 05314 New GEOM.GEOM_Object, containing the translated object. 05315 """ 05316 # Example: see GEOM_TestAll.py 05317 theDistance,Parameters = ParseParameters(theDistance) 05318 anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, 1) 05319 RaiseIfFailed("TranslateVectorDistance", self.TrsfOp) 05320 anObj.SetParameters(Parameters) 05321 return anObj
def geompyDC.geompyDC.MultiRotate1D  (  self,  
theObject,  
theAxis,  
theNbTimes  
) 
Rotate the given object around the given axis a given number times.
Rotation angle will be 2*PI/theNbTimes.
theObject  The object to be rotated. 
theAxis  The rotation axis. 
theNbTimes  Quantity of rotations to be done. 
Example
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.GEOM_Object, containing compound of all the shapes, obtained after each rotation. Example of usage: rot1d = geompy.MultiRotate1D(prism, vect, 4)
Definition at line 5752 of file geompyDC.py.
05752 05753 def MultiRotate1D(self,theObject, theAxis, theNbTimes): 05754 """ 05755 Rotate the given object around the given axis a given number times. 05756 Rotation angle will be 2*PI/theNbTimes. 05757 05758 Parameters: 05759 theObject The object to be rotated. 05760 theAxis The rotation axis. 05761 theNbTimes Quantity of rotations to be done. 05762 05763 Returns: 05764 New GEOM.GEOM_Object, containing compound of all the 05765 shapes, obtained after each rotation. 05766 05767 Example of usage: 05768 rot1d = geompy.MultiRotate1D(prism, vect, 4) 05769 """ 05770 # Example: see GEOM_TestAll.py 05771 theAxis, theNbTimes, Parameters = ParseParameters(theAxis, theNbTimes) 05772 anObj = self.TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes) 05773 RaiseIfFailed("MultiRotate1D", self.TrsfOp) 05774 anObj.SetParameters(Parameters) 05775 return anObj
def geompyDC.geompyDC.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 multitranslate each rotation result.
Translation direction passes through center of gravity of rotated shape and its projection on the rotation axis.
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. 
Example
Rotate the given object around the given axis on the given angle a given number times and multitranslate 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.GEOM_Object, containing compound of all the shapes, obtained after each transformation. Example of usage: rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5)
Definition at line 5791 of file geompyDC.py.
05791 05792 def MultiRotate2D(self,theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2): 05793 """ 05794 Rotate the given object around the 05795 given axis on the given angle a given number 05796 times and multitranslate each rotation result. 05797 Translation direction passes through center of gravity 05798 of rotated shape and its projection on the rotation axis. 05799 05800 Parameters: 05801 theObject The object to be rotated. 05802 theAxis Rotation axis. 05803 theAngle Rotation angle in graduces. 05804 theNbTimes1 Quantity of rotations to be done. 05805 theStep Translation distance. 05806 theNbTimes2 Quantity of translations to be done. 05807 05808 Returns: 05809 New GEOM.GEOM_Object, containing compound of all the 05810 shapes, obtained after each transformation. 05811 05812 Example of usage: 05813 rot2d = geompy.MultiRotate2D(prism, vect, 60, 4, 50, 5) 05814 """ 05815 # Example: see GEOM_TestAll.py 05816 theAngle, theNbTimes1, theStep, theNbTimes2, Parameters = ParseParameters(theAngle, theNbTimes1, theStep, theNbTimes2) 05817 anObj = self.TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2) 05818 RaiseIfFailed("MultiRotate2D", self.TrsfOp) 05819 anObj.SetParameters(Parameters) 05820 return anObj
def geompyDC.geompyDC.PositionAlongPath  (  self,  
theObject,  
thePath,  
theDistance,  
theCopy,  
theReverse  
) 
Modify the Location of the given object by Path,.
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. 
Example
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.GEOM_Object, containing the displaced shape. Example of usage: position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1)
Definition at line 5592 of file geompyDC.py.
05592 05593 def PositionAlongPath(self,theObject, thePath, theDistance, theCopy, theReverse): 05594 """ 05595 Modify the Location of the given object by Path 05596 05597 Parameters: 05598 theObject The object to be displaced. 05599 thePath Wire or Edge along that the object will be translated. 05600 theDistance progress of Path (0 = start location, 1 = end of path location). 05601 theCopy is to create a copy objects if true. 05602 theReverse 0  for usual direction, 1  to reverse path direction. 05603 05604 Returns: 05605 New GEOM.GEOM_Object, containing the displaced shape. 05606 05607 Example of usage: 05608 position = geompy.PositionAlongPath(cylinder, circle, 0.75, 1, 1) 05609 """ 05610 # Example: see GEOM_TestAll.py 05611 anObj = self.TrsfOp.PositionAlongPath(theObject, thePath, theDistance, theCopy, theReverse) 05612 RaiseIfFailed("PositionAlongPath", self.TrsfOp) 05613 return anObj
def geompyDC.geompyDC.Rotate  (  self,  
theObject,  
theAxis,  
theAngle  
) 
Rotate the given object around the given axis on the given angle.
theObject  The object to be rotated. 
theAxis  Rotation axis. 
theAngle  Rotation angle in radians. 
Example
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: New GEOM.GEOM_Object, containing the rotated object.
Definition at line 5329 of file geompyDC.py.
05329 05330 def Rotate(self,theObject, theAxis, theAngle): 05331 """ 05332 Rotate the given object around the given axis on the given angle. 05333 05334 Parameters: 05335 theObject The object to be rotated. 05336 theAxis Rotation axis. 05337 theAngle Rotation angle in radians. 05338 05339 Returns: 05340 New GEOM.GEOM_Object, containing the rotated object. 05341 """ 05342 # Example: see GEOM_TestAll.py 05343 flag = False 05344 if isinstance(theAngle,str): 05345 flag = True 05346 theAngle, Parameters = ParseParameters(theAngle) 05347 if flag: 05348 theAngle = theAngle*math.pi/180.0 05349 anObj = self.TrsfOp.Rotate(theObject, theAxis, theAngle) 05350 RaiseIfFailed("RotateCopy", self.TrsfOp) 05351 anObj.SetParameters(Parameters) 05352 return anObj
def geompyDC.geompyDC.TranslateDXDYDZ  (  self,  
theObject,  
theDX,  
theDY,  
theDZ  
) 
Translate the given object along the vector, specified by its components.
theObject  The object to be translated. 
theDX,theDY,theDZ  Components of translation vector. 
Example
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.GEOM_Object.
Definition at line 5198 of file geompyDC.py.
05198 05199 def TranslateDXDYDZ(self,theObject, theDX, theDY, theDZ): 05200 """ 05201 Translate the given object along the vector, specified by its components. 05202 05203 Parameters: 05204 theObject The object to be translated. 05205 theDX,theDY,theDZ Components of translation vector. 05206 05207 Returns: 05208 Translated GEOM.GEOM_Object. 05209 """ 05210 # Example: see GEOM_TestAll.py 05211 theDX, theDY, theDZ, Parameters = ParseParameters(theDX, theDY, theDZ) 05212 anObj = self.TrsfOp.TranslateDXDYDZ(theObject, theDX, theDY, theDZ) 05213 anObj.SetParameters(Parameters) 05214 RaiseIfFailed("TranslateDXDYDZ", self.TrsfOp) 05215 return anObj
def geompyDC.geompyDC.TranslateVectorDistance  (  self,  
theObject,  
theVector,  
theDistance,  
theCopy  
) 
Translate the given object along the given vector on given distance.
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. 
Example
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: New GEOM.GEOM_Object, containing the translated object.
Definition at line 5274 of file geompyDC.py.
05274 05275 def TranslateVectorDistance(self, theObject, theVector, theDistance, theCopy): 05276 """ 05277 Translate the given object along the given vector on given distance. 05278 05279 Parameters: 05280 theObject The object to be translated. 05281 theVector The translation vector. 05282 theDistance The translation distance. 05283 theCopy Flag used to translate object itself or create a copy. 05284 05285 Returns: 05286 New GEOM.GEOM_Object, containing the translated object. 05287 """ 05288 # Example: see GEOM_TestAll.py 05289 theDistance,Parameters = ParseParameters(theDistance) 05290 anObj = self.TrsfOp.TranslateVectorDistance(theObject, theVector, theDistance, theCopy) 05291 RaiseIfFailed("TranslateVectorDistance", self.TrsfOp) 05292 anObj.SetParameters(Parameters) 05293 return anObj