A DgnExtrusionDetail is a rotational sweep of a base CurveVector. More...
#include <SolidPrimitive.h>
Public Types | |
enum | RadiusType { Minimum, Maximum, Centroidal } |
Public Member Functions | |
DgnRotationalSweepDetail (CurveVectorPtr baseCurve, DPoint3dCR center, DVec3dCR axis, double sweepAngle, bool capped) | |
Detail consructor with complete field list as parameters ... More... | |
DgnRotationalSweepDetail () | |
Default value constructor. More... | |
bool | GetRange (DRange3dR range) const |
Return range. More... | |
bool | GetRange (DRange3dR range, TransformCR transform) const |
Return range when transformed. More... | |
bool | TryGetConstructiveFrame (TransformR localToWorld, TransformR worldToLocal) const |
Return coordinate system of 1) Z axis along rotation 2) X towards base curve extreme point. More... | |
bool | IsSameStructure (ISolidPrimitiveCR other) const |
Test for same type and structure (but no coordinate comparison) More... | |
bool | IsSameStructureAndGeometry (ISolidPrimitiveCR other, double tolerance) const |
Test for same type, structure and coordinates. More... | |
bool | IsClosedVolume () const |
Test if this is a closed volume. More... | |
bool | GetTransforms (TransformR localToWorld, TransformR worldToLocal) const |
return transforms for the coordinate frame with z axis on the line of rotation. More... | |
bool | GetVFractionTransform (double vFraction, TransformR transform, TransformR derivativeTransform) const |
Get transform from base cap to fractional v position. More... | |
CurveVectorPtr | VFractionToProfile (double fraction) const |
Fractional profile curve. More... | |
bool | TryGetRotationAxis (DPoint3dR center, DVec3dR axis, double &sweepRadians) const |
Get the axis of rotation, negated if necessary to force a positive sweep angle. More... | |
void | AddRayIntersections (bvector< SolidLocationDetail > &pickData, DRay3dCR ray, int parentId, double minParameter) const |
Compute intersections with a ray and add to the pickData. More... | |
void | AddCurveIntersections (CurveVectorCR curves, bvector< CurveLocationDetail > &curvePoints, bvector< SolidLocationDetail > &solidPoints, MeshAnnotationVector &messages) const |
Compute intersections with curves and add to the data array. More... | |
void | AddCurveIntersections (ICurvePrimitiveCR curves, bvector< CurveLocationDetail > &curvePoints, bvector< SolidLocationDetail > &solidPoints, MeshAnnotationVector &messages) const |
Compute intersections with a single curve and add to the data array. More... | |
bool | ClosestPoint (DPoint3dCR spacePoint, SolidLocationDetail &pickDetail) const |
bool | TryUVFractionToXYZ (SolidLocationDetail::FaceIndices const &faceIndices, double uFraction, double vFraction, DPoint3dR xyz, DVec3dR dXdu, DVec3dR dXdv) const |
convert u,v fraction on specified face to xyz and derivatives. More... | |
IGeometryPtr | GetFace (SolidLocationDetail::FaceIndices const &indices) const |
Return a single face of the solid primitive. More... | |
void | GetFaceIndices (bvector< SolidLocationDetail::FaceIndices > &indices) const |
Fill a list of all possible face indices. More... | |
ICurvePrimitivePtr | GetConstantVSection (SolidLocationDetail::FaceIndices const &indices, double fraction) const |
Copy a section curve at constant v of a single face to a single ICurvePrimitive. More... | |
ICurvePrimitivePtr | GetConstantUSection (SolidLocationDetail::FaceIndices const &indices, double fraction) const |
Copy a section at constant u of a single face to a single ICurvePrimitive. More... | |
bool | TryGetMaxUVLength (SolidLocationDetail::FaceIndices const &indices, DVec2dR uvLength) const |
Compute the lengths of the longest u and v direction sections of a single face of a solid primitive. More... | |
ISolidPrimitivePtr | Clone () const |
Copy to a new (allocated) solid primitive. More... | |
bool | TransformInPlace (TransformCR transform) |
Transform in place. More... | |
bool | ComputeSecondMomentAreaProducts (TransformR localToWorld, DMatrix4dR localProducts) const |
Return the various integrated products for area moment calculations. More... | |
bool | ComputeSecondMomentVolumeProducts (TransformR localToWorld, DMatrix4dR localProducts) const |
Return the various integrated products for moment calculations. More... | |
bool | HasRealCaps () const |
Return true if capped and incomplete sweep. More... | |
void | SetVRuleCount (size_t numVRules) |
Set the number of v rules to display in wireframe. More... | |
size_t | GetVRuleCount () const |
Get the number of v rules that will be displayed in wireframe. More... | |
bool | GetRadius (double &radius, RadiusType type) const |
Return the radius. More... | |
bool | SetRadius (double radius, RadiusType type) |
Set the radius (by translating the profile). More... | |
Static Public Member Functions | |
static size_t | ComputeVRuleCount (double sweepRadians, size_t numVRulesFullSweep=4) |
Compute v rule count for a given sweep angle and desired number of v rules for a full sweep. More... | |
Public Attributes | |
CurveVectorPtr | m_baseCurve |
DRay3d | m_axisOfRotation |
double | m_sweepAngle |
bool | m_capped |
size_t | m_numVRules |
A DgnExtrusionDetail is a rotational sweep of a base CurveVector.
|
strong |
DgnRotationalSweepDetail | ( | CurveVectorPtr | baseCurve, |
DPoint3dCR | center, | ||
DVec3dCR | axis, | ||
double | sweepAngle, | ||
bool | capped | ||
) |
Detail consructor with complete field list as parameters ...
[in] | baseCurve | Curve to be swept. |
[in] | center | Center of rotation |
[in] | axis | axis of rotation. |
[in] | sweepAngle | major circle sweep angle |
[in] | capped | true if end cap is enabled |
Default value constructor.
void AddCurveIntersections | ( | CurveVectorCR | curves, |
bvector< CurveLocationDetail > & | curvePoints, | ||
bvector< SolidLocationDetail > & | solidPoints, | ||
MeshAnnotationVector & | messages | ||
) | const |
Compute intersections with curves and add to the data array.
[in] | curves | |
[in,out] | curvePoints | growing array of curve points. |
[in,out] | solidPoints | growing array of solid points. |
[in,out] | messages | array of error messages |
void AddCurveIntersections | ( | ICurvePrimitiveCR | curves, |
bvector< CurveLocationDetail > & | curvePoints, | ||
bvector< SolidLocationDetail > & | solidPoints, | ||
MeshAnnotationVector & | messages | ||
) | const |
Compute intersections with a single curve and add to the data array.
[in] | curves | |
[in,out] | curvePoints | growing array of curve points. |
[in,out] | solidPoints | growing array of solid points. |
[in,out] | messages | array of error messages |
void AddRayIntersections | ( | bvector< SolidLocationDetail > & | pickData, |
DRay3dCR | ray, | ||
int | parentId, | ||
double | minParameter | ||
) | const |
Compute intersections with a ray and add to the pickData.
[in] | ray | origin and direction |
[in] | minParameter | smallest parameter of pick. (e.g. 0 for picking along a positive ray from an eyepoint) |
[in,out] | pickData | growing array of picks. |
[in] | parentId | caller's id for this solid. Will be placed in each pickData entry has parentId. |
ISolidPrimitivePtr Clone | ( | ) | const |
Copy to a new (allocated) solid primitive.
bool ClosestPoint | ( | DPoint3dCR | spacePoint, |
SolidLocationDetail & | pickDetail | ||
) | const |
[in] | spacePoint | search for point close to here and on the solid surface |
[out] | pickDetail | closest point data. |
bool ComputeSecondMomentAreaProducts | ( | TransformR | localToWorld, |
DMatrix4dR | localProducts | ||
) | const |
Return the various integrated products for area moment calculations.
The primitive is treated as a thin shell.
[out] | localToWorld | transform from preferred system where the products are most easily computed to world. |
[out] | localProducts | integrated [xx xy xz x; xy yy yz y; xz yz zz z; x y z 1] dA |
bool ComputeSecondMomentVolumeProducts | ( | TransformR | localToWorld, |
DMatrix4dR | localProducts | ||
) | const |
Return the various integrated products for moment calculations.
The primitive is treated as a volume
[out] | localToWorld | transform from preferred system where the products are most easily computed to world. |
[out] | localProducts | integrated [xx xy xz x; xy yy yz y; xz yz zz z; x y z 1] dA |
|
static |
Compute v rule count for a given sweep angle and desired number of v rules for a full sweep.
ICurvePrimitivePtr GetConstantUSection | ( | SolidLocationDetail::FaceIndices const & | indices, |
double | fraction | ||
) | const |
Copy a section at constant u of a single face to a single ICurvePrimitive.
[in] | indices | selects face |
[in] | fraction | u fraction for section curve |
ICurvePrimitivePtr GetConstantVSection | ( | SolidLocationDetail::FaceIndices const & | indices, |
double | fraction | ||
) | const |
Copy a section curve at constant v of a single face to a single ICurvePrimitive.
[in] | indices | selects face |
[in] | fraction | v fraction for section curve |
IGeometryPtr GetFace | ( | SolidLocationDetail::FaceIndices const & | indices | ) | const |
Return a single face of the solid primitive.
indices | integer selectors for the face. |
void GetFaceIndices | ( | bvector< SolidLocationDetail::FaceIndices > & | indices | ) | const |
Fill a list of all possible face indices.
[out] | indices | array of selectors for the faces. |
bool GetRadius | ( | double & | radius, |
RadiusType | type | ||
) | const |
Return the radius.
[out] | radius | |
[in] | type | of radius. |
bool GetRange | ( | DRange3dR | range | ) | const |
Return range.
bool GetRange | ( | DRange3dR | range, |
TransformCR | transform | ||
) | const |
Return range when transformed.
bool GetTransforms | ( | TransformR | localToWorld, |
TransformR | worldToLocal | ||
) | const |
return transforms for the coordinate frame with z axis on the line of rotation.
[out] | localToWorld | translation part is is a point on the axis; z direction is the rotation axis. |
[out] | worldToLocal | inverse transform. |
bool GetVFractionTransform | ( | double | vFraction, |
TransformR | transform, | ||
TransformR | derivativeTransform | ||
) | const |
Get transform from base cap to fractional v position.
[out] | transform | transform to rotate a point. |
[out] | derivativeTransform | Derivative with respect to vFraction. The output of derivativeTransform * xyz is a vector, not a point !!! (If viewed as a 4x4 matrix, its ww entry is zero) |
[in] | vFraction | fraction of sweep angle. |
size_t GetVRuleCount | ( | ) | const |
Get the number of v rules that will be displayed in wireframe.
bool HasRealCaps | ( | ) | const |
Return true if capped and incomplete sweep.
bool IsClosedVolume | ( | ) | const |
Test if this is a closed volume.
bool IsSameStructure | ( | ISolidPrimitiveCR | other | ) | const |
Test for same type and structure (but no coordinate comparison)
bool IsSameStructureAndGeometry | ( | ISolidPrimitiveCR | other, |
double | tolerance | ||
) | const |
Test for same type, structure and coordinates.
bool SetRadius | ( | double | radius, |
RadiusType | type | ||
) |
Set the radius (by translating the profile).
[in] | radius | |
[in] | type | of radius. |
void SetVRuleCount | ( | size_t | numVRules | ) |
Set the number of v rules to display in wireframe.
bool TransformInPlace | ( | TransformCR | transform | ) |
Transform in place.
bool TryGetConstructiveFrame | ( | TransformR | localToWorld, |
TransformR | worldToLocal | ||
) | const |
Return coordinate system of 1) Z axis along rotation 2) X towards base curve extreme point.
bool TryGetMaxUVLength | ( | SolidLocationDetail::FaceIndices const & | indices, |
DVec2dR | uvLength | ||
) | const |
Compute the lengths of the longest u and v direction sections of a single face of a solid primitive.
[in] | indices | selects face. |
[in] | uvLength | sizes in u, v directions. |
bool TryGetRotationAxis | ( | DPoint3dR | center, |
DVec3dR | axis, | ||
double & | sweepRadians | ||
) | const |
Get the axis of rotation, negated if necessary to force a positive sweep angle.
center | OUT center of rotation. |
axis | OUT axis of rotation. |
sweepRadians | OUT angle of rotation. |
bool TryUVFractionToXYZ | ( | SolidLocationDetail::FaceIndices const & | faceIndices, |
double | uFraction, | ||
double | vFraction, | ||
DPoint3dR | xyz, | ||
DVec3dR | dXdu, | ||
DVec3dR | dXdv | ||
) | const |
convert u,v fraction on specified face to xyz and derivatives.
[in] | faceIndices | face selection indices |
[in] | uFraction | fractional coordinate in u direction. |
[in] | vFraction | fractional coordinate in v direction. |
[out] | xyz | point on face. |
[out] | dXdu | derivative of face point wrt uFraction. |
[out] | dXdv | derivative of face point wrt vFraction. |
CurveVectorPtr VFractionToProfile | ( | double | fraction | ) | const |
Fractional profile curve.
DRay3d m_axisOfRotation |
CurveVectorPtr m_baseCurve |
bool m_capped |
size_t m_numVRules |
double m_sweepAngle |