CFx SDK Documentation  2023 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 //FELIX_CHANGE_BEGIN
61  {
63  kLowerU = 1,
64 
66  kUpperU = 2,
67 
69  kLowerV = 3,
70 
72  kUpperV = 4
73  };
74 //FELIX_CHANGE_END
75 
94  int degreeInU,
95  int degreeInV,
96  int propsInU,
97  int propsInV,
98  int numControlPointsInU,
99  int numControlPointsInV,
100  const OdGePoint3dArray& controlPoints,
101  const OdGeDoubleArray& weights,
102  const OdGeKnotVector& uKnots,
103  const OdGeKnotVector& vKnots,
104  const OdGeTol& tol = OdGeContext::gTol);
106  const OdGeNurbSurface& source);
107 
109  const OdGeNurbSurface& nurb);
110 
111 
117  bool isRationalInU() const;
118 
124  bool isPeriodicInU(double& period) const;
125 
131  bool isRationalInV() const;
132 
138  bool isPeriodicInV(double& period) const;
139 
146  int singularityInU() const;
147 
154  int singularityInV() const;
155 
159  int degreeInU() const;
160 
164  int numControlPointsInU() const;
165 
169  int degreeInV() const;
170 
174  int numControlPointsInV() const;
175 
182  OdGePoint3dArray& controlPoints) const;
183 
190  OdGeDoubleArray& weights) const;
191 
195  int numKnotsInU() const;
196 
202  void getUKnots(
203  OdGeKnotVector& uKnots) const;
204 
208  int numKnotsInV() const;
209 
215  void getVKnots(
216  OdGeKnotVector& vKnots) const;
217 
236  int& degreeInU,
237  int& degreeInV,
238  int& propsInU,
239  int& propsInV,
240  int& numControlPointsInU,
241  int& numControlPointsInV,
242  OdGePoint3dArray& controlPoints,
243  OdGeDoubleArray& weights,
244  OdGeKnotVector& uKnots,
245  OdGeKnotVector& vKnots) const;
246 
268  int degreeInU,
269  int degreeInV,
270  int propsInU,
271  int propsInV,
272  int numControlPointsInU,
273  int numControlPointsInV,
274  const OdGePoint3dArray& controlPoints,
275  const OdGeDoubleArray& weights,
276  const OdGeKnotVector& uKnots,
277  const OdGeKnotVector& vKnots,
278  const OdGeTol& tol = OdGeContext::gTol);
279 
280 
282  const OdGePoint3dArray& fitPoints,
283  const OdGeVector3dArray& arrTangentsInU,
284  const OdGeVector3dArray& arrTangentsInV,
285  const OdGeVector3dArray& arrMixedDerivs,
286  const OdGeKnotVector& uKnots,
287  const OdGeKnotVector& vKnots,
288  const OdGeTol& tol);
290  // TD Special :
291 
292  // computes isolines
293 
302  double V,
303  OdGeNurbCurve3d& isoline) const;
304 
313  double U,
314  OdGeNurbCurve3d& isoline) const;
315 
330  const OdGePoint3d& point,
331  const OdGeTol& tol = OdGeContext::gTol) const;
332 
333 
343  const OdGePoint2d& param,
344  OdUInt32 numDeriv,
345  VectorDerivArray derivatives) const;
346 
347  // the index in "m_controlPoints" of control *point* (i,j):
348 
350  int loc(
351  int i,
352  int j) const;
353 
354 //FELIX_CHANGE_BEGIN
355  static OdGeNurbSurface* convertFrom(const OdGeSurface* source, const OdGeTol& tol = OdGeContext::gTol, bool sameParametrization = false);
356 
358  ConnectionSide thisConnectionSide,
359  ConnectionSide surfaceConnectionSide,
360  const OdGeTol& tol = OdGeContext::gTol);
361 
362 //FELIX_CHANGE_END
363 
364 protected:
366 };
367 
368 GE_TOOLKIT_EXPORT OdGeNurbSurface* convertFrom( const OdGeSurface* source, const OdGeTol& tol = OdGeContext::gTol, bool sameParametrization = false );
369 
370 #include "TD_PackPop.h"
371 
372 #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 & joinWith(const OdGeNurbSurface &surface, ConnectionSide thisConnectionSide, ConnectionSide surfaceConnectionSide, const OdGeTol &tol=OdGeContext::gTol)
OdGeNurbSurface(const OdGeNurbSurface &source)
bool getWeights(OdGeDoubleArray &weights) const
static OdGeNurbSurface * convertFrom(const OdGeSurface *source, const OdGeTol &tol=OdGeContext::gTol, bool sameParametrization=false)
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