Line
#
- class ansys.geometry.core.shapes.curves.line.Line(origin: numpy.ndarray | ansys.geometry.core.typing.RealSequence | ansys.geometry.core.math.point.Point3D, direction: numpy.ndarray | ansys.geometry.core.typing.RealSequence | ansys.geometry.core.math.vector.UnitVector3D | ansys.geometry.core.math.vector.Vector3D)#
Bases:
ansys.geometry.core.shapes.curves.curve.Curve
Provides 3D line representation.
Overview#
Check a parameter is within the parametric range of the curve. |
|
Check a point is contained by the curve. |
Evaluate the line at a given parameter. |
|
Create a transformed copy of the line from a transformation matrix. |
|
Project a point onto the line and evaluate the line. |
|
Determine if the line is coincident with another line. |
|
Determine if the line is opposite another line. |
|
Get the parametrization of the line. |
Equals operator for the |
Import detail#
from ansys.geometry.core.shapes.curves.line import Line
Property detail#
- property Line.origin: ansys.geometry.core.math.point.Point3D#
Origin of the line.
- property Line.direction: ansys.geometry.core.math.vector.UnitVector3D#
Direction of the line.
Method detail#
- Line.evaluate(parameter: float) LineEvaluation #
Evaluate the line at a given parameter.
- Parameters:
- parameter
Real
Parameter to evaluate the line at.
- parameter
- Returns:
LineEvaluation
Resulting evaluation.
- Line.transformed_copy(matrix: ansys.geometry.core.math.matrix.Matrix44) Line #
Create a transformed copy of the line from a transformation matrix.
- Parameters:
- matrix
Matrix44
4X4 transformation matrix to apply to the line.
- matrix
- Returns:
Line
New line that is the transformed copy of the original line.
- Line.project_point(point: ansys.geometry.core.math.point.Point3D) LineEvaluation #
Project a point onto the line and evaluate the line.
- Parameters:
- point
Point3D
Point to project onto the line.
- point
- Returns:
LineEvaluation
Resulting evaluation.
- Line.is_coincident_line(other: Line) bool #
Determine if the line is coincident with another line.
- Parameters:
- other
Line
Line to determine coincidence with.
- other
- Returns:
- bool
True
if the line is coincident with another line,False
otherwise.
- Line.is_opposite_line(other: Line) bool #
Determine if the line is opposite another line.
- Parameters:
- other
Line
Line to determine opposition with.
- other
- Returns:
- bool
True
if the line is opposite to another line.
- Line.parameterization() ansys.geometry.core.shapes.parameterization.Parameterization #
Get the parametrization of the line.
The parameter of a line specifies the distance from the origin in the direction of direction.
- Returns:
Parameterization
Information about how the line is parameterized.
- abstract Line.contains_param(param: ansys.geometry.core.typing.Real) bool #
Check a parameter is within the parametric range of the curve.
- abstract Line.contains_point(point: ansys.geometry.core.math.point.Point3D) bool #
Check a point is contained by the curve.
The point can either lie within the curve or on its boundary.