CFx SDK Documentation
2020SP3
|
Go to the documentation of this file.
24 #if !defined(DEBUG_DRAW_INCLUDED)
25 #define DEBUG_DRAW_INCLUDED
47 #include "../Extensions/ExServices/ExHostAppServices.h"
101 static bool g_DEBUG_DRAW_ENABLED =
true;
103 template <
class TSegment2d>
108 pts[0] = rSeg.startPt();
109 pts[1] = rSeg.endPt();
118 rSeg.getArcSeg(
arc2d );
123 template <
class TSegment2d>
125 if( g_DEBUG_DRAW_ENABLED ) {
131 _debug_draw( proxy.
wGeom(), rSeg );
145 for (
OdUInt32 i = 0; i < nSegments; ++i )
168 for (
OdUInt32 i = 0; i < nSegments; ++i )
185 if( g_DEBUG_DRAW_ENABLED ) {
197 if( !g_DEBUG_DRAW_ENABLED )
212 if( g_DEBUG_DRAW_ENABLED ) {
223 if( g_DEBUG_DRAW_ENABLED ) {
236 if( g_DEBUG_DRAW_ENABLED ) {
243 for(
OdUInt32 nContour = 0; nContour < profile.
size(); nContour++)
259 pt3d[1] = pt3d[0] + (pt3d[1] - pt3d[0]) * 0.1;
286 if( !g_DEBUG_DRAW_ENABLED )
292 const double dMult = 100000.0;
309 if( !g_DEBUG_DRAW_ENABLED )
317 const double dMult = 100000.0;
321 cLineRep.appendVertex(ptS2d);
322 cLineRep.appendVertex(ptE2d);
329 if( !g_DEBUG_DRAW_ENABLED )
340 static const double fMarkerSize = 100;
361 if( g_DEBUG_DRAW_ENABLED ) {
374 if( !g_DEBUG_DRAW_ENABLED )
388 if( g_DEBUG_DRAW_ENABLED ) {
396 for( i = 0; i <iSize; i++ )
398 OdUInt32 j, jSize = profile[ i ].numSegments();
399 for( j = 0; j < jSize; j++ )
402 profile[ i ].getSegmentAt( j, seg );
403 _debug_draw( proxy.
wGeom(), seg );
411 inline void DEBUG_DRAW(
const std::vector<FacetModeler::Profile2D>& rProfiles,
OdInt16 color )
413 if( !g_DEBUG_DRAW_ENABLED )
416 for(
size_t idx = 0; idx < rProfiles.size(); idx++)
424 if( g_DEBUG_DRAW_ENABLED ) {
438 if(!g_DEBUG_DRAW_ENABLED)
444 const double dLineLength = 10000;
467 while(!itEdges.done())
473 if(pPairEdge !=
NULL)
490 if( !g_DEBUG_DRAW_ENABLED )
499 DebugDrawBody( proxy, body );
508 if( !g_DEBUG_DRAW_ENABLED )
516 const double dSizes = dSize;
527 if( !g_DEBUG_DRAW_ENABLED )
544 if( !g_DEBUG_DRAW_ENABLED )
570 if( g_DEBUG_DRAW_ENABLED )
575 const double dLength =
v.length();
576 const double dVecLength = dLength * 0.9;
591 if( g_DEBUG_DRAW_ENABLED ) {
604 if( g_DEBUG_DRAW_ENABLED ) {
653 c3dPlane.as2d().push_back(c2dBox);
676 for(
OdUInt32 contourIdx = 0; contourIdx < faceProfile.
size(); contourIdx++)
679 if(currentContour.
isCCW())
724 double dMin =
odmin(dL, dW);
733 pts[1] = ptOrigin + mEntity.
getCsXAxis() * dL;
760 pts[1] = origin + xAxis * dBaseLen;
763 pts[1] = origin + yAxis * dBaseLen * 3;
766 pts[1] = origin + zAxis * dBaseLen * 5;
795 for(
int s = 0; s < numSegs; s++)
800 double dBulge = aSeg.
bulge();
814 for(
int i = 0; i < numVerts; i++)
918 #endif //#if !defined(DEBUG_DRAW_INCLUDED)
virtual void setTrueColor(const OdCmEntityColor &color)=0
virtual void setLineWeight(OdDb::LineWeight lineWeight)=0
void DEBUG_DRAW1(const OdCmColor &color)
void profile(Profile3D &rResult, const OdGePlane *pPlane=0, bool bIncludeHoles=true) const
OdGeVector3d normal() const
OdGiSubEntityTraits & traits()
void DEBUG_DRAW_ENTITY_EXTENTS_2D(const OdGeMatrix3d &mEntity, const OdGeExtents3d &mExtents, OdUInt16 color)
OdGePoint3d pointOnPlane() const
bool isSelfIntersecting(const OdGeTol &gTol=FMGeGbl::gTol, bool bExcludeTouch=false) const
void DEBUG_DRAW_PLANE(const OdGePlane &rPlane, const double fWidth, OdInt16 color)
OdGePoint3d endPoint() const
virtual void setColor(OdUInt16 color)=0
GLfloat GLfloat GLfloat v2
virtual void popModelTransform()=0
void DEBUG_DRAW_AXIS4(const OdGePoint3d &ptOrigin, const OdGeVector3d &vAxis, const double fLen, OdInt16 color)
OdGeVector3d direction() const
void DEBUG_DRAW_CS(const OdGePoint3d &ptOrigin, const OdGeVector3d &vx, const OdGeVector3d &vy, const OdGeVector3d &vz, const double fLen)
Result appendVertex(const OdGePoint2d &ptStart, double dBulge=0.0, OdIntPtr uMetadata=0, OdUInt32 uRawFlags=0)
OdGeVector3d getCsXAxis() const
static Body box(const OdGePoint3d &ptOrigin, const OdGeVector3d &vSizes)
const OdGePoint3d & minPoint() const
void DEBUG_DRAW_AXIS(const OdGePoint3d &ptOrigin, const OdGeVector3d &vAxis, const double fLen)
void DEBUG_DRAW_TRIANGLE(const OdGePoint3d *ptTriangle, OdInt16 color)
OdGePoint2d pointOnLine() const
void DEBUG_CONTOUR2D(const Contour2D &c)
const OdGePoint3d & endPoint() const
virtual OdUInt16 color() const =0
TAecAutoColor< OdUInt16 > AecAutoColor
void sendStringToExecute(const OdString &s)
OdGePoint3d getCsOrigin() const
Result getBulgeAt(OdUInt32 iIndex, double &dBulge) const
void getCoordSystem(OdGePoint3d &origin, OdGeVector3d &xAxis, OdGeVector3d &yAxis, OdGeVector3d &zAxis) const
Result getVertexAt(OdUInt32 iIndex, OdGePoint2d *pPoint, double *pBulge=0, OdIntPtr *pMetadata=0, OdUInt32 *puRawFlags=0) const
OdGiWorldGeometry & wGeom()
const OdGePoint3d & startPoint() const
OdCmEntityColor entityColor() const
void DEBUG_DRAW3(OdRemoteGeomProxy &proxy, const Contour2D &contour, OdInt16 color)
virtual void polygon(OdInt32 numVertices, const OdGePoint3d *vertexList)=0
FacetModeler::Vertex * vertex() const
void DEBUG_DRAW_FACE_PROFILE(const Profile2D &faceProfile)
OdGeVector3d getCsYAxis() const
void DEBUG_DRAW(const Contour2D &contour, OdInt16 color)
const OdGePoint2d & endPt() const
Result getSegmentAt(OdUInt32 iIndex, Segment2D &rSegment) const
const OdGePoint3d & point() const
void DEBUG_DRAW_POLYLINE(const OdGePoint3d *ptPoly, OdUInt32 nPts, OdInt16 color)
void DEBUG_DRAW_LINE(const OdGeLine2d &aLine, OdInt16 color)
const OdGePoint3d & maxPoint() const
OdUInt32 numVerts() const
virtual void pushModelTransform(const OdGeVector3d &normal)=0
const OdGePoint2d & startPt() const
void DEBUG_DRAW_LINESEG(const OdGePoint2d &pt1, const OdGePoint2d &pt2, OdInt16 color)
OdGePoint3d pointOnLine() const
Result getArcSegAt(OdUInt32 iIndex, OdGeCircArc2d &geArc) const
double distanceTo(const OdGePoint3d &point) const
Result getLineSegAt(OdUInt32 iIndex, OdGeLineSeg2d &geLine) const
size_type size() const
DOM.
OdUInt32 numSegments() const
const OdGeMatrix3d & transform() const
virtual void polyline(OdInt32 numVertices, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, OdGsMarker baseSubEntMarker=-1)=0
void to3D(const OdGePoint2d &rSource2D, OdGePoint3d &rDest3D) const
void setClosed(bool bClosed=true)
OdGePoint3d startPoint() const
void DEBUG_DRAW_FACE(const Face *pFace, OdInt16 color)
bool OdZero(double x, double tol=1.e-10)
OdGeVector2d direction() const