OpenLexocad  27.1
CmdAddSweepPathNURBS.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 CmdAddSweepPathNURBS : public Core::Command
15 {
16 public:
17  enum class ResultingShape
18  {
19  AUTO,
20  OPEN,
21  CLOSED
22  };
23 
25  explicit CmdAddSweepPathNURBS(const ResultingShape& aResultingShapeEnum);
26  CmdAddSweepPathNURBS(std::shared_ptr<OpenLxApp::Element> aProfileElement, std::shared_ptr<OpenLxApp::Element> aPathElement, const ResultingShape& aResultingShapeEnum = ResultingShape::AUTO);
27  CmdAddSweepPathNURBS(pConstShape aProfileShape, pConstShape aPathShape, const ResultingShape& aResultingShapeEnum = ResultingShape::AUTO);
28  virtual ~CmdAddSweepPathNURBS() = 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(pConstShape profileShape, pConstShape pathShape, const ResultingShape& aResultingShapeEnum);
40 };
41 }
Definition: CmdAddSweepPathNURBS.h:14
bool undo(int id=0)
Will UNDO one step, returns False if no undo was done (Undos == 0).
ResultingShape
Definition: CmdAddSweepPathNURBS.h:17
std::shared_ptr< Topo::Shape const > pConstShape
Definition: Variant.h:77
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