Constructor
new LineCurve(from, to)
- Description:
- Initializes a new instance of the class, by setting start and end point from two 3D points.
Parameters:
Name | Type | Description |
---|---|---|
from |
Array.<x, y, z> | A start point. |
to |
Array.<x, y, z> | An end point. |
Extends
Members
degree :int
- Description:
- Gets the maximum algebraic degree of any span or a good estimate if curve spans are not algebraic.
- Overrides:
Gets the maximum algebraic degree of any span
or a good estimate if curve spans are not algebraic.
Type:
- int
dimension :int
- Description:
- Gets the dimension of the object. The dimension is typically three. For parameter space trimming curves the dimension is two. In rare cases the dimension can be one or greater than three.
- Overrides:
Gets the dimension of the object.
The dimension is typically three. For parameter space trimming
curves the dimension is two. In rare cases the dimension can
be one or greater than three.
Type:
- int
domain :Interval
- Description:
- Gets or sets the domain of the curve.
- Overrides:
Gets or sets the domain of the curve.
Type:
- Interval
hasBrepForm :bool
- Description:
- Returns true if the Brep.TryConvertBrep function will be successful for this object
- Overrides:
Returns true if the Brep.TryConvertBrep function will be successful for this object
Type:
- bool
isClosed :bool
- Description:
- Gets a value indicating whether or not this curve is a closed curve.
- Overrides:
Gets a value indicating whether or not this curve is a closed curve.
Type:
- bool
isDeformable :bool
- Description:
- true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.
- Overrides:
true if object can be accurately modified with "squishy" transformations like
projections, shears, and non-uniform scaling.
Type:
- bool
isPeriodic :bool
- Description:
- Gets a value indicating whether or not this curve is considered to be Periodic.
- Overrides:
Gets a value indicating whether or not this curve is considered to be Periodic.
Type:
- bool
isValid :bool
- Description:
- Tests an object to see if it is valid.
- Overrides:
Tests an object to see if it is valid.
Type:
- bool
line :Line
- Description:
- Gets or sets the Line value inside this curve.
Gets or sets the Line value inside this curve.
Type:
objectType :ObjectType
- Description:
- Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
- Overrides:
Useful for switch statements that need to differentiate between
basic object types like points, curves, surfaces, and so on.
Type:
- ObjectType
pointAtEnd :Array.<x, y, z>
- Description:
- Evaluates point at the end of the curve.
- Overrides:
Evaluates point at the end of the curve.
Type:
- Array.<x, y, z>
pointAtStart :Array.<x, y, z>
- Description:
- Evaluates point at the start of the curve.
- Overrides:
Evaluates point at the start of the curve.
Type:
- Array.<x, y, z>
spanCount :int
- Description:
- Gets the number of non-empty smooth (c-infinity) spans in the curve.
- Overrides:
Gets the number of non-empty smooth (c-infinity) spans in the curve.
Type:
- int
tangentAtEnd :Array.<x, y, z>
- Description:
- Evaluate unit tangent vector at the end of the curve.
- Overrides:
Evaluate unit tangent vector at the end of the curve.
Type:
- Array.<x, y, z>
tangentAtStart :Array.<x, y, z>
- Description:
- Evaluates the unit tangent vector at the start of the curve.
- Overrides:
Evaluates the unit tangent vector at the start of the curve.
Type:
- Array.<x, y, z>
userStringCount
- Overrides:
Methods
changeClosedCurveSeam(t) → {bool}
- Description:
- If this curve is closed, then modify it so that the start/end point is at curve parameter t.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
t |
double | Curve parameter of new start/end point. The returned curves domain will start at t. |
Returns:
true on success, false on failure.
- Type
- bool
changeDimension(desiredDimension) → {bool}
- Description:
- Changes the dimension of a curve.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
desiredDimension |
int | The desired dimension. |
Returns:
true if the curve's dimension was already desiredDimension
or if the curve's dimension was successfully changed to desiredDimension;
otherwise false.
- Type
- bool
closedCurveOrientation() → {CurveOrientation}
- Description:
- Determines the orientation (counterclockwise or clockwise) of a closed, planar curve in the world XY plane. Only works with simple (no self intersections) closed, planar curves.
- Overrides:
Returns:
The orientation of this curve with respect to world XY plane.
- Type
- CurveOrientation
closedCurveOrientationPlane()
- Description:
- ...
- Overrides:
curvatureAt(t) → {Array.<x, y, z>}
- Description:
- Evaluate the curvature vector at a curve parameter.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
t |
double | Evaluation parameter. |
Returns:
Curvature vector of the curve at the parameter t.
- Type
- Array.<x, y, z>
derivativeAt(t, derivativeCount) → {Array.<Vector3d>}
- Description:
- Evaluate the derivatives at the specified curve parameter.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
t |
double | Curve parameter to evaluate. |
derivativeCount |
int | Number of derivatives to evaluate, must be at least 0. |
Returns:
An array of vectors that represents all the derivatives starting at zero.
- Type
- Array.<Vector3d>
derivativeAtSide()
- Description:
- ...
- Overrides:
duplicate() → {GeometryBase}
- Description:
- Constructs a deep (full) copy of this object.
- Overrides:
Returns:
An object of the same type as this, with the same properties and behavior.
- Type
- GeometryBase
encode()
- Description:
- ...
- Overrides:
frameAt(t) → {Array}
- Description:
- Returns a 3d frame at a parameter.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
t |
double | Evaluation parameter. |
Returns:
[bool, Plane]
- (bool) true on success, false on failure.
- (Plane) The frame is returned here.
- Type
- Array
getBoundingBox(plane) → {Array}
- Description:
- Aligned Bounding box solver. Gets the plane aligned bounding box.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
plane |
Plane | Orientation plane for BoundingBox. |
Returns:
[BoundingBox, Box]
- (BoundingBox) A BoundingBox in plane coordinates.
- (Box) Aligned box in World coordinates.
- Type
- Array
getCurveParameterFromNurbsFormParameter(nurbsParameter) → {Array}
- Description:
- Convert a NURBS curve parameter to a curve parameter.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
nurbsParameter |
double | NURBS form parameter. |
Returns:
[bool, double]
- (bool) true on success, false on failure.
- (double) Curve parameter.
- Type
- Array
getNurbsFormParameterFromCurveParameter(curveParameter) → {Array}
- Description:
- Convert a curve parameter to a NURBS curve parameter.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
curveParameter |
double | Curve parameter. |
Returns:
[bool, double]
- (bool) true on success, false on failure.
- (double) NURBS form parameter.
- Type
- Array
getUserString()
- Description:
- ...
- Overrides:
getUserStrings()
- Description:
- ...
- Overrides:
isArc(tolerance) → {bool}
- Description:
- Test a curve to see if it can be represented by an arc or circle within the given tolerance.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
tolerance |
double | Tolerance to use when checking. |
Returns:
true if the curve can be represented by an arc or a circle within tolerance.
- Type
- bool
isCircle(tolerance) → {bool}
- Description:
- Test a curve to see if it can be represented by a circle within the given tolerance.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
tolerance |
double | Tolerance to use when checking. |
Returns:
true if the curve can be represented by a circle to within tolerance.
- Type
- bool
isEllipse(tolerance) → {bool}
- Description:
- Test a curve to see if it can be represented by an ellipse within a given tolerance.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
tolerance |
double | Tolerance to use for checking. |
Returns:
true if the Curve can be represented by an ellipse within tolerance.
- Type
- bool
isLinear(tolerance) → {bool}
- Description:
- Test a curve to see if it is linear to within the custom tolerance.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
tolerance |
double | Tolerance to use when checking linearity. |
Returns:
true if the ends of the curve are farther than tolerance apart
and the maximum distance from any point on the curve to
the line segment connecting the curve ends is <= tolerance.
- Type
- bool
isPlanar(tolerance) → {bool}
- Description:
- Test a curve for planarity.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
tolerance |
double | Tolerance to use when checking. |
Returns:
true if there is a plane such that the maximum distance from the curve to the plane is <= tolerance.
- Type
- bool
isPolyline() → {bool}
- Description:
- Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.
- Overrides:
Returns:
true if this curve can be represented as a polyline; otherwise, false.
- Type
- bool
makeDeformable() → {bool}
- Description:
- If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
- Overrides:
Returns:
false if object cannot be converted to a deformable object. true if object was
already deformable or was converted into a deformable object.
- Type
- bool
pointAt(t) → {Array.<x, y, z>}
- Description:
- Evaluates point at a curve parameter.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
t |
double | Evaluation parameter. |
Returns:
Point (location of curve at the parameter t).
- Type
- Array.<x, y, z>
rdkXml()
- Description:
- ...
- Overrides:
reverse() → {bool}
- Description:
- Reverses the direction of the curve.
- Overrides:
Returns:
true on success, false on failure.
- Type
- bool
rotate(angleRadians, rotationAxis, rotationCenter) → {bool}
- Description:
- Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
angleRadians |
double | Angle of rotation in radians. |
rotationAxis |
Array.<x, y, z> | Direction of the axis of rotation. |
rotationCenter |
Array.<x, y, z> | Point on the axis of rotation. |
Returns:
true if geometry successfully rotated.
- Type
- bool
scale(scaleFactor) → {bool}
- Description:
- Scales the object by the specified factor. The scale is centered at the origin.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
scaleFactor |
double | The uniform scaling factor. |
Returns:
true if geometry successfully scaled.
- Type
- bool
setEndPoint(point) → {bool}
- Description:
- Forces the curve to end at a specified point. Not all curve types support this operation.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
point |
Array.<x, y, z> | New end point of curve. |
Returns:
true on success, false on failure.
- Type
- bool
setStartPoint(point) → {bool}
- Description:
- Forces the curve to start at a specified point. Not all curve types support this operation.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
point |
Array.<x, y, z> | New start point of curve. |
Returns:
true on success, false on failure.
- Type
- bool
setUserString()
- Description:
- ...
- Overrides:
split(t) → {Array.<Curve>}
- Description:
- Splits (divides) the curve at the specified parameter. The parameter must be in the interior of the curve's domain.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
t |
double | Parameter to split the curve at in the interval returned by Domain(). |
Returns:
Two curves on success, null on failure.
- Type
- Array.<Curve>
tangentAt(t) → {Array.<x, y, z>}
- Description:
- Evaluates the unit tangent vector at a curve parameter.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
t |
double | Evaluation parameter. |
Returns:
Unit tangent vector of the curve at the parameter t.
- Type
- Array.<x, y, z>
toJSON()
- Description:
- Create a JSON string representation of this object
- Overrides:
toNurbsCurve() → {NurbsCurve}
- Description:
- Constructs a NURBS curve representation of this curve.
- Overrides:
Returns:
NURBS representation of the curve on success, null on failure.
- Type
- NurbsCurve
toNurbsCurveSubDomain()
- Description:
- ...
- Overrides:
transform(xform) → {bool}
- Description:
- Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
xform |
Transform | Transformation to apply to geometry. |
Returns:
true if geometry successfully transformed.
- Type
- bool
translate(translationVector) → {bool}
- Description:
- Translates the object along the specified vector.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
translationVector |
Array.<x, y, z> | A moving vector. |
Returns:
true if geometry successfully translated.
- Type
- bool
trim(t0, t1) → {Curve}
- Description:
- Removes portions of the curve outside the specified interval.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
t0 |
double | Start of the trimming interval. Portions of the curve before curve(t0) are removed. |
t1 |
double | End of the trimming interval. Portions of the curve after curve(t1) are removed. |
Returns:
Trimmed portion of this curve is successful, null on failure.
- Type
- Curve
tryGetArc(tolerance) → {Array}
- Description:
- Try to convert this curve into an Arc using a custom tolerance.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
tolerance |
double | Tolerance to use when checking. |
Returns:
[bool, Arc]
- (bool) true if the curve could be converted into an arc.
- (Arc) On success, the Arc will be filled in.
- Type
- Array
tryGetCircle(tolerance) → {Array}
- Description:
- Try to convert this curve into a Circle using a custom tolerance.
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
tolerance |
double | Tolerance to use when checking. |
Returns:
[bool, Circle]
- (bool) true if the curve could be converted into a Circle within tolerance.
- (Circle) On success, the Circle will be filled in.
- Type
- Array
tryGetPolyline() → {Array}
- Description:
- Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.
- Overrides:
Returns:
[bool, Polyline]
- (bool) true if this curve can be represented as a polyline; otherwise, false.
- (Polyline) If true is returned, then the polyline form is returned here.
- Type
- Array