CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbSection.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
25#ifndef _OdDbSection_h_Included_
26#define _OdDbSection_h_Included_
27
28#include "DbEntity.h"
29#include "SmartPtr.h"
30#include "DbHatch.h"
31#include "TD_PackPush.h"
32#include "ModelerGeometry.h"
33
36
37class OdDbSection;
39
45{
46public:
50 enum State
51 {
53 kPlane = 0x01,
54
56 kBoundary = 0x02,
57
59 kVolume = 0x04
60 };
61
66 {
68 kNone = 0x00,
69
71 kSectionLine = 0x01,
72
74 kSectionLineTop = 0x02,
75
77 kSectionLineBottom = 0x04,
78
80 kBackLine = 0x08,
81
83 kBackLineTop = 0x10,
84
86 kBackLineBottom = 0x20,
87
89 kVerticalLineTop = 0x40,
90
92 kVerticalLineBottom = 0x80
93 };
94
98 enum Height
99 {
101 kHeightAboveSectionLine = 0x1,
102
104 kHeightBelowSectionLine = 0x2
105 };
106
107public:
108 //DOM-IGNORE-BEGIN
110 //DOM-IGNORE-END
111
116
124 const OdGeVector3d& verticalDir);
125
134 const OdGeVector3d& verticalDir, const OdGeVector3d& vecViewingDir);
135
148
162
166 const OdString getName() const;
167
173 void getName(OdString& sName) const;
174
180 void setName(const OdString& pszName);
181
186
193
198
205
210
218
223
229 void setIndicatorTransparency(int nTransparency);
230
235
242
246 int numVertices() const;
247
255 OdResult getVertex(int nIndex,
256 OdGePoint3d& pt) const;
257
265 OdResult setVertex(int nIndex,
266 const OdGePoint3d& pt);
267
275 OdResult addVertex(int nInsertAt,
276 const OdGePoint3d& pt);
277
285
292
300
312 double height(OdDbSection::Height nHeightType) const;
313
327 OdResult setHeight(OdDbSection::Height nHeightType, double fHeight);
328
329 //bool hitTest(const OdGePoint3d& ptHit, int* pSegmentIndex, OdGePoint3d* ptOnSegment, OdDbSection::SubItem* pSubItem) const;
330
337 OdResult createJog (const OdGePoint3d& ptOnSection);
338
342 bool hasJogs() const;
343
348
363
370
376 void enableLiveSection(bool bEnable);
377
383 bool isSlice() const;
384
391 OdResult setIsSlice( bool bIsSlice );
392
396 double thicknessDepth() const;
397
405
409 double sectionPlaneOffset() const;
410
418
419public:
420 // Base class overrides
421
423 virtual void dwgOutFields(OdDbDwgFiler* pFiler) const;
424
426 virtual void dxfOutFields(OdDbDxfFiler* pFiler) const;
427
428 virtual bool subWorldDraw(OdGiWorldDraw* pWd) const;
429
430 virtual void subViewportDraw(OdGiViewportDraw* pVd) const;
431
432 virtual OdResult subGetClassID(void* pClsid) const;
433
434 virtual void subClose();
435
442 virtual OdResult subTransformBy(const OdGeMatrix3d& xform);
443
451 virtual OdResult subGetTransformedCopy(const OdGeMatrix3d& mat, OdDbEntityPtr& pCopy) const;
452
453 //virtual OdResult subGetGeomExtents(OdGeExtents3d& extents) const;
454
467 OdArray<OdDbEntityPtr>& intBoundaryEnts,
468 OdArray<OdDbEntityPtr>& intFillEnts,
469 OdArray<OdDbEntityPtr>& backgroundEnts,
470 OdArray<OdDbEntityPtr>& foregroundEnts,
471 OdArray<OdDbEntityPtr>& curveTangencyEnts) const;
472
473 // INTERNAL USE ONLY
474 //DOM-IGNORE-BEGIN
476 OdArray<OdDbEntityPtr>& intBoundaryEnts,
477 OdArray<OdDbEntityPtr>& intFillEnts,
478 OdArray<OdDbEntityPtr>& backgroundEnts,
479 OdArray<OdDbEntityPtr>& foregroundEnts,
480 OdArray<OdDbEntityPtr>& curveTangencyEnts,
481 bool bIsSetProperties) const;
482 //DOM-IGNORE-END
483
487 double topPlane() const;
488
495
499 double bottomPlane() const;
500
507
511 double elevation() const;
512
519};
520
521
522//*************************************************************************
523// OdDbSectionSettings
524//*************************************************************************
525
531{
532public:
537 {
539 kLiveSection = 0x1,
540
542 k2dSection = 0x2,
543
545 k3dSection = 0x4
546 };
547
552 {
554 kIntersectionBoundary = 0x1,
555
557 kIntersectionFill = 0x2,
558
560 kBackgroundGeometry = 0x4,
561
563 kForegroundGeometry = 0x8,
564
566 kCurveTangencyLines = 0x10
567 };
568
573 {
575 kSourceAllObjects = 0x1,
576
578 kSourceSelectedObjects = 0x2,
579
581 kDestinationNewBlock = 0x10,
582
584 kDestinationReplaceBlock = 0x20,
585
587 kDestinationFile = 0x40
588 };
589
590public:
591 //DOM-IGNORE-BEGIN
593 //DOM-IGNORE-END
594
599
601 OdDbDwgFiler* pFiler);
602
603 virtual void dwgOutFields(
604 OdDbDwgFiler* pFiler) const;
605
607 OdDbDxfFiler* pFiler);
608
609 virtual void dxfOutFields(
610 OdDbDxfFiler* pFiler) const;
611
613 void* pClsid) const;
614
618 void reset();
619
633
646
659
681
705
713 OdDbObjectIdArray& ids) const;
714
722 const OdDbObjectIdArray& ids);
723
731
740 const OdDbObjectId& id);
741
749
758 const OdString& pszFileName);
759
783 OdDbSectionSettings::Geometry nGeometry) const;
784
809 bool bVisible);
810
833 OdDbSectionSettings::Geometry nGeometry) const;
834
858 OdDbSectionSettings::Geometry nGeometry, const OdCmColor& color);
859
882 OdDbSectionSettings::Geometry nGeometry) const;
883
908 const OdString& pszLayer);
909
932 OdDbSectionSettings::Geometry nGeometry) const;
933
958 const OdString& pszLinetype);
959
982 OdDbSectionSettings::Geometry nGeometry) const;
983
1008 double fScale);
1009
1032 OdDbSectionSettings::Geometry nGeometry) const;
1033
1058 const OdString& pszPlotStyleName);
1059
1082 OdDbSectionSettings::Geometry nGeometry) const;
1083
1108 OdDb::LineWeight nLineWeight);
1109
1132 OdDbSectionSettings::Geometry nGeometry) const;
1133
1158 int nTransparency);
1159
1181 OdDbSectionSettings::Geometry nGeometry) const;
1182
1206 int nTransparency);
1207
1231 OdDbSectionSettings::Geometry nGeometry) const;
1232
1258 bool bVisible);
1259
1291 OdDbHatch::HatchPatternType& nPatternType,
1292 OdString& pszPatternName) const;
1293
1325 OdDbHatch::HatchPatternType nPatternType,
1326 const OdString& pszPatternName);
1327
1350 OdDbSectionSettings::Geometry nGeometry) const;
1351
1376 double fAngle);
1377
1400 OdDbSectionSettings::Geometry nGeometry) const;
1401
1426 double fSpacing);
1427
1450 OdDbSectionSettings::Geometry nGeometry) const;
1451
1476 double fScale);
1477
1500 OdDbSectionSettings::Geometry nGeometry) const;
1501
1526 bool bHiddenLine);
1527
1550 OdDbSectionSettings::Geometry nGeometry) const;
1551
1576 bool bShow);
1577};
1578
1579
1580#include "TD_PackPop.h"
1581
1582#endif //_OdDbSection_h_Included_
#define DBENT_EXPORT
Definition: DbExport.h:67
OdSmartPtr< OdDbSectionSettings > OdDbSectionSettingsPtr
Definition: DbSection.h:35
OdSmartPtr< OdDbSection > OdDbSectionPtr
Definition: DbSection.h:38
OdResult
Definition: OdResult.h:29
HatchPatternType
Definition: DbHatch.h:100
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
void setIndicatorTransparency(int nTransparency)
virtual bool subWorldDraw(OdGiWorldDraw *pWd) const
OdResult setIsSlice(bool bIsSlice)
OdResult setTopPlane(double)
OdDbSection::State state() const
OdResult setHeight(OdDbSection::Height nHeightType, double fHeight)
OdResult plane(OdGeVector3d &uAxis, OdGeVector3d &vAxis) const
static OdDbSectionPtr createObject(const OdGePoint3dArray &pts, const OdGeVector3d &verticalDir)
OdResult setVertex(int nIndex, const OdGePoint3d &pt)
int indicatorTransparency() const
OdResult generateSectionGeometry(OdDbEntity *pEnt, OdArray< OdDbEntityPtr > &intBoundaryEnts, OdArray< OdDbEntityPtr > &intFillEnts, OdArray< OdDbEntityPtr > &backgroundEnts, OdArray< OdDbEntityPtr > &foregroundEnts, OdArray< OdDbEntityPtr > &curveTangencyEnts) const
void getName(OdString &sName) const
ODDB_DECLARE_MEMBERS(OdDbSection)
OdGeVector3d viewingDirection() const
OdResult addVertex(int nInsertAt, const OdGePoint3d &pt)
double thicknessDepth() const
OdGeVector3d verticalDirection() const
void setState(OdDbSection::State nState)
const OdString getName() const
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdResult setSectionPlaneOffset(double offset)
OdResult setBottomPlane(double)
OdResult setViewingDirection(const OdGeVector3d &dir)
OdResult setThicknessDepth(double depth)
bool hasJogs() const
int numVertices() const
void getVertices(OdGePoint3dArray &pts) const
bool isLiveSectionEnabled() const
OdCmColor indicatorFillColor() const
void setName(const OdString &pszName)
OdResult removeVertex(int nIndex)
double height(OdDbSection::Height nHeightType) const
double bottomPlane() const
virtual OdResult subTransformBy(const OdGeMatrix3d &xform)
OdResult setVertices(const OdGePoint3dArray &pts)
virtual void subViewportDraw(OdGiViewportDraw *pVd) const
bool isSlice() const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdGeVector3d normal() const
OdResult getVertex(int nIndex, OdGePoint3d &pt) const
void enableLiveSection(bool bEnable)
OdResult generateSectionGeometry(OdDbEntity *pEnt, OdArray< OdDbEntityPtr > &intBoundaryEnts, OdArray< OdDbEntityPtr > &intFillEnts, OdArray< OdDbEntityPtr > &backgroundEnts, OdArray< OdDbEntityPtr > &foregroundEnts, OdArray< OdDbEntityPtr > &curveTangencyEnts, bool bIsSetProperties) const
OdDbObjectId getSettings() const
OdResult setElevation(double)
void setIndicatorFillColor(const OdCmColor &color)
virtual OdResult subGetTransformedCopy(const OdGeMatrix3d &mat, OdDbEntityPtr &pCopy) const
static OdDbSectionPtr createObject(const OdGePoint3dArray &pts, const OdGeVector3d &verticalDir, const OdGeVector3d &vecViewingDir)
double elevation() const
virtual OdResult subGetClassID(void *pClsid) const
double sectionPlaneOffset() const
OdDbSectionSettingsPtr getSettings(OdDb::OpenMode mode) const
virtual void subClose()
OdResult createJog(const OdGePoint3d &ptOnSection)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
double topPlane() const
OdResult setVerticalDirection(const OdGeVector3d &dir)
double linetypeScale(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
double hatchAngle(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
OdString layer(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
bool visibility(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbSectionSettings::SectionType currentSectionType() const
void setLinetype(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, const OdString &pszLinetype)
int edgeTransparency(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
void setGenerationOptions(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Generation nOptions)
void setSourceObjects(OdDbSectionSettings::SectionType nSecType, const OdDbObjectIdArray &ids)
OdDbObjectId destinationBlock(OdDbSectionSettings::SectionType nSecType) const
void setDestinationBlock(OdDbSectionSettings::SectionType nSecType, const OdDbObjectId &id)
OdString linetype(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
void setDestinationFile(OdDbSectionSettings::SectionType nSecType, const OdString &pszFileName)
int faceTransparency(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
void setLayer(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, const OdString &pszLayer)
void reset(OdDbSectionSettings::SectionType nSecType)
void setHatchPattern(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, OdDbHatch::HatchPatternType nPatternType, const OdString &pszPatternName)
const OdString destinationFile(OdDbSectionSettings::SectionType nSecType) const
bool hiddenLine(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
void setHatchScale(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, double fScale)
bool hatchVisibility(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
void setFaceTransparency(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, int nTransparency)
OdCmColor color(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
OdString plotStyleName(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
void setHiddenLine(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, bool bHiddenLine)
void getSourceObjects(OdDbSectionSettings::SectionType nSecType, OdDbObjectIdArray &ids) const
void setDivisionLines(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, bool bShow)
void setHatchSpacing(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, double fSpacing)
void setLinetypeScale(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, double fScale)
void setEdgeTransparency(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, int nTransparency)
void getHatchPattern(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, OdDbHatch::HatchPatternType &nPatternType, OdString &pszPatternName) const
bool divisionLines(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
void setVisibility(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, bool bVisible)
OdDb::LineWeight lineWeight(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
void setLineWeight(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, OdDb::LineWeight nLineWeight)
void setHatchVisibility(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, bool bVisible)
virtual OdResult subGetClassID(void *pClsid) const
double hatchSpacing(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
void setColor(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, const OdCmColor &color)
double hatchScale(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry) const
ODDB_DECLARE_MEMBERS(OdDbSectionSettings)
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbSectionSettings::Generation generationOptions(OdDbSectionSettings::SectionType nSecType) const
void setHatchAngle(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, double fAngle)
void setCurrentSectionType(OdDbSectionSettings::SectionType nSecType)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
void setPlotStyleName(OdDbSectionSettings::SectionType nSecType, OdDbSectionSettings::Geometry nGeometry, const OdString &pszPlotStyleName)
GLintptr offset
Definition: gles2_ext.h:183
LineWeight
Definition: OdaDefs.h:386
OpenMode
Definition: DbObjectId.h:54