OpenLexocad  27.0
ElementTool.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 #include <Base/Pln.h>
5 #include <OpenLxApp/Element.h>
6 #include <OpenLxApp_defines.h>
7 
8 #include <vector>
9 
10 
11 namespace OpenLxApp
12 {
14 {
15 public:
16  enum ErrorCode
17  {
18  NoError = 0,
23 
24  };
25 
26  static ErrorCode cut(std::shared_ptr<Element> softElem, std::shared_ptr<Element> hardElem, std::vector<std::shared_ptr<Element>>& result);
27  static ErrorCode cut(std::shared_ptr<Element> softElem,
28  const std::vector<std::shared_ptr<Element>>& hardElems,
29  std::vector<std::shared_ptr<Element>>& result);
30  static ErrorCode cut(std::shared_ptr<Element> softElem,
31  std::shared_ptr<Element>* hardElems,
32  int hardElemsSize,
33  std::shared_ptr<Element>* result,
34  int resultSize,
35  int& nbElementsInResult);
36  static ErrorCode common(std::shared_ptr<Element> firstElem, std::shared_ptr<Element> secondElem, std::vector<std::shared_ptr<Element>>& result);
37  static ErrorCode cutWithPlane(std::shared_ptr<Element> elem, const Base::Pln& plane, std::vector<std::shared_ptr<Element>>& result);
38  static ErrorCode splitByPlane(std::shared_ptr<Element> elem, const Base::Pln& plane, std::vector<std::shared_ptr<Element>>& result);
39  static ErrorCode sectionWithPlane(std::shared_ptr<Element> elem, const Base::Pln& plane, std::vector<std::shared_ptr<Element>>& result);
40  static ErrorCode section(std::shared_ptr<Element> firstElem, std::shared_ptr<Element> secondElem, std::vector<std::shared_ptr<Element>>& result);
41  static ErrorCode fuse(const std::vector<std::shared_ptr<Element>>& elems, std::shared_ptr<Element>& result);
42  static void startTimer();
43  static int stopTimer();
44  static int elapsedTime();
45  static ErrorCode projectOrthoPhoto(const std::vector<std::shared_ptr<Element>>& elems,
46  const Base::String& imgPath,
47  const Base::String& jpgdFilePath,
48  const Base::String& lokFilePath);
49  static ErrorCode projectOrthoPhoto(const std::vector<std::shared_ptr<Element>>& elems,
50  const Base::String& imgPath,
51  double minX,
52  double minY,
53  double maxX,
54  double maxY);
55  static ErrorCode projectImage(const std::vector<std::shared_ptr<Element>>& elems, const Base::String& imgPath);
56 };
57 
58 } // namespace OpenLxApp
OPENLXAPP_EXPORT ErrorCode projectImage(const std::vector< std::shared_ptr< Element >> &elems, const Base::String &imgPath)
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:29
ErrorCode
Definition: Globals.h:85
#define OPENLXAPP_EXPORT
Definition: OpenLxApp_defines.h:12
Definition: ActiveScript.h:9
Definition: ElementTool.h:13
ErrorCode
Definition: ElementTool.h:16
OPENLXAPP_EXPORT ErrorCode projectOrthoPhoto(const std::vector< std::shared_ptr< Element >> &elems, const Base::String &imgPath, const Base::String &jpgdFilePath, const Base::String &lokFilePath)
COMMANDS.