Class Extrusion

Hierarchy (view full)

Constructors

Properties

capCount: number

Gets the amount of capping surfaces.

hasBrepForm: boolean

Returns true if the Brep.TryConvertBrep function will be successful for this object

isCappedAtBottom: boolean

Gets a value indicating whether the surface that fills the bottom profile is existing.

isCappedAtTop: boolean

Gets a value indicating whether the surface that fills the top profile is existing.

isDeformable: boolean

true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.

isMiteredAtEnd: boolean

Gets a value indicating whether a miter plane at the end is defined.

isMiteredAtStart: boolean

Returns a value indicating whether a miter plane at start is defined.

isSolid: boolean

Gets a value indicating whether there is no gap among all surfaces constructing this object.

isValid: boolean

Tests an object to see if it is valid.

isValidWithLog: [boolean, string]

...

miterPlaneNormalAtEnd: number[]

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

miterPlaneNormalAtStart: number[]

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

objectType: ObjectType

Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.

pathEnd: number[]

Gets the end point of the path.

pathStart: number[]

Gets the start point of the path.

pathTangent: number[]

Gets the up vector of the path.

profileCount: number

Gets the amount of profile curves.

userStringCount: number

Gets the amount of user strings.

Methods

  • Parameters

    • innerProfile: Curve

      Closed curve in the XY plane or a 2d curve.

    Returns boolean

    true if the profile was set.

    Description

    Adds an inner profile.

  • Parameters

    • direction: number

      0 gets first parameter's domain, 1 gets second parameter's domain.

    Returns number

    The maximum degree.

    Description

    Returns the maximum algebraic degree of any span (or a good estimate if curve spans are not algebraic).

  • Parameters

    • direction: number

      0 gets first parameter, 1 gets second parameter.

    Returns number[]

    An interval value.

    Description

    Gets the domain in a direction.

  • Parameters

    • u: number

      A first parameter.

    • v: number

      A second parameter.

    Returns object

    [boolean, Plane] (boolean) true if this operation succeeded; otherwise false. (Plane) A frame plane that will be computed during this call.

    Description

    Computes the orient plane on a surface given a U and V parameter. This is the simple evaluation call with no error handling.

  • Parameters

    • accurate: boolean

      If true, a physically accurate bounding box will be computed. If not, a bounding box estimate will be computed. For some geometry types there is no difference between the estimate and the accurate bounding box. Estimated bounding boxes can be computed much (much) faster than accurate (or "tight") bounding boxes. Estimated bounding boxes are always similar to or larger than accurate bounding boxes.

    Returns BoundingBox

    The bounding box of the geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

    Description

    Bounding box solver. Gets the world axis aligned bounding box for the geometry.

  • Parameters

    Returns Mesh

    A mesh.

    Description

    Obtains a reference to a specified type of mesh for this extrusion.

  • Parameters

    • surfaceS: number

      The parameter in the S, or sometimes U, direction, of this surface.

    • surfaceT: number

      The parameter in the T, or sometimes V, direction of this surface.

    Returns object

    [boolean, number, number] (boolean) True if the operation succeeded; otherwise, false. (number) S on the NURBS form. (number) T on the NURBS form.

    Description

    Translates a parameter from the current surface to the parameter space of the surface returned by .

  • Parameters

    • s: number

      0.0 = starting profile 1.0 = ending profile.

    Returns Plane

    A plane. The plane is Invalid on failure.

    Description

    Gets the 3D plane perpendicular to the path at a normalized path parameter.

  • Parameters

    • s: number

      0.0 = starting profile 1.0 = ending profile.

    Returns Plane

    A plane. The plane is Invalid on failure.

    Description

    Gets the 3D plane containing the profile curve at a normalized path parameter.

  • Parameters

    • s: number

      0.0 = starting profile 1.0 = ending profile.

    Returns Transform

    A Transformation. The transform is Invalid on failure.

    Description

    Gets the transformation that maps the XY profile curve to its 3d location.

  • Parameters

    • direction: number

      0 gets first parameter's domain, 1 gets second parameter's domain.

    Returns number[]

    An array with span vectors; or null on error.

    Description

    Gets array of span "knots".

  • Parameters

    • nurbsS: number

      The parameter in the S, or sometimes U, direction of the NURBS form surface.

    • nurbsT: number

      The parameter in the T, or sometimes V, direction of the NURBS form surface.

    Returns object

    [boolean, number, number] (boolean) True if the operation succeeded; otherwise, false. (number) S on this surface. (number) T o n this surface.

    Description

    Translates a parameter from a value on the surface returned by to the current surface.

  • Parameters

    • key: string

      id used to retrieve the string.

    Returns string

    string associated with the key if successful. null if no key was found.

    Description

    Gets user string from this geometry.

  • Returns string[]

    Description

    Gets a copy of all (user key string, user value string) pairs attached to this geometry.

  • Parameters

    • u: number

      Surface u parameter to test.

    • v: number

      Surface v parameter to test.

    Returns number

    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.

    Description

    Tests if a surface parameter value is at a seam.

  • Parameters

    • u: number

      Surface u parameter to test.

    • v: number

      Surface v parameter to test.

    • exact: boolean

      If true, test if (u,v) is exactly at a singularity. If false, test if close enough to cause numerical problems.

    Returns boolean

    true if surface is singular at (s,t)

    Description

    Tests if a surface parameter value is at a singularity.

  • Parameters

    • direction: number

      0 = U, 1 = V.

    Returns boolean

    The indicating boolean value.

    Description

    Gets a value indicating if the surface is closed in a direction.

  • Returns boolean

    true if the surface is a portion of a cone.

    Description

    Determines if the surface is a portion of a cone within RhinoMath.ZeroTolerance.

  • Returns boolean

    true if the surface is a portion of a cylinder.

    Description

    Determines if the surface is a portion of a cylinder within RhinoMath.ZeroTolerance.

  • Parameters

    • direction: number

      0 = U, 1 = V.

    Returns boolean

    The indicating boolean value.

    Description

    Gets a value indicating if the surface is periodic in a direction (default is false).

  • Returns boolean

    true if the surface is planar (flat) to within RhinoMath.ZeroTolerance units (1e-12).

    Description

    Tests a surface to see if it is planar to zero tolerance.

  • Parameters

    • side: number

      side of parameter space to test 0 = south, 1 = east, 2 = north, 3 = west.

    Returns boolean

    True if this specific side of the surface is singular; otherwise, false.

    Description

    true if surface side is collapsed to a point.

  • Returns boolean

    true if the surface is a portion of a sphere.

    Description

    Determines if the surface is a portion of a sphere within RhinoMath.ZeroTolerance.

  • Returns boolean

    true if the surface is a portion of a torus.

    Description

    Determines if the surface is a portion of a torus within RhinoMath.ZeroTolerance.

  • Parameters

    • direction: number

      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: number

      The parameter that was constant on the original surface.

    Returns Curve

    An isoparametric curve or null on error.

    Description

    Gets isoparametric curve.

  • Returns boolean

    false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.

    Description

    If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.

  • Parameters

    • u: number

      A U parameter.

    • v: number

      A V parameter.

    Returns number[]

    The normal.

    Description

    Computes the surface normal at a point. This is the simple evaluation call - it does not support error handling.

  • Returns LineCurve

    The path as a line curve.

    Description

    Gets the line-like curve that is the conceptual axis of the extrusion.

  • Returns LineCurve

    The path as a line curve.

    Description

    Gets the line-like curve that is the conceptual axis of the extrusion.

  • Parameters

    • u: number

      evaluation parameters.

    • v: number

      evaluation parameters.

    Returns number[]

    Point3d.Unset on failure.

    Description

    Evaluates a point at a given parameter.

  • Parameters

    • profileIndex: number

      0 <= profileIndex < ProfileCount The outer profile has index 0.

    • s: number

      0.0 <= s <= 1.0 A relative parameter controlling which profile is returned. 0 = bottom profile and 1 = top profile.

    Returns Curve

    The profile.

    Description

    Gets a transversal isocurve of the extruded profile.

  • Parameters

    • profileParameter: number

      Parameter on profile curve.

    Returns number

    -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.

    Description

    Gets the index of the profile curve at a domain related to a parameter.

  • Parameters

    • angleRadians: number

      Angle of rotation in radians.

    • rotationAxis: number[]

      Direction of the axis of rotation.

    • rotationCenter: number[]

      Point on the axis of rotation.

    Returns boolean

    true if geometry successfully rotated.

    Description

    Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).

  • Parameters

    • scaleFactor: number

      The uniform scaling factor.

    Returns boolean

    true if geometry successfully scaled.

    Description

    Scales the object by the specified factor. The scale is centered at the origin.

  • Parameters

    • direction: number

      0 sets first parameter's domain, 1 sets second parameter's domain.

    • domain: number[]

      A new domain to be assigned.

    Returns boolean

    true if setting succeeded, otherwise false.

    Description

    Sets the domain in a direction.

  • Parameters

    Returns boolean

    True on success.

    Description

    Sets a specified type of mesh for this extrusion.

  • Parameters

    • outerProfile: Curve

      curve in the XY plane or a 2D curve.

    • cap: boolean

      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 boolean

    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.

    Description

    Sets the outer profile of the extrusion.

  • Parameters

    • a: number[]

      The start point.

    • b: number[]

      The end point.

    • up: number[]

      The up vector.

    Returns boolean

    true if the operation succeeded; otherwise false. Setting up=a-b will make the operation fail.

    Description

    Allows to set the two points at the extremes and the up vector.

  • Parameters

    • key: string

      id used to retrieve this string.

    • value: string

      string associated with key.

    Returns boolean

    true if successful, false if not.

    Description

    Attach a user string (key,value combination) to this geometry.

  • Parameters

    • direction: number

      0 gets first parameter's domain, 1 gets second parameter's domain.

    Returns number

    The span count.

    Description

    Gets number of smooth nonempty spans in the parameter direction.

  • Parameters

    • splitKinkyFaces: boolean

      If true and the profiles have kinks, then the faces corresponding to those profiles are split so they will be G1.

    Returns Brep

    A brep with a similar shape like this extrusion, or null on error.

    Description

    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

    • xform: Transform

      Transformation to apply to geometry.

    Returns boolean

    true if geometry successfully transformed.

    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.

  • Parameters

    • translationVector: number[]

      A moving vector.

    Returns boolean

    true if geometry successfully translated.

    Description

    Translates the object along the specified vector.

  • Parameters

    • planarCurve: Curve

      Planar curve used as profile

    • height: number

      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: boolean

      If the curve is closed and cap is true, then the resulting extrusion is capped.

    Returns Extrusion

    If the input is valid, then a new extrusion is returned. Otherwise null is returned

    Description

    Creates an extrusion of a 3d curve (which must be planar) and a height.

  • Parameters

    • box: Box

      IsValid must be true.

    • cap: boolean

      If true, the base and the top of the box will be capped. Defaults to true.

    Returns Extrusion

    Extrusion on success. null on failure.

    Description

    Gets an extrusion from a box.

  • Parameters

    • cylinder: Cylinder

      IsFinite must be true.

    • capBottom: boolean

      If true, the end at cylinder.Height1 will be capped.

    • capTop: boolean

      If true, the end at cylinder.Height2 will be capped.

    Returns Extrusion

    Extrusion on success. null on failure.

    Description

    Gets an extrusion form of a cylinder.

  • Parameters

    • cylinder: Cylinder

      IsFinite must be true.

    • otherRadius: number

      If cylinder.Radius is less than other radius, then the cylinder will be the inside of the pipe.

    • capBottom: boolean

      If true, the end at cylinder.Height1 will be capped.

    • capTop: boolean

      If true, the end at cylinder.Height2 will be capped.

    Returns Extrusion

    Extrusion on success. null on failure.

    Description

    Gets an extrusion form of a pipe.

  • Parameters

    • json: object

      A json formatted object in the following format (values are orientative):

      {
      version: 10000,
      archive3dm: 60,
      opennurbs: -1877964208,
      data: 'encoded 3dm object data'
      }

    Returns CommonObject

    Description

    Decodes a Rhino Object

Generated using TypeDoc