CFx SDK Documentation  2022 SP0
GeNurbSurface.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 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 #ifndef OD_GENURBSF_H
25 #define OD_GENURBSF_H
27 #include "Ge/GeSurface.h"
28 #include "Ge/GeKnotVector.h"
29 #include "OdPlatformSettings.h"
30 #include "TD_PackPush.h"
31 
32 class OdGeNurbCurve3d;
33 
34 static const int derivArraySize = 3;
39 typedef OdGeVector3d VectorDerivArray[derivArraySize][derivArraySize];
44 typedef double WDerivArray [derivArraySize][derivArraySize];
45 
57 {
58 public:
59 
60 
79  int degreeInU,
80  int degreeInV,
81  int propsInU,
82  int propsInV,
83  int numControlPointsInU,
84  int numControlPointsInV,
85  const OdGePoint3dArray& controlPoints,
86  const OdGeDoubleArray& weights,
87  const OdGeKnotVector& uKnots,
88  const OdGeKnotVector& vKnots,
89  const OdGeTol& tol = OdGeContext::gTol);
91  const OdGeNurbSurface& source);
92 
94  const OdGeNurbSurface& nurb);
95 
96 
102  bool isRationalInU() const;
103 
109  bool isPeriodicInU(double& period) const;
110 
116  bool isRationalInV() const;
117 
123  bool isPeriodicInV(double& period) const;
124 
131  int singularityInU() const;
132 
139  int singularityInV() const;
140 
144  int degreeInU() const;
145 
149  int numControlPointsInU() const;
150 
154  int degreeInV() const;
155 
159  int numControlPointsInV() const;
160 
167  OdGePoint3dArray& controlPoints) const;
168 
175  OdGeDoubleArray& weights) const;
176 
180  int numKnotsInU() const;
181 
187  void getUKnots(
188  OdGeKnotVector& uKnots) const;
189 
193  int numKnotsInV() const;
194 
200  void getVKnots(
201  OdGeKnotVector& vKnots) const;
202 
221  int& degreeInU,
222  int& degreeInV,
223  int& propsInU,
224  int& propsInV,
225  int& numControlPointsInU,
226  int& numControlPointsInV,
227  OdGePoint3dArray& controlPoints,
228  OdGeDoubleArray& weights,
229  OdGeKnotVector& uKnots,
230  OdGeKnotVector& vKnots) const;
231 
253  int degreeInU,
254  int degreeInV,
255  int propsInU,
256  int propsInV,
257  int numControlPointsInU,
258  int numControlPointsInV,
259  const OdGePoint3dArray& controlPoints,
260  const OdGeDoubleArray& weights,
261  const OdGeKnotVector& uKnots,
262  const OdGeKnotVector& vKnots,
263  const OdGeTol& tol = OdGeContext::gTol);
264 
265 
267  const OdGePoint3dArray& fitPoints,
268  const OdGeVector3dArray& arrTangentsInU,
269  const OdGeVector3dArray& arrTangentsInV,
270  const OdGeVector3dArray& arrMixedDerivs,
271  const OdGeKnotVector& uKnots,
272  const OdGeKnotVector& vKnots,
273  const OdGeTol& tol);
275  // TD Special :
276 
277  // computes isolines
278 
287  double V,
288  OdGeNurbCurve3d& isoline) const;
289 
298  double U,
299  OdGeNurbCurve3d& isoline) const;
300 
315  const OdGePoint3d& point,
316  const OdGeTol& tol = OdGeContext::gTol) const;
317 
318 
328  const OdGePoint2d& param,
329  OdUInt32 numDeriv,
330  VectorDerivArray derivatives) const;
331 
332  // the index in "m_controlPoints" of control *point* (i,j):
333 
335  int loc(
336  int i,
337  int j) const;
338 
339 protected:
341 };
342 
343 GE_TOOLKIT_EXPORT OdGeNurbSurface* convertFrom( const OdGeSurface* source, const OdGeTol& tol = OdGeContext::gTol, bool sameParametrization = false );
344 
345 #include "TD_PackPop.h"
346 
347 #endif // OD_GENURBSF_H
tol
Definition: DimVarDefs.h:2287
#define GE_TOOLKIT_EXPORT
Definition: GeExport.h:49
GE_TOOLKIT_EXPORT OdGeNurbSurface * convertFrom(const OdGeSurface *source, const OdGeTol &tol=OdGeContext::gTol, bool sameParametrization=false)
OdGeVector3d VectorDerivArray[derivArraySize][derivArraySize]
Definition: GeNurbSurface.h:39
double WDerivArray[derivArraySize][derivArraySize]
Definition: GeNurbSurface.h:44
unsigned int OdUInt32
OdGeNurbSurface(const OdGeNurbSurface &source)
bool getWeights(OdGeDoubleArray &weights) const
void getDefinition(int &degreeInU, int &degreeInV, int &propsInU, int &propsInV, int &numControlPointsInU, int &numControlPointsInV, OdGePoint3dArray &controlPoints, OdGeDoubleArray &weights, OdGeKnotVector &uKnots, OdGeKnotVector &vKnots) const
bool isPeriodicInU(double &period) const
int numControlPointsInU() const
void calculateNURBSProperties()
void getControlPoints(OdGePoint3dArray &controlPoints) const
int degreeInU() const
int singularityInV() const
int degreeInV() const
void computeUIsoLine(double U, OdGeNurbCurve3d &isoline) const
void getUKnots(OdGeKnotVector &uKnots) const
OdGeNurbSurface & set(int degreeInU, int degreeInV, int propsInU, int propsInV, int numControlPointsInU, int numControlPointsInV, const OdGePoint3dArray &controlPoints, const OdGeDoubleArray &weights, const OdGeKnotVector &uKnots, const OdGeKnotVector &vKnots, const OdGeTol &tol=OdGeContext::gTol)
void computeVIsoLine(double V, OdGeNurbCurve3d &isoline) const
OdGeNurbSurface(int degreeInU, int degreeInV, int propsInU, int propsInV, int numControlPointsInU, int numControlPointsInV, const OdGePoint3dArray &controlPoints, const OdGeDoubleArray &weights, const OdGeKnotVector &uKnots, const OdGeKnotVector &vKnots, const OdGeTol &tol=OdGeContext::gTol)
int singularityInU() const
OdGeNurbSurface & setFitData(const OdGePoint3dArray &fitPoints, const OdGeVector3dArray &arrTangentsInU, const OdGeVector3dArray &arrTangentsInV, const OdGeVector3dArray &arrMixedDerivs, const OdGeKnotVector &uKnots, const OdGeKnotVector &vKnots, const OdGeTol &tol)
int numControlPointsInV() const
void getVKnots(OdGeKnotVector &vKnots) const
bool isRationalInV() const
int numKnotsInV() const
int numKnotsInU() const
bool isRationalInU() const
bool isPeriodicInV(double &period) const
bool getDerivativesAt(const OdGePoint2d &param, OdUInt32 numDeriv, VectorDerivArray derivatives) const
int loc(int i, int j) const
OdGePoint2d paramOfPrec(const OdGePoint3d &point, const OdGeTol &tol=OdGeContext::gTol) const
OdGeSurface & operator=(const OdGeSurface &surf)
Definition: GeTol.h:49
GLsizei GLsizei GLchar * source
Definition: gles2_ext.h:282
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:60