CFx SDK Documentation  2023 SP0
FxBIMSection.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2020-2022 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 "sdk/FxBIM.h"
20 
21 #include <StringArray.h>
22 #include <DbEntity.h>
23 #include <Ge/GePlane.h>
24 #include <Ge/GeExtents2d.h>
25 
26 class CFxBIMSection;
28 
30 {
31 public:
33 
34  virtual ~CFxBIMSection();
35 
36  virtual const OdString& Name() const;
37  virtual void SetName( const OdString& name );
38  virtual const OdGePlane& Plane() const;
39  virtual void SetPlane( const OdGePlane& plane );
40  virtual const std::vector< OdGePoint2d >& Points() const;
41  virtual void SetPoints( const std::vector< OdGePoint2d >& points );
42  virtual double Depth() const;
43  virtual void SetDepth( double depth );
44 
45  virtual OdStringArray SourceViews() const;
46  virtual OdString SourceView() const;
47  virtual void SetSourceView(const OdString &name);
48 
50  {
55  //InteriorElevation, //TODO:
56  };
57 
58  virtual SectionType Type() const;
60 
61  virtual const OdString& Filter() const;
62  virtual void SetFilter( const OdString& filter );
63 
64  enum Flags
65  {
66  eInvalid = 0x1,
67  eDrawBox = 0x2,
68  eDrawSymbol = 0x4,
69  eDuplicateName = 0x8,
70  eUse3DOnly = 0x10
71  };
72 
73  virtual int Flags() const;
74  virtual void SetFlags( int flags );
75 
76  virtual Error Regenerate( OdDbDatabasePtr pDbDest );
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 
93 public:
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 
100  OdUInt32 subSetAttributes( OdGiDrawableTraits* traits ) const override;
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;
130  OdDbGripDataPtrArray& grips,
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 
148 protected:
150 };
151 
152 class CFxBIMSectionView;
153 
154 #include <sdk/FxBIMDrawing.h>
155 
157 {
158 public:
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 };
Error
Definition: FxBIM.h:50
#define FXBIM_API
Definition: FxBIM.h:20
OdSmartPtr< CFxBIMSection > CFxBIMSectionPtr
Definition: FxBIMSection.h:26
ptrdiff_t OdGsMarker
unsigned int OdUInt32
OdResult
Definition: OdResult.h:29
virtual const std::vector< OdDbObjectId > & Layers() const
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
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 dwgOutFields(OdDbDwgFiler *pFiler) const override
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 const OdGePlane & Plane() const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler) override
virtual int Flags() const
virtual ~CFxBIMSection()
OdUInt32 subSetAttributes(OdGiDrawableTraits *traits) const override
virtual void AddLayer(const OdDbObjectId &layer)
Add layer, if it is not added yet.
virtual const std::vector< OdGePoint2d > & Points() const
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 OdStringArray SourceViews() const
virtual void SetPoints(const std::vector< OdGePoint2d > &points)
virtual Error Regenerate(OdDbDatabasePtr pDbDest)
OdResult subGetGripPoints(OdDbGripDataPtrArray &grips, const double curViewUnitSize, const int gripSize, const OdGeVector3d &curViewDir, const int bitFlags) const override
virtual void SetSourceView(const OdString &name)
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
ODDB_DECLARE_MEMBERS(CFxBIMSection)
virtual void SetType(CFxBIMSection::SectionType type)
virtual OdString SourceView() const
OdDbObjectPtr subDeepClone(OdDbIdMapping &ownerIdMap, OdDbObject *, bool bPrimary) const override
virtual double Depth() const
virtual const OdString & Name() 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:80
OsnapMode
Definition: OdaDefs.h:480