pycatia.space_analyses_interfaces.measurable¶
- class pycatia.space_analyses_interfaces.measurable.Measurable(com_object)¶
The interface to access a CATIAMeasurable Get measurements on the object.
Note
CAA V5 Visual Basic help
Two types of measurement can be done:
itself : gives dimensions related to the object itself (ex the radius of a circle).between : gives dimensions related to another object (ex the distance between two products).A restriction occurs for distance between: bodies (CATBody) cannot be measured.Methods on VOLUME : GetVolume GetArea GetCOGMethods on SURFACE : GetArea GetCOG GetPerimeterMethods on PLANE : GetArea GetCOG GetPlaneMethods on CYLINDER : GetArea GetCOG GetAxis GetPointsOnAxis GetRadiusMethods on CONE : GetArea GetCOG GetAxis GetPointsOnAxis GetAngleMethods on SPHERE : GetArea GetCOG GetRadius GetCenterMethods on CURVE : GetLength GetCOG GetPointsOnCurveMethods on LINE : GetLength GetCOG GetPointsOnCurve GetDirectionMethods on CIRCLE : GetLength GetCOG GetPointsOnCurve GetRadius GetCenter GetAngle GetAxisMethods on POINT : GetPointMethods on AXIS SYST : GetAxisSystem- property angle: float¶
Note
CAA V5 Visual Basic help
Property Angle( ) As double (Read Only)
Returns the Angle of a circle or cone.Example:This example retrieves the Angle of NewMeasurable measure.Dim AAngle As doubleAAngle = NewMeasurable.Angle- Return type:
float
- property area: float¶
Note
CAA V5 Visual Basic help
Property Area( ) As double (Read Only)
Returns the area of the surface or wet area from volume.Example:This example retrieves the area of NewMeasurable measure. The area unit given by oArea is m²Dim AArea As doubleAArea = NewMeasurable.Area- Return type:
float
- property geometry_name: int¶
Note
CAA V5 Visual Basic help
- Return type:
int | Returns the name of the geometry of the measured object. | Example: | This example retrieves the name of the geometry of the NewMeasurable measure. | Dim AGeometryName As CatMeasurableName | AGeometryName = NewMeasurable.GeometryName
- Returns:
enum cat_measurable_name
- Returns:
int
- get_angle_between(i_measured_item: Reference) float ¶
Note
CAA V5 Visual Basic help
- Parameters:
i_measured_item (Reference) –
Compute the angle between the CATIAMeasurable and another.Example:This example retrieves the angle between the reference1 and reference2.Dim reference1 As ReferenceSet reference1 = part1.CreateReferenceFromObject(object1)Dim reference2 As ReferenceSet reference2 = part1.CreateReferenceFromObject(object1)Dim TheSPAWorkbench As WorkbenchSet TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( “SPAWorkbench” )Dim TheMeasurable As MeasurableSet TheMeasurable = TheSPAWorkbench.GetMeasurable(reference1)Dim MinimumDistance As doubleMinimumDistance = TheMeasurable.GetAngleBetween(reference2)- Return type:
float
- get_axis()¶
- ..note::
CAA V5 Visual Basic help
Sub GetAxis( CATSafeArrayVariant oAxisVector)
Retrieves the axis vector of the cylinder or a cone.Parameters:oVectorThe axis vector of the cylinder or a cone with respect to the product coordinate system:oAxisVector(0) is the X directionoAxisVector(1) is the Y directionoAxisVector(2) is the Z directionExample:This example retrieves the axis vector of the cylinder or a cone of NewMeasurable measure.Dim AxisVector (2)NewMeasurable.GetAxis AxisVector
- Returns:
tuple(float, float, float)
- get_axis_system()¶
- ..note ::
CAA V5 Visual Basic help
Sub GetAxisSystem( CATSafeArrayVariant oComponents)
Retrieves the information of the axis system.Parameters:oCoordinatesThe information of the axis system with respect to the product coordinate system:oComponents(0) is the X coordinate of the origin of the axis systemoComponents(1) is the Y coordinate of the origin of the axis systemoComponents(2) is the Z coordinate of the origin of the axis systemoComponents(3) is the X coordinate of the first direction of the axis systemoComponents(4) is the Y coordinate of the first direction of the axis systemoComponents(5) is the Z coordinate of the first direction of the axis systemoComponents(6) is the X coordinate of the second direction of the axis systemoComponents(7) is the Y coordinate of the second direction of the axis systemoComponents(8) is the Z coordinate of the second direction of the axis systemoComponents(9) is the X coordinate of the third direction of the axis systemoComponents(10) is the Y coordinate of the third direction of the axis systemoComponents(11) is the Z coordinate of the third direction of the axis systemExample:This example retrieves information of the axis system of NewMeasurable measure.Dim Components (11)NewMeasurable.GetAxisSystem Components
- Returns:
tuple(float, float, float, float, float, float, float, float, float, float, float, float)
- get_center()¶
- ..note::
CAA V5 Visual Basic help Sub GetCenter( CATSafeArrayVariant oCoordinates)
Retrieves the position of the center of a circle or sphere.Parameters:oCoordinatesThe position of the center with respect to the product coordinate system:oCoordinates(0) is the X coordinateoCoordinates(1) is the Y coordinateoCoordinates(2) is the Z coordinateExample:This example retrieves the position of the center of NewMeasurable measure.Dim Coordinates (2)NewMeasurable.GetCenter Coordinates << fixed typo in help
- Returns:
tuple(float, float, float)
- get_cog()¶
Note
FROM CAA V5 Visual Basic help
Sub GetCOG( CATSafeArrayVariant oCoordinates)
Retrieves the position of the center of gravity of a surface and volume .Parameters:oCoordinatesThe position of the center of gravity with respect to the product coordinate system:oCoordinates(0) is the X coordinateoCoordinates(1) is the Y coordinateoCoordinates(2) is the Z coordinateExample:This example retrieves the position of the center of gravity of NewMeasurable measure.Dim Coordinates (2)NewMeasurable.GetCOG Coordinates- Returns:
tuple(float, float, float)
- get_direction()¶
Note
CAA V5 Visual Basic help
Sub GetDirection( CATSafeArrayVariant oDirection)
Retrieves the direction of the line.Parameters:oDirectionThe direction of the line with respect to the product coordinate system:oDirection(0) is the X directionoDirection(1) is the Y directionoDirection(2) is the Z directionExample:This example retrieves the direction of the line of NewMeasurable measure.Dim Direction (2)NewMeasurable.GetDirection Direction- Returns:
tuple(float, float, float)
- get_minimum_distance(i_measured_item)¶
Note
CAA V5 Visual Basic help
Func GetMinimumDistance( Reference iMeasuredItem) As double
Compute the minimum distance between the CATIAMeasurable and another.Bodies (openbody, hybridbody..) cannot be measured between.Parameters:oCoordinatesThe information of the axis system with respect to the product coordinate system:oComponents(0) is the X coordinate of the origin of the axis systemoComponents(1) is the Y coordinate of the origin of the axis systemoComponents(2) is the Z coordinate of the origin of the axis systemoComponents(3) is the X coordinate of the first direction of the axis systemoComponents(4) is the Y coordinate of the first direction of the axis systemoComponents(5) is the Z coordinate of the first direction of the axis systemExample:This example retrieves the distance between the reference1 and reference2.Dim reference1 As ReferenceSet reference1 = part1.CreateReferenceFromObject(object1)Dim reference2 As ReferenceSet reference2 = part1.CreateReferenceFromObject(object1)Dim TheSPAWorkbench As WorkbenchSet TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( “SPAWorkbench” )Dim TheMeasurable As MeasurableSet TheMeasurable = TheSPAWorkbench.GetMeasurable(reference1)Dim MinimumDistance As doubleMinimumDistance = TheMeasurable.GetMinimumDistance(reference2)- Returns:
float
- get_minimum_distance_points(i_measured_item)¶
Note
CAA V5 Visual Basic help
Sub GetMinimumDistancePoints( Reference iMeasuredItem, CATSafeArrayVariant oCoordinates)
Compute the points corresponding to the minimum distance between the two references.Example:This example retrieves the points corresponding to the distance between the reference1 and reference2.Dim reference1 As ReferenceSet reference1 = part1.CreateReferenceFromObject(object1)Dim reference2 As ReferenceSet reference2 = part1.CreateReferenceFromObject(object1)Dim TheSPAWorkbench As WorkbenchSet TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( “SPAWorkbench” )Dim TheMeasurable As MeasurableSet TheMeasurable = TheSPAWorkbench.GetMeasurable(reference1)Dim Coordinates (8)TheMeasurable.GetMinimumDistancePoints reference2, Coordinates- Parameters:
i_measured_item –
- Returns:
tuple(float, float, float, float, float, float, float, float, float)
- get_plane()¶
Note
CAA V5 Visual Basic help
Sub GetPlane( CATSafeArrayVariant oComponents)
Retrieves informations of the plane.Parameters:oComponentsThe informations of the plane with respect to the product coordinate system:oComponents(0) is the X coordinate of the originoComponents(1) is the Y coordinate of the originoComponents(2) is the Z coordinate of the originoComponents(3) is the X coordinate of the first direction of the planeoComponents(4) is the Y coordinate of the first direction of the planeoComponents(5) is the Z coordinate of the first direction of the planeoComponents(6) is the X coordinate of the second direction of the planeoComponents(7) is the Y coordinate of the second direction of the planeoComponents(8) is the Z coordinate of the second direction of the planeExample:This example retrieves informations of the plane of NewMeasurable measure.Dim Components (8)NewMeasurable.GetPlane Components- Returns:
tuple(float, float, float, float, float, float, float, float)
- get_point()¶
Note
CAA V5 Visual Basic help Sub GetPoint( CATSafeArrayVariant oCoordinates)
Retrieves the position of the point.Parameters:oCoordinatesThe coordinate of the point with respect to the product coordinate system:oCoordinates(0) is the X coordinateoCoordinates(1) is the Y coordinateoCoordinates(2) is the Z coordinateExample:This example retrieves the coordinate of the point of NewMeasurable measure.Dim Coordinates (2)NewMeasurable.GetPoint Coordinates- Returns:
tuple(float, float, float)
- get_points_on_axis()¶
Note
CAA V5 Visual Basic help
Sub GetPointsOnAxis( CATSafeArrayVariant oCoordinates)
Retrieves the the characteristic points of the axis with respect of the size of the revolution object.Parameters:oCoordinatesThe information of the characteristic points with respect to the product coordinate system:oCoordinates(0) is the X coordinate of the centerpoint of the axisoCoordinates(1) is the Y coordinate of the centerpoint of the axisoCoordinates(2) is the Z coordinate of the centerpoint of the axisoCoordinates(3) is the X coordinate of the startpoint of the axisoCoordinates(4) is the Y coordinate of the startpoint of the axisoCoordinates(5) is the Z coordinate of the startpoint of the axisoCoordinates(6) is the X coordinate of the endpoint of the axisoCoordinates(7) is the Y coordinate of the endpoint of the axisoCoordinates(8) is the Z coordinate of the endpoint of the axisExample:This example retrieves the characteristic points of the axis of NewMeasurable measure.Dim Coordinates (8)NewMeasurable.GetPointsOnAxis Coordinates- Returns:
tuple(float, float, float, float, float, float, float, float)
- get_points_on_curve()¶
Note
CAA V5 Visual Basic help
Sub GetPointsOnCurve( CATSafeArrayVariant oCoordinates)
Retrieves the characteristic points of the curve : the start point, the middle point and the end point.Parameters:oCoordinatesThe information of the characteristic points of the curve with respect to the product coordinate system:oCoordinates(0) is the X coordinate of the startpoint of the curveoCoordinates(1) is the Y coordinate of the startpoint of the curveoCoordinates(2) is the Z coordinate of the startpoint of the curveoCoordinates(3) is the X coordinate of the midpoint of the curveoCoordinates(4) is the Y coordinate of the midpoint of the curveoCoordinates(5) is the Z coordinate of the midpoint of the curveoCoordinates(6) is the X coordinate of the endpoint of the curveoCoordinates(7) is the Y coordinate of the endpoint of the curveoCoordinates(8) is the Z coordinate of the endpoint of the curveExample:This example retrieves the characteristic points of the curve of NewMeasurable measure.Dim Coordinates (8)NewMeasurable.GetPointsOnCurve Coordinates- Returns:
tuple(float, float, float, float, float, float, float, float)
- property length: float¶
- ..note::
CAA V5 Visual Basic help
Property Length( ) As double (Read Only)
Returns the Length of a curve.Example:This example retrieves the Length of NewMeasurable measure.Dim ALength As doubleALength = NewMeasurable.Length
- Return type:
float
- property perimeter: float¶
Note
CAA V5 Visual Basic help
Property Perimeter( ) As double (Read Only)
Returns the perimeter of a surface.Example:This example retrieves the perimeter of NewMeasurable measure.Dim APerimeter As doubleAPerimeter = NewMeasurable.Perimeter- Return type:
float
- property radius: float¶
- ..note ::
CAA V5 Visual Basic help
Property Radius( ) As double (Read Only)
Returns the radius of an arc, cylinder or sphere.Example:This example retrieves the Radius of NewMeasurable measure.Dim ARadius As doubleARadius = NewMeasurable.Radius
- Return type:
float
- property volume: float¶
- ..note::
CAA V5 Visual Basic help Property Volume( ) As double (Read Only)
Returns the volume.Example:This example retrieves the volume of NewMeasurable measure. The volume unit given by oVolume is m^3Dim AVolume As doubleAVolume = NewMeasurable.Volume
- Return type:
float