Go to the documentation of this file.
24 #include <Draw/CurveStyle.h>
25 #include <Draw/DimensionStyle.h>
26 #include <Draw/ExtrusionStyle.h>
27 #include <Draw/PointStyle.h>
28 #include <Draw/SolidStyle.h>
29 #include <Draw/SurfaceStyle.h>
30 #include <Draw/TextStyle.h>
53 class DocumentObserver;
65 friend class ApplicationP;
85 void deleteObjects(
const std::vector<std::shared_ptr<DocObject>>& aObjects);
99 const std::vector<std::shared_ptr<Element>>& elements,
101 bool exportFacesAsLines,
144 std::vector<std::shared_ptr<Element>>
getElements(std::function<
bool(std::shared_ptr<Element> aElement)> aFilter);
147 std::vector<std::shared_ptr<Root>>
getRoots(std::function<
bool(std::shared_ptr<Root> aRoot)> aFilter);
149 std::vector<std::shared_ptr<DocObject>>
getObjects(std::function<
bool(std::shared_ptr<DocObject> aObject)> aFilter);
189 std::set<std::shared_ptr<Task>>
getTasks(std::shared_ptr<Element> aElement);
190 void setTasks(std::shared_ptr<Element> aElement, std::set<std::shared_ptr<Task>> aTasks)
const;
217 _appDoc = other._appDoc;
221 bool isEqual(std::shared_ptr<Document> other)
const {
return (*
this == *other); }
237 std::shared_ptr<DocObjectFactory>
create();
246 static void startTimer();
247 static int stopTimer();
248 static int elapsedTime();
249 static int elapsedTimeForTextures();
250 static int elapsedTimeForLocalAxes();
251 static int getRecomputeCount();
254 static void __addTextureTimeInMS__(
int ms);
255 static void __addSetLocalAxesTimeInMS__(
int ms);
256 static void __addRecomputeCount__();
260 App::Document* _appDoc =
nullptr;
262 static int textureTimeInMS;
263 static int setLocalAxesTimeInMS;
264 static int recomputeCnt;
bool setLayerVisible(int layerNumber, bool isVisible)
Definition: ActiveScript.h:10
void addObject(std::shared_ptr< DocObject > aObject)
Definition: CoreDocument.h:269
Draw::ExtrusionStyle getActiveExtrusionStyle() const
std::shared_ptr< BuildingStorey > getActiveBuildingStorey()
void setActiveCurveStyle(const Draw::CurveStyle &cs)
std::set< std::shared_ptr< Task > > getTasks(std::shared_ptr< Element > aElement)
std::shared_ptr< DocObjectFactory > create()
void deleteObjects(const std::vector< std::shared_ptr< DocObject >> &aObjects)
Draw::SolidStyle getActiveSpineStyle() const
bool saveAs(const Base::String &format, const Base::String &filename)
void detachDocumentObserver(std::shared_ptr< DocumentObserver > aObserver)
bool setLayerFrozen(int layerNumber, bool isFrozen)
double getRotationZ_WCS() const
std::vector< std::shared_ptr< DocObject > > getObjects()
void setActiveAuxiliaryCurveStyle(const Draw::CurveStyle &cs)
Document(const Base::String &name, const Base::String &typeName=L"")
Definition: GlobalId.h:28
bool saveForWeb(const Base::String &fileOrDirName, bool aSingleHtmlFile=false)
Geom::Dir getGlobalX_WCS() const
std::vector< std::shared_ptr< Space > > getSpaces()
int addLayer(const Base::String &layerName, bool isVisible=true, bool isFrozen=false)
friend bool operator!=(const Document &x, const Document &y)
Definition: Document.h:226
friend bool operator>=(const Document &x, const Document &y)
Definition: Document.h:232
void setCompany(const Base::String &company)
bool getLayerVisible(int layerNumber, bool &isVisible) const
std::vector< std::shared_ptr< Element > > getElements()
bool setLayerName(int layerNumber, const Base::String &layerName)
Draw::SurfaceStyle getActiveSurfaceStyle() const
bool saveAs2dl(const Base::String &filename, const std::vector< std::shared_ptr< Element >> &elements, const Geom::Ax2 &axis, bool exportFacesAsLines, bool forLexo2d)
Geom::Pnt getZeropointLok()
static std::vector< std::string > getCommandNames()
friend bool operator>(const Document &x, const Document &y)
Definition: Document.h:230
void copyObjectsFrom(std::shared_ptr< Document > other)
double getZeropointAngle()
Document(const Document &other)
Definition: Document.h:213
std::vector< std::shared_ptr< BuildingStorey > > getBuildingStoreys()
bool runCommand(const std::string &cmdName)
The one and only Application.
Definition: Application.h:50
Geom::Dir getGlobalY_WCS() const
bool isEqual(std::shared_ptr< Document > other) const
Definition: Document.h:221
std::vector< std::shared_ptr< Element > > getElements(std::function< bool(std::shared_ptr< Element > aElement)> aFilter)
void setActiveDimensionStyle(const Draw::DimensionStyle &ds)
Definition: DocObject.h:54
std::shared_ptr< Element > getActiveElement()
Base::String getName() const
Draw::PointStyle getActivePointStyle() const
Document holding all persistent DocObjects.
Definition: Document.h:62
std::vector< std::shared_ptr< Building > > getBuildings()
friend bool operator<=(const Document &x, const Document &y)
Definition: Document.h:231
void setCreatedBy(const Base::String &createdBy)
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:44
Base::String getTmpDirectory() const
void setActivePointStyle(const Draw::PointStyle &ps)
Geom::Dir getGlobalZ_WCS() const
void setActiveExtrusionStyle(const Draw::ExtrusionStyle &ss)
void setZeropointAngle(double value)
bool createAutomaticWedgeMesh(const Base::String &xlsFileName=Base::String(), const Base::String &fileName2dl=Base::String())
std::shared_ptr< Element > addVariant(const Base::String &aFileValName, const Geom::Ax2 &position)
bool getLayerName(int layerNumber, Base::String &layerName) const
std::vector< std::shared_ptr< Root > > getRoots(std::function< bool(std::shared_ptr< Root > aRoot)> aFilter)
Draw::TextStyle getActiveTextStyle() const
std::shared_ptr< Site > getActiveSite()
std::vector< std::shared_ptr< Site > > getSites()
std::vector< int > getLayerNumbers() const
friend bool operator<(const Document &x, const Document &y)
Definition: Document.h:229
void attachDocumentObserver(std::shared_ptr< DocumentObserver > aObserver)
std::shared_ptr< Element > getElementByGlobalId(const Base::GlobalId &aGlobalId)
void removeObject(std::shared_ptr< DocObject > aObject)
std::vector< std::shared_ptr< Element > > getElementsByBimNumber(const Base::String &componentName, bool useRegularExpression=false)
void setZeropointXYZ(const Geom::XYZ &xyz)
void deleteObject(std::shared_ptr< DocObject > aObject)
bool getLayerFrozen(int layerNumber, bool &isFrozen) const
void set_WCS(const Geom::Ax2 &axis)
void setTasks(std::shared_ptr< Element > aElement, std::set< std::shared_ptr< Task >> aTasks) const
std::shared_ptr< Root > getRootByGlobalId(const Base::GlobalId &aGlobalId)
Draw::DimensionStyle getActiveDimensionStyle() const
Document & operator=(const Document &other)
Definition: Document.h:215
bool runCommand(Core::Command *cmd)
std::shared_ptr< Element > import2dvFile(const Base::String &aFile2dvName, const Geom::Ax2 &position)
std::vector< std::shared_ptr< Root > > getRoots()
std::vector< std::shared_ptr< DocObject > > getObjects(std::function< bool(std::shared_ptr< DocObject > aObject)> aFilter)
Geom::XYZ getZeropointXYZ()
static std::set< std::string > commandSet
Definition: Document.h:240
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:18
void setZeropointLok(const Geom::Pnt &pnt)
std::shared_ptr< Building > getActiveBuilding()
void setComment(const Base::String &comment)
Geom::Pnt getLocation_WCS() const
std::vector< std::shared_ptr< Element > > getElementsByBimColor(const int &cadworkColor)
void setActiveTextStyle(const Draw::TextStyle &ts)
Draw::CurveStyle getActiveCurveStyle() const
friend bool operator==(const Document &x, const Document &y)
Definition: Document.h:225
Draw::CurveStyle getActiveAuxiliaryCurveStyle() const
bool saveAs(const Base::String &filename)
std::vector< std::shared_ptr< SpatialElement > > getSpatialElements()
Document(App::Document *aDoc)
void setActiveSurfaceStyle(const Draw::SurfaceStyle &ss)
void setActiveSpineStyle(const Draw::SolidStyle &ss)
bool registerPythonScript(const Base::GlobalId &aScriptId, const Base::String &aScriptFilePath=L"")
Document(App::Document *appDoc, const Base::String &name)