10 #ifndef MS_BSPLINE_STRUCTURES_DEFINED
11 #define MS_BSPLINE_STRUCTURES_DEFINED
17 #define BSCURVE_GENERAL 0
18 #define BSCURVE_LINE 1
19 #define BSCURVE_CIRCULAR_ARC 2
20 #define BSCURVE_CIRCLE 3
21 #define BSCURVE_ELLIPTICAL_ARC 4
22 #define BSCURVE_ELLIPSE 5
23 #define BSCURVE_PARABOLIC_ARC 6
24 #define BSCURVE_HYPERBOLIC_ARC 7
27 #define BSSURF_GENERAL 0
28 #define BSSURF_PLANE 1
29 #define BSSURF_RIGHT_CYLINDER 2
31 #define BSSURF_SPHERE 4
32 #define BSSURF_TORUS 5
33 #define BSSURF_REVOLUTION 6
34 #define BSSURF_TAB_CYLINDER 7
35 #define BSSURF_RULED_SURFACE 8
42 #define MAX_POLES MAX_VERTICES
44 #define MAX_KNOTS (MAX_POLES + 2*MAX_ORDER - 1)
45 #define MAX_BNDRY_PTS MAX_VERTICES
46 #define MAX_DATA_PTS MAX_VERTICES
47 #define MAX_BSORDER MAX_ORDER
49 #define KNOT_TOLERANCE_BASIS 1E-10
54 #define FIT_LEASTSQUARES 2
55 #define FIT_CATMULLROM 3
58 #define OFFSET_JUMP_CUSP 0
59 #define OFFSET_CHAMFER_CUSP 1
60 #define OFFSET_POINT_CUSP 2
61 #define OFFSET_PARABOLA_CUSP 3
62 #define OFFSET_ARC_CUSP 4
65 #define POSITION_CONTINUITY 0
66 #define TANGENT_CONTINUITY 1
67 #define CURVATURE_CONTINUITY 2
68 #define DERIVATIVE_CONTINUITY 3
71 #define TRUNCATE_BOTH 0
72 #define TRUNCATE_NONE 1
73 #define TRUNCATE_SINGLE 2
78 #define SILHBND_NONE 2
79 #define SILHBND_BOTH 3
82 #define NO_EDGE 0x0000
83 #define U0_EDGE 0x0001
84 #define U1_EDGE 0x0002
85 #define V0_EDGE 0x0004
86 #define V1_EDGE 0x0008
87 #define ANY_EDGE 0x000F
91 #define MSB_ERROR 0x8000
111 int NumberAllocatedKnots ()
const;
156 void WireIntegrals (
double &length,
DPoint3dP centroid,
157 double fractionA,
double fractionB);
166 double m_knots[2 * MaxOrder];
188 GEOMDLLIMPEXP
void FractionToPoint (
DPoint3dR xyz,
double f)
const;
191 GEOMDLLIMPEXP
DPoint3d FractionToPoint (
double f)
const;
194 GEOMDLLIMPEXP
double FractionToKnot (
double f)
const;
197 GEOMDLLIMPEXP
void FractionToPoint (
DPoint3dR xyz,
DVec3dR tangent,
double f,
bool applyKnotScale =
true)
const;
209 GEOMDLLIMPEXP
void WireCentroid (
double &length,
DPoint3dR centroid,
double fraction0,
double fraction1);
212 GEOMDLLIMPEXP
void Length (
double &length,
double fraction0,
double fraction1);
214 GEOMDLLIMPEXP
void Length (
RotMatrixCP worldToLocal,
double &length,
double fraction0,
double fraction1);
218 GEOMDLLIMPEXP
double PolygonLength ()
const;
221 GEOMDLLIMPEXP
DRange1d KnotRange ()
const;
225 GEOMDLLIMPEXP
void SaturateKnots ();
236 GEOMDLLIMPEXP
void AddStrokes
242 double fractionA = 0.0,
243 double fractionB = 1.0,
244 bool useWorkPoles =
false,
252 GEOMDLLIMPEXP
bool IsRational (
bool useWorkPoles =
false)
const;
254 GEOMDLLIMPEXP
DPoint4dP GetWorkPoleP (
size_t index);
256 GEOMDLLIMPEXP
size_t GetWorkOrder ();
258 GEOMDLLIMPEXP
void Multiply (
TransformCR transform);
261 GEOMDLLIMPEXP
void BuildWorkPoles (
TransformCR transform);
272 bool mapToKnots =
false,
size_t firstDimension = 0,
size_t lastDimension = 2,
bool includeStartEnd =
true)
const;
276 GEOMDLLIMPEXP
bool TryGetPoleXYZ (
size_t index,
DPoint3dR xyz)
const;
278 GEOMDLLIMPEXP
DPoint4dP GetPoleP (
size_t index);
282 GEOMDLLIMPEXP
size_t GetOrder ();
284 GEOMDLLIMPEXP
size_t GetNumKnots ();
287 GEOMDLLIMPEXP
double *GetKnotP (
size_t index);
289 GEOMDLLIMPEXP
double *GetKnotP ();
292 GEOMDLLIMPEXP
bool IsNullU ()
const;
294 GEOMDLLIMPEXP
double UMin ()
const;
296 GEOMDLLIMPEXP
double UMax ()
const;
299 GEOMDLLIMPEXP
void SetUMin (
double u);
301 GEOMDLLIMPEXP
void SetUMax (
double u);
306 GEOMDLLIMPEXP
bool SubdivideToIntersection (
DRange1dCR interval);
309 GEOMDLLIMPEXP
size_t Index ()
const;
323 static GEOMDLLIMPEXP
bool RefineCloseApproach
331 double &fractionAOut,
333 double &fractionBOut,
struct RotMatrix const * RotMatrixCP
Definition: msgeomstructs_typedefs.h:135
int32_t order
Curve order (one more than polynomial degree).
Definition: BsplineStructs.h:99
MSBsplineCurve is a "Non uniform, rational Bspline curve".
Definition: MSBsplineCurve.h:46
int32_t numKnots
Knot count. See NumberAllocatedKnots.
Definition: BsplineStructs.h:105
int32_t isColinearTangents
Definition: BsplineStructs.h:131
struct IFacetOptions const & IFacetOptionsCR
Definition: msgeomstructs_typedefs.h:162
Spline order, closure, and count data.
Definition: BsplineStructs.h:96
int32_t numRules
Not used.
Definition: BsplineStructs.h:107
#define END_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:30
int32_t isPeriodic
Definition: BsplineStructs.h:127
struct RotMatrix const & RotMatrixCR
Definition: msgeomstructs_typedefs.h:135
struct DRange1d const & DRange1dCR
Definition: msgeomstructs_typedefs.h:102
int int32_t
Definition: Bentley.r.h:92
#define NULL
Definition: Bentley.h:157
4d point coordinates.
Definition: dpoint4d.h:17
int32_t isChordLenKnots
Definition: BsplineStructs.h:130
int32_t isNaturalTangents
Definition: BsplineStructs.h:133
struct MSBsplineCurve const & MSBsplineCurveCR
Definition: msgeomstructs_typedefs.h:139
int32_t closed
True if the curve uses poles in a periodic sense.
Definition: BsplineStructs.h:101
3d point coordinates.
Definition: dpoint3d.h:19
int32_t numPoles
Number of stored poles.
Definition: BsplineStructs.h:103
int32_t curveDisplay
Definition: BsplineStructs.h:142
A 1d interval with low and high values.
Definition: DRange1d.h:41
int32_t rulesByLength
Definition: BsplineStructs.h:143
struct DMatrix4d const * DMatrix4dCP
Definition: msgeomstructs_typedefs.h:97
struct Transform const & TransformCR
Definition: msgeomstructs_typedefs.h:134
int32_t polygonDisplay
Definition: BsplineStructs.h:141
struct MSBsplineCurve const * MSBsplineCurveCP
Definition: msgeomstructs_typedefs.h:139
int32_t numPoints
Definition: BsplineStructs.h:128
int32_t isChordLenTangents
Definition: BsplineStructs.h:132
int32_t numKnots
Definition: BsplineStructs.h:129
int32_t order
Definition: BsplineStructs.h:126
#define BEGIN_BENTLEY_GEOMETRY_NAMESPACE
Definition: Bentley.r.h:29
int MSBsplineStatus
Definition: BsplineStructs.h:89
struct BCurveSegment const & BCurveSegmentCR
Definition: msgeomstructs_typedefs.h:161
Vector with x,y,z components.
Definition: dvec3d.h:110
Interpolation controls.
Definition: BsplineStructs.h:124
A 3d low and high corner pair for range boxes.
Definition: drange3d.h:20
spline display controls
Definition: BsplineStructs.h:139
Complete data for a single patch segment extracted from a bspline curve.
Definition: BsplineStructs.h:152