Extrusion

Extrusion

Represents an extrusion, or objects such as beams or linearly extruded elements, that can be represented by profile curves and two miter planes at the extremes.

Constructor

new Extrusion()

Extends

Members

capCount :int

Gets the amount of capping surfaces.
Type:
  • int

hasBrepForm :bool

Inherited From:
Returns true if the Brep.TryConvertBrep function will be successful for this object
Type:
  • bool

isCappedAtBottom :bool

Gets a value indicating whether the surface that fills the bottom profile is existing.
Type:
  • bool

isCappedAtTop :bool

Gets a value indicating whether the surface that fills the top profile is existing.
Type:
  • bool

isDeformable :bool

Inherited From:
true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.
Type:
  • bool

isMiteredAtEnd :bool

Gets a value indicating whether a miter plane at the end is defined.
Type:
  • bool

isMiteredAtStart :bool

Returns a value indicating whether a miter plane at start is defined.
Type:
  • bool

isSolid :bool

Overrides:
Gets a value indicating whether there is no gap among all surfaces constructing this object.
Type:
  • bool

isValid :bool

Inherited From:
Tests an object to see if it is valid.
Type:
  • bool

miterPlaneNormalAtEnd :Array.<x, y, z>

Gets or sets the normal of the miter plane at the end in profile coordinates. In profile coordinates, 0,0,1 always maps to the extrusion axis
Type:
  • Array.<x, y, z>

miterPlaneNormalAtStart :Array.<x, y, z>

Gets or sets the normal of the miter plane at the start in profile coordinates. In profile coordinates, 0,0,1 always maps to the extrusion axis
Type:
  • Array.<x, y, z>

objectType :ObjectType

Inherited From:
Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
Type:
  • ObjectType

pathEnd :Array.<x, y, z>

Gets the end point of the path.
Type:
  • Array.<x, y, z>

pathStart :Array.<x, y, z>

Gets the start point of the path.
Type:
  • Array.<x, y, z>

pathTangent :Array.<x, y, z>

Gets the up vector of the path.
Type:
  • Array.<x, y, z>

profileCount :int

Gets the amount of profile curves.
Type:
  • int

userStringCount

Inherited From:

Methods

(static) create(planarCurve, height, cap) → {Extrusion}

Creates an extrusion of a 3d curve (which must be planar) and a height.
Parameters:
Name Type Description
planarCurve Curve Planar curve used as profile
height double If the height > 0, the bottom of the extrusion will be in plane and the top will be height units above the plane. If the height < 0, the top of the extrusion will be in plane and the bottom will be height units below the plane. The plane used is the one that is returned from the curve's TryGetPlane function.
cap bool If the curve is closed and cap is true, then the resulting extrusion is capped.
Returns:
If the input is valid, then a new extrusion is returned. Otherwise null is returned
Type
Extrusion

(static) createBoxExtrusion(box, cap) → {Extrusion}

Gets an extrusion from a box.
Parameters:
Name Type Description
box Box IsValid must be true.
cap bool If true, the base and the top of the box will be capped. Defaults to true.
Returns:
Extrusion on success. null on failure.
Type
Extrusion

(static) createCylinderExtrusion(cylinder, capBottom, capTop) → {Extrusion}

Gets an extrusion form of a cylinder.
Parameters:
Name Type Description
cylinder Cylinder IsFinite must be true.
capBottom bool If true, the end at cylinder.Height1 will be capped.
capTop bool If true, the end at cylinder.Height2 will be capped.
Returns:
Extrusion on success. null on failure.
Type
Extrusion

(static) createPipeExtrusion(cylinder, otherRadius, capBottom, capTop) → {Extrusion}

Gets an extrusion form of a pipe.
Parameters:
Name Type Description
cylinder Cylinder IsFinite must be true.
otherRadius double If cylinder.Radius is less than other radius, then the cylinder will be the inside of the pipe.
capBottom bool If true, the end at cylinder.Height1 will be capped.
capTop bool If true, the end at cylinder.Height2 will be capped.
Returns:
Extrusion on success. null on failure.
Type
Extrusion

addInnerProfile(innerProfile) → {bool}

Adds an inner profile.
Parameters:
Name Type Description
innerProfile Curve Closed curve in the XY plane or a 2d curve.
Returns:
true if the profile was set.
Type
bool

degree(direction) → {int}

Inherited From:
Returns the maximum algebraic degree of any span (or a good estimate if curve spans are not algebraic).
Parameters:
Name Type Description
direction int 0 gets first parameter's domain, 1 gets second parameter's domain.
Returns:
The maximum degree.
Type
int

domain(direction) → {Interval}

Inherited From:
Gets the domain in a direction.
Parameters:
Name Type Description
direction int 0 gets first parameter, 1 gets second parameter.
Returns:
An interval value.
Type
Interval

duplicate() → {GeometryBase}

Inherited From:
Constructs a deep (full) copy of this object.
Returns:
An object of the same type as this, with the same properties and behavior.
Type
GeometryBase

encode()

Inherited From:
...

frameAt(u, v) → {Array}

Inherited From:
Computes the orient plane on a surface given a U and V parameter. This is the simple evaluation call with no error handling.
Parameters:
Name Type Description
u double A first parameter.
v double A second parameter.
Returns:
[bool, Plane]
  • (bool) true if this operation succeeded; otherwise false.
  • (Plane) A frame plane that will be computed during this call.
Type
Array

getBoundingBox(plane) → {Array}

Inherited From:
Aligned Bounding box solver. Gets the plane aligned bounding box.
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

getMesh(meshType) → {Mesh}

Obtains a reference to a specified type of mesh for this extrusion.
Parameters:
Name Type Description
meshType MeshType The mesh type.
Returns:
A mesh.
Type
Mesh

getNurbsFormParameterFromSurfaceParameter(surfaceS, surfaceT) → {Array}

Inherited From:
Translates a parameter from the current surface to the parameter space of the surface returned by .
Parameters:
Name Type Description
surfaceS double The parameter in the S, or sometimes U, direction, of this surface.
surfaceT double The parameter in the T, or sometimes V, direction of this surface.
Returns:
[bool, double, double]
  • (bool) True if the operation succeeded; otherwise, false.
  • (double) S on the NURBS form.
  • (double) T on the NURBS form.
Type
Array

getPathPlane(s) → {Plane}

Gets the 3D plane perpendicular to the path at a normalized path parameter.
Parameters:
Name Type Description
s double 0.0 = starting profile 1.0 = ending profile.
Returns:
A plane. The plane is Invalid on failure.
Type
Plane

getProfilePlane(s) → {Plane}

Gets the 3D plane containing the profile curve at a normalized path parameter.
Parameters:
Name Type Description
s double 0.0 = starting profile 1.0 = ending profile.
Returns:
A plane. The plane is Invalid on failure.
Type
Plane

getProfileTransformation(s) → {Transform}

Gets the transformation that maps the XY profile curve to its 3d location.
Parameters:
Name Type Description
s double 0.0 = starting profile 1.0 = ending profile.
Returns:
A Transformation. The transform is Invalid on failure.
Type
Transform

getSpanVector(direction) → {Array.<double>}

Inherited From:
Gets array of span "knots".
Parameters:
Name Type Description
direction int 0 gets first parameter's domain, 1 gets second parameter's domain.
Returns:
An array with span vectors; or null on error.
Type
Array.<double>

getSurfaceParameterFromNurbsFormParameter(nurbsS, nurbsT) → {Array}

Inherited From:
Translates a parameter from a value on the surface returned by to the current surface.
Parameters:
Name Type Description
nurbsS double The parameter in the S, or sometimes U, direction of the NURBS form surface.
nurbsT double The parameter in the T, or sometimes V, direction of the NURBS form surface.
Returns:
[bool, double, double]
  • (bool) True if the operation succeeded; otherwise, false.
  • (double) S on this surface.
  • (double) T o n this surface.
Type
Array

getUserString()

Inherited From:
...

getUserStrings()

Inherited From:
...

isAtSeam(u, v) → {int}

Inherited From:
Tests if a surface parameter value is at a seam.
Parameters:
Name Type Description
u double Surface u parameter to test.
v double Surface v parameter to test.
Returns:
0 if not a seam, 1 if u == Domain(0)[i] and srf(u, v) == srf(Domain(0)[1-i], v) 2 if v == Domain(1)[i] and srf(u, v) == srf(u, Domain(1)[1-i]) 3 if 1 and 2 are true.
Type
int

isAtSingularity(u, v, exact) → {bool}

Inherited From:
Tests if a surface parameter value is at a singularity.
Parameters:
Name Type Description
u double Surface u parameter to test.
v double Surface v parameter to test.
exact bool If true, test if (u,v) is exactly at a singularity. If false, test if close enough to cause numerical problems.
Returns:
true if surface is singular at (s,t)
Type
bool

isClosed(direction) → {bool}

Inherited From:
Gets a value indicating if the surface is closed in a direction.
Parameters:
Name Type Description
direction int 0 = U, 1 = V.
Returns:
The indicating boolean value.
Type
bool

isCone(tolerance) → {bool}

Inherited From:
Determines if the surface is a portion of a cone within a given tolerance.
Parameters:
Name Type Description
tolerance double tolerance to use when checking.
Returns:
true if the surface is a portion of a cone.
Type
bool

isCylinder(tolerance) → {bool}

Inherited From:
Determines if the surface is a portion of a cylinder within a given tolerance.
Parameters:
Name Type Description
tolerance double tolerance to use when checking.
Returns:
true if the surface is a portion of a cylinder.
Type
bool

isoCurve(direction, constantParameter) → {Curve}

Inherited From:
Gets isoparametric curve.
Parameters:
Name Type Description
direction int 0 first parameter varies and second parameter is constant e.g., point on IsoCurve(0,c) at t is srf(t,c) This is a horizontal line from left to right 1 first parameter is constant and second parameter varies e.g., point on IsoCurve(1,c) at t is srf(c,t This is a vertical line from bottom to top.
constantParameter double The parameter that was constant on the original surface.
Returns:
An isoparametric curve or null on error.
Type
Curve

isPeriodic(direction) → {bool}

Inherited From:
Gets a value indicating if the surface is periodic in a direction (default is false).
Parameters:
Name Type Description
direction int 0 = U, 1 = V.
Returns:
The indicating boolean value.
Type
bool

isPlanar(tolerance) → {bool}

Inherited From:
Tests a surface to see if it is planar to a given tolerance.
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 surface to the plane is <= tolerance.
Type
bool

isSingular(side) → {bool}

Inherited From:
true if surface side is collapsed to a point.
Parameters:
Name Type Description
side int side of parameter space to test 0 = south, 1 = east, 2 = north, 3 = west.
Returns:
True if this specific side of the surface is singular; otherwise, false.
Type
bool

isSphere(tolerance) → {bool}

Inherited From:
Determines if the surface is a portion of a sphere within a given tolerance.
Parameters:
Name Type Description
tolerance double tolerance to use when checking.
Returns:
true if the surface is a portion of a sphere.
Type
bool

isTorus(tolerance) → {bool}

Inherited From:
Determines if the surface is a portion of a torus within a given tolerance.
Parameters:
Name Type Description
tolerance double tolerance to use when checking.
Returns:
true if the surface is a portion of a torus.
Type
bool

makeDeformable() → {bool}

Inherited From:
If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
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

normalAt(u, v) → {Array.<x, y, z>}

Inherited From:
Computes the surface normal at a point. This is the simple evaluation call - it does not support error handling.
Parameters:
Name Type Description
u double A U parameter.
v double A V parameter.
Returns:
The normal.
Type
Array.<x, y, z>

pathLineCurve() → {LineCurve}

Gets the line-like curve that is the conceptual axis of the extrusion.
Returns:
The path as a line curve.
Type
LineCurve

pathLineCurve() → {LineCurve}

Gets the line-like curve that is the conceptual axis of the extrusion.
Returns:
The path as a line curve.
Type
LineCurve

pointAt(u, v) → {Array.<x, y, z>}

Inherited From:
Evaluates a point at a given parameter.
Parameters:
Name Type Description
u double evaluation parameters.
v double evaluation parameters.
Returns:
Point3d.Unset on failure.
Type
Array.<x, y, z>

profile3d(profileIndex, s) → {Curve}

Gets a transversal isocurve of the extruded profile.
Parameters:
Name Type Description
profileIndex int 0 <= profileIndex < ProfileCount The outer profile has index 0.
s double 0.0 <= s <= 1.0 A relative parameter controlling which profile is returned. 0 = bottom profile and 1 = top profile.
Returns:
The profile.
Type
Curve

profileIndex(profileParameter) → {int}

Gets the index of the profile curve at a domain related to a parameter.
Parameters:
Name Type Description
profileParameter double Parameter on profile curve.
Returns:
-1 if profileParameter does not correspond to a point on the profile curve. When the profileParameter corresponds to the end of one profile and the beginning of the next profile, the index of the next profile is returned.
Type
int

rdkXml()

Inherited From:
...

rotate(angleRadians, rotationAxis, rotationCenter) → {bool}

Inherited From:
Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
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}

Inherited From:
Scales the object by the specified factor. The scale is centered at the origin.
Parameters:
Name Type Description
scaleFactor double The uniform scaling factor.
Returns:
true if geometry successfully scaled.
Type
bool

setDomain(direction, domain) → {bool}

Inherited From:
Sets the domain in a direction.
Parameters:
Name Type Description
direction int 0 sets first parameter's domain, 1 sets second parameter's domain.
domain Interval A new domain to be assigned.
Returns:
true if setting succeeded, otherwise false.
Type
bool

setOuterProfile(outerProfile, cap) → {bool}

Sets the outer profile of the extrusion.
Parameters:
Name Type Description
outerProfile Curve curve in the XY plane or a 2D curve.
cap bool If outerProfile is a closed curve, then cap determines if the extrusion has end caps. If outerProfile is an open curve, cap is ignored.
Returns:
true if the profile was set. If the outer profile is closed, then the extrusion may also have inner profiles. If the outer profile is open, the extrusion may not have inner profiles. If the extrusion already has a profile, the set will fail.
Type
bool

setPathAndUp(a, b, up) → {bool}

Allows to set the two points at the extremes and the up vector.
Parameters:
Name Type Description
a Array.<x, y, z> The start point.
b Array.<x, y, z> The end point.
up Array.<x, y, z> The up vector.
Returns:
true if the operation succeeded; otherwise false. Setting up=a-b will make the operation fail.
Type
bool

setUserString()

Inherited From:
...

spanCount(direction) → {int}

Inherited From:
Gets number of smooth nonempty spans in the parameter direction.
Parameters:
Name Type Description
direction int 0 gets first parameter's domain, 1 gets second parameter's domain.
Returns:
The span count.
Type
int

toBrep(splitKinkyFaces) → {Brep}

Constructs a brep form of the extrusion. The outer profile is always the first face of the brep. If there are inner profiles, additional brep faces are created for each profile. If the outer profile is closed, then end caps are added as the last two faces of the brep.
Parameters:
Name Type Description
splitKinkyFaces bool If true and the profiles have kinks, then the faces corresponding to those profiles are split so they will be G1.
Returns:
A brep with a similar shape like this extrusion, or null on error.
Type
Brep

toJSON()

Inherited From:
Create a JSON string representation of this object

toNurbsSurface() → {NurbsSurface}

Inherited From:
Gets a NURBS surface representation of this surface. Default tolerance of 0.0 is used.
Returns:
NurbsSurface on success, null on failure.
Type
NurbsSurface

transform(xform) → {bool}

Inherited From:
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.
Parameters:
Name Type Description
xform Transform Transformation to apply to geometry.
Returns:
true if geometry successfully transformed.
Type
bool

translate(translationVector) → {bool}

Inherited From:
Translates the object along the specified vector.
Parameters:
Name Type Description
translationVector Array.<x, y, z> A moving vector.
Returns:
true if geometry successfully translated.
Type
bool

wallEdge(ci) → {Curve}

Gets one of the longitudinal curves along the beam or extrusion.
Parameters:
Name Type Description
ci ComponentIndex The index of this profile.
Returns:
The profile.
Type
Curve

wallSurface(ci) → {Surface}

Gets one of the longitudinal surfaces of the extrusion.
Parameters:
Name Type Description
ci ComponentIndex The index specifying which precise item to retrieve.
Returns:
The surface.
Type
Surface