CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GeNurbCurve2d.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#ifndef OD_GENURB2d_H
26#define OD_GENURB2d_H
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:
57
64 const OdGeNurbCurve2d& source);
65
94 int degree,
95 const OdGeKnotVector& knots,
96 const OdGePoint2dArray& controlPoints,
97 bool isPeriodic = false);
98
133 int degree,
134 const OdGeKnotVector& knots,
135 const OdGePoint2dArray& controlPoints,
136 const OdGeDoubleArray& weights,
137 bool isPeriodic = false);
138
151 int degree,
152 const OdGePolyline2d& fitPolyline,
153 bool isPeriodic = false);
154
174 const OdGePoint2dArray& fitPoints,
175 const OdGeVector2d& startTangent,
176 const OdGeVector2d& endTangent,
177 bool startTangentDefined = true,
178 bool endTangentDefined = true,
179 const OdGeTol& fitTolerance = OdGeContext::gTol);
180
192 const OdGePoint2dArray& fitPoints,
193 const OdGeTol& fitTolerance = OdGeContext::gTol);
194
210 const OdGePoint2dArray& fitPoints,
211 const OdGeVector2dArray& fitTangents,
212 const OdGeTol& fitTolerance = OdGeContext::gTol,
213 bool isPeriodic = false);
214
224 const OdGeEllipArc2d& ellipse);
225
235 const OdGeLineSeg2d& linSeg);
236
257 const OdGePoint2dArray& fitPoints,
258 const OdGeVector2d& startTangent,
259 const OdGeVector2d& endTangent,
260 bool startTangentDefined,
261 bool endTangentDefined,
262 OdGeKnotParameterization knotParam,
263 const OdGeTol& fitTol = OdGeContext::gTol);
264
271 int numFitPoints() const;
272
282
293 int fitPointIndex,
294 OdGePoint2d& point) const;
295
306 OdGeTol& fitTolerance) const;
307
319 OdGeVector2d& startTangent,
320 OdGeVector2d& endTangent) const;
321
340 OdGePoint2dArray& fitPoints,
341 OdGeTol& fitTolerance,
342 bool& tangentsExist,
343 OdGeVector2d& startTangent,
344 OdGeVector2d& endTangent) const;
345
365 OdGePoint2dArray& fitPoints,
366 OdGeTol& fitTolerance,
367 bool& tangentsExist,
368 OdGeVector2d& startTangent,
369 OdGeVector2d& endTangent,
370 OdGeKnotParameterization& knotParam) const;
371
401 int& degree,
402 bool& rational,
403 bool& periodic,
404 OdGeKnotVector& knots,
405 OdGePoint2dArray& controlPoints,
406 OdGeDoubleArray& weights) const;
407
417 int numWeights() const;
418
427 double weightAt(
428 int weightIndex) const;
429
446 int weightIndex,
447 double weight);
448
464 bool evalMode() const;
465
480 const OdGeTol& tol = OdGeContext::gTol) const;
481
496 const OdGeTol& tol = OdGeContext::gTol) const;
497
508 int fitPointIndex,
509 const OdGePoint2d& point);
510
522 int fitPointIndex,
523 const OdGePoint2d& point);
524
538 int fitPointIndex);
539
553 bool addControlPointAt(double newKnot, const OdGePoint2d& point, double weight = 1.0);
554
564
575
585 const OdGeTol& fitTol = OdGeContext::gTol);
586
597 const OdGeVector2d& startTangent,
598 const OdGeVector2d& endTangent);
599
618 const OdGePoint2dArray& fitPoints,
619 const OdGeVector2d& startTangent,
620 const OdGeVector2d& endTangent,
621 const OdGeTol& fitTol = OdGeContext::gTol);
622
644 const OdGeKnotVector& fitKnots,
645 const OdGePoint2dArray& fitPoints,
646 const OdGeVector2d& startTangent,
647 const OdGeVector2d& endTangent,
648 const OdGeTol& fitTol = OdGeContext::gTol,
649 bool isPeriodic = false);
650
671 int degree,
672 const OdGePoint2dArray& fitPoints,
673 const OdGeTol& fitTol = OdGeContext::gTol);
674
693 const OdGePoint2dArray& fitPoints,
694 const OdGeVector2d& startTangent,
695 const OdGeVector2d& endTangent,
696 OdGeKnotParameterization knotParam,
697 const OdGeTol& fitTol = OdGeContext::gTol);
698
711
721 double newKnot);
722
736 double newKnot);
737
756 bool evalMode = false);
757
772 const OdGeNurbCurve2d& curve);
773
784 double newStartParam,
785 double newEndParam);
786
800 double weight = 1.0);
801
814
822
833
841
852 int plusDegree);
853
863 const OdGeNurbCurve2d& spline);
864
866 // Overrides :
867
869 // TD Special :
870
884 const OdGeLine2d &line2d,
885 OdGePoint2dArray &pnts2d,
887 OdGeDoubleArray *params = NULL) const;
888
913 int degree,
914 const OdGeKnotVector& knots,
915 const OdGePoint2dArray& controlPoints,
916 const OdGeDoubleArray& weights,
917 bool isPeriodic = false);
918
937 static OdGeNurbCurve2d* convertFrom(const OdGeCurve2d* source, const OdGeInterval& domain, const OdGeTol& tol = OdGeContext::gTol, bool sameParametrization = false);
938
955 static OdGeNurbCurve2d* convertFrom(const OdGeCurve2d* source, const OdGeTol& tol = OdGeContext::gTol, bool sameParametrization = false);
956//DOM-IGNORE-BEGIN
957protected:
958 friend class OdDbGeEdgesDwgIO;
959 friend class OdDbGeEdgesDxfIO;
960
976 OdGeNurbCurve2d& setData(int degree, const OdGeKnotVector& knots,
977 const OdGePoint2dArray& controlPoints, const OdGeDoubleArray& weights, bool isPeriodic,
978 const OdGePoint2dArray& fitPoints,
979 const OdGeVector2d& startTangent,
980 const OdGeVector2d& endTangent);
981//DOM-IGNORE-END
982};
983
984#include "TD_PackPop.h"
985
986#endif
987
tol
Definition: DimVarDefs.h:2287
#define GE_TOOLKIT_EXPORT
Definition: GeExport.h:49
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
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)
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)
OdGeNurbCurve2d & joinWith(const OdGeNurbCurve2d &curve)
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)
Definition: GeTol.h:49
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:65
OdGeKnotParameterization
Definition: Ge.h:513