CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
GeNurbCurve2d.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2024, 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-2024 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#ifndef OD_GENURB2d_H
26#define OD_GENURB2d_H
27
28#include "Ge/GeSplineEnt2d.h"
29#include "OdPlatformSettings.h"
30
31class OdGeNurbCurve2dImpl;
32class OdGePolyline2d;
33class OdGeEllipArc2d;
34class OdGeLineSeg2d;
35class OdGeKnotVector;
36
37#include "TD_PackPush.h"
38
50{
51public:
53
59
66 const OdGeNurbCurve2d& source);
67
96 int degree,
97 const OdGeKnotVector& knots,
98 const OdGePoint2dArray& controlPoints,
99 bool isPeriodic = false);
100
135 int degree,
136 const OdGeKnotVector& knots,
137 const OdGePoint2dArray& controlPoints,
138 const OdGeDoubleArray& weights,
139 bool isPeriodic = false);
140
153 int degree,
154 const OdGePolyline2d& fitPolyline,
155 bool isPeriodic = false);
156
176 const OdGePoint2dArray& fitPoints,
177 const OdGeVector2d& startTangent,
178 const OdGeVector2d& endTangent,
179 bool startTangentDefined = true,
180 bool endTangentDefined = true,
181 const OdGeTol& fitTolerance = OdGeContext::gTol);
182
194 const OdGePoint2dArray& fitPoints,
195 const OdGeTol& fitTolerance = OdGeContext::gTol);
196
212 const OdGePoint2dArray& fitPoints,
213 const OdGeVector2dArray& fitTangents,
214 const OdGeTol& fitTolerance = OdGeContext::gTol,
215 bool isPeriodic = false);
216
226 const OdGeEllipArc2d& ellipse);
227
237 const OdGeLineSeg2d& linSeg);
238
259 const OdGePoint2dArray& fitPoints,
260 const OdGeVector2d& startTangent,
261 const OdGeVector2d& endTangent,
262 bool startTangentDefined,
263 bool endTangentDefined,
264 OdGeKnotParameterization knotParam,
265 const OdGeTol& fitTol = OdGeContext::gTol);
266
273 int numFitPoints() const;
274
284
295 int fitPointIndex,
296 OdGePoint2d& point) const;
297
308 OdGeTol& fitTolerance) const;
309
321 OdGeVector2d& startTangent,
322 OdGeVector2d& endTangent) const;
323
342 OdGePoint2dArray& fitPoints,
343 OdGeTol& fitTolerance,
344 bool& tangentsExist,
345 OdGeVector2d& startTangent,
346 OdGeVector2d& endTangent) const;
347
367 OdGePoint2dArray& fitPoints,
368 OdGeTol& fitTolerance,
369 bool& tangentsExist,
370 OdGeVector2d& startTangent,
371 OdGeVector2d& endTangent,
372 OdGeKnotParameterization& knotParam) const;
373
403 int& degree,
404 bool& rational,
405 bool& periodic,
407 OdGePoint2dArray& controlPoints,
408 OdGeDoubleArray& weights) const;
409
419 int numWeights() const;
420
429 double weightAt(
430 int weightIndex) const;
431
448 int weightIndex,
449 double weight);
450
466 bool evalMode() const;
467
482 const OdGeTol& tol = OdGeContext::gTol) const;
483
498 const OdGeTol& tol = OdGeContext::gTol) const;
499
510 int fitPointIndex,
511 const OdGePoint2d& point);
512
524 int fitPointIndex,
525 const OdGePoint2d& point);
526
540 int fitPointIndex);
541
555 bool addControlPointAt(double newKnot, const OdGePoint2d& point, double weight = 1.0);
556
566
577
587 const OdGeTol& fitTol = OdGeContext::gTol);
588
599 const OdGeVector2d& startTangent,
600 const OdGeVector2d& endTangent);
601
620 const OdGePoint2dArray& fitPoints,
621 const OdGeVector2d& startTangent,
622 const OdGeVector2d& endTangent,
623 const OdGeTol& fitTol = OdGeContext::gTol);
624
646 const OdGeKnotVector& fitKnots,
647 const OdGePoint2dArray& fitPoints,
648 const OdGeVector2d& startTangent,
649 const OdGeVector2d& endTangent,
650 const OdGeTol& fitTol = OdGeContext::gTol,
651 bool isPeriodic = false);
652
673 int degree,
674 const OdGePoint2dArray& fitPoints,
675 const OdGeTol& fitTol = OdGeContext::gTol);
676
695 const OdGePoint2dArray& fitPoints,
696 const OdGeVector2d& startTangent,
697 const OdGeVector2d& endTangent,
698 OdGeKnotParameterization knotParam,
699 const OdGeTol& fitTol = OdGeContext::gTol);
700
713
723 double newKnot);
724
738 double newKnot);
739
758 bool evalMode = false);
759
775 const OdGeNurbCurve2d& curve, const OdGeTol& iTolerance = OdGeContext::gTol);
776
787 double newStartParam,
788 double newEndParam);
789
803 double weight = 1.0);
804
817
825
836
844
855 int plusDegree);
856
866 const OdGeNurbCurve2d& spline);
867
869 // Overrides :
870
872 // TD Special :
873
887 const OdGeLine2d &line2d,
888 OdGePoint2dArray &pnts2d,
890 OdGeDoubleArray *params = NULL) const;
891
916 int degree,
917 const OdGeKnotVector& knots,
918 const OdGePoint2dArray& controlPoints,
919 const OdGeDoubleArray& weights,
920 bool isPeriodic = false);
921
940 static OdGeNurbCurve2d* convertFrom(const OdGeCurve2d* source, const OdGeInterval& domain, const OdGeTol& tol = OdGeContext::gTol, bool sameParametrization = false);
941
958 static OdGeNurbCurve2d* convertFrom(const OdGeCurve2d* source, const OdGeTol& tol = OdGeContext::gTol, bool sameParametrization = false);
959//DOM-IGNORE-BEGIN
960protected:
961 friend class OdDbGeEdgesDwgIO;
962 friend class OdDbGeEdgesDxfIO;
963
980 const OdGePoint2dArray& controlPoints, const OdGeDoubleArray& weights, bool isPeriodic,
981 const OdGePoint2dArray& fitPoints,
982 const OdGeVector2d& startTangent,
983 const OdGeVector2d& endTangent);
984//DOM-IGNORE-END
985};
986
987#include "TD_PackPop.h"
988
989#endif
990
tol
OdGe::OdGeKnotParameterization OdGeKnotParameterization
Definition Ge.h:544
OdArray< double, OdMemoryAllocator< double > > OdGeDoubleArray
#define GE_TOOLKIT_EXPORT
Definition GeExport.h:35
OdArray< OdGePoint2d, OdMemoryAllocator< OdGePoint2d > > OdGePoint2dArray
Definition GeGbl.h:45
OdArray< OdGeVector2d > OdGeVector2dArray
bool isPeriodic(double &period) const
bool getFitTolerance(OdGeTol &fitTolerance) const
bool setFitKnotParameterization(OdGeKnotParameterization knotParam)
OdGeNurbCurve2d(const OdGeLineSeg2d &linSeg)
int numFitPoints() const
OdGeNurbCurve2d(const OdGePoint2dArray &fitPoints, const OdGeVector2dArray &fitTangents, const OdGeTol &fitTolerance=OdGeContext::gTol, bool isPeriodic=false)
bool addControlPointAt(double newKnot, const OdGePoint2d &point, double weight=1.0)
OdGeNurbCurve2d & hardTrimByParams(double newStartParam, double newEndParam)
OdGeNurbCurve2d(const OdGePoint2dArray &fitPoints, const OdGeTol &fitTolerance=OdGeContext::gTol)
OdGeNurbCurve2d & setWeightAt(int weightIndex, double weight)
OdGeNurbCurve2d(const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, bool startTangentDefined=true, bool endTangentDefined=true, const OdGeTol &fitTolerance=OdGeContext::gTol)
bool getFitKnotParameterization(OdGeKnotParameterization &knotParam) const
OdGeNurbCurve2d & setEvalMode(bool evalMode=false)
int numWeights() const
OdGeNurbCurve2d & setData(int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &controlPoints, const OdGeDoubleArray &weights, bool isPeriodic, const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent)
OdGeNurbCurve2d & insertKnot(double newKnot)
OdGeNurbCurve2d & makeNonPeriodic()
bool getFitData(OdGePoint2dArray &fitPoints, OdGeTol &fitTolerance, bool &tangentsExist, OdGeVector2d &startTangent, OdGeVector2d &endTangent) const
OdGeNurbCurve2d & joinWith(const OdGeNurbCurve2d &curve, const OdGeTol &iTolerance=OdGeContext::gTol)
bool getParamsOfC1Discontinuity(OdGeDoubleArray &params, const OdGeTol &tol=OdGeContext::gTol) const
OdGeNurbCurve2d(int degree, const OdGePolyline2d &fitPolyline, bool isPeriodic=false)
bool setFitTangents(const OdGeVector2d &startTangent, const OdGeVector2d &endTangent)
OdGeNurbCurve2d & setFitData(const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, OdGeKnotParameterization knotParam, const OdGeTol &fitTol=OdGeContext::gTol)
OdGeNurbCurve2d & makeRational(double weight=1.0)
friend class OdDbGeEdgesDxfIO
GE_OPERATORS_OVERRIDE_2D(OdGeNurbCurve2d)
OdGeNurbCurve2d & setFitData(int degree, const OdGePoint2dArray &fitPoints, const OdGeTol &fitTol=OdGeContext::gTol)
bool deleteControlPointAt(int index)
bool setFitPointAt(int fitPointIndex, const OdGePoint2d &point)
OdGeNurbCurve2d & makeOpen()
OdGeNurbCurve2d & elevateDegree(int plusDegree)
bool getFitPointAt(int fitPointIndex, OdGePoint2d &point) const
OdGeNurbCurve2d & setFitData(const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, const OdGeTol &fitTol=OdGeContext::gTol)
OdGeNurbCurve2d(const OdGeEllipArc2d &ellipse)
double weightAt(int weightIndex) const
OdGeNurbCurve2d(int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &controlPoints, const OdGeDoubleArray &weights, bool isPeriodic=false)
bool deleteFitPointAt(int fitPointIndex)
OdGeNurbCurve2d(int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &controlPoints, bool isPeriodic=false)
OdGeNurbCurve2d & setFitData(const OdGeKnotVector &fitKnots, const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, const OdGeTol &fitTol=OdGeContext::gTol, bool isPeriodic=false)
bool getFitData(OdGePoint2dArray &fitPoints, OdGeTol &fitTolerance, bool &tangentsExist, OdGeVector2d &startTangent, OdGeVector2d &endTangent, OdGeKnotParameterization &knotParam) const
OdGeNurbCurve2d & makePeriodic()
bool getFitTangents(OdGeVector2d &startTangent, OdGeVector2d &endTangent) const
static OdGeNurbCurve2d * convertFrom(const OdGeCurve2d *source, const OdGeTol &tol=OdGeContext::gTol, bool sameParametrization=false)
bool setFitTolerance(const OdGeTol &fitTol=OdGeContext::gTol)
void getDefinitionData(int &degree, bool &rational, bool &periodic, OdGeKnotVector &knots, OdGePoint2dArray &controlPoints, OdGeDoubleArray &weights) const
OdGeNurbCurve2d(const OdGeNurbCurve2d &source)
OdGeNurbCurve2d & addKnot(double newKnot)
bool evalMode() const
bool intersectWith(const OdGeLine2d &line2d, OdGePoint2dArray &pnts2d, const OdGeTol &tol=OdGeContext::gTol, OdGeDoubleArray *params=NULL) const
OdGeNurbCurve2d & set(int degree, const OdGeKnotVector &knots, const OdGePoint2dArray &controlPoints, const OdGeDoubleArray &weights, bool isPeriodic=false)
bool addFitPointAt(int fitPointIndex, const OdGePoint2d &point)
friend class OdDbGeEdgesDwgIO
static OdGeNurbCurve2d * convertFrom(const OdGeCurve2d *source, const OdGeInterval &domain, const OdGeTol &tol=OdGeContext::gTol, bool sameParametrization=false)
bool getParamsOfG1Discontinuity(OdGeDoubleArray &params, const OdGeTol &tol=OdGeContext::gTol) const
OdGeNurbCurve2d(const OdGePoint2dArray &fitPoints, const OdGeVector2d &startTangent, const OdGeVector2d &endTangent, bool startTangentDefined, bool endTangentDefined, OdGeKnotParameterization knotParam, const OdGeTol &fitTol=OdGeContext::gTol)
OdGeNurbCurve2d & makeClosed()
OdGeSplineEnt2d & operator=(const OdGeSplineEnt2d &spline)
int degree() const
const OdGeKnotVector & knots() const
GLenum GLint * params
Definition gles2_ext.h:184
GLuint index
Definition gles2_ext.h:265
GLsizei GLsizei GLchar * source
Definition gles2_ext.h:282
static GE_STATIC_EXPORT OdGeTol gTol
Definition GeGbl.h:67