OpenLexocad  27.1
CmdAddSkinGuidesNURBS.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Core/Command.h>
4 #include <OpenLxApp/Element.h>
5 
6 namespace OpenLxCmd
7 {
14 class LX_OPENLXCMD_EXPORT CmdAddSkinGuidesNURBS : public Core::Command
15 {
16 public:
17  enum class ResultingShape
18  {
19  AUTO,
20  OPEN,
21  CLOSED
22  };
23 
25  explicit CmdAddSkinGuidesNURBS(const ResultingShape &aResultingShapeEnum);
26  CmdAddSkinGuidesNURBS(std::vector<std::shared_ptr<OpenLxApp::Element>> aElements, std::vector<std::shared_ptr<OpenLxApp::Element>> aGuideElements, const ResultingShape &aResultingShapeEnum = ResultingShape::AUTO);
27  CmdAddSkinGuidesNURBS(std::vector<pConstShape> aShapes, std::vector<pConstShape> aGuideShapes, const ResultingShape& aResultingShapeEnum = ResultingShape::AUTO);
28  virtual ~CmdAddSkinGuidesNURBS() = default;
29 
30  bool redo() override;
31  bool undo() override;
32 
33  std::shared_ptr<OpenLxApp::Element> getElement() const;
34 
35 private:
36  App::Document* _document = nullptr;
37  App::Element* _newElement = nullptr;
38 
39  void execute(const std::vector<pConstShape> &shapes, const std::vector<pConstShape> &guideShapes, const ResultingShape& aResultingShapeEnum);
40 };
41 }
bool undo(int id=0)
Will UNDO one step, returns False if no undo was done (Undos == 0).
bool redo(int id=0)
Will REDO one step, returns False if no redo was done (Redos == 0).
Definition: CmdAddBolt.h:7
ResultingShape
Definition: CmdAddSkinGuidesNURBS.h:17
Definition: CmdAddSkinGuidesNURBS.h:14
Definition: Command.h:34