CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FMDebugDraw.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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#if !defined(DEBUG_DRAW_INCLUDED)
25#define DEBUG_DRAW_INCLUDED
26
27//#define DEBUG_DRAW_ENABLED // Drawing must be built
28#if !defined(_DEBUG) && defined(DEBUG_DRAW_ENABLED)
29#undef DEBUG_DRAW_ENABLED
30#endif
31#if defined(_DEBUG) && defined(DEBUG_DRAW_ENABLED)
32#pragma comment(lib, "TD_DbRoot.lib")
33#pragma comment(lib, "TD_Db.lib")
34#pragma comment(lib, "TD_Gi.lib")
35#pragma comment(lib, "TD_DbIO.lib")
36#endif
37
38#if defined(DEBUG_DRAW_ENABLED)
39#include "RemoteGeomProxy.h"
40#include "CmColor.h"
41#include "FMGiTools.h"
42//#include "Gi/AECGi.h"
43#include <Gi/GiGeometry.h>
44#include <Gi/GiCommonDraw.h>
46#include "../Extensions/ExServices/ExHostAppServices.h"
47#include "AbstractViewPE.h"
48#else
50class OdCmEntityColor;
51class OdCmColor;
52#endif
53#include "FMProfile2D.h"
54#include "FMContour2D.h"
55#include "FMContour3D.h"
56//#include "FMDrawBody.h"
57#include "FMProfile3D.h"
58#include <Modeler/FMMdlBody.h>
61#include <FMGeometry.h>
62#include <Int32Array.h>
63
64//#include "StaticRxObject.h"
65//#include "DbEntity/AECDbMassElem.h"
66#include "Ge/GeExtents2d.h"
67#include "Ge/GeLineSeg3d.h"
68//#include "DbBlockReference.h"
69#include <vector>
70
71
72using namespace FacetModeler;
73
74// colors are indices to OdCmEntityColor
76{
77 static const OdUInt16 clear = 0;
78 static const OdUInt16 red = 1;
79 static const OdUInt16 yellow = 2;
80 static const OdUInt16 green = 3;
81 static const OdUInt16 cyan = 4;
82 static const OdUInt16 blue = 5;
83 static const OdUInt16 magenta = 6;
84 static const OdUInt16 white = 7;
85};
86
87
88template<typename T>
90{
91 T m_uColor;
92
93public:
95 {
96 m_uColor = 0;
97 }
98
100 {
101 T nRet = m_uColor;
102
103 m_uColor++;
104 if(m_uColor > 6)
105 m_uColor = 0;
106
107 return nRet;
108 }
109
110 T peekColor() const { return m_uColor; }
111};
112
114
115#if defined(DEBUG_DRAW_ENABLED)
116// Do not change this initialization of the g_DEBUG_DRAW_ENABLED.
117// Set it to 'true' either in debugger or in sources exactly before DEBUG_DRAW() functions calls
118static bool g_DEBUG_DRAW_ENABLED = true;
119
120template <class TSegment2d>
121inline void _debug_draw( OdGiWorldGeometry& geom, const TSegment2d& rSeg ) {
122 if( OdZero( rSeg.bulge() ) || rSeg.type() == FacetModeler::estCoincident )
123 {
124 OdGePoint2d pts[2];
125 pts[0] = rSeg.startPt();
126 pts[1] = rSeg.endPt();
127 OdGiTools::polyline2d( geom, 2, pts );
128 }
129 else
130 {
131 //double dBulge = rSeg.bulge();
132 //FacetModeler::SegmentType st = rSeg.type();
133
134 OdGeCircArc2d arc2d;
135 rSeg.getArcSeg( arc2d );
136 OdGiTools::arc2d( geom, arc2d );
137 }
138}
139
140template <class TSegment2d>
141inline void DEBUG_DRAW(const TSegment2d& rSeg, OdInt16 color) {
142 if( g_DEBUG_DRAW_ENABLED ) {
143 OdRemoteGeomProxy proxy;
144 OdRemoteGeomProxyAutoBlock rAuto(proxy);
145
146 proxy.begin();
147 proxy.traits().setColor( color );
148 _debug_draw( proxy.wGeom(), rSeg );
149 proxy.end();
150 }
151}
152
153
154
155inline void DEBUG_DRAW3(OdRemoteGeomProxy& proxy, const FacetModeler::Contour2D& contour, OdInt16 color)
156{
157 proxy.traits().setColor( color );
158
159 double dBulge = 0;
160
161 OdUInt32 nSegments = contour.numSegments();
162 for ( OdUInt32 i = 0; i < nSegments; ++i )
163 {
164 contour.getBulgeAt( i, dBulge );
165 if( OdZero( dBulge ) ) {
166 OdGeLineSeg2d line;
167 contour.getLineSegAt( i, line );
168 OdGiTools::lineSeg2d( proxy.wGeom(), line, i );
169 }
170 else if(contour.segmentType(i) == FacetModeler::estArc) {
172 contour.getArcSegAt( i, arc2d );
173 OdGiTools::arc2d( proxy.wGeom(), arc2d, i );
174 }
175 }
176}
177
178inline void DEBUG_DRAW( const FacetModeler::Contour2D& contour, OdInt16 color) {
179 if( g_DEBUG_DRAW_ENABLED ) {
180 OdRemoteGeomProxy proxy;
181 OdRemoteGeomProxyAutoBlock rAuto(proxy);
182
183 proxy.begin();
184 DEBUG_DRAW3( proxy, contour, color );
185 proxy.end();
186 }
187}
188
189inline void DEBUG_DRAW( const FacetModeler::IContour2D& contour, OdInt16 color)
190{
191 if( !g_DEBUG_DRAW_ENABLED )
192 return;
193
194 FacetModeler::Contour2D c2d ( contour );
195
196 OdRemoteGeomProxy proxy;
197 OdRemoteGeomProxyAutoBlock rAuto(proxy);
198
199 proxy.begin();
200 DEBUG_DRAW3( proxy, c2d, color );
201 proxy.end();
202}
203
204inline void DEBUG_DRAW(const FacetModeler::Contour3D& contour, OdInt16 color ) {
205 if( g_DEBUG_DRAW_ENABLED ) {
206 OdRemoteGeomProxy proxy;
207 OdRemoteGeomProxyAutoBlock rAuto(proxy);
208
209 proxy.begin();
210 proxy.wGeom().pushModelTransform( contour.transform() );
211 DEBUG_DRAW3( proxy, static_cast<const FacetModeler::Contour2D&>( contour ), color );
212 proxy.wGeom().popModelTransform();
213 proxy.end();
214 }
215}
216
217inline void DEBUG_DRAW( const FacetModeler::Profile3D& profile, OdInt16 color ) {
218 if( g_DEBUG_DRAW_ENABLED ) {
219 OdRemoteGeomProxy proxy;
220 OdRemoteGeomProxyAutoBlock rAuto(proxy);
221
222 proxy.begin();
223 proxy.traits().setColor( color );
224
225 for(OdUInt32 nContour = 0; nContour < profile.size(); nContour++)
226 {
227 const FacetModeler::Contour2D& c2d = profile[nContour] ;
228 for(OdUInt32 nSeg = 0; nSeg < c2d.numSegments(); nSeg++)
229 {
231 c2d.getSegmentAt(nSeg, sg);
232
233 OdGePoint3d pt3d[2];
234 profile.to3D(sg.startPt(), pt3d[0]);
235 profile.to3D(sg.endPt(), pt3d[1]);
236
237 proxy.wGeom().polyline( 2, pt3d );
238#if 1
239 OdUInt16 colorOld = proxy.traits().color();
240 proxy.traits().setColor(1);
241 pt3d[1] = pt3d[0] + (pt3d[1] - pt3d[0]) * 0.1;
242 proxy.wGeom().polyline(2, pt3d);
243 proxy.traits().setColor(colorOld);
244#endif
245 }
246 }
247
248 proxy.end();
249 }
250}
251
252inline void DEBUG_DRAW_LINESEG(const OdGePoint2d& pt1, const OdGePoint2d& pt2, OdInt16 color)
253{
254 OdRemoteGeomProxy proxy;
255 OdRemoteGeomProxyAutoBlock rAuto(proxy);
256
257 proxy.begin();
258 proxy.traits().setColor( color );
259 OdGePoint2d pts[2];
260 pts[0] = pt1;
261 pts[1] = pt2;
262 OdGiTools::polyline2d( proxy.wGeom(), 2, pts );
263 proxy.end();
264}
265
266inline void DEBUG_DRAW_LINE(const OdGeLine2d& aLine, OdInt16 color)
267{
268 if( !g_DEBUG_DRAW_ENABLED )
269 return;
270
271 OdRemoteGeomProxy proxy;
272 OdRemoteGeomProxyAutoBlock rAuto(proxy);
273
274 const double dMult = 100000.0;
275 OdGePoint2d ptS2d = aLine.pointOnLine() - aLine.direction() * dMult;
276 OdGePoint2d ptE2d = aLine.pointOnLine() + aLine.direction() * dMult;
277
278 DEBUG_DRAW_LINESEG(ptS2d, ptE2d, color);
279
280 /*OdGePoint3d pt1(OdGePlane::kXYPlane, ptS2d);
281 OdGePoint3d pt2(OdGePlane::kXYPlane, ptE2d);
282
283 proxy.begin();
284 proxy.traits().setColor( color );
285 proxy.wGeom().xline(pt1, pt2);
286 proxy.end();*/
287}
288
289inline void DEBUG_DRAW(const OdGeLine2d& aLine, const OdGePlane& aPlane, OdInt16 color)
290{
291 if( !g_DEBUG_DRAW_ENABLED )
292 return;
293
294 OdRemoteGeomProxy proxy;
295 OdRemoteGeomProxyAutoBlock rAuto(proxy);
296
297 FacetModeler::Contour3D cLineRep( aPlane );
298
299 const double dMult = 100000.0;
300 OdGePoint2d ptS2d = aLine.pointOnLine() - aLine.direction() * dMult;
301 OdGePoint2d ptE2d = aLine.pointOnLine() + aLine.direction() * dMult;
302
303 cLineRep.appendVertex(ptS2d);
304 cLineRep.appendVertex(ptE2d);
305
306 DEBUG_DRAW(cLineRep, color);
307};
308
309inline void DEBUG_DRAW(const OdCmEntityColor& color)
310{
311 if( !g_DEBUG_DRAW_ENABLED )
312 return;
313
314 OdRemoteGeomProxy proxy;
315 OdRemoteGeomProxyAutoBlock rAuto(proxy);
316
317 proxy.begin();
318 proxy.traits().setTrueColor( color );
320
321
322 static const double fMarkerSize = 100;
323 OdGePoint2d pts[7];
324 pts[0] = OdGePoint2d(-fMarkerSize, fMarkerSize);
325 pts[1] = OdGePoint2d(fMarkerSize, fMarkerSize);
326 pts[2] = OdGePoint2d(fMarkerSize, -fMarkerSize);
327 pts[3] = OdGePoint2d(-fMarkerSize, -fMarkerSize);
328 pts[4] = OdGePoint2d(-fMarkerSize, fMarkerSize);
329 pts[5] = OdGePoint2d(0, -fMarkerSize);
330 pts[6] = OdGePoint2d(fMarkerSize, fMarkerSize);
331
332 OdGiTools::polyline2d( proxy.wGeom(), 7, pts );
333
334 proxy.end();
335}
336
337inline void DEBUG_DRAW1(const OdCmColor& color)
338{
339 DEBUG_DRAW(color.entityColor());
340};
341
342inline void DEBUG_DRAW_POLYLINE(const OdGePoint3d* ptPoly, OdUInt32 nPts, OdInt16 color) {
343 if( g_DEBUG_DRAW_ENABLED ) {
344 OdRemoteGeomProxy proxy;
345 OdRemoteGeomProxyAutoBlock rAuto(proxy);
346
347 proxy.begin();
348 proxy.traits().setColor( color );
349 proxy.wGeom().polyline(nPts, ptPoly);
350 proxy.end();
351 }
352}
353
354inline void DEBUG_DRAW_POLYLINE(const OdGePoint2d* ptPoly2d, OdUInt32 nPts, OdInt16 color) {
355 if (g_DEBUG_DRAW_ENABLED) {
356
357 OdGePoint3dArray ptPoly;
358 ptPoly.resize(nPts);
359 for (OdUInt32 i = 0; i != nPts; i++)
360 {
361 ptPoly[i] = OdGePoint3d(ptPoly2d[i].x, ptPoly2d[i].y, 0);
362 }
363
364 DEBUG_DRAW_POLYLINE(ptPoly.asArrayPtr(), nPts, color);
365 }
366}
367
368inline void DEBUG_DRAW_TRIANGLE(const OdGePoint3d* ptTriangle, OdInt16 color)
369{
370 if( !g_DEBUG_DRAW_ENABLED )
371 return;
372
373 OdRemoteGeomProxy proxy;
374 OdRemoteGeomProxyAutoBlock rAuto(proxy);
375
376 OdInt32Array faceList;
377 faceList.push_back(3);
378 faceList.push_back(0);
379 faceList.push_back(1);
380 faceList.push_back(2);
381
382 proxy.begin();
383 proxy.traits().setColor( color );
384 proxy.wGeom().shell(3, ptTriangle, 4, faceList.asArrayPtr());
385 proxy.end();
386}
387
388inline void DEBUG_DRAW( const FacetModeler::Profile2D& profile, OdInt16 color )
389{
390 if( g_DEBUG_DRAW_ENABLED ) {
391 OdRemoteGeomProxy proxy;
392 OdRemoteGeomProxyAutoBlock rAuto(proxy);
393
394 proxy.begin();
395 proxy.traits().setColor( color );
396
397 OdUInt32 i, iSize = profile.size();
398 for( i = 0; i <iSize; i++ )
399 {
400 OdUInt32 j, jSize = profile[ i ].numSegments();
401 for( j = 0; j < jSize; j++ )
402 {
404 profile[ i ].getSegmentAt( j, seg );
405 _debug_draw( proxy.wGeom(), seg );
406 }
407 }
408
409 proxy.end();
410 }
411}
412
413inline void DEBUG_DRAW( const std::vector<FacetModeler::Profile2D>& rProfiles, OdInt16 color )
414{
415 if( !g_DEBUG_DRAW_ENABLED )
416 return;
417
418 for(size_t idx = 0; idx < rProfiles.size(); idx++)
419 {
420 DEBUG_DRAW(rProfiles[idx], color);
421 }
422}
423
424inline void DEBUG_DRAW2(const OdGePoint2d& pt1, const OdGePoint2d& pt2, OdInt16 color)
425{
426 if (g_DEBUG_DRAW_ENABLED) { // set this flag in debugger to enable geometry sending to remote viever
427 OdRemoteGeomProxy proxy;
428 OdRemoteGeomProxyAutoBlock rAuto(proxy);
429
430 proxy.begin(); // initialize proxy for remote OdGiWorldDraw object
431 proxy.traits().setColor(color);// use remote OdGiSubEntityTraits
432 OdGePoint3d pts[] = { OdGePoint3d(pt1.x, pt1.y, 0), OdGePoint3d(pt2.x, pt2.y, 0) };
433 proxy.wGeom().polyline(2, pts);
434 proxy.end();// send geometry to remote viewer
435 }
436}
437
438inline void DEBUG_DRAW3(const OdGePoint3d& pt1, const OdGePoint3d& pt2, OdInt16 color)
439{
440 if( g_DEBUG_DRAW_ENABLED ) { // set this flag in debugger to enable geometry sending to remote viever
441 OdRemoteGeomProxy proxy;
442 OdRemoteGeomProxyAutoBlock rAuto(proxy);
443
444 proxy.begin(); // initialize proxy for remote OdGiWorldDraw object
445 proxy.traits().setColor( color );// use remote OdGiSubEntityTraits
446 OdGePoint3d pts[] = {pt1, pt2};
447 proxy.wGeom().polyline( 2, pts );
448 proxy.end();// send geometry to remote viewer
449 }
450}
451
452inline void DEBUG_DRAW(const OdGeLine3d& line, OdInt16 color)
453{
454 if(!g_DEBUG_DRAW_ENABLED)
455 return;
456
457 OdRemoteGeomProxy proxy;
458 OdRemoteGeomProxyAutoBlock rAuto(proxy);
459
460 const double dLineLength = 10000;
461
462 OdGePoint3d pt1, pt2;
463 pt1 = line.pointOnLine() + line.direction() * dLineLength;
464 pt2 = line.pointOnLine() - line.direction() * dLineLength;
465
466
467 proxy.begin(); // initialize proxy for remote OdGiWorldDraw object
468 proxy.traits().setColor( color );// use remote OdGiSubEntityTraits
469 OdGePoint3d pts[] = {pt1, pt2};
470 proxy.wGeom().polyline( 2, pts );
471 proxy.end();// send geometry to remote viewer
472}
473
474inline void DEBUG_DRAW3(const OdGeVector3d& v1, const OdGeVector3d& v2, OdInt16 color) {
475 DEBUG_DRAW3( (const OdGePoint3d&)v1, (const OdGePoint3d&)v2, color );
476}
477
478static void bodyGenMesh(GeMesh::OdGeTrMesh& mesh, const FacetModeler::Body& body)
479{
480 FaceIterator itF(&body);
481 while (!itF.done())
482 {
483 Face* pFace = itF.get();
484 const OdGePlane& plane = pFace->plane();
486 pFace->projection(plane, profile);
487 OdGePoint2dArray aVxFace;
488 std::vector<OdInt32> aFaceIndex;
489 for (unsigned int i = 0; i < profile.size(); ++i)
490 {
491 const FacetModeler::Contour2D& contour = profile[i];
492 const int nVt = contour.numVerts();
493 const bool bHole = !contour.isCCW();
494 aFaceIndex.push_back(bHole ? -nVt : nVt);
495 for (int j = 0; j < nVt; ++j)
496 {
497 const int iVx = aVxFace.logicalLength();
498 aVxFace.resize(iVx + 1);
499 OdGePoint2d pt;
500 contour.getVertexAt(j, &aVxFace[iVx]);
501 aFaceIndex.push_back(iVx);
502 }
503 }
504 OdArray<OdInt32> aTrFace;
505 GeMesh::triangulateProfile(aVxFace, aFaceIndex, aTrFace);
506
507 const int nVxMesh = mesh.m_aVx.logicalLength();
508 const int nVxFace = aVxFace.logicalLength();
509 mesh.m_aVx.resize(nVxMesh + nVxFace);
510 for (int i = 0; i < nVxFace; ++i)
511 {
512 mesh.m_aVx[nVxMesh + i] = plane.evalPoint(aVxFace[i]);
513 }
514 const int nTr = aTrFace.logicalLength() / 4;
515 for (int i = 0; i < nTr; ++i)
516 {
517 ODA_ASSERT(aTrFace[i * 4] == 3);
519 tr.tr[0] = nVxMesh + aTrFace[i * 4 + 1];
520 tr.tr[1] = nVxMesh + aTrFace[i * 4 + 2];
521 tr.tr[2] = nVxMesh + aTrFace[i * 4 + 3];
522 mesh.m_aTr.push_back(tr);
523 }
524 itF.next();
525 }
526}
527
528static inline void DebugDrawBody(OdRemoteGeomProxy& proxy, const FacetModeler::Body& rBody, bool wired = true)
529{
530 if (rBody.isNull())
531 return;
532
533 if (wired)
534 {
535 FacetModeler::EdgeBodyIterator itEdges(&rBody);
536 while (!itEdges.done())
537 {
538 FacetModeler::Edge* pEdge = itEdges.get();
539 if (pEdge != NULL)
540 {
541 FacetModeler::Edge* pPairEdge = pEdge->next();
542 if (pPairEdge != NULL)
543 {
544 OdGePoint3d ptVtx[2];
545 ptVtx[0] = pEdge->vertex()->point();
546 ptVtx[1] = pPairEdge->vertex()->point();
547
548 proxy.wGeom().polyline(2, ptVtx);
549 }
550 }
551
552 itEdges.next();
553 }
554 }
555 else{
557 bodyGenMesh(mesh, rBody);
558
559 OdGePoint3dArray vertices;
560 OdInt32Array faces;
561 for (unsigned int i = 0; i < mesh.m_aTr.length(); i++)
562 {
563 faces.push_back(3);
564 faces.push_back(mesh.m_aTr[i].tr[0]);
565 faces.push_back(mesh.m_aTr[i].tr[1]);
566 faces.push_back(mesh.m_aTr[i].tr[2]);
567 }
568 proxy.wGeom().shell(mesh.m_aVx.length(), mesh.m_aVx.asArrayPtr(), faces.length(), faces.asArrayPtr());
569 }
570}
571
572inline void DEBUG_DRAW(const FacetModeler::Body& body, OdInt16 color, bool wired = true )
573{
574 if( !g_DEBUG_DRAW_ENABLED )
575 return;
576
577 OdRemoteGeomProxy proxy;
578 OdRemoteGeomProxyAutoBlock rAuto(proxy);
579
580 proxy.begin(); // initialize proxy for remote OdGiWorldDraw object
581
582 proxy.traits().setColor( color );// use remote OdGiSubEntityTraits
583 DebugDrawBody( proxy, body, wired);
584
585 proxy.end();// send geometry to remote viewer
586}
587
588
589
590inline void DEBUG_DRAW( const OdGePoint3d& pt, double dSize, OdInt16 color )
591{
592 if( !g_DEBUG_DRAW_ENABLED )
593 return;
594
595 OdRemoteGeomProxy proxy;
596 OdRemoteGeomProxyAutoBlock rAuto(proxy);
597
598 proxy.begin(); // initialize proxy for remote OdGiWorldDraw object
599
600 const double dSizes = dSize;
601 OdGePoint3d ptOrigin = pt - OdGeVector3d(dSizes/2, dSizes/2, dSizes/2);
602
603 proxy.traits().setColor( color );// use remote OdGiSubEntityTraits
604 DebugDrawBody( proxy, FacetModeler::Body::box( ptOrigin, OdGeVector3d(dSizes, dSizes, dSizes) ) );
605
606 proxy.end();// send geometry to remote viewer
607}
608
609inline void DEBUG_DRAW( const FacetModeler::Edge& pEdge, OdInt16 color )
610{
611 if( !g_DEBUG_DRAW_ENABLED )
612 return;
613
614 OdRemoteGeomProxy proxy;
615 OdRemoteGeomProxyAutoBlock rAuto(proxy);
616
617 proxy.begin(); // initialize proxy for remote OdGiWorldDraw object
618 proxy.traits().setColor( color );// use remote OdGiSubEntityTraits
619 OdGePoint3d pts[] = {pEdge.startPoint(), pEdge.endPoint()};
620 proxy.wGeom().polyline( 2, pts );
621 proxy.end();// send geometry to remote viewer
622
623 DEBUG_DRAW(pEdge.endPoint(), 0.01, color);
624}
625
626inline void DebugDrawFaceEdges(const FacetModeler::Face* pFace, OdInt16 color)
627{
628 if( !g_DEBUG_DRAW_ENABLED )
629 return;
630
631 EdgeFaceIterator it(pFace);
632 while(!it.done())
633 {
634 DEBUG_DRAW(*it.get(), color);
635
636 OdGePoint3d pts = it.get()->startPoint();
637 OdGePoint3d pte = it.get()->endPoint();
638
639 double d = pts.distanceTo(pte);
640
641 it.next();
642 }
643
644}
645
646
647inline void DEBUG_DRAW( const OdGePoint3d& pt, OdInt16 color )
648{
649 DEBUG_DRAW(pt, 12.0, color);
650}
651
652inline void DEBUG_DRAW3(const OdGePoint3d& pt, const OdGeVector3d& v, OdInt16 color)
653{
654 if( g_DEBUG_DRAW_ENABLED )
655 { // set this flag in debugger to enable geometry sending to remote viever
656 OdRemoteGeomProxy proxy;
657 OdRemoteGeomProxyAutoBlock rAuto(proxy);
658
659 const double dLength = v.length();
660 const double dVecLength = dLength * 0.9;
661 OdGePoint3d ptEnd1 = pt + (dVecLength * v);
662 OdGePoint3d ptEnd2 = pt + v;
663
664 OdGePoint3d pts1[] = {pt, ptEnd1};
665 DEBUG_DRAW_POLYLINE(pts1, 2, color);
666
667 OdGePoint3d pts2[] = {ptEnd1, ptEnd2};
668 DEBUG_DRAW_POLYLINE(pts2, 2, color+1);
669 }
670}
671
672
673inline void DEBUG_DRAW( const OdGeLineSeg3d& aSeg, OdInt16 color )
674{
675 if( g_DEBUG_DRAW_ENABLED ) { // set this flag in debugger to enable geometry sending to remote viever
676 OdRemoteGeomProxy proxy;
677 OdRemoteGeomProxyAutoBlock rAuto(proxy);
678
679 proxy.begin(); // initialize proxy for remote OdGiWorldDraw object
680 proxy.traits().setColor( color );// use remote OdGiSubEntityTraits
681 OdGePoint3d pts[] = {aSeg.startPoint(), aSeg.endPoint()};
682 proxy.wGeom().polyline( 2, pts );
683 proxy.end();// send geometry to remote viewer
684 }
685};
686
687
688inline void DEBUG_DRAW_ARROW(const OdGePoint3d& ptStart, const OdGeVector3d& vec, OdInt16 edgeBaseColor)
689{
690 OdGePoint3d ptEnd = ptStart + vec;
691 OdGePoint3d ptArrowBase = ptEnd - (ptEnd - ptStart) / 20.0;
692
693 OdInt16 edgeColor = edgeBaseColor;
695 DEBUG_DRAW3(ptStart, ptEnd, edgeColor);
696 DEBUG_DRAW3(ptArrowBase, ptEnd, arrowColor);
697};
698
699
700inline void DEBUG_DRAW_FACE( const FacetModeler::Face* pFace, OdInt16 color ) {
701 if( g_DEBUG_DRAW_ENABLED ) { // set this flag in debugger to enable geometry sending to remote viever
702 OdRemoteGeomProxy proxy;
703 OdRemoteGeomProxyAutoBlock rAuto(proxy);
704
706 pFace->profile( profile );
707 DEBUG_DRAW( profile, color );
708 }
709}
710
711
712inline void DEBUG_DRAW_AXIS4(const OdGePoint3d& ptOrigin, const OdGeVector3d& vAxis, const double fLen, OdInt16 color)
713{
714 OdRemoteGeomProxy proxy;
715 OdRemoteGeomProxyAutoBlock rAuto(proxy);
716
717 OdGePoint3d v1 = ptOrigin + vAxis * (0.9 * fLen);
718 OdGePoint3d v2 = v1 + vAxis * (0.1 * fLen);
719 DEBUG_DRAW3( ptOrigin, v1, color );
721}
722
723inline void DEBUG_DRAW_AXIS(const OdGePoint3d& ptOrigin, const OdGeVector3d& vAxis, const double fLen) {
724 DEBUG_DRAW_AXIS4(ptOrigin, vAxis, fLen, OdCmEntityColor::kACIGreen);
725}
726
727inline void DEBUG_DRAW_CS(const OdGePoint3d& ptOrigin, const OdGeVector3d& vx, const OdGeVector3d& vy, const OdGeVector3d& vz, const double fLen)
728{
729 OdRemoteGeomProxy proxy;
730 OdRemoteGeomProxyAutoBlock rAuto(proxy);
731
732 DEBUG_DRAW_AXIS4(ptOrigin, vx, fLen, OdCmEntityColor::kACIRed);
733 DEBUG_DRAW_AXIS4(ptOrigin, vy, fLen, OdCmEntityColor::kACIGreen);
734 DEBUG_DRAW_AXIS4(ptOrigin, vz, fLen, OdCmEntityColor::kACIBlue);
735}
736
737inline void DEBUG_DRAW_PLANE(const OdGePlane& rPlane, const double fWidth, OdInt16 color)
738{
739 OdRemoteGeomProxy proxy;
740 OdRemoteGeomProxyAutoBlock rAuto(proxy);
741
743 c2dBox.appendVertex(OdGePoint2d(-fWidth,-fWidth));
744 c2dBox.appendVertex(OdGePoint2d(fWidth,-fWidth));
745 c2dBox.appendVertex(OdGePoint2d(fWidth,fWidth));
746 c2dBox.appendVertex(OdGePoint2d(-fWidth,fWidth));
747 c2dBox.setClosed(true);
748
749 FacetModeler::Profile3D c3dPlane(rPlane);
750 c3dPlane.as2d().push_back(c2dBox);
751 DEBUG_DRAW( c3dPlane, color );
752 DEBUG_DRAW_AXIS( rPlane.pointOnPlane(), rPlane.normal(), fWidth/2 );
753}
754
755inline void DEBUG_DRAW(const OdGePoint2d& rPoint, OdInt16 color, double fMarkerSize = 5)
756{
757 OdRemoteGeomProxy proxy;
758 OdRemoteGeomProxyAutoBlock rAuto(proxy);
759
761
762 c2dBox.appendVertex(rPoint + OdGeVector2d(fMarkerSize, -fMarkerSize));
763 c2dBox.appendVertex(rPoint + OdGeVector2d(fMarkerSize, fMarkerSize));
764 c2dBox.appendVertex(rPoint + OdGeVector2d(-fMarkerSize, fMarkerSize));
765 c2dBox.appendVertex(rPoint + OdGeVector2d(-fMarkerSize, -fMarkerSize));
766 c2dBox.setClosed(true);
767
768 DEBUG_DRAW( c2dBox, color );
769}
770
771inline void DEBUG_DRAW_FACE_PROFILE(const FacetModeler::Profile2D& faceProfile)
772{
773 for(OdUInt32 contourIdx = 0; contourIdx < faceProfile.size(); contourIdx++)
774 {
775 const FacetModeler::Contour2D& currentContour = faceProfile[contourIdx];
776 if(currentContour.isCCW())
777 {
778 DEBUG_DRAW(currentContour, OdCmEntityColor::kACIRed);
779 }
780 else
781 {
782 DEBUG_DRAW(currentContour, OdCmEntityColor::kACIGreen);
783 }
784 }
785}
786
787/*inline void TEST_DRAW_PLANE( const OdGePlane& rPlane, const double fWidth) {
788 FacetModeler::Contour2D c2dBox;
789 c2dBox.appendVertex(OdGePoint2d(-fWidth,-fWidth));
790 c2dBox.appendVertex(OdGePoint2d(fWidth,-fWidth));
791 c2dBox.appendVertex(OdGePoint2d(fWidth,fWidth));
792 c2dBox.appendVertex(OdGePoint2d(-fWidth,fWidth));
793 c2dBox.setClosed(true);
794
795 FacetModeler::Profile3D c3dPlane(rPlane);
796 c3dPlane.as2d().push_back(c2dBox);
797 pGi->Geo().DrawProfile3D(c3dPlane);
798}*/
799
800inline void DEBUG_BLOCK_BEGIN()
801{
802 OdRemoteGeomProxy proxy;
803 proxy.sendStringToExecute(g_strGeomBlockBegin);
804}
805
806inline void DEBUG_BLOCK_END()
807{
808 OdRemoteGeomProxy proxy;
809 proxy.sendStringToExecute(g_strGeomBlockEnd);
810}
811
812inline void DEBUG_DRAW_EXTENTS(const OdGeExtents2d& box, OdUInt16 color)
813{
815
817 pts.resize(5);
818
819 pts[0] = box.minPoint();
820 pts[1] = OdGePoint2d(box.maxPoint().x, box.minPoint().y);
821 pts[2] = box.maxPoint();
822 pts[3] = OdGePoint2d(box.minPoint().x, box.maxPoint().y);
823 pts[4] = pts[0];
824
825 DEBUG_DRAW_POLYLINE(pts.asArrayPtr(), 5, color);
827}
828
829inline void DEBUG_DRAW_ENTITY_EXTENTS_2D(const OdGeMatrix3d& mEntity, const OdGeExtents3d& mExtents, OdUInt16 color)
830{
831 OdGePoint3d ptOrigin = mEntity.getCsOrigin();
832
833 double dL = mExtents.maxPoint().x - mExtents.minPoint().x;
834 double dW = mExtents.maxPoint().y - mExtents.minPoint().y;
835
836 double dPtSize = 1;
837 {
838 double dMin = odmin(dL, dW);
839 dPtSize = dMin / 10;
840 }
841
843 DEBUG_DRAW(ptOrigin, dPtSize, 0);
844 OdGePoint3d pts[5];
845
846 pts[0] = ptOrigin;
847 pts[1] = ptOrigin + mEntity.getCsXAxis() * dL;
848 pts[2] = pts[1] + mEntity.getCsYAxis() * dW;
849 pts[3] = pts[2] - mEntity.getCsXAxis() * dL;
850 pts[4] = pts[3] - mEntity.getCsYAxis() * dW;
851 DEBUG_DRAW_POLYLINE(pts, 5, color);
853}
854
855/*inline void DEBUG_DRAW_ENTITY_EXTENTS_2D(AECDbGeoPtr pEntity, const OdGeExtents3d& mExtents, OdUInt16 color)
856{
857 DEBUG_DRAW_ENTITY_EXTENTS_2D(pEntity->GetMatrix(), mExtents, color);
858}*/
859
860inline void DEBUG_DRAW_CS(const OdGeMatrix3d& m, double dBaseLen, OdUInt16 color)
861{
862 OdGePoint3d origin;
863 OdGeVector3d xAxis;
864 OdGeVector3d yAxis;
865 OdGeVector3d zAxis;
866 m.getCoordSystem(origin, xAxis, yAxis, zAxis);
867
869 DEBUG_DRAW(origin, dBaseLen / 10., 0);
870
871 OdGePoint3d pts[2];
872 pts[0] = origin;
873
874 pts[1] = origin + xAxis * dBaseLen;
875 DEBUG_DRAW_POLYLINE(pts, 2, color);
876
877 pts[1] = origin + yAxis * dBaseLen * 3;
878 DEBUG_DRAW_POLYLINE(pts, 2, color);
879
880 pts[1] = origin + zAxis * dBaseLen * 5;
881 DEBUG_DRAW_POLYLINE(pts, 2, color);
882
884}
885
886/*inline void DEBUG_DRAW(OdDbBlockReference* pBlock, OdUInt16 color)
887{
888 DEBUG_BLOCK_BEGIN();
889
890 OdRemoteGeomProxy proxy;
891 OdRemoteGeomProxyAutoBlock rAuto(proxy);
892
893 proxy.setDatabase(pBlock->database());
894 proxy.begin();
895 proxy.traits().setColor( color );
896 proxy.wGeom().draw( pBlock );
897 proxy.end();
898
899 DEBUG_BLOCK_END();
900}*/
901
902inline void DEBUG_CONTOUR2D(const FacetModeler::Contour2D& c)
903{
904 AecAutoColor color;
905 bool fIsSI = c.isSelfIntersecting();
906
908 const int numSegs = c.numSegments();
909 for(int s = 0; s < numSegs; s++)
910 {
911 c.getSegmentAt(s, aSeg);
912 DEBUG_DRAW(aSeg, color.peekColor());
913
914 double dBulge = aSeg.bulge();
915 FacetModeler::SegmentType sType = aSeg.type();
916
917 OdGePoint2d ptS = aSeg.startPt();
918 OdGePoint2d ptE = aSeg.endPt();
919
920 DEBUG_DRAW(ptS, color.peekColor());
921 DEBUG_DRAW(ptE, color.peekColor());
922
923 color.color();
924 }
925
926 OdGePoint2d pt;
927 const int numVerts = c.numVerts();
928 for(int i = 0; i < numVerts; i++)
929 {
930 c.getVertexAt(i, &pt);
931 DEBUG_DRAW(pt, color.color());
932 }
933}
934
935inline void DEBUG_DRAW_EXTENTS(const OdGeExtents3d& box, OdUInt16 color)
936{
938
939 const OdGePoint3d& minPt = box.minPoint();
940 const OdGePoint3d& maxPt = box.maxPoint();
941
942 OdGePoint3d pts[8];
943
944 pts[0] = minPt;
945 pts[1] = OdGePoint3d(maxPt.x, minPt.y, minPt.z);
946 pts[2] = OdGePoint3d(maxPt.x, maxPt.y, minPt.z);
947 pts[3] = OdGePoint3d(minPt.x, maxPt.y, minPt.z);
948
949 pts[4] = OdGePoint3d(minPt.x, minPt.y, maxPt.z);
950 pts[5] = OdGePoint3d(maxPt.x, minPt.y, maxPt.z);
951 pts[6] = maxPt;
952 pts[7] = OdGePoint3d(minPt.x, maxPt.y, maxPt.z);
953
954 OdGePoint3d poly1[6];
955 poly1[0] = pts[4];
956 poly1[1] = pts[0];
957 poly1[2] = pts[1];
958 poly1[3] = pts[2];
959 poly1[4] = pts[3];
960 poly1[5] = pts[7];
961
962 OdGePoint3d poly2[6];
963 poly2[0] = pts[1];
964 poly2[1] = pts[5];
965 poly2[2] = pts[4];
966 poly2[3] = pts[7];
967 poly2[4] = pts[6];
968 poly2[5] = pts[2];
969
970 OdGePoint3d poly3[2];
971 poly3[0] = pts[0];
972 poly3[1] = pts[3];
973
974 OdGePoint3d poly4[2];
975 poly4[0] = pts[5];
976 poly4[1] = pts[6];
977
978 DEBUG_DRAW_POLYLINE(poly1, 6, color);
979 DEBUG_DRAW_POLYLINE(poly2, 6, color);
980 DEBUG_DRAW_POLYLINE(poly3, 2, color);
981 DEBUG_DRAW_POLYLINE(poly4, 2, color);
982
984}
985
986
987inline void DEBUG_DRAW_LOOP(const OdGePoint2dArray& loop, OdUInt16 color)
988{
990
991 OdGePoint2dArray closedLoop;
992 closedLoop.resize(loop.size() + 1);
993
994 for (OdUInt32 i = 0; i != loop.size(); i++)
995 {
996 closedLoop[i] = loop[i];
997 }
998 closedLoop[loop.size()] = loop[0];
999
1000 DEBUG_DRAW_POLYLINE(closedLoop.asArrayPtr(), closedLoop.size(), color);
1002}
1003
1004#else
1005
1006template <class TSegment2d>
1007inline void DEBUG_DRAW(const TSegment2d& rSeg, OdInt16 color) {}
1008
1009inline void DEBUG_DRAW3(OdRemoteGeomProxy& proxy, const Contour2D& contour, OdInt16 color) {}
1010
1011inline void DEBUG_DRAW( const Contour2D& contour, OdInt16 color) {}
1012
1013inline void DEBUG_DRAW(const Contour3D& contour, OdInt16 color ) {}
1014
1015inline void DEBUG_DRAW( const Profile3D& profile, OdInt16 color ) {}
1016
1017inline void DEBUG_DRAW_LINESEG(const OdGePoint2d& pt1, const OdGePoint2d& pt2, OdInt16 color) {}
1018
1019inline void DEBUG_DRAW_LINE(const OdGeLine2d& aLine, OdInt16 color) {}
1020
1021inline void DEBUG_DRAW(const OdGeLine2d& aLine, const OdGePlane& aPlane, OdInt16 color) {}
1022
1023inline void DEBUG_DRAW(const OdCmEntityColor& color) {}
1024
1025inline void DEBUG_DRAW1(const OdCmColor& color) {}
1026
1027inline void DEBUG_DRAW_POLYLINE(const OdGePoint3d* ptPoly, OdUInt32 nPts, OdInt16 color) {}
1028
1029inline void DEBUG_DRAW( const Profile2D& profile, OdInt16 color ) {}
1030
1031inline void DEBUG_DRAW( const std::vector<Profile2D>& rProfiles, OdInt16 color ) {}
1032
1033inline void DEBUG_DRAW3(const OdGePoint3d& pt1, const OdGePoint3d& pt2, OdInt16 color) {}
1034
1035inline void DEBUG_DRAW(const OdGeLine3d& line, OdInt16 color) {}
1036
1037inline void DEBUG_DRAW3(const OdGeVector3d& v1, const OdGeVector3d& v2, OdInt16 color) {}
1038
1039static inline void DebugDrawBody( OdRemoteGeomProxy& proxy, const Body& rBody ) {}
1040
1041inline void DEBUG_DRAW( const Body& body, OdInt16 color, bool wired = true ) {}
1042
1043inline void DEBUG_DRAW( const OdGePoint3d& pt, double dSize, OdInt16 color ) {}
1044
1045inline void DEBUG_DRAW( const OdGePoint3d& pt, OdInt16 color ) {}
1046
1047inline void DEBUG_DRAW3(const OdGePoint3d& pt, const OdGeVector3d& v, OdInt16 color) {}
1048
1049
1050inline void DEBUG_DRAW( const OdGeLineSeg3d& aSeg, OdInt16 color ) {}
1051
1052inline void DEBUG_DRAW_FACE( const Face* pFace, OdInt16 color ) {}
1053
1054inline void DEBUG_DRAW( const Edge& pEdge, OdInt16 color ) {}
1055
1056inline void DEBUG_DRAW_AXIS4(const OdGePoint3d& ptOrigin, const OdGeVector3d& vAxis, const double fLen, OdInt16 color) {}
1057
1058inline void DEBUG_DRAW_AXIS(const OdGePoint3d& ptOrigin, const OdGeVector3d& vAxis, const double fLen) {}
1059
1060inline void DEBUG_DRAW_CS(const OdGePoint3d& ptOrigin, const OdGeVector3d& vx, const OdGeVector3d& vy, const OdGeVector3d& vz, const double fLen) {}
1061
1062inline void DEBUG_DRAW_PLANE(const OdGePlane& rPlane, const double fWidth, OdInt16 color) {}
1063
1064inline void DEBUG_DRAW(const OdGePoint2d& rPoint, OdInt16 color, double fMarkerSize = 5) {}
1065inline void DEBUG_DRAW(const Segment2D& rSeg, OdInt16 color) {}
1066
1067inline void DEBUG_DRAW_FACE_PROFILE(const Profile2D& faceProfile) {}
1068
1069//inline void TEST_DRAW_PLANE( AECGiDraw* pGi, const OdGePlane& rPlane, const double fWidth) {}
1070
1071
1072inline void DEBUG_DRAW_ENTITY_EXTENTS_2D(const OdGeMatrix3d& mEntity, const OdGeExtents3d& mExtents, OdUInt16 color) {}
1073
1074//inline void DEBUG_DRAW_ENTITY_EXTENTS_2D(AECDbGeoPtr pEntity, const OdGeExtents3d& mExtents, OdUInt16 color) {}
1075
1076inline void DEBUG_DRAW_CS(const OdGeMatrix3d& m, double dBaseLen, OdUInt16 color) {}
1077
1078
1079//inline void DEBUG_DRAW(OdDbBlockReference* pBlock, OdUInt16 color) {}
1080
1081inline void DEBUG_DRAW_TRIANGLE(const OdGePoint3d* ptTriangle, OdInt16 color) {}
1082
1083inline void DEBUG_CONTOUR2D(const Contour2D& c) {}
1084
1085inline void DEBUG_BLOCK_BEGIN(){}
1086inline void DEBUG_BLOCK_END(){}
1087
1088
1089inline void DEBUG_DRAW2(const OdGePoint2d& pt1, const OdGePoint2d& pt2, OdInt16 color) {}
1090inline void DEBUG_DRAW_EXTENTS(const OdGeExtents2d& box, OdUInt16 color) {}
1091inline void DEBUG_DRAW_LOOP(const OdGePoint2dArray& loop, OdUInt16 color) {}
1092
1093
1094
1095
1096
1097#endif
1098
1099
1100
1101#endif //#if !defined(DEBUG_DRAW_INCLUDED)
#define ODA_ASSERT(exp)
Definition: DebugStuff.h:57
void DEBUG_DRAW_ENTITY_EXTENTS_2D(const OdGeMatrix3d &mEntity, const OdGeExtents3d &mExtents, OdUInt16 color)
Definition: FMDebugDraw.h:1072
void DEBUG_DRAW_AXIS4(const OdGePoint3d &ptOrigin, const OdGeVector3d &vAxis, const double fLen, OdInt16 color)
Definition: FMDebugDraw.h:1056
void DEBUG_DRAW_EXTENTS(const OdGeExtents2d &box, OdUInt16 color)
Definition: FMDebugDraw.h:1090
void DEBUG_CONTOUR2D(const Contour2D &c)
Definition: FMDebugDraw.h:1083
void DEBUG_DRAW_POLYLINE(const OdGePoint3d *ptPoly, OdUInt32 nPts, OdInt16 color)
Definition: FMDebugDraw.h:1027
void DEBUG_DRAW_FACE_PROFILE(const Profile2D &faceProfile)
Definition: FMDebugDraw.h:1067
void DEBUG_DRAW_PLANE(const OdGePlane &rPlane, const double fWidth, OdInt16 color)
Definition: FMDebugDraw.h:1062
void DEBUG_DRAW_LINE(const OdGeLine2d &aLine, OdInt16 color)
Definition: FMDebugDraw.h:1019
void DEBUG_DRAW1(const OdCmColor &color)
Definition: FMDebugDraw.h:1025
void DEBUG_DRAW_CS(const OdGePoint3d &ptOrigin, const OdGeVector3d &vx, const OdGeVector3d &vy, const OdGeVector3d &vz, const double fLen)
Definition: FMDebugDraw.h:1060
void DEBUG_BLOCK_END()
Definition: FMDebugDraw.h:1086
void DEBUG_DRAW3(OdRemoteGeomProxy &proxy, const Contour2D &contour, OdInt16 color)
Definition: FMDebugDraw.h:1009
void DEBUG_DRAW_LINESEG(const OdGePoint2d &pt1, const OdGePoint2d &pt2, OdInt16 color)
Definition: FMDebugDraw.h:1017
void DEBUG_DRAW(const TSegment2d &rSeg, OdInt16 color)
Definition: FMDebugDraw.h:1007
void DEBUG_DRAW_FACE(const Face *pFace, OdInt16 color)
Definition: FMDebugDraw.h:1052
void DEBUG_DRAW_AXIS(const OdGePoint3d &ptOrigin, const OdGeVector3d &vAxis, const double fLen)
Definition: FMDebugDraw.h:1058
void DEBUG_DRAW2(const OdGePoint2d &pt1, const OdGePoint2d &pt2, OdInt16 color)
Definition: FMDebugDraw.h:1089
void DEBUG_DRAW_LOOP(const OdGePoint2dArray &loop, OdUInt16 color)
Definition: FMDebugDraw.h:1091
TAecAutoColor< OdUInt16 > AecAutoColor
Definition: FMDebugDraw.h:113
void DEBUG_DRAW_TRIANGLE(const OdGePoint3d *ptTriangle, OdInt16 color)
Definition: FMDebugDraw.h:1081
void DEBUG_BLOCK_BEGIN()
Definition: FMDebugDraw.h:1085
#define odmin(X, Y)
Definition: OdPlatform.h:34
unsigned int OdUInt32
short OdInt16
unsigned short OdUInt16
bool OdZero(double x, double tol=1.e-10)
Definition: OdaDefs.h:532
static Body box(const OdGePoint3d &ptOrigin, const OdGeVector3d &vSizes)
bool isNull() const
Result getLineSegAt(OdUInt32 iIndex, OdGeLineSeg2d &geLine) const
Result getVertexAt(OdUInt32 iIndex, OdGePoint2d *pPoint, double *pBulge=NULL, OdIntPtr *pMetadata=NULL, OdUInt32 *puRawFlags=NULL) const
Result getBulgeAt(OdUInt32 iIndex, double &dBulge) const
void setClosed(bool bClosed=true)
Result getArcSegAt(OdUInt32 iIndex, OdGeCircArc2d &geArc) const
OdUInt32 numVerts() const
SegmentType segmentType(OdUInt32 iIndex) const
bool isSelfIntersecting(const OdGeTol &gTol=FMGeGbl::gTol, bool bExcludeTouch=false) const
Result getSegmentAt(OdUInt32 iIndex, Segment2D &rSegment) const
OdUInt32 numSegments() const
Result appendVertex(const OdGePoint2d &ptStart, double dBulge=0.0, OdIntPtr uMetadata=0, OdUInt32 uRawFlags=0)
const OdGePoint3d & startPoint() const
Definition: FMMdlEdge.h:423
const OdGePoint3d & endPoint() const
Definition: FMMdlEdge.h:427
Edge * next() const
Vertex * vertex() const
void projection(const OdGePlane &plane, Profile2D &result, bool bIncludeHoles=true, OdArray< const Edge * > *pSourceEdges=NULL) const
void profile(Profile3D &rResult, const OdGePlane *pPlane=NULL, bool bIncludeHoles=true) const
const OdGePlane & plane() const
size_type size() const
const OdGePoint2d & endPt() const
double bulge() const
SegmentType type() const
const OdGePoint2d & startPt() const
const OdGePoint3d & point() const
void to3D(const OdGePoint2d &rSource2D, OdGePoint3d &rDest3D) const
const OdGeMatrix3d & transform() const
OdGePoint3dArray m_aVx
const T * asArrayPtr() const
Definition: OdArray.h:1590
size_type length() const
Definition: OdArray.h:1537
size_type size() const
Definition: OdArray.h:1247
void push_back(const T &value)
Definition: OdArray.h:1411
size_type logicalLength() const
Definition: OdArray.h:1558
void resize(size_type logicalLength, const T &value)
Definition: OdArray.h:1185
OdCmEntityColor entityColor() const
const OdGePoint2d & maxPoint() const
Definition: GeExtents2d.h:88
const OdGePoint2d & minPoint() const
Definition: GeExtents2d.h:79
const OdGePoint3d & maxPoint() const
Definition: GeExtents3d.h:443
const OdGePoint3d & minPoint() const
Definition: GeExtents3d.h:438
OdGePoint3d startPoint() const
OdGePoint3d endPoint() const
OdGePoint2d pointOnLine() const
OdGeVector2d direction() const
OdGeVector3d direction() const
OdGePoint3d pointOnLine() const
void getCoordSystem(OdGePoint3d &origin, OdGeVector3d &xAxis, OdGeVector3d &yAxis, OdGeVector3d &zAxis) const
OdGePoint3d getCsOrigin() const
OdGeVector3d getCsYAxis() const
OdGeVector3d getCsXAxis() const
OdGePoint3d pointOnPlane() const
OdGeVector3d normal() const
double x
Definition: GePoint2d.h:409
double y
Definition: GePoint2d.h:410
double z
Definition: GePoint3d.h:497
double distanceTo(const OdGePoint3d &point) const
Definition: GePoint3d.h:339
double y
Definition: GePoint3d.h:496
double x
Definition: GePoint3d.h:495
OdGePoint3d evalPoint(const OdGePoint2d &param) const
virtual void popModelTransform()=0
virtual void shell(OdInt32 numVertices, const OdGePoint3d *vertexList, OdInt32 faceListSize, const OdInt32 *faceList, const OdGiEdgeData *pEdgeData=0, const OdGiFaceData *pFaceData=0, const OdGiVertexData *pVertexData=0)=0
virtual void polyline(OdInt32 numVertices, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, OdGsMarker baseSubEntMarker=-1)=0
virtual void pushModelTransform(const OdGeVector3d &normal)=0
virtual OdUInt16 color() const =0
virtual void setLineWeight(OdDb::LineWeight lineWeight)=0
virtual void setColor(OdUInt16 color)=0
virtual void setTrueColor(const OdCmEntityColor &color)=0
OdGiSubEntityTraits & traits()
void sendStringToExecute(const OdString &s)
OdGiWorldGeometry & wGeom()
T peekColor() const
Definition: FMDebugDraw.h:110
GLfloat GLfloat v1
Definition: gles2_ext.h:295
GLfloat GLfloat GLfloat v2
Definition: gles2_ext.h:296
const GLfloat * v
Definition: gles2_ext.h:315
GLfloat GLfloat blue
Definition: gles2_ext.h:147
GLfloat x
Definition: gles2_ext.h:314
GLfloat green
Definition: gles2_ext.h:147
GLfloat GLfloat y
Definition: gles2_ext.h:316
GE_TOOLKIT_EXPORT bool triangulateProfile(const OdGePoint2dArray &vertexSource, const std::vector< OdInt32 > &inFaceData, OdArray< OdInt32 > &vecTriangles, double tol=0)
@ kLnWt211
Definition: OdaDefs.h:410
void polyline2d(OdGiGeometry &geom, int n, const OdGePoint2d *pts, double z=0.0)
Definition: FMGiTools.h:32
void lineSeg2d(OdGiGeometry &geom, const OdGeLineSeg2d &line, double z=0.0)
Definition: FMGiTools.h:66
void arc2d(OdGiGeometry &geom, const OdGePoint2d &p1, const OdGePoint2d &p2, const OdGePoint2d &p3, double z=0.0)
Definition: FMGiTools.h:43
static const OdUInt16 clear
Definition: FMDebugDraw.h:77
static const OdUInt16 magenta
Definition: FMDebugDraw.h:83
static const OdUInt16 red
Definition: FMDebugDraw.h:78
static const OdUInt16 cyan
Definition: FMDebugDraw.h:81
static const OdUInt16 yellow
Definition: FMDebugDraw.h:79
static const OdUInt16 white
Definition: FMDebugDraw.h:84