CFx SDK Documentation  2022 SP0
GeCurve2d.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_GE_CURVE_2D_H
25 #define OD_GE_CURVE_2D_H
27 class OdGePointOnCurve2d;
28 class OdGeInterval;
29 class OdGeMatrix2d;
30 class OdGeLine2d;
31 class OdGePointOnCurve2dData;
32 class OdGeBoundBlock2d;
33 
34 #include "Ge/GeEntity2d.h"
35 #include "Ge/GeIntArray.h"
36 #include "Ge/GePoint2d.h"
37 #include "Ge/GePoint2dArray.h"
38 #include "Ge/GeVector2d.h"
39 #include "Ge/GeVector2dArray.h"
40 #include "Ge/GeCurve2dPtrArray.h"
41 #include "Ge/GeDoubleArray.h"
42 
43 #include "TD_PackPush.h"
44 
53 {
54 public:
55 
56 
66  OdGeInterval& interval) const;
67 
79  OdGeInterval& interval,
80  OdGePoint2d& start,
81  OdGePoint2d& end) const;
82 
93 
101 
111  const OdGeInterval& interval);
112 
120  double distanceTo(
121  const OdGePoint2d& point,
122  const OdGeTol& tol = OdGeContext::gTol) const;
123 
131  double distanceTo(
132  const OdGeCurve2d& otherCur,
133  const OdGeTol& tol = OdGeContext::gTol) const;
134 
142  const OdGePoint2d& point,
143  const OdGeTol& tol = OdGeContext::gTol) const;
144 
152  const OdGeCurve2d& curve2d,
153  OdGePoint2d& pntOnOtherCrv,
154  const OdGeTol& tol= OdGeContext::gTol) const;
155 
163  const OdGePoint2d& point,
164  OdGePointOnCurve2d& pntOnCrv,
165  const OdGeTol& tol = OdGeContext::gTol) const;
166 
174  const OdGeCurve2d& curve2d,
175  OdGePointOnCurve2d& pntOnThisCrv,
176  OdGePointOnCurve2d& pntOnOtherCrv,
177  const OdGeTol& tol = OdGeContext::gTol) const;
178 
186  const OdGePoint2d& point,
187  OdGePointOnCurve2d& pntOnCrv,
188  const OdGeTol& tol = OdGeContext::gTol) const;
189 
191 
200  bool isOn(
201  const OdGePoint2d& point,
202  double& param,
203  const OdGeTol& tol = OdGeContext::gTol) const;
204 
211  bool isOn(
212  double param,
213  const OdGeTol& tol = OdGeContext::gTol) const;
214 
230  double paramOf(
231  const OdGePoint2d& point,
232  const OdGeTol& tol = OdGeContext::gTol) const;
233 
241  double distance,
242  OdGeCurve2dPtrArray& offsetCurveList,
243  OdGe::OffsetCrvExtType extensionType = OdGe::kFillet,
244  const OdGeTol& tol = OdGeContext::gTol) const;
245 
251  bool isClosed(
252  const OdGeTol& tol = OdGeContext::gTol) const;
253 
263  double& period) const;
264 
278  bool isLinear(
279  OdGeLine2d& line,
280  const OdGeTol& tol = OdGeContext::gTol) const;
281 
288  double length(
289  double fromParam,
290  double toParam,
291  double tol
292 #ifndef SWIG
293  = OdGeContext::gTol.equalPoint()
294 #endif
295  ) const;
296 
297 
304  double length(
305  double tol
306 #ifndef SWIG
307  = OdGeContext::gTol.equalPoint()
308 #endif
309  ) const;
310 
318  double datumParam,
319  double length,
320  bool posParamDir
321 #ifndef SWIG
322  = true
323 #endif
324  , double tol
325 #ifndef SWIG
326  = OdGeContext::gTol.equalPoint()
327 #endif
328  ) const;
329 
334  bool area(
335  double startParam, double endParam,
336  double& value,
337  const OdGeTol& tol = OdGeContext::gTol) const;
338 
347  OdGe::EntityId& degenerateType,
348  const OdGeTol& tol = OdGeContext::gTol) const;
349 
358  OdGeEntity2d*& pConvertedEntity,
359  const OdGeTol& tol = OdGeContext::gTol) const;
360 
372  double param,
373  OdGeCurve2d*& piece1,
374  OdGeCurve2d*& piece2) const;
375 
382  bool explode(
383  OdGeCurve2dPtrArray& explodedCurves,
384  OdGeIntArray& newExplodedCurve,
385  const OdGeInterval* interval = NULL) const;
386 
394  const OdGePoint2d& point,
395  OdGePointOnCurve2d& approxPnt,
396  const OdGeInterval* nbhd = NULL,
397  const OdGeTol& tol = OdGeContext::gTol) const;
398 
406  const OdGeCurve2d& otherCurve,
407  OdGePointOnCurve2d& approxPntOnThisCrv,
408  OdGePointOnCurve2d& approxPntOnOtherCrv,
409  const OdGeInterval* nbhd1 = NULL,
410  const OdGeInterval* nbhd2 = NULL,
411  const OdGeTol& tol = OdGeContext::gTol) const;
412 
420 
428  const OdGeInterval& range) const;
429 
437 
445  const OdGeInterval& range) const;
446 
456  OdGePoint2d& startPoint) const;
457 
467  OdGePoint2d& endPoint) const;
468 
478  double param) const;
479 
492  double param,
493  int numDeriv,
494  OdGeVector2dArray& derivatives) const;
495 
506  double fromParam,
507  double toParam,
508  double approxEps,
509  OdGePoint2dArray& pointArray,
510  OdGeDoubleArray& paramArray) const;
511 
522  int numSample,
523  OdGePoint2dArray& pointArray) const;
524 
526 
528  // TD Special :
529 
531  double fromParam,
532  double toParam,
533  double approxEps,
534  OdGePoint2dArray& pointArray,
535  OdGeDoubleArray* pParamArray = NULL) const;
536 
547  double fromParam,
548  double toParam,
549  double approxEps,
550  OdGePoint2dArray& pointArray,
551  OdGeDoubleArray* pParamArray = NULL) const;
552 
560  int numSample,
561  OdGePoint2dArray& pointArray) const;
562 
563 protected:
568  const OdGeCurve2d& source);
569 };
570 
571 #include "TD_PackPop.h"
572 
573 #endif // OD_GE_CURVE_2D_H
574 
tol
Definition: DimVarDefs.h:2287
#define GE_TOOLKIT_EXPORT
Definition: GeExport.h:49
#define NULL
Definition: GsProperties.h:177
bool isOn(const OdGePoint2d &point, double &param, const OdGeTol &tol=OdGeContext::gTol) const
OdGeBoundBlock2d boundBlock() const
void getSamplePoints(double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray *pParamArray=NULL) const
OdGeCurve2d & setInterval()
TD_USING(OdGeEntity2d::isOn)
double paramOf(const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
double length(double tol=OdGeContext::gTol.equalPoint()) const
bool isClosed(const OdGeTol &tol=OdGeContext::gTol) const
void appendSamplePoints(int numSample, OdGePoint2dArray &pointArray) const
void appendSamplePoints(double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray *pParamArray=NULL) const
void getLocalClosestPoints(const OdGePoint2d &point, OdGePointOnCurve2d &approxPnt, const OdGeInterval *nbhd=NULL, const OdGeTol &tol=OdGeContext::gTol) const
bool isDegenerate(OdGe::EntityId &degenerateType, const OdGeTol &tol=OdGeContext::gTol) const
OdGePoint2d evalPoint(double param, int numDeriv, OdGeVector2dArray &derivatives) const
OdGePoint2d closestPointTo(const OdGeCurve2d &curve2d, OdGePoint2d &pntOnOtherCrv, const OdGeTol &tol=OdGeContext::gTol) const
bool isLinear(OdGeLine2d &line, const OdGeTol &tol=OdGeContext::gTol) const
OdGeBoundBlock2d orthoBoundBlock(const OdGeInterval &range) const
void getLocalClosestPoints(const OdGeCurve2d &otherCurve, OdGePointOnCurve2d &approxPntOnThisCrv, OdGePointOnCurve2d &approxPntOnOtherCrv, const OdGeInterval *nbhd1=NULL, const OdGeInterval *nbhd2=NULL, const OdGeTol &tol=OdGeContext::gTol) const
bool isPeriodic(double &period) const
OdGePoint2d evalPoint(double param) const
bool isOn(double param, const OdGeTol &tol=OdGeContext::gTol) const
bool area(double startParam, double endParam, double &value, const OdGeTol &tol=OdGeContext::gTol) const
OdGeCurve2d(const OdGeCurve2d &source)
OdGeBoundBlock2d orthoBoundBlock() const
OdGeBoundBlock2d boundBlock(const OdGeInterval &range) const
double paramAtLength(double datumParam, double length, bool posParamDir=true, double tol=OdGeContext::gTol.equalPoint()) const
void getSamplePoints(int numSample, OdGePoint2dArray &pointArray) const
bool explode(OdGeCurve2dPtrArray &explodedCurves, OdGeIntArray &newExplodedCurve, const OdGeInterval *interval=NULL) const
void getInterval(OdGeInterval &interval) const
double length(double fromParam, double toParam, double tol=OdGeContext::gTol.equalPoint()) const
OdGePoint2d closestPointTo(const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
bool getNormalPoint(const OdGePoint2d &point, OdGePointOnCurve2d &pntOnCrv, const OdGeTol &tol=OdGeContext::gTol) const
void getInterval(OdGeInterval &interval, OdGePoint2d &start, OdGePoint2d &end) const
void getTrimmedOffset(double distance, OdGeCurve2dPtrArray &offsetCurveList, OdGe::OffsetCrvExtType extensionType=OdGe::kFillet, const OdGeTol &tol=OdGeContext::gTol) const
void getClosestPointTo(const OdGePoint2d &point, OdGePointOnCurve2d &pntOnCrv, const OdGeTol &tol=OdGeContext::gTol) const
double distanceTo(const OdGeCurve2d &otherCur, const OdGeTol &tol=OdGeContext::gTol) const
double distanceTo(const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
bool isDegenerate(OdGeEntity2d *&pConvertedEntity, const OdGeTol &tol=OdGeContext::gTol) const
void getSplitCurves(double param, OdGeCurve2d *&piece1, OdGeCurve2d *&piece2) const
void getSamplePoints(double fromParam, double toParam, double approxEps, OdGePoint2dArray &pointArray, OdGeDoubleArray &paramArray) const
OdGeCurve2d & reverseParam()
bool setInterval(const OdGeInterval &interval)
bool hasEndPoint(OdGePoint2d &endPoint) const
void getClosestPointTo(const OdGeCurve2d &curve2d, OdGePointOnCurve2d &pntOnThisCrv, OdGePointOnCurve2d &pntOnOtherCrv, const OdGeTol &tol=OdGeContext::gTol) const
bool hasStartPoint(OdGePoint2d &startPoint) const
OdGeEntity2d & operator=(const OdGeEntity2d &entity)
bool isOn(const OdGePoint2d &point, const OdGeTol &tol=OdGeContext::gTol) const
Definition: GeTol.h:49
GLsizei GLsizei GLchar * source
Definition: gles2_ext.h:282
GLuint GLsizei GLsizei * length
Definition: gles2_ext.h:274
GLenum GLint * range
Definition: gles2_ext.h:563
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
static GE_STATIC_EXPORT OdGeTol gTol
Definition: GeGbl.h:60
EntityId
Definition: Ge.h:53
OffsetCrvExtType
Definition: Ge.h:178
@ kFillet
Definition: Ge.h:179