CFx SDK Documentation  2020SP3
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_
OdResult
OdResult
Definition: OdResult.h:29
OdDbNurbSurface::getVKnots
OdResult getVKnots(OdGeKnotVector &knots) const
OdGeVector3d
Definition: GeVector3d.h:54
NULL
#define NULL
Definition: GsProperties.h:177
OdDbNurbSurface::getNumberOfControlPointsInV
OdResult getNumberOfControlPointsInV(int &iCount) const
OdTf::version
@ version
Definition: Tf.h:335
OdDbNurbSurface::getControlPointAt
OdResult getControlPointAt(int iUIndex, int iVIndex, OdGePoint3d &point) const
GeNurbSurface.h
OdDbSurface
Definition: DbSurface.h:76
OdDbNurbSurface::isPointOnSurface
OdResult isPointOnSurface(const OdGePoint3d &point, bool &bOnSurface) const
OdDbNurbSurface::getNumberOfKnotsInV
OdResult getNumberOfKnotsInV(int &iCount) const
OdDbNurbSurface::getDegreeInV
OdResult getDegreeInV(int &iDegree) const
OdDbNurbSurface::getDegreeInU
OdResult getDegreeInU(int &iDegree) const
OdDbNurbSurface::isPeriodicInU
OdResult isPeriodicInU(bool &bIsPeriodic) const
OdDbNurbSurface::getNumberOfControlPointsInU
OdResult getNumberOfControlPointsInU(int &iCount) const
OdDbNurbSurface
Definition: DbNurbSurface.h:49
OdDbNurbSurface::RemoveControlPointsAtU
OdResult RemoveControlPointsAtU(int iUDegree)
OdDbNurbSurface::InsertKnotAtU
OdResult InsertKnotAtU(double dU)
OdDbNurbSurface::rebuild
OdResult rebuild(int iUDegree, int iVDegree, int iNumUCtrlPts, int iNumVCtrlPts, bool bRestore=false)
OdArray
Definition: OdArray.h:591
OdDbNurbSurface::setControlPoints
OdResult setControlPoints(int iUCount, int iVCount, const OdGePoint3dArray &points)
TD_PackPop.h
OdDbNurbSurfacePtr
OdSmartPtr< OdDbNurbSurface > OdDbNurbSurfacePtr
Definition: DbNurbSurface.h:712
OdDbNurbSurface::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdDbNurbSurface::getControlPoints
OdResult getControlPoints(int &iUCount, int &iVCount, OdGePoint3dArray &points) const
OdDbNurbSurface::evaluate
OdResult evaluate(double dU, double dV, OdGePoint3d &pos, OdGeVector3d &uDeriv, OdGeVector3d &vDeriv) const
OdDbNurbSurface::getIsolineAtV
OdResult getIsolineAtV(double dV, OdDbCurvePtrArray &lineSegments) const
OdDbNurbSurface::evaluate
OdResult evaluate(double dU, double dV, OdGePoint3d &pos) const
OdDbNurbSurface::setWeight
OdResult setWeight(int iUIndex, int iVIndex, double weight)
OdDb::DwgVersion
DwgVersion
Definition: OdaDefs.h:46
OdDbNurbSurface::getNumberOfSpansInU
OdResult getNumberOfSpansInU(int &span) const
OdDbNurbSurface::InsertControlPointsAtV
OdResult InsertControlPointsAtV(double dV, const OdGePoint3dArray &uCtrlPts, const OdGeDoubleArray &uWeights)
OdDbCurvePtrArray
OdArray< OdDbCurvePtr > OdDbCurvePtrArray
Definition: DbNurbSurface.h:33
OdDbNurbSurface::isPeriodicInV
OdResult isPeriodicInV(bool &bIsPeriodic) const
OdDbNurbSurface::isPlanar
OdResult isPlanar(bool &bIsPlanar, OdGePoint3d &ptOnSurface, OdGeVector3d &normal) const
OdSmartPtr
Definition: SmartPtr.h:58
OdGePoint3d
Definition: GePoint3d.h:55
OdDbNurbSurface::set
OdResult set(int iUDegree, int iVDegree, bool bRational, int iUNumControlPoints, int iVNumControlPoints, const OdGePoint3dArray &ctrlPtsArr, const OdGeDoubleArray &weights, const OdGeKnotVector &uKnots, const OdGeKnotVector &vKnots)
OdDbNurbSurface::isRational
OdResult isRational(bool &bIsRational) const
OdDbNurbSurface::getNormal
OdResult getNormal(double dU, double dV, OdGeVector3d &normal) const
DbCurve.h
OdDbNurbSurface::getUKnots
OdResult getUKnots(OdGeKnotVector &knots) const
OdDbNurbSurface::getPeriodInU
OdResult getPeriodInU(double &dPeriod) const
OdDbNurbSurface::get
OdResult get(int &iUDegree, int &iVDegree, bool &bRational, int &iUNumControlPoints, int &iVNumControlPoints, OdGePoint3dArray &ctrlPtsArr, OdGeDoubleArray &weights, OdGeKnotVector &uKnots, OdGeKnotVector &vKnots) const
OdDbNurbSurface::getNumberOfKnotsInU
OdResult getNumberOfKnotsInU(int &iCount) const
OdDbDxfFiler
Definition: DbFiler.h:194
OdDbNurbSurface::getIsolineAtU
OdResult getIsolineAtU(double dU, OdDbCurvePtrArray &lineSegments) const
OdDbNurbSurface::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDbNurbSurface::createNurbSurface
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)
OdDbNurbSurface::convertFrom
OdResult convertFrom(OdDbSurface *pSource, OdDb::DwgVersion version, bool transferId=true)
OdDbNurbSurface::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbNurbSurface::getNumberOfSpansInV
OdResult getNumberOfSpansInV(int &span) const
OdDbNurbSurface::evaluate
OdResult evaluate(double dU, double dV, OdGePoint3d &pos, OdGeVector3d &uDeriv, OdGeVector3d &vDeriv, OdGeVector3d &uuDeriv, OdGeVector3d &uvDeriv, OdGeVector3d &vvDeriv) const
TD_PackPush.h
OdDbNurbSurface::isClosedInV
OdResult isClosedInV(bool &bIsClosed) const
OdGeKnotVector
Definition: GeKnotVector.h:44
OdDbNurbSurface::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbNurbSurface)
OdDbNurbSurface::getPeriodInV
OdResult getPeriodInV(double &dPeriod) const
OdDbNurbSurface::InsertKnotAtV
OdResult InsertKnotAtV(double dV)
OdDbNurbSurface::isClosedInU
OdResult isClosedInU(bool &bIsClosed) const
OdDbNurbSurface::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbNurbSurface::setControlPointAt
OdResult setControlPointAt(int iUIndex, int iVIndex, const OdGePoint3d &point)
OdGeNurbSurface
Definition: GeNurbSurface.h:57
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbNurbSurface::InsertControlPointsAtU
OdResult InsertControlPointsAtU(double dU, const OdGePoint3dArray &vCtrlPts, const OdGeDoubleArray &vWeights)
OdDbNurbSurface::modifyPositionAndTangent
OdResult modifyPositionAndTangent(double dU, double dV, const OdGePoint3d &point, const OdGeVector3d *uDeriv=NULL, const OdGeVector3d *vDeriv=NULL)
OdDbNurbSurface::getWeight
OdResult getWeight(int iUIndex, int iVIndex, double &weight) const
OdDbNurbSurface::OdDbNurbSurface
OdDbNurbSurface()
OdDbNurbSurface::getParameterOfPoint
OdResult getParameterOfPoint(const OdGePoint3d &point, double &dU, double &dV) const
OdDbNurbSurface::evaluate
OdResult evaluate(double dU, double dV, int iDerivDegree, OdGePoint3d &point, OdGeVector3dArray &derivatives) const
DbSurface.h
OdDbNurbSurface::RemoveControlPointsAtV
OdResult RemoveControlPointsAtV(int iVDegree)
OdDbDwgFiler
Definition: DbFiler.h:1031