CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FxBIMSection.h
Go to the documentation of this file.
1//
2// (C) Copyright 2020-2023 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
19#include "FxBIM.h"
20
21#include <StringArray.h>
22#include <DbEntity.h>
23#include <Ge/GePlane.h>
24#include <Ge/GeExtents2d.h>
25
26#include <vector>
27
28class CFxBIMSection;
30
32{
33public:
35
36 virtual ~CFxBIMSection();
37
38 virtual const OdString& Name() const;
39 virtual void SetName( const OdString& name );
40 virtual const OdGePlane& Plane() const;
41 virtual void SetPlane( const OdGePlane& plane );
42 virtual const std::vector< OdGePoint2d >& Points() const;
43 virtual void SetPoints( const std::vector< OdGePoint2d >& points );
44 virtual double Depth() const;
45 virtual void SetDepth( double depth );
46
48 {
53 //InteriorElevation, //TODO:
54 };
55
56 virtual SectionType Type() const;
58
59 virtual const OdString& Filter() const;
60 virtual void SetFilter( const OdString& filter );
61
62 virtual void AddEntRef( const OdDbObjectId& eRefId );
63 virtual void AddEntRefs( const OdDbEntityPtrArray& arrEntRefs );
64 virtual void RemoveFromEntRefs();
65
66 enum Flags
67 {
68 eInvalid = 0x1,
69 eDrawBox = 0x2,
70 eDrawSymbol = 0x4,
71 eUnused0 = 0x8,
72 eUnused1 = 0x10,
73 };
74
75 virtual int Flags() const;
76 virtual void SetFlags( int flags );
77
78 virtual const std::vector< OdDbObjectId >& Layers() const;
79 virtual void SetLayers( const std::vector< OdDbObjectId >& layers );
80
81 void HideDrawBox( const bool& bHide );
82
86 virtual void AddLayer(const OdDbObjectId &layer);
87
91 virtual void RemoveLayer(const OdDbObjectId &layer);
92
93public:
94 virtual OdResult dwgInFields( OdDbDwgFiler* pFiler ) override;
95 virtual void dwgOutFields( OdDbDwgFiler* pFiler ) const override;
96
97 virtual OdResult dxfInFields( OdDbDxfFiler* pFiler ) override;
98 virtual void dxfOutFields( OdDbDxfFiler* pFiler ) const override;
99
101 bool subWorldDraw( OdGiWorldDraw* wd ) const override;
102 void subViewportDraw( OdGiViewportDraw* vd ) const override;
103
104 OdResult subGetGeomExtents( OdGeExtents3d& extents ) const override;
105
106 void subGripStatus( const OdDb::GripStat status ) override;
107
109 OdDb::OsnapMode osnapMode,
110 OdGsMarker gsSelectionMark,
111 const OdGePoint3d& pickPoint,
112 const OdGePoint3d& lastPoint,
113 const OdGeMatrix3d& xWorldToEye,
114 OdGePoint3dArray& snapPoints ) const override;
115
117 OdDb::OsnapMode osnapMode,
118 OdGsMarker gsSelectionMark,
119 const OdGePoint3d& pickPoint,
120 const OdGePoint3d& lastPoint,
121 const OdGeMatrix3d& xWorldToEye,
122 OdGePoint3dArray& snapPoints,
123 const OdGeMatrix3d& insertionMat ) const override;
124
125 bool subIsContentSnappable() const override;
126
127 OdResult subGetGripPoints( OdGePoint3dArray& gripPoints ) const override;
128 OdResult subMoveGripPointsAt( const OdIntArray& indices, const OdGeVector3d& offset ) override;
131 const double curViewUnitSize,
132 const int gripSize,
133 const OdGeVector3d& curViewDir,
134 const int bitFlags ) const override;
136 const OdDbVoidPtrArray& grips,
137 const OdGeVector3d& offset,
138 int bitFlags ) override;
139 OdResult subGetStretchPoints( OdGePoint3dArray& stretchPoints ) const override;
141 const OdIntArray& indices,
142 const OdGeVector3d& offset ) override;
143
144 OdResult subErase( bool erasing ) override;
145 OdDbObjectPtr subWblockClone( OdDbIdMapping& ownerIdMap, OdDbObject*, bool bPrimary ) const override;
146 OdDbObjectPtr subDeepClone( OdDbIdMapping& ownerIdMap, OdDbObject*, bool bPrimary ) const override;
147
148protected:
150};
151
153
154#include "FxBIMDrawing.h"
155
157{
158public:
159 virtual ~CFxBIMSectionReactor() = default;
160
161 virtual void Created( CFxBIMSection* p ) {}
162 virtual void Removed( CFxBIMSection* p, bool removed ) {}
163
164 virtual void Renamed( CFxBIMSection* p, const OdString& oldName, bool undo ) {}
165
166 virtual void ViewCreated( const CFxBIMDrawing::ViewRef& viewRef, OdDbDatabase* pDb ) {}
167 virtual void ViewCopied( const CFxBIMDrawing::ViewRef& viewRef, const OdString& viewHandle, const OdString& viewNumber, const OdDbObjectId& idXref, OdDbDatabase* pDb ) {}
168 virtual void ViewRemoved( const CFxBIMDrawing::ViewRef& viewRef, bool removed, OdDbDatabase* pDb ) {}
169 virtual void ViewRenamed( CFxBIMSectionView* p, OdString const& sOldNumber, OdString const& sOldName, bool undo ) {}
170
171 virtual void Regenerated( CFxBIMSection* p, OdDbDatabase* pDbDest, const std::vector< OdDbObjectId >& oldSE, const std::vector< OdDbObjectId >& newSE ) {}
172
173 virtual void ModifiedGraphics( CFxBIMSection* p ) {}
174 virtual void ModifiedType( CFxBIMSection* p ) {}
175 virtual void ModifiedFilter( CFxBIMSection* p ) {}
176};
#define FXBIM_API
Definition: FxBIM.h:20
OdSmartPtr< CFxBIMSection > CFxBIMSectionPtr
Definition: FxBIMSection.h:29
ptrdiff_t OdGsMarker
unsigned int OdUInt32
OdResult
Definition: OdResult.h:29
bool subIsContentSnappable() const override
OdResult subGetStretchPoints(OdGePoint3dArray &stretchPoints) const override
OdResult subGetGeomExtents(OdGeExtents3d &extents) const override
virtual void SetName(const OdString &name)
virtual SectionType Type() const
virtual const OdGePlane & Plane() const
virtual const std::vector< OdDbObjectId > & Layers() const
OdResult subMoveGripPointsAt(const OdDbVoidPtrArray &grips, const OdGeVector3d &offset, int bitFlags) override
OdDbObjectPtr subWblockClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const override
OdResult subGetOsnapPoints(OdDb::OsnapMode osnapMode, OdGsMarker gsSelectionMark, const OdGePoint3d &pickPoint, const OdGePoint3d &lastPoint, const OdGeMatrix3d &xWorldToEye, OdGePoint3dArray &snapPoints, const OdGeMatrix3d &insertionMat) const override
void subGripStatus(const OdDb::GripStat status) override
virtual void RemoveFromEntRefs()
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const override
virtual const std::vector< OdGePoint2d > & Points() const
virtual void SetLayers(const std::vector< OdDbObjectId > &layers)
OdResult subMoveGripPointsAt(const OdIntArray &indices, const OdGeVector3d &offset) override
virtual void SetFilter(const OdString &filter)
virtual void SetPlane(const OdGePlane &plane)
virtual void SetFlags(int flags)
OdResult subGetGripPoints(OdGePoint3dArray &gripPoints) const override
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler) override
virtual int Flags() const
virtual ~CFxBIMSection()
OdUInt32 subSetAttributes(OdGiDrawableTraits *traits) const override
virtual void AddEntRef(const OdDbObjectId &eRefId)
virtual const OdString & Name() const
virtual void AddLayer(const OdDbObjectId &layer)
Add layer, if it is not added yet.
OdResult subGetOsnapPoints(OdDb::OsnapMode osnapMode, OdGsMarker gsSelectionMark, const OdGePoint3d &pickPoint, const OdGePoint3d &lastPoint, const OdGeMatrix3d &xWorldToEye, OdGePoint3dArray &snapPoints) const override
void subViewportDraw(OdGiViewportDraw *vd) const override
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const override
virtual const OdString & Filter() const
OdResult subErase(bool erasing) override
virtual void SetPoints(const std::vector< OdGePoint2d > &points)
OdResult subGetGripPoints(OdDbGripDataPtrArray &grips, const double curViewUnitSize, const int gripSize, const OdGeVector3d &curViewDir, const int bitFlags) const override
void HideDrawBox(const bool &bHide)
OdResult subMoveStretchPointsAt(const OdIntArray &indices, const OdGeVector3d &offset) override
virtual void SetDepth(double depth)
bool subWorldDraw(OdGiWorldDraw *wd) const override
virtual void RemoveLayer(const OdDbObjectId &layer)
Remove layer, if it was added.
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler) override
virtual void AddEntRefs(const OdDbEntityPtrArray &arrEntRefs)
ODDB_DECLARE_MEMBERS(CFxBIMSection)
virtual void SetType(CFxBIMSection::SectionType type)
OdDbObjectPtr subDeepClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const override
virtual double Depth() const
virtual void ModifiedGraphics(CFxBIMSection *p)
Definition: FxBIMSection.h:173
virtual void Regenerated(CFxBIMSection *p, OdDbDatabase *pDbDest, const std::vector< OdDbObjectId > &oldSE, const std::vector< OdDbObjectId > &newSE)
Definition: FxBIMSection.h:171
virtual void Renamed(CFxBIMSection *p, const OdString &oldName, bool undo)
Definition: FxBIMSection.h:164
virtual void ViewCopied(const CFxBIMDrawing::ViewRef &viewRef, const OdString &viewHandle, const OdString &viewNumber, const OdDbObjectId &idXref, OdDbDatabase *pDb)
Definition: FxBIMSection.h:167
virtual void ViewCreated(const CFxBIMDrawing::ViewRef &viewRef, OdDbDatabase *pDb)
Definition: FxBIMSection.h:166
virtual void Created(CFxBIMSection *p)
Definition: FxBIMSection.h:161
virtual void ViewRemoved(const CFxBIMDrawing::ViewRef &viewRef, bool removed, OdDbDatabase *pDb)
Definition: FxBIMSection.h:168
virtual ~CFxBIMSectionReactor()=default
virtual void ViewRenamed(CFxBIMSectionView *p, OdString const &sOldNumber, OdString const &sOldName, bool undo)
Definition: FxBIMSection.h:169
virtual void ModifiedFilter(CFxBIMSection *p)
Definition: FxBIMSection.h:175
virtual void ModifiedType(CFxBIMSection *p)
Definition: FxBIMSection.h:174
virtual void Removed(CFxBIMSection *p, bool removed)
Definition: FxBIMSection.h:162
GLuint const GLchar * name
Definition: gles2_ext.h:265
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
GLintptr offset
Definition: gles2_ext.h:183
GripStat
Definition: DbGrip.h:112
OsnapMode
Definition: OdaDefs.h:489