CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbSpline.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24
25
26
27#ifndef ODDB_DBSPLINE_H
28#define ODDB_DBSPLINE_H
29
30#include "TD_PackPush.h"
31
32#include "DbCurve.h"
33#include "DwgDeclareMembers.h"
34
35static const unsigned int kPlineVerticesThrehold = 10000U;
36
37class OdGeKnotVector;
38
45{
46public:
48
50
54 bool isRational() const;
55
61 int degree() const;
62
66 void elevateDegree(int newDegree);
67
71 int numControlPoints() const;
72
80 int controlPointIndex,
81 OdGePoint3d& point) const;
82
90 int controlPointIndex,
91 const OdGePoint3d& point);
92
96 int numFitPoints() const;
97
105 int fitPointIndex,
106 OdGePoint3d& point) const;
107
115 int fitPointIndex,
116 const OdGePoint3d& point);
117
130 int fitPointIndex,
131 const OdGePoint3d& point);
132
139 int fitPointIndex);
140
148 double fitTolerance() const;
149
160 double fitTolerance);
161
168 OdGeVector3d& startTangent,
169 OdGeVector3d& endTangent) const;
170
177 const OdGeVector3d& startTangent,
178 const OdGeVector3d& endTangent);
179
183 bool hasFitData() const;
184
196 OdGePoint3dArray& fitPoints,
197 int& degree,
198 double& fitTolerance,
199 bool& tangentsExist,
200 OdGeVector3d& startTangent,
201 OdGeVector3d& endTangent ) const;
202
215 OdGePoint3dArray& fitPoints,
216 int& degree,
217 double& fitTolerance,
218 bool& tangentsExist,
219 OdGeVector3d& startTangent,
220 OdGeVector3d& endTangent,
221 OdGe::OdGeKnotParameterization& knotParam) const;
222
232 const OdGePoint3dArray& fitPoints,
233 int degree,
234 double fitTolerance,
235 const OdGeVector3d& startTangent,
236 const OdGeVector3d& endTangent );
237
248 const OdGePoint3dArray& fitPoints,
249 int degree,
250 double fitTolerance,
251 const OdGeVector3d& startTangent,
252 const OdGeVector3d& endTangent,
254
259
278 int& degree,
279 bool& rational,
280 bool& closed,
281 bool& periodic,
282 OdGePoint3dArray& controlPoints,
283 OdGeDoubleArray& knots,
284 OdGeDoubleArray& weights,
285 double& controlPtTol,
286 double& knotTol) const;
287
300 int& degree,
301 bool& rational,
302 bool& closed,
303 bool& periodic,
304 OdGePoint3dArray& controlPoints,
305 OdGeKnotVector& knots,
306 OdGeDoubleArray& weights,
307 double& controlPtTol) const;
308
330 void setNurbsData(int degree,
331 bool rational,
332 bool closed,
333 bool periodic,
334 const OdGePoint3dArray& controlPoints,
335 const OdGeDoubleArray& knots,
336 const OdGeDoubleArray& weights,
337 double controlPtTol,
338 double knotTol );
339
360 int degree,
361 bool rational,
362 bool closed,
363 bool periodic,
364 const OdGePoint3dArray& controlPoints,
365 const OdGeKnotVector& knots,
366 const OdGeDoubleArray& weights,
367 double controlPtTol);
368
373 double weightAt(
374 int weightIndex) const;
375
382 int weightIndex,
383 double weight);
384
388 void insertKnot(double param);
389
397
398
400 void* pClsid) const;
401
402 /*
403 void getOffsetCurvesGivenPlaneNormal(const OdGeVector3d& normal, //Replace OdRxObjectPtrArray
404 double offsetDist,
405 OdRxObjectPtrArray& offsetCurves ) const;
406 */
407
409 OdDbDwgFiler* pFiler);
410
411 virtual void dwgOutFields(
412 OdDbDwgFiler* pFiler) const;
413
415 OdDbDxfFiler* pFiler);
416
417 virtual void dxfOutFields(
418 OdDbDxfFiler* pFiler) const;
419
420 virtual bool subWorldDraw(
421 OdGiWorldDraw* pWd) const;
422
423 //FELIX_CHANGE_BEGIN
425 OdGeExtents3d& extents) const;
426 //FELIX_CHANGE_END
427
429 const OdGeMatrix3d& xfm);
430
431 virtual bool isPlanar() const;
432
434 OdGePlane& plane,
435 OdDb::Planarity& planarity) const;
436
437
443 double param,
444 OdGePoint3d& pointOnCurve) const;
445
447 const OdGePoint3d& pointOnCurve,
448 double& param) const;
449
451 double& startParam) const;
452
454 double& endParam) const;
455
457 OdGePoint3d& startPoint) const;
458
460 OdGePoint3d& endPoint) const;
461
462 virtual OdResult getDistAtParam( double param, double& dist ) const;
463
464 virtual OdResult getParamAtDist( double dist, double& param ) const;
465
467 double param,
468 OdGeVector3d& firstDeriv) const;
469
471 double param,
472 OdGeVector3d& secondDeriv) const;
473
475 double& area) const;
476
477 //DOM-IGNORE-BEGIN
481 //DOM-IGNORE-END
482
484 const OdGeDoubleArray& params,
485 OdRxObjectPtrArray& entitySet) const ODRX_OVERRIDE;
486
489 OdDbObjectId& replaceId,
490 bool& exchangeXData);
491
496 {
497 kFitPoints = 0, // By fit points.
498 kControlPoints = 1 // By control points.
499 };
500
505
518
522 bool cvFrame() const;
523
528 void setCvFrame(bool bVisible);
529
543 OdResult insertControlPointAt(double knotParam, const OdGePoint3d& ctrlPt, double weight = 1.0);
544
554
558 bool isNull() const;
559
570 bool modifyPositionAndTangent(double param, const OdGePoint3d& point, const OdGeVector3d* deriv);
571
574
606 int precision = 10, int* maxSuggestedPrecision = NULL,
607 unsigned int numOfVerticesThreshold = kPlineVerticesThrehold) const;
608
642 bool bConvertAsArcs, bool bToLWPolyline,
643 int precision = 10, int* maxSuggestedPrecision = NULL,
644 unsigned int numOfVerticesThreshold = kPlineVerticesThrehold) const;
645
663};
664
669
676{
677public:
679
681 const OdDbCurve* pCurve,
682 const OdGePoint3d& pointOnCurve,
683 double& param) const = 0;
684
686 const OdDbCurve* pCurve,
687 double& area) const = 0;
688};
689
694
695#include "TD_PackPop.h"
696
697#endif
698
#define DBENT_EXPORT
Definition: DbExport.h:67
OdSmartPtr< OdDbSpline > OdDbSplinePtr
Definition: DbSpline.h:668
OdSmartPtr< OdDbSplinePE > OdDbSplinePEPtr
Definition: DbSpline.h:693
tol
Definition: DimVarDefs.h:2287
#define ODRX_OVERRIDE
OdResult
Definition: OdResult.h:29
virtual OdResult getSecondDeriv(double param, OdGeVector3d &secondDeriv) const
virtual OdResult getSplitCurves(const OdGeDoubleArray &params, OdRxObjectPtrArray &curveSegments) const
virtual OdResult getFirstDeriv(double param, OdGeVector3d &firstDeriv) const =0
void setFitData(const OdGePoint3dArray &fitPoints, int degree, double fitTolerance, const OdGeVector3d &startTangent, const OdGeVector3d &endTangent, OdGe::OdGeKnotParameterization knotParam)
double weightAt(int weightIndex) const
OdResult setType(SplineType type)
int degree() const
OdResult getFitTangents(OdGeVector3d &startTangent, OdGeVector3d &endTangent) const
bool modifyPositionAndTangent(double param, const OdGePoint3d &point, const OdGeVector3d *deriv)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
void setControlPointAt(int controlPointIndex, const OdGePoint3d &point)
void setFitPointAt(int fitPointIndex, const OdGePoint3d &point)
double fitTolerance() const
TD_USING(OdDbCurve::getSecondDeriv)
void setWeightAt(int weightIndex, double weight)
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
void setNurbsData(int degree, bool rational, bool closed, bool periodic, const OdGePoint3dArray &controlPoints, const OdGeKnotVector &knots, const OdGeDoubleArray &weights, double controlPtTol)
bool hasFitData() const
virtual OdResult getSplitCurves(const OdGeDoubleArray &params, OdRxObjectPtrArray &entitySet) const ODRX_OVERRIDE
void getControlPointAt(int controlPointIndex, OdGePoint3d &point) const
virtual OdResult getPointAtParam(double param, OdGePoint3d &pointOnCurve) const
void setCvFrame(bool bVisible)
void elevateDegree(int newDegree)
virtual OdResult reverseCurve()
bool isRational() const
virtual OdResult getPlane(OdGePlane &plane, OdDb::Planarity &planarity) const
OdDbObjectPtr decomposeForSave(OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
bool cvFrame() const
virtual OdResult setFromOdGeCurve(const OdGeCurve3d &geCurve, OdGeVector3d *normal=NULL, const OdGeTol &tol=OdGeContext::gTol) ODRX_OVERRIDE
OdResult toPolyline(OdDbCurve *&pCurve, int precision=10, int *maxSuggestedPrecision=NULL, unsigned int numOfVerticesThreshold=kPlineVerticesThrehold) const
virtual OdResult subGetGeomExtents(OdGeExtents3d &extents) const
TD_USING(OdDbCurve::getFirstDeriv)
void insertKnot(double param)
OdResult insertControlPointAt(double knotParam, const OdGePoint3d &ctrlPt, double weight=1.0)
OdResult getFitPointAt(int fitPointIndex, OdGePoint3d &point) const
virtual OdResult getParamAtDist(double dist, double &param) const
virtual OdResult getEndParam(double &endParam) const
SplineType type() const
virtual OdResult getSecondDeriv(double param, OdGeVector3d &secondDeriv) const
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
void removeFitPointAt(int fitPointIndex)
void setFitTangents(const OdGeVector3d &startTangent, const OdGeVector3d &endTangent)
TD_USING(OdDbCurve::getSplitCurves)
OdResult getFitData(OdGePoint3dArray &fitPoints, int &degree, double &fitTolerance, bool &tangentsExist, OdGeVector3d &startTangent, OdGeVector3d &endTangent, OdGe::OdGeKnotParameterization &knotParam) const
void setFitTol(double fitTolerance)
void setFitData(const OdGePoint3dArray &fitPoints, int degree, double fitTolerance, const OdGeVector3d &startTangent, const OdGeVector3d &endTangent)
virtual bool isPlanar() const
void getNurbsData(int &degree, bool &rational, bool &closed, bool &periodic, OdGePoint3dArray &controlPoints, OdGeDoubleArray &knots, OdGeDoubleArray &weights, double &controlPtTol, double &knotTol) const
void getNurbsData(int &degree, bool &rational, bool &closed, bool &periodic, OdGePoint3dArray &controlPoints, OdGeKnotVector &knots, OdGeDoubleArray &weights, double &controlPtTol) const
virtual OdResult getStartPoint(OdGePoint3d &startPoint) const
DWGMAP_DECLARE_MEMBERS(OdDbSpline)
OdResult removeControlPointAt(int index)
OdResult getFitData(OdGePoint3dArray &fitPoints, int &degree, double &fitTolerance, bool &tangentsExist, OdGeVector3d &startTangent, OdGeVector3d &endTangent) const
int numFitPoints() const
virtual OdResult getArea(double &area) const
virtual OdResult getDistAtParam(double param, double &dist) const
OdResult toPolyline(OdDbCurve *&pCurve, bool bConvertAsArcs, bool bToLWPolyline, int precision=10, int *maxSuggestedPrecision=NULL, unsigned int numOfVerticesThreshold=kPlineVerticesThrehold) const
virtual OdResult getStartParam(double &startParam) const
int numControlPoints() const
virtual OdResult getFirstDeriv(double param, OdGeVector3d &firstDeriv) const
void purgeFitData()
void setNurbsData(int degree, bool rational, bool closed, bool periodic, const OdGePoint3dArray &controlPoints, const OdGeDoubleArray &knots, const OdGeDoubleArray &weights, double controlPtTol, double knotTol)
void insertFitPointAt(int fitPointIndex, const OdGePoint3d &point)
virtual OdResult subGetClassID(void *pClsid) const
virtual OdResult getParamAtPoint(const OdGePoint3d &pointOnCurve, double &param) const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
bool isNull() const
virtual OdResult getEndPoint(OdGePoint3d &endPoint) const
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const ODRX_OVERRIDE
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
virtual OdResult getOdGeCurve(OdGeCurve3d *&pGeCurve, const OdGeTol &tol=OdGeContext::gTol) const ODRX_OVERRIDE
virtual OdResult getArea(const OdDbCurve *pCurve, double &area) const =0
ODRX_DECLARE_MEMBERS(OdDbSplinePE)
virtual OdResult getParamAtPoint(const OdDbCurve *pCurve, const OdGePoint3d &pointOnCurve, double &param) const =0
Definition: GeTol.h:49
GLenum GLint * params
Definition: gles2_ext.h:184
GLuint index
Definition: gles2_ext.h:265
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLenum GLint GLint * precision
Definition: gles2_ext.h:563
DwgVersion
Definition: OdaDefs.h:47
Planarity
Definition: DbEntity.h:74
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:65
OdGeKnotParameterization
Definition: Ge.h:513