sketcher_interfaces

axis_2D

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.axis_2D.Axis2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
SketcherInterfaces.Geometry2D
Axis2D

Interface defining a coordinate system in the 2D Space.
property horizontal_reference

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property HorizontalReference() As Line2D (Read Only)

Returns the 2D coordinate system horizontal axis.
Returns

Line2D

property origin

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property Origin() As Point2D (Read Only)

Returns the 2D coordinate system origin.
Returns

Point2D

property vertical_reference

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property VerticalReference() As Line2D (Read Only)

Returns the 2D coordinate system vertical axis.
Returns

Line2D

circle_2D

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.circle_2D.Circle2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
SketcherInterfaces.Geometry2D
SketcherInterfaces.Curve2D
Circle2D

Class defining a circle in 2D Space.
property center_point

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property CenterPoint() As Point2D

Returns the center point of the circle.

Parameters:

oCenterPoint
The center point of the circle
Returns

Point2D

get_center(o_data)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetCenter(CATSafeArrayVariant oData)

Returns the center of the circle

Parameters:

oData[0]
The X Coordinate of the circle center point
oData[1]
The Y Coordinate of the circle center point
Example:
The following example reads the coordinates of the
center
of the circle myCircle: double center(1) myCircle.GetCenter
center
Parameters

o_data (tuple) –

Returns

None

property radius

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property Radius() As double (Read Only)

Returns the radius of the circle

Parameters:

oRadius
The radius of the circle
Returns

float

set_data(i_center_x, i_center_y, i_radius)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetData(double iCenterX,
double iCenterY,
double iRadius)

Modifies the caracteristics of the circle

Parameters:

iCenterX
The X Coordinate of the circle center
iCenterY
The Y Coordinate of the circle center
iRadius
The radius of the circle
Parameters
  • i_center_x (float) –

  • i_center_y (float) –

  • i_radius (float) –

Returns

None

control_point_2D

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.control_point_2D.ControlPoint2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
SketcherInterfaces.Geometry2D
SketcherInterfaces.Point2D
ControlPoint2D

Class defining a spline control point in 2D Space.
property curvature

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property Curvature() As double

Returns the curvature properties of the spline control
point

Parameters:

oCurvature
The curvature of the tangent determined at the control
point
Returns

float

get_tangent(o_tangent)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetTangent(CATSafeArrayVariant oTangent)

Returns the tangent properties of the spline control point

Parameters:

oTangent[0]
The X Coordinate of the tangent determined at the control point

oTangent[1]
The Y Coordinate of the tangent determined at the control
point
Parameters

o_tangent (tuple) –

Returns

None

set_tangent(i_tangent_x, i_tangent_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetTangent(double iTangentX,
double iTangentY)

Imposes the tangent properties of the spline control point

Parameters:

iTangentX
The X Coordinate of the tangent determined at the control point

iTangentY
The Y Coordinate of the tangent determined at the control
point
Parameters
  • i_tangent_x (float) –

  • i_tangent_y (float) –

Returns

None

unset_curvature()

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub UnsetCurvature()

Unsets the curvature properties of the spline control point
Returns

None

unset_tangent()

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub UnsetTangent()

Unsets the tangent properties of the spline control point
Returns

None

curve_2D

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.curve_2D.Curve2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
SketcherInterfaces.Geometry2D
Curve2D

Class defining a curve in 2D Space.
property continuity

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property Continuity() As short (Read Only)

Returns the highest level of geometric continuity the curve
possesses.

Parameters:

oLevel
The maximum geometric continuity level
Returns

enum

property end_point

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property EndPoint() As Point2D

Returns the end point of the curve. The end point is decided with respect
to the logical flow imposed on the curve by the object.

Parameters:

oEndPoint
The end point of the curve
Returns

Point2D

get_curvature(i_param, o_curvature)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetCurvature(double iParam,
CATSafeArrayVariant oCurvature)

Returns the curvature and curvature direction at the parameter
specified.

Parameters:

iParam
The parameter of the chosen point on the curve.
oCurvature[0]
The curvature at the specified parameter.
oCurvature[1;2]
The unit-vector of curvature direction at the specified
parameter.
Parameters
  • i_param (float) –

  • o_curvature (tuple) –

Returns

None

get_derivatives(i_param, o_derivative)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetDerivatives(double iParam,
CATSafeArrayVariant oDerivative)

Returns the first, second and third derivatives at the parameter
specified.

Parameters:

iParam
The parameter of the chosen point on the curve.
oDerivative[0]
First degree derivative.
oDerivative[1]
Second degree derivative.
oDerivative[2]
Third degree derivative.
Parameters
  • i_param (float) –

  • o_derivative (tuple) –

Returns

None

get_end_points(o_end_points)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetEndPoints(CATSafeArrayVariant oEndPoints)

Returns the end-points of the curve. The start point and the end point are
decided with respect to the logical flow imposed on the curve by the
object.

Parameters:

oEndPoints[0]
The x coordinate of the start point
oEndPoints[1]
The y coordinate of the start point
oEndPoints[2]
The x coordinate of the end point
oEndPoints[3]
The y coordinate of the end point
Parameters

o_end_points (tuple) –

Returns

None

get_length_at_param(i_from_param, i_to_param)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetLengthAtParam(double iFromParam,
double iToParam) As double

Returns the length, measured along the curve, from a given parameter to a
given parameter.

Parameters:

iFromParam
The parameter from which the length is to be measured.

iToParam
The parameter to which the length is to be measured.

oLength
The length between the parameters
Parameters
  • i_from_param (float) –

  • i_to_param (float) –

Returns

float

get_param_at_length(i_from_param, i_length)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetParamAtLength(double iFromParam,
double iLength) As double

Returns the parameter at a given length, measured along the curve, starting
from a given parameter. The direction of measurement is always in the direction
of the logical flow of the curve. If no inherent logical flow can be assigned
the direction is the direction of increasing
parameterization.

Parameters:

iFromParam
The parameter from which the length needs to be measured.

iLength
The length of the curve to be measured from iFromParam in the
logical flow direction of the curve.
oParam
The computed parameter.
Parameters
  • i_from_param (float) –

  • i_length (float) –

Returns

float

get_param_extents(o_params)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetParamExtents(CATSafeArrayVariant oParams)

Returns the parametric extents of the curve. This is the parametric
equivalent of the end-points.

Parameters:

oParams[0]
The parameter associated with the start point of the curve

oParams[1]
The parameter associated with the end point of the
curve
Parameters

o_params (tuple) –

Returns

None

get_point_at_param(i_param, o_point)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetPointAtParam(double iParam,
CATSafeArrayVariant oPoint)

Returns a point on the curve computed from an input
parameter.

Parameters:

iParam
The parameter
oPoint
The X and Y coordinates of the computed 2D space
point.
Parameters
  • i_param (float) –

  • o_point (tuple) –

Returns

None

get_range_box(o_bound_point)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetRangeBox(CATSafeArrayVariant oBoundPoint)

Returns the range box (or bounding box) of the object
The box is axially aligned within the local coordinate system of the
server.

Parameters:

oBoundPoint[0]
The minimum x point of the box
oBoundPoint[1]
The minimum y point of the box
oBoundPoint[2]
The maximum x point of the box
oBoundPoint[3]
The maximum y point of the box
Parameters

o_bound_point (tuple) –

Returns

None

get_tangent(i_param, o_tangency)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetTangent(double iParam,
CATSafeArrayVariant oTangency)

Returns the unit-vector tangent at the parameter
specified.

Parameters:

iParam
The parameter of the chosen point on the curve.
oTangency
The X and Y coordinates of the unit-vector tangent at the specified
parameter.
Parameters
  • i_param (float) –

  • o_tangency (tuple) –

Returns

None

is_periodic()

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func IsPeriodic() As boolean

Specifies whether a curve is periodic or not.

Parameters:

oPeriodic
Returns true if the curve is periodic.
Returns

bool

property period

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property Period() As double (Read Only)

Returns the period of a periodic curve.

Parameters:

oPeriod
The period of the curve.
Returns

float

property start_point

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property StartPoint() As Point2D

Returns the start point of the curve. The start point is decided with
respect to the logical flow imposed on the curve by the
object.

Parameters:

oStartPoint
The start point of the curve
Returns

Point2D

ellipse_2D

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.ellipse_2D.Ellipse2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
SketcherInterfaces.Geometry2D
SketcherInterfaces.Curve2D
Ellipse2D

Class defining an ellipse in 2D Space.
property center_point

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property CenterPoint() As Point2D

Returns the center point of the ellipse.

Parameters:

iCenterPoint
The center point of the ellipse
Returns

Point2D

get_center(o_center)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetCenter(CATSafeArrayVariant oCenter)

Returns the center of the ellipse in 2D space

Parameters:

oCenter[0]
The X Coordinate of the center point of the ellipse

oCenter[1]
The Y Coordinate of the center point of the
ellipse
Parameters

o_center (tuple) –

Returns

None

get_major_axis(o_major_axis)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetMajorAxis(CATSafeArrayVariant oMajorAxis)

Returns the unit vector of the major axis of the ellipse in 2D
space

Parameters:

oMajorAxis[0]
The length of the major axis
oMajorAxis[1]
The length of the major axis
Parameters

o_major_axis (tuple) –

Returns

None

get_minor_axis(o_major_axis)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetMinorAxis(CATSafeArrayVariant oMajorAxis)

Returns the unit vector of the minor axis of the ellipse in 2D
space

Parameters:

oMinorAxis[0]
The length of the major axis
oMinorAxis[1]
The length of the major axis
Parameters

o_major_axis (tuple) –

Returns

None

property major_radius

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property MajorRadius() As double (Read Only)

Returns the radius of the ellipse major axis

Parameters:

oMajorRadius
The radius of the major axis
Returns

float

property minor_radius

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property MinorRadius() As double (Read Only)

Returns the radius of the ellipse minor axis

Parameters:

oMinorRadius
The radius of the minor axis
Returns

float

set_data(i_center_x, i_center_y, i_major_x, i_major_y, i_major_radius, i_minor_radius)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetData(double iCenterX,
double iCenterY,
double iMajorX,
double iMajorY,
double iMajorRadius,
double iMinorRadius)

Modifies the caracteristics of the ellipse

Parameters:

iCenterX
The X Coordinate of the ellipse center
iCenterY
The Y Coordinate of the ellipse center
iMajorX
The X coordinate of the Major axis direction
iMajorY
The Y coordinate of the Major axis direction
iMajorRadius
The length of the major axis
iMinorRadius
The length of the minor axis
Parameters
  • i_center_x (float) –

  • i_center_y (float) –

  • i_major_x (float) –

  • i_major_y (float) –

  • i_major_radius (float) –

  • i_minor_radius (float) –

Returns

None

factory_2D

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.factory_2D.Factory2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
Factory2D

Interface to the factory for 2D objects.
create_circle(i_center_x, i_center_y, i_radius, i_start_param, i_end_param)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateCircle(double iCenterX,
double iCenterY,
double iRadius,
double iStartParam,
double iEndParam) As Circle2D

Creates and returns a 2D circle arc.

Parameters:

iCenterX
The X coordinate of the circle center
iCenterY
The Y coordinate of the circle center
iRadius
The radius of the circle
iStartParam
The beginning parameter of the circle.
This parameter is an angle value between 0 included and 2PI
excluded. Parameter values are computed from the axis horizontal direction in
the trigonometrical direction.
iEndParam
The end parameter of the circle.
This parameter may take any value between iStartParam excluded and
4PI included.
Parameters
  • i_center_x (float) –

  • i_center_y (float) –

  • i_radius (float) –

  • i_start_param (float) –

  • i_end_param (float) –

Returns

Circle2D

create_closed_circle(i_center_x, i_center_y, i_radius)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateClosedCircle(double iCenterX,
double iCenterY,
double iRadius) As Circle2D

Creates and returns a closed 2D circle.

Parameters:

iCenterX
The X coordinate of the circle center
iCenterY
The Y coordinate of the circle center
iRadius
The radius of the circle
Parameters
  • i_center_x (float) –

  • i_center_y (float) –

  • i_radius (float) –

Returns

Circle2D

create_closed_ellipse(i_center_x, i_center_y, i_major_x, i_major_y, i_major_radius, i_minor_radius)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateClosedEllipse(double iCenterX,
double iCenterY,
double iMajorX,
double iMajorY,
double iMajorRadius,
double iMinorRadius) As Ellipse2D

Creates and returns a closed 2D ellipse.

Parameters:

iCenterX
The X coordinate of the ellipse center
iCenterY
The Y coordinate of the ellipse center
iMajorX
The X component of the major axis direction
iMajorY
The Y component of the Major axis direction
iMajorRadius
The length of the major axis
iMinorRadius
The length of the minor axis
Parameters
  • i_center_x (float) –

  • i_center_y (float) –

  • i_major_x (float) –

  • i_major_y (float) –

  • i_major_radius (float) –

  • i_minor_radius (float) –

Returns

Ellipse2D

create_control_point(i_x, i_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateControlPoint(double iX,
double iY) As ControlPoint2D

Creates and returns a 2D spline control point.

Parameters:

iX
The X coordinate of point to create
iY
The Y coordinate of point to create
Parameters
  • i_x (float) –

  • i_y (float) –

Returns

ControlPoint2D

create_ellipse(i_center_x, i_center_y, i_major_x, i_major_y, i_major_radius, i_minor_radius, i_start_param, i_end_param)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateEllipse(double iCenterX,
double iCenterY,
double iMajorX,
double iMajorY,
double iMajorRadius,
double iMinorRadius,
double iStartParam,
double iEndParam) As Ellipse2D

Creates and returns a 2D ellipse arc.

Parameters:

iCenterX
The X coordinate of the ellipse center
iCenterY
The Y coordinate of the ellipse center
iMajorX
The X component of the major axis direction
iMajorY
The Y component of the major axis direction
iMajorRadius
The length of the major axis
iMinorRadius
The length of the minor axis
iStartParam
The beginning parameter of the ellipse.
This parameter is an angle value between 0 included and 2PI
excluded. Parameter values are computed from the major axis direction in the
trigonometrical direction.
iEndParam
The end parameter of the ellipse.
This parameter may take any value between iStartParam excluded and
4PI included.
Parameters
  • i_center_x (float) –

  • i_center_y (float) –

  • i_major_x (float) –

  • i_major_y (float) –

  • i_major_radius (float) –

  • i_minor_radius (float) –

  • i_start_param (float) –

  • i_end_param (float) –

Returns

Ellipse2D

create_hyperbola(i_center_x, i_center_y, i_axis_x, i_axis_y, i_major_radius, i_minor_radius)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateHyperbola(double iCenterX,
double iCenterY,
double iAxisX,
double iAxisY,
double iMajorRadius,
double iMinorRadius) As Hyperbola2D

Creates and returns a hyperbola.

Parameters:

iCenterX
The X coordinate of the hyperbola center
iCenterY
The Y coordinate of the hyperbola center
iAxisX
The X coordinate of the major axis direction
iAxisY
The Y coordinate of the major axis direction
iMajorRadius
The length of the major axis
iMinorRadius
The length of the minor axis
Parameters
  • i_center_x (float) –

  • i_center_y (float) –

  • i_axis_x (float) –

  • i_axis_y (float) –

  • i_major_radius (float) –

  • i_minor_radius (float) –

Returns

Hyperbola2D

create_intersection(i_geometry)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateIntersection(Reference iGeometry) As Geometry2D

Creates and returns the intersection of an object with the
sketch.

Parameters:

iGeometry
The object to intersect with the sketch
Parameters

i_geometry (Reference) –

Returns

Geometry2D

create_intersections(i_geometry)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateIntersections(Reference iGeometry) As
GeometricElements

Creates and returns the possible intersections of an object with the
sketch.

Parameters:

iGeometry
The object to intersect with the sketch
Parameters

i_geometry (Reference) –

Returns

GeometricElements

create_line(i_x1, i_y1, i_x2, i_y2)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateLine(double iX1,
double iY1,
double iX2,
double iY2) As Line2D

Creates and returns a 2D line.

Parameters:

iX1
The X coordinate of line first extremity
iY1
The Y coordinate of line first extremity
iX2
The X coordinate of line second extremity
iY2
The Y coordinate of line second extremity
Parameters
  • i_x1 (float) –

  • i_y1 (float) –

  • i_x2 (float) –

  • i_y2 (float) –

Returns

Line2D

create_line_from_vector(i_x1, i_y1, i_ux, i_uy)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateLineFromVector(double iX1,
double iY1,
double iUX,
double iUY) As Line2D

Creates and returns a 2D line.

Parameters:

iX1
The X coordinate of the line origin
iY1
The Y coordinate of the line origin
iUX
The X component of the line vector
iUY
The Y component of the line vector
Parameters
  • i_x1 (float) –

  • i_y1 (float) –

  • i_ux (float) –

  • i_uy (float) –

Returns

Line2D

create_parabola(i_center_x, i_center_y, i_axis_x, i_axis_y, i_focal_distance)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateParabola(double iCenterX,
double iCenterY,
double iAxisX,
double iAxisY,
double iFocalDistance) As Parabola2D

Creates and returns a parabola.

Parameters:

iCenterX
The X coordinate of the parabola center
iCenterY
The Y coordinate of the parabola center
iAxisX
The X coordinate of the major axis direction
iAxisY
The Y coordinate of the major axis direction
iFocalDistance
The parabola focal distance
Parameters
  • i_center_x (float) –

  • i_center_y (float) –

  • i_axis_x (float) –

  • i_axis_y (float) –

  • i_focal_distance (float) –

Returns

Parabola2D

create_point(i_x, i_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreatePoint(double iX,
double iY) As Point2D

Creates and returns a 2D point.

Parameters:

iX
The X coordinate of point to create
iY
The Y coordinate of point to create
Parameters
  • i_x (float) –

  • i_y (float) –

Returns

Point2D

create_projection(i_geometry)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateProjection(Reference iGeometry) As Geometry2D

Creates and returns the projection of an object on the
sketch.

Parameters:

iGeometry
The object to project on the sketch
Parameters

i_geometry (Reference) –

Returns

Geometry2D

create_projections(i_geometry)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateProjections(Reference iGeometry) As
GeometricElements

Creates and returns the possible projections of an object on the
sketch.

Parameters:

iGeometry
The object to project on the sketch
Parameters

i_geometry (Reference) –

Returns

GeometricElements

create_spline(i_poles)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func CreateSpline(CATSafeArrayVariant iPoles) As Spline2D

Creates and returns a 2D b-spline.

Parameters:

iPoles
An array of CATIAPoint2D forming the poles of the
b-spline.
Parameters

i_poles (tuple) –

Returns

Spline2D

geometric_element

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.geometric_element.GeometricElement(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
GeometricElement

2D or 3D wireframe geometric element.
property geometric_type

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property GeometricType() As CatGeometricType (Read Only)

Returns the type of the underlying geometrical element

Parameters:

oType
Specific type of the geometric interface
Returns

enum cat_geometric_type

geometry_2D

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.geometry_2D.Geometry2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
Geometry2D

2D wireframe geometric element.
property construction

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property Construction() As boolean

Returns the construction mode of the 2D geometry
Returns

bool

property report_name

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property ReportName() As long

Returns the report name of the 2D geometry

Parameters:

oReportName
The integer value of the report name
Returns

int

hyperbola_2D

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.hyperbola_2D.Hyperbola2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
SketcherInterfaces.Geometry2D
SketcherInterfaces.Curve2D
Hyperbola2D

Class defining an hyperbola in 2D Space.
get_axis(o_axis)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetAxis(CATSafeArrayVariant oAxis)

Returns the axis vector direction of the hyperbola in 2D
space

Parameters:

oAxis[0]
The X coordinate of the axis vector direction
oAxis[1]
The Y coordinate of the axis vector direction
Parameters

o_axis (tuple) –

Returns

None

get_center(o_center)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetCenter(CATSafeArrayVariant oCenter)

Returns the center point of the hyperbola in 2D space

Parameters:

oCenter[0]
The X Coordinate of the center point of the hyperbola

oCenter[1]
The Y Coordinate of the center point of the
hyperbola
Parameters

o_center (tuple) –

Returns

None

property imaginary_radius

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property ImaginaryRadius() As double (Read Only)

Returns the minor radius of the hyperbola in 2D space

Parameters:

oMinorRadius
The minor radius of the hyperbola
Returns

float

property radius

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property Radius() As double (Read Only)

Returns the major radius of the hyperbola in 2D space

Parameters:

oMajorRadius
The major radius of the hyperbola
Returns

float

set_data(i_center_x, i_center_y, i_axis_x, i_axis_y, i_major_radius, i_minor_radius)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetData(double iCenterX,
double iCenterY,
double iAxisX,
double iAxisY,
double iMajorRadius,
double iMinorRadius)

Modifies the caracteristics of the hyperbola

Parameters:

iCenterX
The X Coordinate of the hyperbola center
iCenterY
The Y Coordinate of the hyperbola center
iAxisX
The X coordinate of the axis vector direction
iAxisY
The Y coordinate of the axis vector direction
iMajorRadius
The length of the major radius
iMinorRadius
The length of the minor radius
Parameters
  • i_center_x (float) –

  • i_center_y (float) –

  • i_axis_x (float) –

  • i_axis_y (float) –

  • i_major_radius (float) –

  • i_minor_radius (float) –

Returns

None

line_2D

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.line_2D.Line2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
SketcherInterfaces.Geometry2D
SketcherInterfaces.Curve2D
Line2D

Class defining a line in 2D Space.
get_direction(o_direction)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetDirection(CATSafeArrayVariant oDirection)

Returns the unit-vector pointing in the direction of the
line.

Parameters:

oDirection[0]
The X Coordinate of the unit vector pointing in the direction of
the line
oDirection[1]
The Y Coordinate of the unit vector pointing in the direction of
the line
Parameters

o_direction (tuple) –

Returns

None

get_origin(o_origin)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetOrigin(CATSafeArrayVariant oOrigin)

Returns a point lying on the line

Parameters:

oPoint[0]
The X Coordinate of a point lying on the line
oPoint[1]
The Y Coordinate of a point lying on the line
Parameters

o_origin (tuple) –

Returns

None

set_data(i_x, i_y, i_x_direction, i_y_direction)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetData(double iX,
double iY,
double iXDirection,
double iYDirection)

Modifies the caracteristics of the infinite line

Parameters:

iX
The X Coordinate of a point lying on the line
iY
The Y Coordinate of a point lying on the line
iXDirection
The X Coordinate of the unit vector pointing in the direction of
the line
iYDirection
The Y Coordinate of the unit vector pointing in the direction of
the line
Parameters
  • i_x (float) –

  • i_y (float) –

  • i_x_direction (float) –

  • i_y_direction (float) –

Returns

None

parabola_2D

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.parabola_2D.Parabola2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
SketcherInterfaces.Geometry2D
SketcherInterfaces.Curve2D
Parabola2D

Class defining an parabola in 2D Space.
property focal_distance

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property FocalDistance() As double (Read Only)

Returns the focal distance of the parabola in 2D space

Parameters:

oFocal
The focal distance of the parabola
Returns

float

get_axis(o_axis)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetAxis(CATSafeArrayVariant oAxis)

Returns the axis vector direction of the parabola in 2D
space

Parameters:

oAxis[0]
The X coordinate of the axis vector direction
oAxis[1]
The Y coordinate of the axis vector direction
Parameters

o_axis (tuple) –

Returns

None

get_center(o_center)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetCenter(CATSafeArrayVariant oCenter)

Returns the center of the parabola in 2D space

Parameters:

oCenter[0]
The X Coordinate of the center point of the parabola

oCenter[1]
The Y Coordinate of the center point of the
parabola
Parameters

o_center (tuple) –

Returns

None

set_data(i_center_x, i_center_y, i_axis_x, i_axis_y, i_focal_distance)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetData(double iCenterX,
double iCenterY,
double iAxisX,
double iAxisY,
double iFocalDistance)

Modifies the caracteristics of the parabola

Parameters:

iCenterX
The X Coordinate of the parabola center
iCenterY
The Y Coordinate of the parabola center
iAxisX
The X coordinate of the axis vector direction
iAxisY
The Y coordinate of the axis vector direction
iFocalDistance
The focal distance of the parabola
Parameters
  • i_center_x (float) –

  • i_center_y (float) –

  • i_axis_x (float) –

  • i_axis_y (float) –

  • i_focal_distance (float) –

Returns

None

point_2D

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.point_2D.Point2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
SketcherInterfaces.Geometry2D
Point2D

Class defining a point in 2D Space.
get_coordinates(o_point)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetCoordinates(CATSafeArrayVariant oPoint)

Returns the coordinates of the point

Parameters:

oPoint[0]
The X Coordinate of the point
oPoint[1]
The Y Coordinate of the point
Parameters

o_point (tuple) –

Returns

None

set_data(i_x, i_y)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetData(double iX,
double iY)

Modifies the coordinates of the point

Parameters:

iX
The X Coordinate of the point
iY
The Y Coordinate of the point
Parameters
  • i_x (float) –

  • i_y (float) –

Returns

None

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.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
Sketch

The Sketch is a 2D based element comprising constrained 2D geometrical
elements.
The Sketch is created by giving a 2D support.
property absolute_axis

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property AbsoluteAxis() As Axis2D (Read Only)

Returns the 2D absolute axis of the sketch. The absolute axis is used for
constraining the sketch in 3D space, and its constituting horizontal and
vertical directions can also be used to constrain horizontally or vertically
subsequent geometrical elements in the sketch.

Returns:
oAxis The absolute axis of the sketch (@see CATIAAxis2D for more
information).

Example:
The following example places in myAxis the absolute
axis
of the sketch mySketch:

Set myAxis = mySketch.AbsoluteAxis
Returns

Axis2D

property center_line

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property CenterLine() As Line2D

Returns 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 more
information).

Example:
The following example returns in myCenterLine the center
line
in the sketch mySketch:

Set myCenterLine = mySketch.CenterLine
Returns

Line2D

close_edition()

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub CloseEdition()

Closes the Sketch Edition. Once you have finished working with the sketch,
you
must close its edition before using it for sketch-based
shapes.

Example:
The following example closes the edition of the sketch
mySketch:

mySketch.CloseEdition
Returns

None

property constraints

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
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 (@see
CATIAConstraints
for more information).

Example:
The following example returns in colConstraint the list of
constraints
in the sketch mySketch:

Set colConstraint = mySketch.Constraints
Returns

Constraints

evaluate()

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub Evaluate()

Evaluate the constraint system of the sketch
Returns

None

property factory_2D

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property Factory2D() As Factory2D (Read Only)

Returns the 2D factory of the sketch. Take care that you must open
edition
on a sketch before adding or modifying elements in it.

Returns:
oFactory The 2D geometrical factory of the sketch (@see
CATIAFactory2D
for more information).

Example:
The following example returns in my2DFactory the 2D
factory
of the sketch mySketch:

Set my2DFactory = mySketch.Factory2D
Returns

Factory2D

property geometric_elements

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
o Property GeometricElements() As GeometricElements (Read
Only)

Returns the list of geometrical elements included in the
sketch.

Returns:
oGeometricElements The list of geometric elements in the sketch (@see
CATIAGeometricElements
for more information).

Example:
The following example returns in colGeometry the list of
geometrical
elements in the sketch mySketch:

Set colGeometry = mySketch.GeometricElements
Returns

GeometricElements

get_absolute_axis_data(o_axis_data)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetAbsoluteAxisData(CATSafeArrayVariant oAxisData)

Returns the sketch axis coordinates in 3D space. The matrix returned
comprises 9 doubles, the first 3 being the coordinates
of the axis origin, the next 3 being those of the horizontal axis, and
the
last 3 those of the vertical axis.
The sketch horizontal axis is in fact computed from the first non null
projection of one of the 3 3D space axes on the sketch
plane.

Returns:
oAxisData The matrix of the axis in 3D space.

Example:
The following example reads the coordinates of the
axis
of the sketch mySketch:

Dim myAxisCoordinate (8)
mySketch.GetAbsoluteAxisData myAxisCoordinate
Set 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)
Parameters

o_axis_data (tuple) –

Returns

None

inverse_orientation()

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub InverseOrientation()

Inverse Orientation Of Sketch
Returns

None

open_edition()

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func OpenEdition() As Factory2D

Opens the Sketch Edition. You must open edition on a sketch before you can
add
elements in it. The CATIAFactory2D returned then enables you to create
2D
geometrical elements in the sketch.

Returns:
oFactory Returns the 2D FACTORY.

Example:
The following example opens edition on the sketch
mySketch
and places the factory in my2DFactory:

Set my2DFactory = mySketch.OpenEdition
Returns

Factory2D

set_absolute_axis_data(i_axis_data)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub SetAbsoluteAxisData(CATSafeArrayVariant iAxisData)

Sets the absolute axis of the sketch in 3D space.

Parameters:

oAxisData
The matrix comprises 9 doubles, the first 3 being the
coordinates
of the axis origin, the next 3 being those of the horizontal
axis,
and the last 3 those of the vertical axis of the absolute
axis.
Parameters

i_axis_data (tuple) –

Returns

None

spline_2D

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.spline_2D.Spline2D(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.AnyObject
SketcherInterfaces.GeometricElement
SketcherInterfaces.Geometry2D
SketcherInterfaces.Curve2D
Spline2D

Class defining a spline in 2D Space.
A 2D spline is defined by its constituting control points.
get_control_points(o_ctrl_points)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub GetControlPoints(CATSafeArrayVariant oCtrlPoints)

Returns the control points making up the spline.

Parameters:

oCtrlPoints
The control points of the spline

Example:
The following example fetches the list of control points
defining the
splinemySpline:

mySpline.GetControlPoints ControlPoints
Parameters

o_ctrl_points (tuple) –

Returns

None

get_number_of_control_points()

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func GetNumberOfControlPoints() As double

Returns the number of Control Points of the Spline

Parameters:

oNumber
The number of control points*
Returns

float

insert_control_point_after(i_ctrl_point, i_position)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub InsertControlPointAfter(Point2D iCtrlPoint,
long iPosition)

Inserts control points in the spline. If a 2D point is given (and not a
control
point), a new control point is created and aggregated in the
spline.

Parameters:

iCtrlPoint
The new point to be inserted. (@see CATIAPoint2D and
CATIAControlPoint2D
for more information).
iPosition
The position at which to insert the point.
To insert a new control point as the first element, set iPosition
to 0.

Example:
The following example inserts a control point myCtrlPoint as
the second
element of the splinemySpline:

call mySpline.InsertControlPointAfter (myCtrlPoint,
1)
Parameters
  • i_ctrl_point (Point2D) –

  • i_position (int) –

Returns

None