OpenLexocad  27.1
CmdConvertToFacetedBrep.h
Go to the documentation of this file.
1 // //
3 // LEXOCAD API //
4 // //
5 // ©2005-2016 Cadwork Informatik. All rights reserved. //
6 // //
7 // ONLY INCLUDE OTHER INTERFACES! //
8 // Lexocad provides API Classes for public use and //
9 // Implementation Classes for private use. //
10 // //
11 // - Do ONLY include and use the LEXOCAD API in this header. //
12 // - Do not change existing interfaces. //
13 // - Document your code! //
14 // //
15 // - All types from Base, Core, Geom, Topo are allowed here. //
16 // - In the Gui modules the use of Qt types is allowed. //
17 // //
19 
20 #pragma once
21 #include <Core/Command.h>
22 #include <OpenLxApp/Element.h>
23 
24 
25 namespace OpenLxCmd
26 {
33 class LX_OPENLXCMD_EXPORT CmdConvertToFacetedBrep : public Core::Command
34 {
35 public:
36  explicit CmdConvertToFacetedBrep(std::shared_ptr<OpenLxApp::Element> element);
37  explicit CmdConvertToFacetedBrep(const std::vector<std::shared_ptr<OpenLxApp::Element>>& elements);
39 
40  bool redo() override;
41  bool undo() override;
42 
43  std::vector<std::shared_ptr<OpenLxApp::Element>> getElements() const;
44 
45 private:
46  Command* _cmd = nullptr;
47  std::vector<std::shared_ptr<OpenLxApp::Element>> _resultElements = {};
48 };
49 
56 class LX_OPENLXCMD_EXPORT CmdConvertToBeamElement : public Core::Command
57 {
58 public:
59  explicit CmdConvertToBeamElement(std::shared_ptr<OpenLxApp::Element> element);
60 
61  bool redo() override;
62  bool undo() override;
63 
64 private:
65  Command* _cmd = nullptr;
66 };
67 } // namespace OpenLxCmd
Convert the geometry of the given Element into a FacetedBrep.
Definition: CmdConvertToFacetedBrep.h:33
bool undo(int id=0)
Will UNDO one step, returns False if no undo was done (Undos == 0).
Convert the given Element into a ElementExtension::BeamElement.
Definition: CmdConvertToFacetedBrep.h:56
bool redo(int id=0)
Will REDO one step, returns False if no redo was done (Redos == 0).
Definition: CmdAddBolt.h:7
Definition: Command.h:34