TrimmedCurve#

class ansys.geometry.core.shapes.curves.trimmed_curve.TrimmedCurve(geometry: ansys.geometry.core.shapes.curves.curve.Curve, start: ansys.geometry.core.math.point.Point3D, end: ansys.geometry.core.math.point.Point3D, interval: ansys.geometry.core.shapes.parameterization.Interval, length: pint.Quantity, grpc_client: ansys.geometry.core.connection.client.GrpcClient = None)#

Represents a trimmed curve.

A trimmed curve is a curve that has a boundary. This boundary comes in the form of an interval.

Parameters:
geometryCurve

Underlying mathematical representation of the curve.

startPoint3D

Start point of the curve.

endPoint3D

End point of the curve.

intervalInterval

Parametric interval that bounds the curve.

lengthQuantity

Length of the curve.

grpc_clientGrpcClient, default: None

gRPC client that is required for advanced functions such as intersect_curve().

Overview#

evaluate_proportion

Evaluate the curve at a proportional value.

intersect_curve

Get the intersect points of this trimmed curve with another one.

transformed_copy

Return a copy of the trimmed curve transformed by the given matrix.

translate

Translate the trimmed curve by a given vector and distance.

rotate

Rotate the trimmed curve around a given axis centered at a given point.

geometry

Underlying mathematical curve.

start

Start point of the curve.

end

End point of the curve.

length

Calculated length of the edge.

interval

Interval of the curve that provides its boundary.

__repr__

Represent the trimmed curve as a string.

Import detail#

from ansys.geometry.core.shapes.curves.trimmed_curve import TrimmedCurve

Property detail#

property TrimmedCurve.geometry: ansys.geometry.core.shapes.curves.curve.Curve#

Underlying mathematical curve.

property TrimmedCurve.start: ansys.geometry.core.math.point.Point3D#

Start point of the curve.

property TrimmedCurve.end: ansys.geometry.core.math.point.Point3D#

End point of the curve.

property TrimmedCurve.length: pint.Quantity#

Calculated length of the edge.

property TrimmedCurve.interval: ansys.geometry.core.shapes.parameterization.Interval#

Interval of the curve that provides its boundary.

Method detail#

TrimmedCurve.evaluate_proportion(param: ansys.geometry.core.typing.Real) ansys.geometry.core.shapes.curves.curve_evaluation.CurveEvaluation#

Evaluate the curve at a proportional value.

A parameter of 0 corresponds to the start of the curve, while a parameter of 1 corresponds to the end of the curve.

Parameters:
paramReal

Parameter in the proportional range [0,1].

Returns:
CurveEvaluation

Resulting curve evaluation.

TrimmedCurve.intersect_curve(other: TrimmedCurve) list[ansys.geometry.core.math.point.Point3D]#

Get the intersect points of this trimmed curve with another one.

If the two trimmed curves do not intersect, an empty list is returned.

Parameters:
otherTrimmedCurve

Trimmed curve to intersect with.

Returns:
list[Point3D]

All points of intersection between the curves.

TrimmedCurve.transformed_copy(matrix: ansys.geometry.core.math.matrix.Matrix44) TrimmedCurve#

Return a copy of the trimmed curve transformed by the given matrix.

Parameters:
matrixMatrix44

Transformation matrix to apply to the curve.

Returns:
TrimmedCurve

A new trimmed curve with the transformation applied.

TrimmedCurve.translate(direction: ansys.geometry.core.math.vector.UnitVector3D, distance: ansys.geometry.core.typing.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Distance) None#

Translate the trimmed curve by a given vector and distance.

Parameters:
directionUnitVector3D

Direction of translation.

distanceReal | Quantity | Distance

Distance to translate.

TrimmedCurve.rotate(origin: ansys.geometry.core.math.point.Point3D, axis: ansys.geometry.core.math.vector.UnitVector3D, angle: ansys.geometry.core.typing.Real | pint.Quantity | ansys.geometry.core.misc.measurements.Angle) None#

Rotate the trimmed curve around a given axis centered at a given point.

Parameters:
originPoint3D

Origin point of the rotation.

axisUnitVector3D

Axis of rotation.

angleReal | Quantity | Angle

Angle to rotate in radians.

TrimmedCurve.__repr__() str#

Represent the trimmed curve as a string.