Rhino C++ API  8.6
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ON_Extrusion Class Reference

#include <opennurbs_beam.h>

Inheritance diagram for ON_Extrusion:
ON_Surface ON_Geometry ON_Object

Public Member Functions

 ON_Extrusion ()
 
 ON_Extrusion (const ON_Extrusion &src)
 
 ~ON_Extrusion ()
 
bool AddInnerProfile (ON_Curve *inner_profile)
 
ON_BrepBrepForm (ON_Brep *brep, bool bSmoothFaces) const
 
ON_BrepBrepForm (ON_Brep *brep=nullptr) const override
 
int CapCount () const
 
ON_MeshCreateMesh (const ON_MeshParameters &mp, ON_Mesh *mesh=nullptr) const override
 
ON__UINT32 DataCRC (ON__UINT32 current_remainder) const override
 
int Degree (int dir) const override
 
void Destroy ()
 
void DestroyMesh (ON::mesh_type mt)
 
void DestroyRuntimeCache (bool bDelete=true) override
 
int Dimension () const override
 
ON_Interval Domain (int dir) const override
 
void Dump (ON_TextLog &) const override
 
bool Evaluate (double u, double v, int num_der, int array_stride, double *der_array, int quadrant=0, int *hint=0) const override
 work horse evaluator More...
 
bool Extend (int dir, const ON_Interval &domain) override
 
int FaceCount () const
 
bool GetBBox (double *boxmin, double *boxmax, bool bGrowBox=false) const override
 virtual ON_Geometry GetBBox override
More...
 
bool GetBrepFormComponentIndex (ON_COMPONENT_INDEX extrusion_ci, double extrusion_profile_parameter, const ON_Brep &brep_form, ON_COMPONENT_INDEX &brep_ci) const
 
bool GetBrepFormComponentIndex (ON_COMPONENT_INDEX extrusion_ci, double extrusion_profile_parameter, const ON_Brep *brep_form, bool bSmoothFaces, ON_COMPONENT_INDEX &brep_ci, ON_Interval *profile_subdomain) const
 
bool GetBrepFormComponentIndex (ON_COMPONENT_INDEX extrusion_ci, double extrusion_profile_parameter, const ON_Brep *brep_form, ON_COMPONENT_INDEX &brep_ci) const
 
bool GetBrepFormComponentIndex (ON_COMPONENT_INDEX extrusion_ci, ON_COMPONENT_INDEX &brep_ci) const
 
bool GetClosestPoint (const ON_3dPoint &P, double *s, double *t, double maximum_distance=0.0, const ON_Interval *sdomain=0, const ON_Interval *tdomain=0) const override
 
bool GetLocalClosestPoint (const ON_3dPoint &, double, double, double *, double *, const ON_Interval *=nullptr, const ON_Interval *=nullptr) const override
 
void GetMiterPlaneNormal (int end, ON_3dVector &N) const
 
bool GetNextDiscontinuity (int dir, ON::continuity c, double t0, double t1, double *t, int *hint=nullptr, int *dtype=nullptr, double cos_angle_tolerance=ON_DEFAULT_ANGLE_TOLERANCE_COSINE, double curvature_tolerance=ON_SQRT_EPSILON) const override
 
int GetNurbForm (ON_NurbsSurface &nurbs_surface, double tolerance=0.0) const override
 
bool GetNurbFormParameterFromSurfaceParameter (double surface_s, double surface_t, double *nurbs_s, double *nurbs_t) const override
 
bool GetParameterTolerance (int dir, double t, double *tminus, double *tplus) const override
 
bool GetPathPlane (double s, ON_Plane &plane) const
 
int GetProfileCurves (ON_SimpleArray< const ON_Curve * > &profile_curves) const
 
int GetProfileKinkParameters (int profile_index, ON_SimpleArray< double > &profile_kink_parameters) const
 
int GetProfileKinkParameters (int profile_index, ON_SimpleArray< double > *profile_kink_parameters) const
 
bool GetProfilePlane (double s, ON_Plane &plane) const
 
bool GetProfileTransformation (double s, ON_Xform &xform) const
 
bool GetSpanVector (int dir, double *span_vector) const override
 
bool GetSpanVectorIndex (int dir, double t, int side, int *span_vector_index, ON_Interval *span_interval) const override
 
bool GetSurfaceParameterFromNurbFormParameter (double nurbs_s, double nurbs_t, double *surface_s, double *surface_t) const override
 
bool GetSurfaceSize (double *width, double *height) const override
 
bool GetTightBoundingBox (class ON_BoundingBox &tight_bbox, bool bGrowBox=false, const class ON_Xform *xform=nullptr) const override
 virtual ON_Geometry GetTightBoundingBox override
More...
 
int HasNurbForm () const override
 
int IsCapped () const
 
bool IsClosed (int) const override
 
bool IsContinuous (ON::continuity c, double s, double t, int *hint=nullptr, double point_tolerance=ON_ZERO_TOLERANCE, double d1_tolerance=ON_ZERO_TOLERANCE, double d2_tolerance=ON_ZERO_TOLERANCE, double cos_angle_tolerance=ON_DEFAULT_ANGLE_TOLERANCE_COSINE, double curvature_tolerance=ON_SQRT_EPSILON) const override
 
ISO IsIsoparametric (const ON_BoundingBox &bbox) const override
 
ISO IsIsoparametric (const ON_Curve &curve, const ON_Interval *curve_domain=nullptr) const override
 
int IsMitered () const
 
ON_CurveIsoCurve (int dir, double c) const override
 
bool IsPeriodic (int) const override
 
bool IsPlanar (ON_Plane *plane=nullptr, double tolerance=ON_ZERO_TOLERANCE) const override
 
bool IsSolid () const
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 
const ON_MeshMesh (ON::mesh_type mt) const
 
ON::object_type ObjectType () const override
 
ON_Extrusionoperator= (const ON_Extrusion &)
 
ON_3dPoint PathEnd () const
 
ON_LineCurvePathLineCurve (ON_LineCurve *line_curve) const
 
int PathParameter () const
 
ON_3dPoint PathStart () const
 
ON_3dVector PathTangent () const
 
const ON_PolyCurvePolyProfile () const
 
const ON_CurveProfile (int profile_index) const
 
ON_CurveProfile3d (int profile_index, double s) const
 
ON_CurveProfile3d (ON_COMPONENT_INDEX ci) const
 
int ProfileCount () const
 
int ProfileIndex (double profile_parameter) const
 
bool ProfileIsKinked (int profile_index) const
 
int ProfileParameter () const
 
int ProfileSmoothSegmentCount (int profile_index) const
 
ON_CurvePullback (const ON_Curve &curve_3d, double tolerance, const ON_Interval *curve_3d_subdomain=nullptr, ON_3dPoint start_uv=ON_3dPoint::UnsetPoint, ON_3dPoint end_uv=ON_3dPoint::UnsetPoint, ON_FitResult *rc=nullptr) const override
 
ON_CurvePushup (const ON_Curve &curve_2d, double tolerance, const ON_Interval *curve_2d_subdomain=nullptr, ON_FitResult *rc=nullptr) const override
 
bool Read (ON_BinaryArchive &binary_archive) override
 
bool Reverse (int dir) override
 
bool SetDomain (int dir, double t0, double t1) override
 
bool SetMesh (ON::mesh_type mt, ON_Mesh *mesh)
 
bool SetMiterPlaneNormal (ON_3dVector N, int end)
 
bool SetOuterProfile (ON_Curve *outer_profile, bool bCap)
 
bool SetPath (ON_3dPoint A, ON_3dPoint B)
 
bool SetPathAndUp (ON_3dPoint A, ON_3dPoint B, ON_3dVector up)
 
unsigned int SizeOf () const override
 
int SpanCount (int dir) const override
 number of smooth nonempty spans in the parameter direction More...
 
bool Split (int dir, double c, ON_Surface *&west_or_south_side, ON_Surface *&east_or_north_side) const override
 
ON_SumSurfaceSumSurfaceForm (ON_SumSurface *sum_surface) const
 
bool Transform (const ON_Xform &xform) override
 
bool Transpose () override
 transpose surface parameterization (swap "s" and "t") More...
 
bool Trim (int dir, const ON_Interval &domain) override
 
ON_CurveWallEdge (ON_COMPONENT_INDEX ci) const
 
ON_SurfaceWallSurface (ON_COMPONENT_INDEX ci) const
 
bool Write (ON_BinaryArchive &binary_archive) const override
 
- Public Member Functions inherited from ON_Surface
 ON_Surface ()
 
 ON_Surface (const ON_Surface &)
 
virtual ~ON_Surface ()
 
bool AreaMassProperties (class ON_MassProperties &mp, bool bArea=true, bool bFirstMoments=true, bool bSecondMoments=true, bool bProductMoments=true, double rel_tol=1.0e-6, double abs_tol=1.0e-6) const
 
ON_BrepBrepForm (ON_Brep *brep=nullptr) const override
 
virtual ON_SurfaceTreeCreateSurfaceTree () const
 
void DestroyRuntimeCache (bool bDelete=true) override
 virtual ON_Object::DestroyRuntimeCache override More...
 
void DestroySurfaceTree ()
 
virtual ON_SurfaceDuplicateSurface () const
 
bool Ev1Der (double u, double v, ON_3dPoint &point, ON_3dVector &du, ON_3dVector &dv, int quadrant=0, int *hint=0) const
 
bool Ev2Der (double u, double v, ON_3dPoint &point, ON_3dVector &du, ON_3dVector &dv, ON_3dVector &duu, ON_3dVector &duv, ON_3dVector &dvv, int quadrant=0, int *hint=0) const
 
bool EvaluatePoint (const class ON_ObjRef &objref, ON_3dPoint &P) const override
 virtual ON_Geometry override More...
 
bool EvNormal (double u, double v, ON_3dPoint &point, ON_3dVector &du, ON_3dVector &dv, ON_3dVector &normal, int=0, int *=0) const
 
bool EvNormal (double u, double v, ON_3dPoint &point, ON_3dVector &normal, int quadrant=0, int *hint=0) const
 
bool EvNormal (double u, double v, ON_3dVector &normal, int quadrant=0, int *hint=0) const
 
bool EvPoint (double u, double v, ON_3dPoint &point, int quadrant=0, int *hint=0) const
 
bool FrameAt (double u, double v, ON_Plane &frame) const
 
bool GetDomain (int dir, double *t0, double *t1) const
 
int GetIsoPushupDirection (const ON_Curve &curve_2d, double tolerance, const ON_Interval *curve_2d_subdomain, double *c, ON_Interval *c3_dom) const
 
bool GetSilhouette (const ON_Interval *udom, const ON_Interval *vdom, const ON_SilhouetteParameters parameters, const ON_PlaneEquation *clipping_planes, size_t clipping_plane_count, ON_ClassArray< ON_SIL_EVENT > &silhouettes, ON_ProgressReporter *progress, ON_Terminator *terminator) const
 
ON_CurveGetSurfaceParameterFromNurbFormParameter (const ON_Curve &curve3d, const ON_Curve &ns_curve2dX, double fit_tolerance) const
 
bool HasBrepForm () const override
 
int IntersectPlane (ON_PlaneEquation plane_equation, ON_ClassArray< ON_SSX_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0, double fitting_tolerance=0.0, const ON_Interval *surface_udomain=0, const ON_Interval *surface_vdomain=0) const
 
int IntersectSurface (const ON_Surface *surfaceB, ON_ClassArray< ON_SSX_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0, double fitting_tolerance=0.0, const ON_Interval *surfaceA_udomain=0, const ON_Interval *surfaceA_vdomain=0, const ON_Interval *surfaceB_udomain=0, const ON_Interval *surfaceB_vdomain=0) const
 
int IsAtSeam (double s, double t) const
 
bool IsAtSingularity (double s, double t, bool bExact=true) const
 
bool IsCone (ON_Cone *cone=nullptr, double tolerance=ON_ZERO_TOLERANCE) const
 
bool IsCylinder (ON_Cylinder *cylinder=nullptr, double tolerance=ON_ZERO_TOLERANCE) const
 
virtual bool IsSingular (int) const
 
bool IsSolid () const
 
bool IsSphere (ON_Sphere *sphere=nullptr, double tolerance=ON_ZERO_TOLERANCE) const
 
bool IsTorus (ON_Torus *torus=nullptr, double tolerance=ON_ZERO_TOLERANCE) const
 
ON_3dVector NormalAt (double, double) const
 
ON_NurbsSurfaceNurbsSurface (ON_NurbsSurface *pNurbsSurface=nullptr, double tolerance=0.0, const ON_Interval *s_subdomain=nullptr, const ON_Interval *t_subdomain=nullptr) const
 
ON::object_type ObjectType () const override
 override ON_Object::ObjectType() - returns ON::surface_object More...
 
virtual ON_SurfaceOffset (double offset_distance, double tolerance, double *max_deviation=nullptr) const
 
ON_Surfaceoperator= (const ON_Surface &)
 
ON_3dPoint PointAt (double, double) const
 simple evaluation interface - no error handling More...
 
bool SetDomain (int dir, ON_Interval domain)
 
unsigned int SizeOf () const override
 virtual ON_Object::SizeOf override More...
 
const ON_SurfaceTreeSurfaceTree () const
 
bool VolumeMassProperties (class ON_MassProperties &mp, bool bVolume=true, bool bFirstMoments=true, bool bSecondMoments=true, bool bProductMoments=true, ON_3dPoint base_point=ON_3dPoint::UnsetPoint, double rel_tol=1.0e-6, double abs_tol=1.0e-6) const
 
- Public Member Functions inherited from ON_Geometry
 ON_Geometry ()=default
 
 ON_Geometry (const ON_Geometry &)=default
 
 ~ON_Geometry ()=default
 
ON_BoundingBox BoundingBox () const
 
virtual void ClearBoundingBox ()
 
virtual ON_COMPONENT_INDEX ComponentIndex () const
 
bool GetBoundingBox (ON_3dPoint &bbox_min, ON_3dPoint &bbox_max, bool bGrowBox=false) const
 
bool GetBoundingBox (ON_BoundingBox &bbox, bool bGrowBox=false) const
 
virtual bool IsDeformable () const
 
virtual bool IsMorphable () const
 
bool IsValid (class ON_TextLog *text_log=nullptr) const override
 
virtual bool MakeDeformable ()
 
virtual bool Morph (const class ON_SpaceMorph &morph)
 
ON_Geometryoperator= (const ON_Geometry &)=default
 
bool Rotate (double rotation_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center)
 
bool Rotate (double sin_angle, double cos_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center)
 
bool Scale (double scale_factor)
 
virtual bool SwapCoordinates (int i, int j)
 
const ON_BoundingBox TightBoundingBox () const
 
bool Translate (const ON_3dVector &translation_vector)
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 
bool AttachUserData (class ON_UserData *pUserData)
 
unsigned int ClearAllComponentStates () const
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 
void CopyUserData (const ON_Object &source_object)
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 
bool DetachUserData (class ON_UserData *pUserData)
 
void EmergencyDestroy ()
 
class ON_UserDataFirstUserData () const
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
bool IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const
 
bool IsKindOf (const ON_ClassId *pClassId) const
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 
virtual void MemoryRelocate ()
 
virtual ON_UUID ModelObjectId () const
 
void MoveUserData (ON_Object &source_object)
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
virtual unsigned int SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const
 
virtual unsigned int SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 
int SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace)
 
bool ThisIsNullptr (bool bSilentError) const
 
void TransformUserData (const class ON_Xform &xform)
 
virtual bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
 
int UserStringCount () const
 

Static Public Member Functions

static bool CleanupPolyCurveProfile (ON_PolyCurve &polycurve)
 
static ON_ExtrusionCreateFrom3dCurve (const ON_Curve &curve, const ON_Plane *plane, double height, bool bCap, ON_Extrusion *extrusion=0)
 
static ON_ExtrusionCylinder (const ON_Cylinder &cylinder, bool bCapBottom, bool bCapTop, ON_Extrusion *extrusion=0)
 
static bool IsValidPolyCurveProfile (const ON_PolyCurve &polycurve, ON_TextLog *text_log=0)
 
static ON_ExtrusionPipe (const ON_Cylinder &cylinder, double other_radius, bool bCapBottom, bool bCapTop, ON_Extrusion *extrusion=0)
 
- Static Public Member Functions inherited from ON_Surface
static class ON_NurbsSurfaceCreateCubicLoft (int curve_count, const ON_Curve *const *curve_list, double k, int is_closed=0, ON::cubic_loft_end_condition start_shape=ON::cubic_loft_ec_quadratic, ON::cubic_loft_end_condition end_shape=ON::cubic_loft_ec_quadratic, class ON_NurbsSurface *nurbs_surface=0)
 
static class ON_NurbsSurfaceCreateLinearLoft (int curve_count, const ON_Curve *const *curve_list, double k, int is_closed=0, class ON_NurbsSurface *nurbs_surface=0)
 

Public Attributes

bool m_bCap [2]
 
bool m_bHaveN [2]
 
bool m_bTransposed
 false: (s,t) = (profile,path) More...
 
ON_MeshCache m_mesh_cache = ON_MeshCache::Empty
 Cached meshes used for rendering, analysis, ... More...
 
ON_3dVector m_N [2]
 
ON_Line m_path
 
ON_Interval m_path_domain
 Surface parameterization information. More...
 
ON_Curvem_profile
 
int m_profile_count
 
ON_Interval m_t
 
ON_3dVector m_up
 

Static Public Attributes

static const double m_Nz_min
 1/64; More...
 
static const double m_path_length_min
 ON_ZERO_TOLERANCE;. More...
 
- Static Public Attributes inherited from ON_Geometry
const static ON_Geometry Unset
 

Additional Inherited Members

- Public Types inherited from ON_Surface
enum  ISO {
  not_iso = 0, x_iso = 1, y_iso = 2, W_iso = 3,
  S_iso = 4, E_iso = 5, N_iso = 6, iso_count = 7
}
 pure virtual class for surface objects More...
 
- Public Types inherited from ON_Object
enum  UserDataConflictResolution : unsigned char {
  UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3,
  UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6
}
 
- Protected Member Functions inherited from ON_Surface
ON_CurvePullbackCurveProxy (const ON_CurveProxy &curveproxy_3d, double tolerance, const ON_Interval *curve_3d_subdomain, ON_3dPoint start_uv, ON_3dPoint end_uv, ON_FitResult *rc) const
 Helper for ON_Surface::Pullback overrides that handles "real" curve issues. More...
 
ON_CurvePullbackPolyCurve (const ON_PolyCurve &polycurve_3d, double tolerance, const ON_Interval *curve_3d_subdomain, ON_3dPoint start_uv, ON_3dPoint end_uv, ON_FitResult *rc) const
 
ON_CurvePushupCurveProxy (const ON_CurveProxy &curveproxy_2d, double tolerance, const ON_Interval *curve_2d_subdomain, ON_FitResult *rc) const
 Helper for ON_Surface::Pushup overrides that handles "real" curve issues. More...
 
ON_CurvePushupPolyCurve (const ON_PolyCurve &polycurve_2d, double tolerance, const ON_Interval *curve_2d_subdomain, ON_FitResult *rc) const
 

Constructor & Destructor Documentation

◆ ON_Extrusion() [1/2]

ON_Extrusion::ON_Extrusion ( )

◆ ON_Extrusion() [2/2]

ON_Extrusion::ON_Extrusion ( const ON_Extrusion src)

◆ ~ON_Extrusion()

ON_Extrusion::~ON_Extrusion ( )

Member Function Documentation

◆ AddInnerProfile()

bool ON_Extrusion::AddInnerProfile ( ON_Curve inner_profile)

Description: Add an inner profile. Parameters: inner_profile - [in] closed curve in the xy plane or a 2d curve. Returns: True if the profile was set. In this case the ON_Extrusion class manages the curve and ~ON_Extrusion will delete it. The extrusion must already have an outer profile. If the extrusion already has a profile, the set will fail. Remarks: If needed, innter_profile will be converted to a 2d curve. If inner_profile is not correctly oriented, it will be reversed so it has a clockwise orientation.

◆ BrepForm() [1/2]

ON_Brep* ON_Extrusion::BrepForm ( ON_Brep brep,
bool  bSmoothFaces 
) const

Description: Build a brep form of the extrusion. The outer profile is always the first face in 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 in the brep. Parameters: brep - [in] If the brep pointer is not null, then the brep form is constructed in brep. If the brep pointer is null, then an ON_Brep is allocated on the heap. bSmoothFaces - [in] If true and the profiles have kinks, then the faces corresponding to those profiles are split so they will be G1. Returns: If successful, a pointer to the brep form. If unsuccessful, null.

◆ BrepForm() [2/2]

ON_Brep* ON_Extrusion::BrepForm ( ON_Brep brep = nullptr) const
overridevirtual

Description: Build a brep form of the extrusion. The outer profile is always the first face in 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 in the brep. Parameters: brep - [in] If the brep pointer is not null, then the brep form is constructed in brep. If the brep pointer is null, then an ON_Brep is allocated on the heap. Returns: If successful, a pointer to the brep form. If unsuccessful, null.

Reimplemented from ON_Geometry.

◆ CapCount()

int ON_Extrusion::CapCount ( ) const

Returns: 0: no caps 1: exrusion has either a top cap or a bottom cap 2: both ends are capped. See Also: ON_Extrusion::ProfileCount() ON_Extrusion::ProfileSmoothSegmentCount()

◆ CleanupPolyCurveProfile()

static bool ON_Extrusion::CleanupPolyCurveProfile ( ON_PolyCurve polycurve)
static

Description: If possible, modify a polycurve so it meets the necessary conditions to be used as a multi-segment profile in a extrusion. Returns: True if the returned polycurve can be used a a multi-segment profile in a extrusion.

◆ CreateFrom3dCurve()

static ON_Extrusion* ON_Extrusion::CreateFrom3dCurve ( const ON_Curve curve,
const ON_Plane plane,
double  height,
bool  bCap,
ON_Extrusion extrusion = 0 
)
static

Description: Create an ON_Exrusion from a 3d curve, a plane and a height. Parameters: curve - [in] A continuous 3d curve. plane - [in] If plane is null, then the plane returned by curve.IsPlanar() is used. The 3d curve is projected to this plane and the result is passed to ON_Extrusion::SetOuterProfile(). height - [in] 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. bCap - [in] If the curve is closed and bCap is true, then the resulting extrusion is capped. extrusion - [in] If the input extrusion pointer is null, one will be allocated on the heap and it is the caller's responsibility to delete it at an appropriate time. If the input pointer is not null, this extrusion will be used and the same pointer will be returned, provided the input is valid. Returns: If the input is valid, a pointer to an ON_Exrusion form of the pipe. If the input is not valid, then null, even when the input extrusion object is not null.

◆ CreateMesh()

ON_Mesh* ON_Extrusion::CreateMesh ( const ON_MeshParameters mp,
ON_Mesh mesh = nullptr 
) const
overridevirtual

overrides of virtual ON_Surface functions

Reimplemented from ON_Surface.

◆ Cylinder()

static ON_Extrusion* ON_Extrusion::Cylinder ( const ON_Cylinder cylinder,
bool  bCapBottom,
bool  bCapTop,
ON_Extrusion extrusion = 0 
)
static

Description: Get an ON_Exrusion form of a cylinder. Parameters: cylinder - [in] cylinder.IsFinite() must be true bCapBottom - [in] if true, the end at cylinder.m_height[0] will be capped bCapTop - [in] if true, the end at cylinder.m_height[1] will be capped extrusion - [in] If the input extrusion pointer is null, one will be allocated on the heap and it is the caller's responsibility to delete it at an appropriate time. If the input pointer is not null, this extrusion will be used and the same pointer will be returned, provided the input is valid. Returns: If the input is valid, a pointer to an ON_Exrusion form of the cylinder. If the input is not valid, then null, even when the input extrusion object is not null. Example:

    ON_Cylinder cylinder = ...;
    bool bCapBottom = true;
    bool bCapTop = true;
    ON_Extrusion extrusion;
    if ( 0 == ON_Extrusion::Cylinder(cylinder,bCapBottom,bCapTop,&extrusion) )
    {

/ input is not valid - nothing set ... } else { / extrusion = cylinder ... }

◆ DataCRC()

ON__UINT32 ON_Extrusion::DataCRC ( ON__UINT32  current_remainder) const
overridevirtual

Description: Returns a CRC calculated from the information that defines the object. This CRC can be used as a quick way to see if two objects are not identical. Parameters: current_remainder - [in]; Returns: CRC of the information the defines the object.

Reimplemented from ON_Object.

◆ Degree()

int ON_Extrusion::Degree ( int  dir) const
overridevirtual

Implements ON_Surface.

◆ Destroy()

void ON_Extrusion::Destroy ( )

ON_Extrusion interface

◆ DestroyMesh()

void ON_Extrusion::DestroyMesh ( ON::mesh_type  mt)

Description: Destroy a mesh attached to the ON_Extrusion. Parameters: mt - [in] type of mesh to destroy If mt is ON::default_mesh or ON::any_mesh, then all attached meshes of all types are destroyed. bDeleteMesh - [in] if true, cached mesh is deleted. If false, pointer to cached mesh is just set to null.

◆ DestroyRuntimeCache()

void ON_Extrusion::DestroyRuntimeCache ( bool  bDelete = true)
overridevirtual

overrides of virtual ON_Object functions

Reimplemented from ON_Object.

◆ Dimension()

int ON_Extrusion::Dimension ( ) const
overridevirtual

overrides of virtual ON_Geometry functions

Reimplemented from ON_Geometry.

◆ Domain()

ON_Interval ON_Extrusion::Domain ( int  dir) const
overridevirtual

Implements ON_Surface.

◆ Dump()

void ON_Extrusion::Dump ( ON_TextLog ) const
overridevirtual

Description: Creates a text dump of the object. Remarks: Dump() is intended for debugging and is not suitable for creating high quality text descriptions of an object.

The default implementations of this virtual function prints the class's name.

Reimplemented from ON_Object.

◆ Evaluate()

bool ON_Extrusion::Evaluate ( double  u,
double  v,
int  num_der,
int  array_stride,
double *  der_array,
int  quadrant = 0,
int *  hint = 0 
) const
overridevirtual

work horse evaluator

Parameters
ureturns false if unable to evaluate
vevaluation parameters
num_dernumber of derivatives (>=0)
array_stridearray stride (>=Dimension())
der_arrayarray of length stride*(ndir+1)*(ndir+2)/2
quadrantoptional - determines which quadrant to evaluate from 0 = default 1 from NE quadrant 2 from NW quadrant 3 from SW quadrant 4 from SE quadrant
hintoptional - evaluation hint (int[2]) used to speed repeated evaluations

Implements ON_Surface.

◆ Extend()

bool ON_Extrusion::Extend ( int  dir,
const ON_Interval domain 
)
overridevirtual

Description: Pure virtual function. Default returns false. Where possible, analytically extends surface to include domain. Parameters: dir - [in] 0 new Domain(0) will include domain. (the first surface parameter). 1 new Domain(1) will include domain. (the second surface parameter). domain - [in] if domain is not included in surface domain, surface will be extended so that its domain includes domain.
Will not work if surface is closed in direction dir. Original surface is identical to the restriction of the resulting surface to the original surface domain, Returns: true if successful.

Reimplemented from ON_Surface.

◆ FaceCount()

int ON_Extrusion::FaceCount ( ) const

Description: Deprecated function.

Use CapCount() to determine how many end caps there are. Use ProfileCount() to determine how many profiles there are. Use ProfileSmoothSegmentCount() to determine how many smooth subsegments are in a profile. Each smooth subsegment becomes a wall face in the brep form.

Returns: Number of "faces" the extrusion has. 0: extrusion is not valid 1: extrusion is not capped 2: extrusion has a closed outer profile and one cap 3: extrusion has a closed outer profile and two caps

Remarks: This function was written before extrusions supported "holes" and before the brep form was divided at profile creases. At this point it simply leads to confusion. See the Description function replacements.

Deprecated:
Use CapCount(), ProfileCount(), or ProfileSmoothSegmentCount()

◆ GetBBox()

bool ON_Extrusion::GetBBox ( double *  boxmin,
double *  boxmax,
bool  bGrowBox = false 
) const
overridevirtual

virtual ON_Geometry GetBBox override

Reimplemented from ON_Geometry.

◆ GetBrepFormComponentIndex() [1/4]

bool ON_Extrusion::GetBrepFormComponentIndex ( ON_COMPONENT_INDEX  extrusion_ci,
double  extrusion_profile_parameter,
const ON_Brep brep_form,
ON_COMPONENT_INDEX brep_ci 
) const

◆ GetBrepFormComponentIndex() [2/4]

bool ON_Extrusion::GetBrepFormComponentIndex ( ON_COMPONENT_INDEX  extrusion_ci,
double  extrusion_profile_parameter,
const ON_Brep brep_form,
bool  bSmoothFaces,
ON_COMPONENT_INDEX brep_ci,
ON_Interval profile_subdomain 
) const

◆ GetBrepFormComponentIndex() [3/4]

bool ON_Extrusion::GetBrepFormComponentIndex ( ON_COMPONENT_INDEX  extrusion_ci,
double  extrusion_profile_parameter,
const ON_Brep brep_form,
ON_COMPONENT_INDEX brep_ci 
) const

◆ GetBrepFormComponentIndex() [4/4]

bool ON_Extrusion::GetBrepFormComponentIndex ( ON_COMPONENT_INDEX  extrusion_ci,
ON_COMPONENT_INDEX brep_ci 
) const

Description: Convert a component index that identifies a part of this extrusion to a component index that identifies a part of the brep created by BrepForm(...,false). Parameters: extrusion_ci - [in] extrusion_profile_parameter - [in] brep_form - [in] brep created by ON_Extrusion::BrepForm() bSmoothFaces - [in] If true and the profiles have kinks, then the faces corresponding to those profiles are split so they will be G1. brep_ci - [out] profile_subdomain - [out] The subdomain of the profile that contributes to the brep form component index Returns: True if successful. False if input is not valid, in which case brep_ci is set by calling ON_COMPONENT_INDEX::UnSet(). Remarks: If the wall surfaces have creases, then this function cannot be used to identify brep components created by BrepForm(...,true).

◆ GetClosestPoint()

bool ON_Extrusion::GetClosestPoint ( const ON_3dPoint P,
double *  s,
double *  t,
double  maximum_distance = 0.0,
const ON_Interval sdomain = 0,
const ON_Interval tdomain = 0 
) const
overridevirtual

Description: Get the parameters of the point on the surface that is closest to P. Parameters: P - [in] test point s - [out] t - [out] (*s,*t) = parameters of the surface point that is closest to P. maximum_distance = 0.0 - [in] optional upper bound on the distance from P to the surface. If you are only interested in finding a point Q on the surface when P.DistanceTo(Q) < maximum_distance, then set maximum_distance to that value. sdomain = 0 - [in] optional domain restriction tdomain = 0 - [in] optional domain restriction Returns: True if successful. If false, the values of *s and *t are undefined. See Also: ON_Surface::GetLocalClosestPoint.

Reimplemented from ON_Surface.

◆ GetLocalClosestPoint()

bool ON_Extrusion::GetLocalClosestPoint ( const ON_3dPoint ,
double  ,
double  ,
double *  ,
double *  ,
const ON_Interval = nullptr,
const ON_Interval = nullptr 
) const
overridevirtual

Find parameters of the point on a surface that is locally closest to the test_point. The search for a local close point starts at seed parameters. If a sub_domain parameter is not nullptr, then the search is restricted to the specified portion of the surface.

true if returned if the search is successful. false is returned if the search fails.

Reimplemented from ON_Surface.

◆ GetMiterPlaneNormal()

void ON_Extrusion::GetMiterPlaneNormal ( int  end,
ON_3dVector N 
) const

◆ GetNextDiscontinuity()

bool ON_Extrusion::GetNextDiscontinuity ( int  dir,
ON::continuity  c,
double  t0,
double  t1,
double *  t,
int *  hint = nullptr,
int *  dtype = nullptr,
double  cos_angle_tolerance = ON_DEFAULT_ANGLE_TOLERANCE_COSINE,
double  curvature_tolerance = ON_SQRT_EPSILON 
) const
overridevirtual

Description: Search for a derivatitive, tangent, or curvature discontinuity. Parameters: dir - [in] If 0, then "u" parameter is checked. If 1, then the "v" parameter is checked. c - [in] type of continity to test for. t0 - [in] Search begins at t0. If there is a discontinuity at t0, it will be ignored. This makes it possible to repeatedly call GetNextDiscontinuity and step through the discontinuities. t1 - [in] (t0 != t1) If there is a discontinuity at t1 is will be ignored unless c is a locus discontinuity type and t1 is at the start or end of the curve. t - [out] if a discontinuity is found, then *t reports the parameter at the discontinuity. hint - [in/out] if GetNextDiscontinuity will be called repeatedly, passing a "hint" with initial value *hint=0 will increase the speed of the search.
dtype - [out] if not nullptr, *dtype reports the kind of discontinuity found at *t. A value of 1 means the first derivative or unit tangent was discontinuous. A value of 2 means the second derivative or curvature was discontinuous. A value of 0 means the curve is not closed, a locus discontinuity test was applied, and t1 is at the start of end of the curve. cos_angle_tolerance - [in] default = cos(1 degree) Used only when c is ON::continuity::G1_continuous or ON::continuity::G2_continuous. If the cosine of the angle between two tangent vectors is <= cos_angle_tolerance, then a G1 discontinuity is reported. curvature_tolerance - [in] (default = ON_SQRT_EPSILON) Used only when c is ON::continuity::G2_continuous. If K0 and K1 are curvatures evaluated from above and below and |K0 - K1| > curvature_tolerance, then a curvature discontinuity is reported. Returns: Parametric continuity tests c = (C0_continuous, ..., G2_continuous):

true if a parametric discontinuity was found strictly between t0 and t1. Note well that all curves are parametrically continuous at the ends of their domains.

Locus continuity tests c = (C0_locus_continuous, ...,G2_locus_continuous):

true if a locus discontinuity was found strictly between t0 and t1 or at t1 is the at the end of a curve. Note well that all open curves (IsClosed()=false) are locus discontinuous at the ends of their domains. All closed curves (IsClosed()=true) are at least C0_locus_continuous at the ends of their domains.

Reimplemented from ON_Surface.

◆ GetNurbForm()

int ON_Extrusion::GetNurbForm ( ON_NurbsSurface nurbs_surface,
double  tolerance = 0.0 
) const
overridevirtual

ON_Surface* Offset( double offset_distance, double tolerance, double* max_deviation = nullptr ) const;

Reimplemented from ON_Surface.

◆ GetNurbFormParameterFromSurfaceParameter()

bool ON_Extrusion::GetNurbFormParameterFromSurfaceParameter ( double  surface_s,
double  surface_t,
double *  nurbs_s,
double *  nurbs_t 
) const
overridevirtual

Reimplemented from ON_Surface.

◆ GetParameterTolerance()

bool ON_Extrusion::GetParameterTolerance ( int  dir,
double  t,
double *  tminus,
double *  tplus 
) const
overridevirtual

Reimplemented from ON_Surface.

◆ GetPathPlane()

bool ON_Extrusion::GetPathPlane ( double  s,
ON_Plane plane 
) const

Description: Get the the 3d plane perpendicular to the path at a normalized path parameter. Parameters: s - [in] 0.0 = starting plane 1.0 = ending plane plane - [out] Plane is returned here. If false is returned, then the input value of plane is not changed. Returns: true if plane was set. False if this is invalid and plane could not be set. Remarks: When no mitering is happening, GetPathPlane() and GetProfilePlane() return the same plane.

◆ GetProfileCurves()

int ON_Extrusion::GetProfileCurves ( ON_SimpleArray< const ON_Curve * > &  profile_curves) const

Description: Get a list of the 2d profile curves. Returns: Number of curves appended to the list.

◆ GetProfileKinkParameters() [1/2]

int ON_Extrusion::GetProfileKinkParameters ( int  profile_index,
ON_SimpleArray< double > &  profile_kink_parameters 
) const

Description: Get the parameters where a profile curve has kinks. Parameters: profile_index - [in] profile_kink_parameters - [out] parameters at internal kinks are appended to this array. Returns: Number of parameters appended to profile_kink_parameters[] Remarks: This function is used when making the brep form that has smooth faces.

◆ GetProfileKinkParameters() [2/2]

int ON_Extrusion::GetProfileKinkParameters ( int  profile_index,
ON_SimpleArray< double > *  profile_kink_parameters 
) const

◆ GetProfilePlane()

bool ON_Extrusion::GetProfilePlane ( double  s,
ON_Plane plane 
) const

Description: Get the the 3d plane containing the profile curve at a normalized path parameter. Parameters: s - [in] 0.0 = starting plane 1.0 = ending plane plane - [out] Plane containing profile is returned in plane. If false is returned, then the input value of plane is not changed. Returns: true if plane was set. False if this is invalid and plane could not be set. Remarks: When no mitering is happening, GetPathPlane() and GetProfilePlane() return the same plane.

◆ GetProfileTransformation()

bool ON_Extrusion::GetProfileTransformation ( double  s,
ON_Xform xform 
) const

Description: Get the transformation that maps the xy profile curve to its 3d location. Parameters: s - [in] 0.0 = starting profile 1.0 = ending profile

◆ GetSpanVector()

bool ON_Extrusion::GetSpanVector ( int  dir,
double *  span_vector 
) const
overridevirtual

Implements ON_Surface.

◆ GetSpanVectorIndex()

bool ON_Extrusion::GetSpanVectorIndex ( int  dir,
double  t,
int  side,
int *  span_vector_index,
ON_Interval span_interval 
) const
overridevirtual

If t is in the domain of the surface, GetSpanVectorIndex() returns the span vector index "i" such that span_vector[i] <= t <= span_vector[i+1]. The "side" parameter determines which span is selected when t is at the end of a span.

Parameters
dir0 gets first parameter's domain, 1 gets second parameter's domain
[in]t[IN] t = evaluation parameter
[in]side[IN] side 0 = default, -1 = from below, +1 = from above
[out]span_vector_index[OUT] span vector index
[out]span_interval[OUT] domain of the span containing "t"

Reimplemented from ON_Surface.

◆ GetSurfaceParameterFromNurbFormParameter()

bool ON_Extrusion::GetSurfaceParameterFromNurbFormParameter ( double  nurbs_s,
double  nurbs_t,
double *  surface_s,
double *  surface_t 
) const
overridevirtual

Reimplemented from ON_Surface.

◆ GetSurfaceSize()

bool ON_Extrusion::GetSurfaceSize ( double *  width,
double *  height 
) const
overridevirtual

Description: Get an estimate of the size of the rectangle that would be created if the 3d surface where flattened into a rectangle. Parameters: width - [out] (corresponds to the first surface parameter) height - [out] (corresponds to the first surface parameter) Example:

/ Reparameterize a surface to minimize distortion / in the map from parameter space to 3d. ON_Surface* surf = ...; double width, height; if ( surf->GetSurfaceSize( &width, &height ) ) { srf->SetDomain( 0, ON_Interval( 0.0, width ) ); srf->SetDomain( 1, ON_Interval( 0.0, height ) ); }

Returns: true if successful.

Reimplemented from ON_Surface.

◆ GetTightBoundingBox()

bool ON_Extrusion::GetTightBoundingBox ( class ON_BoundingBox tight_bbox,
bool  bGrowBox = false,
const class ON_Xform xform = nullptr 
) const
overridevirtual

virtual ON_Geometry GetTightBoundingBox override

Reimplemented from ON_Geometry.

◆ HasNurbForm()

int ON_Extrusion::HasNurbForm ( ) const
overridevirtual

Description: Is there a NURBS surface representation of this surface. Parameters: Returns: 0 unable to create NURBS representation with desired accuracy. 1 success - NURBS parameterization matches the surface's 2 success - NURBS point locus matches the surface's and the domain of the NURBS surface is correct.
However, This surface's parameterization and the NURBS surface parameterization may not match. This situation happens when getting NURBS representations of surfaces that have a transendental parameterization like spheres, cylinders, and cones. Remarks: This is a low-level virtual function. See Also: ON_Surface::GetNurbForm ON_Surface::NurbsSurface

Reimplemented from ON_Surface.

◆ IsCapped()

int ON_Extrusion::IsCapped ( ) const

Returns: 0: no or profile is open 1: bottom cap 2: top cap 3: both ends capped.

◆ IsClosed()

bool ON_Extrusion::IsClosed ( int  ) const
overridevirtual

Reimplemented from ON_Surface.

◆ IsContinuous()

bool ON_Extrusion::IsContinuous ( ON::continuity  c,
double  s,
double  t,
int *  hint = nullptr,
double  point_tolerance = ON_ZERO_TOLERANCE,
double  d1_tolerance = ON_ZERO_TOLERANCE,
double  d2_tolerance = ON_ZERO_TOLERANCE,
double  cos_angle_tolerance = ON_DEFAULT_ANGLE_TOLERANCE_COSINE,
double  curvature_tolerance = ON_SQRT_EPSILON 
) const
overridevirtual

Description: Test continuity at a surface parameter value. Parameters: c - [in] continuity to test for s - [in] surface parameter to test t - [in] surface parameter to test hint - [in] evaluation hint point_tolerance - [in] if the distance between two points is greater than point_tolerance, then the surface is not C0. d1_tolerance - [in] if the difference between two first derivatives is greater than d1_tolerance, then the surface is not C1. d2_tolerance - [in] if the difference between two second derivatives is greater than d2_tolerance, then the surface is not C2. cos_angle_tolerance - [in] default = cos(1 degree) Used only when c is ON::continuity::G1_continuous or ON::continuity::G2_continuous. If the cosine of the angle between two normal vectors is <= cos_angle_tolerance, then a G1 discontinuity is reported. curvature_tolerance - [in] (default = ON_SQRT_EPSILON) Used only when c is ON::continuity::G2_continuous. If K0 and K1 are curvatures evaluated from above and below and |K0 - K1| > curvature_tolerance, then a curvature discontinuity is reported. Returns: true if the surface has at least the c type continuity at the parameter t.

Reimplemented from ON_Surface.

◆ IsIsoparametric() [1/2]

ISO ON_Extrusion::IsIsoparametric ( const ON_BoundingBox bbox) const
overridevirtual

Description: Test a 2d bounding box to see if it is iso parameteric in the surface's parameter space. Parameters: bbox - [in] bounding box to test Returns: Isoparametric status of the bounding box. Remarks: Because it may transpose domains, ON_SurfaceProxy overrides this function. All other surface classes just use the base class implementation.

Reimplemented from ON_Surface.

◆ IsIsoparametric() [2/2]

ISO ON_Extrusion::IsIsoparametric ( const ON_Curve curve,
const ON_Interval curve_domain = nullptr 
) const
overridevirtual

Description: Test a 2d curve to see if it is iso parameteric in the surface's parameter space. Parameters: curve - [in] curve to test curve_domain = [in] optional sub domain of the curve Returns: Isoparametric status of the curve. Remarks: Because it may transpose domains, ON_SurfaceProxy overrides this function. All other surface classes just use the base class implementation.

Reimplemented from ON_Surface.

◆ IsMitered()

int ON_Extrusion::IsMitered ( ) const

Returns: 0: not mitered. 1: start of path is mitered. 2: end of path is mitered. 3: start and end are mitered.

◆ IsoCurve()

ON_Curve* ON_Extrusion::IsoCurve ( int  dir,
double  c 
) const
overridevirtual

Description: Get isoparametric curve. Parameters: dir - [in] 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

c - [in] value of constant parameter Returns: Isoparametric curve. Remarks: In this function "dir" indicates which direction the resulting curve runs. 0: horizontal, 1: vertical In the other ON_Surface functions that take a "dir" argument, "dir" indicates if "c" is a "u" or "v" parameter.

Reimplemented from ON_Surface.

◆ IsPeriodic()

bool ON_Extrusion::IsPeriodic ( int  ) const
overridevirtual

Reimplemented from ON_Surface.

◆ IsPlanar()

bool ON_Extrusion::IsPlanar ( ON_Plane plane = nullptr,
double  tolerance = ON_ZERO_TOLERANCE 
) const
overridevirtual

Description: Test a surface to see if it is planar. Parameters: plane - [out] if not nullptr and true is returned, the plane parameters are filled in. tolerance - [in] 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.

Reimplemented from ON_Surface.

◆ IsSolid()

bool ON_Extrusion::IsSolid ( ) const

Returns: True if extrusion object is a capped solid.

◆ IsValid()

bool ON_Extrusion::IsValid ( class ON_TextLog text_log = nullptr) const
overridevirtual

Description: Tests an object to see if its data members are correctly initialized. Parameters: text_log - [in] if the object is not valid and text_log is not nullptr, then a brief englis description of the reason the object is not valid is appened to the log. The information appended to text_log is suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool. Returns: @untitled table true object is valid false object is invalid, uninitialized, etc.

Reimplemented from ON_Object.

◆ IsValidPolyCurveProfile()

static bool ON_Extrusion::IsValidPolyCurveProfile ( const ON_PolyCurve polycurve,
ON_TextLog text_log = 0 
)
static

Description: Test a polycurve to determine if it meets the necessary conditions to be used as a multi-segment profile in a extrusion. Returns: True if the returned polycurve can be used a a multi-segment profile in a extrusion.

◆ Mesh()

const ON_Mesh* ON_Extrusion::Mesh ( ON::mesh_type  mt) const

Description: Get a mesh attached to the ON_Extrusion. Parameters: mt - [in] type of mesh to get. ON::render_mesh, ON::analysis_mesh and ON::preview_mesh remove the meshes of those types. If mt is ON::default_mesh or ON::any_mesh, then the first non null mesh is returned. Returns: A pointer to a mesh on the ON_Extusion object.
This mesh will be deleted by ~ON_Extrusion(). If a mesh of the requested type is not available, then null is returned.

◆ ObjectType()

ON::object_type ON_Extrusion::ObjectType ( ) const
overridevirtual

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

Returns: ON::object_type enum value.

Remarks: The default implementation of this virtual function returns ON::unknown_object_type

Reimplemented from ON_Object.

◆ operator=()

ON_Extrusion& ON_Extrusion::operator= ( const ON_Extrusion )

◆ PathEnd()

ON_3dPoint ON_Extrusion::PathEnd ( ) const

◆ PathLineCurve()

ON_LineCurve* ON_Extrusion::PathLineCurve ( ON_LineCurve line_curve) const

Parameters: line_curve - [in] If null, a line curve will be allocated using new. Returns: Null if the extrusion path is not valid. Otherwise a pointer to an ON_LineCurve that is set to the extrusion's path. The caller must delete this curve.

◆ PathParameter()

int ON_Extrusion::PathParameter ( ) const

Description: Get the surface parameter for the path. Returns: 0: The first surface parameter corresponds to the path direction. (m_bTransposed = true) 1: The second surface parameter corresponds to the path direction. (m_bTransposed = false) Remarks: The default ON_Extrusion constructor sets m_bTransposed = false which corresponds to the 1 = PathParameter().

◆ PathStart()

ON_3dPoint ON_Extrusion::PathStart ( ) const

◆ PathTangent()

ON_3dVector ON_Extrusion::PathTangent ( ) const

◆ Pipe()

static ON_Extrusion* ON_Extrusion::Pipe ( const ON_Cylinder cylinder,
double  other_radius,
bool  bCapBottom,
bool  bCapTop,
ON_Extrusion extrusion = 0 
)
static

Description: Get an ON_Exrusion form of a pipe. Parameters: cylinder - [in] cylinder.IsFinite() must be true The cylinder can be either the inner or outer wall of the pipe. other_radius - in If cylinder.Radius() < other_radius, then the cylinder will be the inside of the pipe. If cylinder.Radius() > other_radius, then the cylinder will be the outside of the pipe. bCapBottom - [in] if true, the end at cylinder.m_height[0] will be capped bCapTop - [in] if true, the end at cylinder.m_height[1] will be capped extrusion - [in] If the input extrusion pointer is null, one will be allocated on the heap and it is the caller's responsibility to delete it at an appropriate time. If the input pointer is not null, this extrusion will be used and the same pointer will be returned, provided the input is valid. Returns: If the input is valid, a pointer to an ON_Exrusion form of the pipe. If the input is not valid, then null, even when the input extrusion object is not null. Example:

    ON_Cylinder cylinder = ...;
    double other_radius = cylinder.Radius()+1.0;
    bool bCapBottom = true;
    bool bCapTop = true;
    ON_Extrusion extrusion;
    if ( 0 == ON_Extrusion::Pipe(cylinder,other_radius,bCapBottom,bCapTop,&extrusion) )
    {

/ input is not valid - nothing set ... } else { / extrusion = pipe ... }

◆ PolyProfile()

const ON_PolyCurve* ON_Extrusion::PolyProfile ( ) const

Returns: If m_profile_count >= 2 and m_profile is an ON_PolyCurve with m_profile_count segments defining outer and inner profiles, a pointer to the polycurve is returned. Otherwise null is returned.

◆ Profile()

const ON_Curve* ON_Extrusion::Profile ( int  profile_index) const

Parameters: profile_index - [in] 0 <= profile_index < ProfileCount(). The outer profile has index 0. Returns: Pointer to the i-th 2d profile. The ON_Extrusion class manages this curve. Do not delete it and do not use the pointer if the ON_Extrusion class changes.

◆ Profile3d() [1/2]

ON_Curve* ON_Extrusion::Profile3d ( int  profile_index,
double  s 
) const

Parameters: profile_index - [in] 0 <= profile_index < ProfileCount(). The outer profile has index 0. s - in A relative parameter controlling which priofile is returned. s = 0.0 returns the bottom profile and s = 1.0 returns the top profile. Returns: nullptr if the input parameters or the ON_Extrusion class is not valid. Otherwise a pointer to a 3d curve for the requested profile. This curve is on the heap and the caller is responsible for deleting this curve.

◆ Profile3d() [2/2]

ON_Curve* ON_Extrusion::Profile3d ( ON_COMPONENT_INDEX  ci) const

Parameters: ci - [in] component index identifying a 3d extrusion profile curve. Returns: nullptr if the component index or the ON_Extrusion class is not valid. Otherwise a pointer to a 3d curve for the requested profile. This curve is on the heap and the caller is responsible for deleting this curve.

◆ ProfileCount()

int ON_Extrusion::ProfileCount ( ) const

Returns: Number of profile curves. See Also: ON_Extrusion::CapCount() ON_Extrusion::ProfileSmoothSegmentCount()

◆ ProfileIndex()

int ON_Extrusion::ProfileIndex ( double  profile_parameter) const

Parameters: profile_parameter - [in] parameter on profile curve Returns: -1: if the profile_parameter does not correspond to a point on the profile curve. >= 0: index of the profile curve with domain containing this parameter. When the profile_parameter corresponds to the end of one profile and the beginning of the next profile, the index of the next profile is returned.

◆ ProfileIsKinked()

bool ON_Extrusion::ProfileIsKinked ( int  profile_index) const

Parameters: profile_index - [in] Returns: True if the profile has at least one kink.

◆ ProfileParameter()

int ON_Extrusion::ProfileParameter ( ) const

Description: Get the surface parameter for the profile. Returns: 0: The first surface parameter corresponds to the profile direction. (m_bTransposed = false) 1: The second surface parameter corresponds to the profile direction. (m_bTransposed = true) Remarks: The default ON_Extrusion constructor sets m_bTransposed = false which corresponds to the 0 = ProfileParameter().

◆ ProfileSmoothSegmentCount()

int ON_Extrusion::ProfileSmoothSegmentCount ( int  profile_index) const

Parameter: profile_index - [in] 0 <= profile_index < ProfileCount(). The outer profile has index 0. Returns: Number of smooth segments in the profile curve. See Also: ON_Extrusion::CapCount() ON_Extrusion::GetProfileKinkParameters() ON_Extrusion::ProfileCount()

◆ Pullback()

ON_Curve* ON_Extrusion::Pullback ( const ON_Curve curve_3d,
double  tolerance,
const ON_Interval curve_3d_subdomain = nullptr,
ON_3dPoint  start_uv = ON_3dPoint::UnsetPoint,
ON_3dPoint  end_uv = ON_3dPoint::UnsetPoint,
ON_FitResult rc = nullptr 
) const
overridevirtual

Description: Pull a 3d curve back to the surface's parameter space. Parameters: curve_3d - [in] a 3d curve tolerance - [in] the maximum acceptable 3d distance between from surface(curve_2d(t)) to the locus of points on the surface that are closest to curve_3d. curve_3d_subdomain - [in] optional subdomain for curve_3d start_uv - [in] optional starting point (if known) end_uv - [in] optional ending point (if known) rc - [out] if not 0 on input, points to an ON_FitResult with the following value - ON_FitResult::in_tolerance if result is in tolerance ON_FitResult::not_in_tolerance if result is not in tolerance ON_FitResult::unknown if no result or it could not be determined if the result was in tolerance. Returns: 2d curve. See Also: ON_Surface::IsoCurve ON_Surface::Pushup

Reimplemented from ON_Surface.

◆ Pushup()

ON_Curve* ON_Extrusion::Pushup ( const ON_Curve curve_2d,
double  tolerance,
const ON_Interval curve_2d_subdomain = nullptr,
ON_FitResult rc = nullptr 
) const
overridevirtual

Description: Compute a 3d curve that is the composite of a 2d curve and the surface map. Parameters: curve_2d - [in] a 2d curve whose image is in the surface's domain. tolerance - [in] the maximum acceptable distance from the returned 3d curve to the image of curve_2d on the surface. curve_2d_subdomain - [in] optional subdomain for curve_2d rc - [out] if not 0 on input, points to an ON_FitResult with the following value - ON_FitResult::in_tolerance if result is in tolerance ON_FitResult::not_in_tolerance if result is not in tolerance ON_FitResult::unknown if no result or it could not be determined if the result was in tolerance. Returns: 3d curve. See Also: ON_Surface::IsoCurve ON_Surface::Pullback

Reimplemented from ON_Surface.

◆ Read()

bool ON_Extrusion::Read ( ON_BinaryArchive binary_archive)
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::ReadObject(). Parameters: binary_archive - archive to read from Returns: Returns true if the read is successful. Remarks: Use ON_BinaryArchive::ReadObject() to read objects. This Read() function should read the objects definition back into its data members.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

◆ Reverse()

bool ON_Extrusion::Reverse ( int  dir)
overridevirtual

Implements ON_Surface.

◆ SetDomain()

bool ON_Extrusion::SetDomain ( int  dir,
double  t0,
double  t1 
)
overridevirtual

Reimplemented from ON_Surface.

◆ SetMesh()

bool ON_Extrusion::SetMesh ( ON::mesh_type  mt,
ON_Mesh mesh 
)

ON_Extrusion mesh interface Description: Attach a mesh to the ON_Extrusion. Parameters: mt - [in] type of mesh that is being attached. If mt is ON::render_mesh, ON::analysis_mesh or ON::preview_mesh, the mesh is attached as that type of mesh. If mt is ON::default_mesh or ON::any_mesh, then nothing is done and false is returned. mesh - [in] mesh to attach.
mesh must be on the heap because ~ON_Extrusion() will delete it. if there is already of mesh of the prescribed type, it will be deleted. if mesh is null, any existing mesh is deleted and nothing is attached.

◆ SetMiterPlaneNormal()

bool ON_Extrusion::SetMiterPlaneNormal ( ON_3dVector  N,
int  end 
)

Description: Set miter plane normal. Parameters: N - [in] If N = ON_3dVector::UnsetVector or N is parallel to the z-axis, then the miter plane is the default plane perpendicular to the path. If N is valid and the z coordinate of a unitized N is greater than m_Nz_tol, then the miter plane normal is set. end - [in] 0 = set miter plane at the start of the path. 1 = set miter plane at the end of the path.

◆ SetOuterProfile()

bool ON_Extrusion::SetOuterProfile ( ON_Curve outer_profile,
bool  bCap 
)

Description: Set the outer profile of the extrusion. Parameters: outer_profile - [in] curve in the xy plane or a 2d curve. bCap - [in] If outer_profile is a closed curve, then bCap determines if the extrusion has end caps. If outer_profile is an open curve, bCap is ignored. Returns: True if the profile was set. In this case the ON_Extrusion class manages the curve and ~ON_Extrusion will delete it. 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. Remarks: If needed, outer_profile will be converted to a 2d curve. If outer_curve is closed but not correctly oriented, it will reversed so it has a counter-clockwise orientation.

◆ SetPath()

bool ON_Extrusion::SetPath ( ON_3dPoint  A,
ON_3dPoint  B 
)

Description: Sets m_path to (A,B), m_path_domain to [0,Length(AB)], and m_t to [0,1]. Parameters: A - [in] path start B - [in] path end Returns: true A and B are valid, the distance from A to B is larger than ON_ZERO_TOLERANCE, and the path was set. false A or B is not valid or the distance from A to B is at most ON_ZERO_TOLERANCE. In this case nothing is set. Remark: You must also set the up direction to be perpendicular to the path.

◆ SetPathAndUp()

bool ON_Extrusion::SetPathAndUp ( ON_3dPoint  A,
ON_3dPoint  B,
ON_3dVector  up 
)

Description: Sets m_path to (A,B), m_path_domain to [0,Length(AB)], m_t to [0,1], and m_up. Parameters: A - [in] path start B - [in] path end up - [in] up direction If up is a unit vector and perpendicular to the line segment from A to B, then m_up is set to up. Otherwise up will be adjusted so it is perpendicular to the line segment from A to B and unitized. Returns: true A and B are valid, the distance from A to B is larger than ON_ZERO_TOLERANCE, and the path was set. false A or B is not valid, or the distance from A to B is at most ON_ZERO_TOLERANCE, or up is invalid, or up is zero, or up is parallel to the line segment. In this case nothing is set.

◆ SizeOf()

unsigned int ON_Extrusion::SizeOf ( ) const
overridevirtual

Returns: An estimate of the amount of memory the class uses in bytes.

Reimplemented from ON_Object.

◆ SpanCount()

int ON_Extrusion::SpanCount ( int  dir) const
overridevirtual

number of smooth nonempty spans in the parameter direction

Parameters
dir0 gets first parameter's domain, 1 gets second parameter's domain

Implements ON_Surface.

◆ Split()

bool ON_Extrusion::Split ( int  dir,
double  c,
ON_Surface *&  west_or_south_side,
ON_Surface *&  east_or_north_side 
) const
overridevirtual

Description: Splits (divides) the surface into two parts at the specified parameter.

Parameters: dir - [in] 0 The surface is split vertically. The "west" side is returned in "west_or_south_side" and the "east" side is returned in "east_or_north_side". 1 The surface is split horizontally. The "south" side is returned in "west_or_south_side" and the "north" side is returned in "east_or_north_side". c - [in] value of constant parameter in interval returned by Domain(dir) west_or_south_side - [out] west/south portion of surface returned here east_or_north_side - [out] east/north portion of surface returned here

Example:

    ON_NurbsSurface srf = ...;
    int dir = 1;
    ON_NurbsSurface* south_side = 0;
    ON_NurbsSurface* north_side = 0;
    srf.Split( dir, srf.Domain(dir).Mid() south_side, north_side );

Reimplemented from ON_Surface.

◆ SumSurfaceForm()

ON_SumSurface* ON_Extrusion::SumSurfaceForm ( ON_SumSurface sum_surface) const

Description: Build a sum surface form of the extrusion. Parameters: sum_surface - [in] If the sum_surface pointer is not null, then the sum surface form is constructed in sum_surface. If the sum_surface pointer is null, then an ON_SumSurface is allocated on the heap. Returns: If successful, a pointer to the sum surface form. If unsuccessful, null. In particular, extrusions with mitered ends do not have sum surface forms.

◆ Transform()

bool ON_Extrusion::Transform ( const ON_Xform xform)
overridevirtual

Description: Transforms the object.

Parameters: xform - [in] transformation to apply to object. If xform.IsSimilarity() is zero, then you may want to call MakeSquishy() before calling Transform.

Remarks: When overriding this function, be sure to include a call to ON_Object::TransformUserData() which takes care of transforming any ON_UserData that may be attached to the object.

See Also: ON_Geometry::IsDeformable();

Remarks: Classes derived from ON_Geometry should call ON_Geometry::Transform() to handle user data transformations and then transform their definition.

Reimplemented from ON_Geometry.

◆ Transpose()

bool ON_Extrusion::Transpose ( )
overridevirtual

transpose surface parameterization (swap "s" and "t")

Implements ON_Surface.

◆ Trim()

bool ON_Extrusion::Trim ( int  dir,
const ON_Interval domain 
)
overridevirtual

Description: Removes the portions of the surface outside of the specified interval.

Parameters: dir - [in] 0 The domain specifies an sub-interval of Domain(0) (the first surface parameter). 1 The domain specifies an sub-interval of Domain(1) (the second surface parameter). domain - [in] interval of the surface to keep. If dir is 0, then the portions of the surface with parameters (s,t) satisfying s < Domain(0).Min() or s > Domain(0).Max() are trimmed away. If dir is 1, then the portions of the surface with parameters (s,t) satisfying t < Domain(1).Min() or t > Domain(1).Max() are trimmed away.

Reimplemented from ON_Surface.

◆ WallEdge()

ON_Curve* ON_Extrusion::WallEdge ( ON_COMPONENT_INDEX  ci) const

Parameters: ci - [in] component index identifying a wall edge curve. Returns: nullptr if the component index or the ON_Extrusion class is not valid. Otherwise a pointer to a 3d curve for the requested wall edge. This curve is on the heap and the caller is responsible for deleting this curve.

◆ WallSurface()

ON_Surface* ON_Extrusion::WallSurface ( ON_COMPONENT_INDEX  ci) const

Parameters: ci - [in] component index identifying a wall surface. Returns: nullptr if the component index or the ON_Extrusion class is not valid. Otherwise a pointer to a surface for the requested wall surface. This curve is on the heap and the caller is responsible for deleting this curve.

◆ Write()

bool ON_Extrusion::Write ( ON_BinaryArchive binary_archive) const
overridevirtual

Description: Low level archive writing tool used by ON_BinaryArchive::WriteObject(). Parameters: binary_archive - archive to write to Returns: Returns true if the write is successful. Remarks: Use ON_BinaryArchive::WriteObject() to write objects. This Write() function should just write the specific definition of this object. It should not write and any chunk typecode or length information.

The default implementation of this virtual function returns false and does nothing.

Reimplemented from ON_Object.

Member Data Documentation

◆ m_bCap

bool ON_Extrusion::m_bCap[2]

capped end information: If the profile is closed, then m_bCap[] determines if the ends are capped.

◆ m_bHaveN

bool ON_Extrusion::m_bHaveN[2]

mitered end information: The normals m_N[] are with respect to the xy plane. A normal parallel to the z axis has no mitering. If m_bHaveN[i] is true, then m_N[i] must be a 3d unit vector with m_N[i].z > m_Nz_tol; If m_bHaveN[i] is false, then m_N[i] is ignored. The normal m_N[0] defines the start miter plane and m_N[1] defines the end miter plane.

◆ m_bTransposed

bool ON_Extrusion::m_bTransposed

false: (s,t) = (profile,path)

◆ m_mesh_cache

ON_MeshCache ON_Extrusion::m_mesh_cache = ON_MeshCache::Empty
mutable

Cached meshes used for rendering, analysis, ...

◆ m_N

ON_3dVector ON_Extrusion::m_N[2]

◆ m_Nz_min

const double ON_Extrusion::m_Nz_min
static

1/64;

The z coordinates of miter plane normals must be greater than m_Nz_tol

◆ m_path

ON_Line ON_Extrusion::m_path

path definition: The line m_path must have length > m_path_length_min. The interval m_t must satisfy 0 <= m_t[0] < m_t[1] <= 1. The extrusion starts at m_path.PointAt(m_t[0]) and ends at m_path.PointAt(m_t[1]). The "up" direction m_up is a unit vector that must be perpendicular to m_path.Tangent().

◆ m_path_domain

ON_Interval ON_Extrusion::m_path_domain

Surface parameterization information.

◆ m_path_length_min

const double ON_Extrusion::m_path_length_min
static

ON_ZERO_TOLERANCE;.

The length of the m_path line must be greater than m_path_length_min

◆ m_profile

ON_Curve* ON_Extrusion::m_profile

◆ m_profile_count

int ON_Extrusion::m_profile_count

profile information: In general, use SetOuterProfile() and AddInnerProfile() to set m_profile_count and m_profile. If you are a glutton for punishment, then you might be interested in the following. The profile curves must be in the x-y plane. The profile's "y" axis corresponds to m_up. The point (0,0) is extruded along the m_path line. If m_profile_count = 1, then m_profile can be any type of continuous curve. If m_profile_count > 1, then m_profile must be an ON_PolyCurve with m_profile_count segments, the domain of each segment must exactly match the polycurve's segment domain, every segment must be continuous and closed, the first segment curve must have counter-clockwise orientation, and the rest must have clockwise orientations.

◆ m_t

ON_Interval ON_Extrusion::m_t

◆ m_up

ON_3dVector ON_Extrusion::m_up