Role: This object may be, for example, the lateral face of a cylinder. You will create a CylindricalFace object using the , , or method. Then, you pass it to the operator (such as ). The lifetime of a CylindricalFace object is limited, see .
- Example:
-
This example asks the end user to select a shape to pattern and a cylindrical face, and creates a circular
pattern of the shape. The cylindrical face specifies the rotation axis.
Dim InputObjectType(0) Set Document = CATIA.ActiveDocument Set Selection = Document.Selection 'We propose to the user that he select the shape to pattern InputObjectType(0)="SketchBasedShape" Status=Selection.SelectElement2(InputObjectType,"Select the shape to pattern",true) if (Status = "cancel") then Exit Sub Set Shape = Selection.Item(1).Value Selection.Clear 'We propose to the user that he select the cylindrical face InputObjectType(0)="CylindricalFace" Status=Selection.SelectElement2(InputObjectType,"Select the cylindrical face",true) if (Status = "cancel") then Exit Sub Set CylindricalFace = Selection.Item(1).Value Set RotationCenter = Document.Part.CreateReferenceFromName("") Set CircPattern = ShapeFactory.AddNewCircPattern(Shape,1,4,20.0,45.0,1,4,RotationCenter,CylindricalFace,True,0.0,True) Document.Part.Update
Methods
- Sub GetDirection( oDirection)
-
Returns the direction of the cylindrical face axis
- Parameters:
-
- oDirection[0]
- The X Coordinate of the axis direction dd>
- oDirection[1]
- The Y Coordinate of the axis direction dd>
- oDirection[2]
- The Z Coordinate of the axis direction dd>
- Sub GetOrigin( oOrigin)
-
Returns the origin of the cylindrical face axis.
- Parameters:
-
- oOrigin[0]
- The X Coordinate of the axis origin dd>
- oOrigin[1]
- The Y Coordinate of the axis origin dd>
- oOrigin[2]
- The Z Coordinate of the axis origin dd>