CFx SDK Documentation  2023 SP0
DbNurbSurface.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 
25 #ifndef _DbNurbSurface_h_Included_
26 #define _DbNurbSurface_h_Included_
27 
28 #include "TD_PackPush.h"
29 #include "DbSurface.h"
30 #include "DbCurve.h"
31 #include "Ge/GeNurbSurface.h"
32 
33 class OdGeKnotVector;
34 
39 
49 {
50 public:
55  //virtual ~OdDbNurbSurface();
57 
83  OdResult get (int& iUDegree, int& iVDegree, bool& bRational, int& iUNumControlPoints, int& iVNumControlPoints,
84  OdGePoint3dArray& ctrlPtsArr, OdGeDoubleArray& weights, OdGeKnotVector& uKnots, OdGeKnotVector& vKnots) const;
85 
121  OdResult set (int iUDegree, int iVDegree, bool bRational, int iUNumControlPoints, int iVNumControlPoints,
122  const OdGePoint3dArray& ctrlPtsArr, const OdGeDoubleArray& weights, const OdGeKnotVector& uKnots, const OdGeKnotVector& vKnots);
123 
124  //OdDbObject methods
126 
127  virtual void dwgOutFields(OdDbDwgFiler* pFiler) const;
128 
130 
131  virtual void dxfOutFields(OdDbDxfFiler* pFiler) const;
132 
133  //virtual OdResult subGetClassID(void* pClsid) const;
134 
150  OdResult getControlPoints(int& iUCount, int& iVCount, OdGePoint3dArray& points) const;
151 
169  OdResult setControlPoints(int iUCount, int iVCount, const OdGePoint3dArray& points);
170 
181  OdResult getControlPointAt(int iUIndex, int iVIndex, OdGePoint3d& point) const;
182 
197  OdResult setControlPointAt(int iUIndex, int iVIndex, const OdGePoint3d& point);
198 
207 
216 
225 
234 
242  OdResult getNumberOfKnotsInU(int& iCount) const;
243 
251  OdResult getNumberOfKnotsInV(int& iCount) const;
252 
265  OdResult getWeight(int iUIndex, int iVIndex, double& weight ) const;
266 
284  OdResult setWeight(int iUIndex, int iVIndex, double weight );
285 
301  OdResult evaluate(double dU, double dV, OdGePoint3d& pos) const;
302 
321  OdResult evaluate(double dU, double dV, OdGePoint3d& pos, OdGeVector3d& uDeriv, OdGeVector3d& vDeriv) const;
322 
343  OdResult evaluate(double dU, double dV, OdGePoint3d& pos, OdGeVector3d& uDeriv, OdGeVector3d& vDeriv,
344  OdGeVector3d& uuDeriv, OdGeVector3d& uvDeriv, OdGeVector3d& vvDeriv) const;
345 
363  OdResult evaluate(double dU, double dV, int iDerivDegree, OdGePoint3d& point, OdGeVector3dArray& derivatives) const;
364 
372  OdResult getDegreeInU(int& iDegree) const;
373 
381  OdResult getDegreeInV(int& iDegree) const;
382 
391  OdResult isClosedInU(bool& bIsClosed) const;
392 
401  OdResult isClosedInV(bool& bIsClosed) const;
402 
411  OdResult isPeriodicInU(bool& bIsPeriodic) const;
412 
421  OdResult isPeriodicInV(bool& bIsPeriodic) const;
422 
432  OdResult getPeriodInU(double& dPeriod) const;
433 
442  OdResult getPeriodInV(double& dPeriod) const;
443 
452  OdResult isRational(bool& bIsRational) const;
453 
464  OdResult isPlanar(bool& bIsPlanar, OdGePoint3d& ptOnSurface, OdGeVector3d& normal) const;
465 
475  OdResult isPointOnSurface(const OdGePoint3d& point, bool& bOnSurface) const;
476 
486  OdResult getNormal(double dU, double dV, OdGeVector3d& normal) const;
487 
495  OdResult getNumberOfSpansInU(int& span) const;
496 
504  OdResult getNumberOfSpansInV(int& span) const;
505 
516  OdResult getIsolineAtU(double dU, OdDbCurvePtrArray& lineSegments) const;
517 
531  OdResult getIsolineAtV(double dV, OdDbCurvePtrArray& lineSegments) const;
532 
549 
566 
582  OdResult InsertControlPointsAtU(double dU, const OdGePoint3dArray& vCtrlPts, const OdGeDoubleArray& vWeights);
583 
599  OdResult InsertControlPointsAtV(double dV, const OdGePoint3dArray& uCtrlPts, const OdGeDoubleArray& uWeights);
600 
615 
630 
646  OdResult rebuild(int iUDegree, int iVDegree, int iNumUCtrlPts, int iNumVCtrlPts, bool bRestore = false);
647 
664  OdResult modifyPositionAndTangent(double dU, double dV, const OdGePoint3d& point, const OdGeVector3d* uDeriv = NULL, const OdGeVector3d* vDeriv = NULL);
665 
679  OdResult getParameterOfPoint(const OdGePoint3d& point, double& dU, double& dV) const;
680 
690  OdResult convertFrom(OdDbSurface* pSource, OdDb::DwgVersion version, bool transferId = true);
691  // Overridden methods from AcDbEntity
692  //void dragStatus(const AcDb::DragStat status);
693 
705  static OdResult createNurbSurface(const OdGeNurbSurface &surface, const OdArray<OdArray< OdGeNurbCurve3d*> > &arrLoopsPtr, const OdArray<OdGePoint3d> *arrApex,
706  const OdArray<OdArray< OdGeNurbCurve2d*> > &arrLoopsProjPtr, OdDbNurbSurface &NURBS, bool bVaidateInput = true);
707 };
708 
713 
714 #include "TD_PackPop.h"
715 #endif //_DbNurbSurface_h_Included_
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdArray< OdDbCurvePtr > OdDbCurvePtrArray
Definition: DbNurbSurface.h:33
OdSmartPtr< OdDbNurbSurface > OdDbNurbSurfacePtr
#define NULL
Definition: GsProperties.h:177
OdResult
Definition: OdResult.h:29
OdResult getIsolineAtV(double dV, OdDbCurvePtrArray &lineSegments) const
OdResult getDegreeInV(int &iDegree) const
OdResult getParameterOfPoint(const OdGePoint3d &point, double &dU, double &dV) const
OdResult getNumberOfControlPointsInU(int &iCount) const
OdResult getDegreeInU(int &iDegree) const
ODDB_DECLARE_MEMBERS(OdDbNurbSurface)
OdResult getPeriodInU(double &dPeriod) const
static OdResult createNurbSurface(const OdGeNurbSurface &surface, const OdArray< OdArray< OdGeNurbCurve3d * > > &arrLoopsPtr, const OdArray< OdGePoint3d > *arrApex, const OdArray< OdArray< OdGeNurbCurve2d * > > &arrLoopsProjPtr, OdDbNurbSurface &NURBS, bool bVaidateInput=true)
OdResult evaluate(double dU, double dV, OdGePoint3d &pos, OdGeVector3d &uDeriv, OdGeVector3d &vDeriv) const
OdResult setControlPointAt(int iUIndex, int iVIndex, const OdGePoint3d &point)
OdResult getNumberOfControlPointsInV(int &iCount) const
OdResult getNumberOfKnotsInU(int &iCount) const
OdResult getControlPointAt(int iUIndex, int iVIndex, OdGePoint3d &point) const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdResult getNormal(double dU, double dV, OdGeVector3d &normal) const
OdResult getNumberOfSpansInU(int &span) const
OdResult getUKnots(OdGeKnotVector &knots) const
OdResult isRational(bool &bIsRational) const
OdResult getIsolineAtU(double dU, OdDbCurvePtrArray &lineSegments) const
OdResult InsertKnotAtU(double dU)
OdResult getPeriodInV(double &dPeriod) const
OdResult isClosedInV(bool &bIsClosed) const
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdResult InsertControlPointsAtV(double dV, const OdGePoint3dArray &uCtrlPts, const OdGeDoubleArray &uWeights)
OdResult getVKnots(OdGeKnotVector &knots) const
OdResult RemoveControlPointsAtU(int iUDegree)
OdResult get(int &iUDegree, int &iVDegree, bool &bRational, int &iUNumControlPoints, int &iVNumControlPoints, OdGePoint3dArray &ctrlPtsArr, OdGeDoubleArray &weights, OdGeKnotVector &uKnots, OdGeKnotVector &vKnots) const
OdResult InsertControlPointsAtU(double dU, const OdGePoint3dArray &vCtrlPts, const OdGeDoubleArray &vWeights)
OdResult isPointOnSurface(const OdGePoint3d &point, bool &bOnSurface) const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdResult InsertKnotAtV(double dV)
OdResult getWeight(int iUIndex, int iVIndex, double &weight) const
OdResult getNumberOfKnotsInV(int &iCount) const
OdResult evaluate(double dU, double dV, OdGePoint3d &pos, OdGeVector3d &uDeriv, OdGeVector3d &vDeriv, OdGeVector3d &uuDeriv, OdGeVector3d &uvDeriv, OdGeVector3d &vvDeriv) const
OdResult RemoveControlPointsAtV(int iVDegree)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdResult isPeriodicInV(bool &bIsPeriodic) const
OdResult isClosedInU(bool &bIsClosed) const
OdResult getControlPoints(int &iUCount, int &iVCount, OdGePoint3dArray &points) const
OdResult modifyPositionAndTangent(double dU, double dV, const OdGePoint3d &point, const OdGeVector3d *uDeriv=NULL, const OdGeVector3d *vDeriv=NULL)
OdResult rebuild(int iUDegree, int iVDegree, int iNumUCtrlPts, int iNumVCtrlPts, bool bRestore=false)
OdResult evaluate(double dU, double dV, OdGePoint3d &pos) const
OdResult isPeriodicInU(bool &bIsPeriodic) const
OdResult set(int iUDegree, int iVDegree, bool bRational, int iUNumControlPoints, int iVNumControlPoints, const OdGePoint3dArray &ctrlPtsArr, const OdGeDoubleArray &weights, const OdGeKnotVector &uKnots, const OdGeKnotVector &vKnots)
OdResult convertFrom(OdDbSurface *pSource, OdDb::DwgVersion version, bool transferId=true)
OdResult setWeight(int iUIndex, int iVIndex, double weight)
OdResult getNumberOfSpansInV(int &span) const
OdResult isPlanar(bool &bIsPlanar, OdGePoint3d &ptOnSurface, OdGeVector3d &normal) const
OdResult evaluate(double dU, double dV, int iDerivDegree, OdGePoint3d &point, OdGeVector3dArray &derivatives) const
OdResult setControlPoints(int iUCount, int iVCount, const OdGePoint3dArray &points)
DwgVersion
Definition: OdaDefs.h:46
@ version
Definition: Tf.h:335