pycatia.sketcher_interfaces.sketch¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
Warning
The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.
- class pycatia.sketcher_interfaces.sketch.Sketch(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectSketchThe Sketch is a 2D based element comprising constrained 2D geometricalelements.The Sketch is created by giving a 2D support.- property absolute_axis: Axis2D¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property AbsoluteAxis() As Axis2D (Read Only)Returns the 2D absolute axis of the sketch. The absolute axis is used forconstraining the sketch in 3D space, and its constituting horizontal andvertical directions can also be used to constrain horizontally or verticallysubsequent geometrical elements in the sketch.Returns:oAxis The absolute axis of the sketch (@see CATIAAxis2D for moreinformation).Example:The following example places in myAxis the absoluteaxisof the sketch mySketch:Set myAxis = mySketch.AbsoluteAxis
- Return type:
- property center_line: Line2D¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property CenterLine() As Line2DReturns the geometric 2D line defined as the center line of the sketch.Center lines are then used for creating shafts.Returns:oLine The center line of the sketch(@see CATIALine2D for moreinformation).Example:The following example returns in myCenterLine the centerlinein the sketch mySketch:Set myCenterLine = mySketch.CenterLine
- Return type:
- close_edition() None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub CloseEdition()Closes the Sketch Edition. Once you have finished working with the sketch,youmust close its edition before using it for sketch-basedshapes.Example:The following example closes the edition of the sketchmySketch:mySketch.CloseEdition
- Return type:
None
- property constraints: Constraints¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property Constraints() As Constraints (Read Only)Returns the list of constraints included in the sketch.Returns:oConstraints The list of constraints in the sketch (@seeCATIAConstraintsfor more information).Example:The following example returns in colConstraint the list ofconstraintsin the sketch mySketch:Set colConstraint = mySketch.Constraints
- Return type:
- evaluate() None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub Evaluate()Evaluate the constraint system of the sketch
- Return type:
None
- property factory_2d: Factory2D¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property Factory2D() As Factory2D (Read Only)Returns the 2D factory of the sketch. Take care that you must openeditionon a sketch before adding or modifying elements in it.Returns:oFactory The 2D geometrical factory of the sketch (@seeCATIAFactory2Dfor more information).Example:The following example returns in my2DFactory the 2Dfactoryof the sketch mySketch:Set my2DFactory = mySketch.Factory2D
- Return type:
- property geometric_elements: GeometricElements¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
- o Property GeometricElements() As GeometricElements (ReadOnly)Returns the list of geometrical elements included in thesketch.Returns:oGeometricElements The list of geometric elements in the sketch (@seeCATIAGeometricElementsfor more information).Example:The following example returns in colGeometry the list ofgeometricalelements in the sketch mySketch:Set colGeometry = mySketch.GeometricElements
- Return type:
- get_absolute_axis_data() tuple ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub GetAbsoluteAxisData(CATSafeArrayVariant oAxisData)Returns the sketch axis coordinates in 3D space. The matrix returnedcomprises 9 doubles, the first 3 being the coordinatesof the axis origin, the next 3 being those of the horizontal axis, andthelast 3 those of the vertical axis.The sketch horizontal axis is in fact computed from the first non nullprojection of one of the 3 3D space axes on the sketchplane.Returns:oAxisData The matrix of the axis in 3D space.Example:The following example reads the coordinates of theaxisof the sketch mySketch:Dim myAxisCoordinate (8)mySketch.GetAbsoluteAxisData myAxisCoordinateSet OriginX = myAxisCoordinate(1)Set OriginY = myAxisCoordinate(2)Set OriginZ = myAxisCoordinate(3)Set HorizontalX = myAxisCoordinate(4)Set HorizontalY = myAxisCoordinate(5)Set HorizontalZ = myAxisCoordinate(6)Set VerticalX = myAxisCoordinate(7)Set VerticalY = myAxisCoordinate(8)Set VerticalZ = myAxisCoordinate(9)
- Return type:
tuple
- inverse_orientation() None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub InverseOrientation()Inverse Orientation Of Sketch
- Return type:
None
- open_edition() Factory2D ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Func OpenEdition() As Factory2DOpens the Sketch Edition. You must open edition on a sketch before you canaddelements in it. The CATIAFactory2D returned then enables you to create2Dgeometrical elements in the sketch.Returns:oFactory Returns the 2D FACTORY.Example:The following example opens edition on the sketchmySketchand places the factory in my2DFactory:Set my2DFactory = mySketch.OpenEdition
- Return type:
- set_absolute_axis_data(i_axis_data: tuple) None ¶
Note
- CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
- o Sub SetAbsoluteAxisData(CATSafeArrayVariant iAxisData)Sets the absolute axis of the sketch in 3D space.Parameters:oAxisDataThe matrix comprises 9 doubles, the first 3 being thecoordinatesof the axis origin, the next 3 being those of the horizontalaxis,and the last 3 those of the vertical axis of the absoluteaxis.
- Parameters:
i_axis_data (tuple) –
- Return type:
None