My Project
IjkGridParametricRepresentation.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2016)
3 
4 philippe.verney@f2i-consulting.com
5 
6 This software is a computer program whose purpose is to access to data formatted using Energistics standards.
7 
8 This software is governed by the CeCILL-B license under French law and
9 abiding by the rules of distribution of free software. You can use,
10 modify and/ or redistribute the software under the terms of the CeCILL-B
11 license as circulated by CEA, CNRS and INRIA at the following URL
12 "http://www.cecill.info".
13 
14 As a counterpart to the access to the source code and rights to copy,
15 modify and redistribute granted by the license, users are provided only
16 with a limited warranty and the software's author, the holder of the
17 economic rights, and the successive licensors have only limited
18 liability.
19 
20 In this respect, the user's attention is drawn to the risks associated
21 with loading, using, modifying and/or developing or reproducing the
22 software by the user in light of its specific status of free software,
23 that may mean that it is complicated to manipulate, and that also
24 therefore means that it is reserved for developers and experienced
25 professionals having in-depth computer knowledge. Users are therefore
26 encouraged to load and test the software's suitability as regards their
27 requirements in conditions enabling the security of their systems and/or
28 data to be ensured and, more generally, to use and operate it in the
29 same conditions as regards security.
30 
31 The fact that you are presently reading this means that you have had
32 knowledge of the CeCILL-B license and that you accept its terms.
33 -----------------------------------------------------------------------*/
34 #pragma once
35 
36 #include "resqml2_0_1/AbstractIjkGridRepresentation.h"
37 
38 #include "tools/BSpline.h"
39 
40 namespace resqml2_0_1
41 {
43  {
44  private:
45  void getXyzPointsOfPatchFromParametricPoints(gsoap_resqml2_0_1::resqml2__Point3dParametricArray* parametricPoint3d, double * xyzPoints) const;
46  public:
47 
48  class DLL_IMPORT_OR_EXPORT PillarInformation
49  {
50  public:
51 
52  unsigned int maxControlPointCount;
53  unsigned int parametricLineCount;
54  unsigned int splitLineCount;
55  double * controlPoints;
56  double * controlPointParameters;
57  short * pillarKind;
58  unsigned int* pillarOfSplitCoordLines;
59  std::vector< std::vector< geometry::BSpline > > splines;
60 
61  PillarInformation():maxControlPointCount(0), parametricLineCount(0), splitLineCount(0),
62  controlPoints(nullptr), controlPointParameters(nullptr), pillarKind(nullptr), pillarOfSplitCoordLines(nullptr) {}
63 
65  cleanMemory();
66  }
67 
68  void cleanMemory() {
69  if (controlPoints != nullptr) delete[] controlPoints;
70  if (controlPointParameters != nullptr) delete[] controlPointParameters;
71  if (pillarKind != nullptr) delete[] pillarKind;
72  if (pillarOfSplitCoordLines != nullptr) delete[] pillarOfSplitCoordLines;
73  }
74  };
75 
77  const std::string & guid, const std::string & title,
78  const unsigned int & iCount, const unsigned int & jCount, const unsigned int & kCount,
79  bool withTruncatedPillars = false);
80 
82  const std::string & guid, const std::string & title,
83  const unsigned int & iCount, const unsigned int & jCount, const unsigned int & kCount,
84  bool withTruncatedPillars = false);
85 
89  IjkGridParametricRepresentation(gsoap_resqml2_0_1::_resqml2__IjkGridRepresentation* fromGsoap) : AbstractIjkGridRepresentation(fromGsoap) {}
90  IjkGridParametricRepresentation(gsoap_resqml2_0_1::_resqml2__TruncatedIjkGridRepresentation* fromGsoap) : AbstractIjkGridRepresentation(fromGsoap) {}
91 
96 
97  std::string getHdfProxyUuid() const;
98 
102  ULONG64 getXyzPointCountOfKInterfaceOfPatch(const unsigned int & patchIndex) const;
103 
107  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
108 
113  void loadPillarInformation(PillarInformation & pillarInfo) const;
114 
124  void getXyzPointsOfKInterfaceOfPatch(const unsigned int & kInterface, const unsigned int & patchIndex, double * xyzPoints, const PillarInformation & pillarInfo) const;
125 
131  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
132 
136  unsigned int getControlPointMaxCountPerPillar() const;
137 
143  void getControlPoints(double * controlPoints, bool reverseIAxis = false, bool reverseJAxis= false, bool reverseKAxis= false) const;
144 
149  bool hasControlPointParameters() const;
150 
157  void getControlPointParameters(double * controlPointParameters, bool reverseIAxis = false, bool reverseJAxis= false, bool reverseKAxis= false) const;
158 
162  bool isParametricLineKindConstant() const;
163 
164  /*
165  * Get the constant parametric line count in the grid.
166  */
167  short getConstantParametricLineKind() const;
168 
174  void getParametricLineKind(short * pillarKind, bool reverseIAxis = false, bool reverseJAxis= false) const;
175 
181  void getParametersOfNodes(double * parameters, bool reverseIAxis = false, bool reverseJAxis= false, bool reverseKAxis= false) const;
182 
197  void setGeometryAsParametricNonSplittedPillarNodes(
198  const gsoap_resqml2_0_1::resqml2__PillarShape & mostComplexPillarGeometry, const gsoap_resqml2_0_1::resqml2__KDirection & kDirectionKind, const bool & isRightHanded,
199  double * parameters, double * controlPoints, double * controlPointParameters, const unsigned int & controlPointMaxCountPerPillar, short * pillarKind, resqml2::AbstractHdfProxy* proxy);
200 
205  void setGeometryAsParametricNonSplittedPillarNodesUsingExistingDatasets(
206  const gsoap_resqml2_0_1::resqml2__PillarShape & mostComplexPillarGeometry, const gsoap_resqml2_0_1::resqml2__KDirection & kDirectionKind, const bool & isRightHanded,
207  const std::string & parameters, const std::string & controlPoints, const std::string & controlPointParameters, const unsigned int & controlPointMaxCountPerPillar, const std::string & pillarKind, const std::string & definedPillars, resqml2::AbstractHdfProxy* proxy);
208 
226  void setGeometryAsParametricSplittedPillarNodes(
227  const gsoap_resqml2_0_1::resqml2__PillarShape & mostComplexPillarGeometry, const gsoap_resqml2_0_1::resqml2__KDirection & kDirectionKind, const bool & isRightHanded,
228  double * parameters, double * controlPoints, double * controlPointParameters, const unsigned int & controlPointMaxCountPerPillar, short * pillarKind, resqml2::AbstractHdfProxy* proxy,
229  const unsigned long & splitCoordinateLineCount, unsigned int * pillarOfCoordinateLine,
230  unsigned int * splitCoordinateLineColumnCumulativeCount, unsigned int * splitCoordinateLineColumns);
231 
236  void setGeometryAsParametricSplittedPillarNodesUsingExistingDatasets(
237  const gsoap_resqml2_0_1::resqml2__PillarShape & mostComplexPillarGeometry, const gsoap_resqml2_0_1::resqml2__KDirection & kDirectionKind, const bool & isRightHanded,
238  const std::string & parameters, const std::string & controlPoints, const std::string & controlPointParameters, const unsigned int & controlPointMaxCountPerPillar, const std::string & pillarKind, const std::string & definedPillars, resqml2::AbstractHdfProxy* proxy,
239  const unsigned long & splitCoordinateLineCount, const std::string & pillarOfCoordinateLine,
240  const std::string & splitCoordinateLineColumnCumulativeCount, const std::string & splitCoordinateLineColumns);
241 
258  void setGeometryAsParametricSplittedPillarNodes(
259  const gsoap_resqml2_0_1::resqml2__KDirection & kDirectionKind, const bool & isRightHanded,
260  double * parameters, double * controlPoints, double * controlPointParameters, const unsigned int & controlPointCountPerPillar, short pillarKind, resqml2::AbstractHdfProxy* proxy,
261  const unsigned long & splitCoordinateLineCount, unsigned int * pillarOfCoordinateLine,
262  unsigned int * splitCoordinateLineColumnCumulativeCount, unsigned int * splitCoordinateLineColumns);
263 
267  void setGeometryAsParametricSplittedPillarNodesUsingExistingDatasets(
268  const gsoap_resqml2_0_1::resqml2__KDirection & kDirectionKind, const bool & isRightHanded,
269  const std::string & parameters, const std::string & controlPoints, const std::string & controlPointParameters, const unsigned int & controlPointCountPerPillar, short pillarKind, resqml2::AbstractHdfProxy* proxy,
270  const unsigned long & splitCoordinateLineCount, const std::string & pillarOfCoordinateLine,
271  const std::string & splitCoordinateLineColumnCumulativeCount, const std::string & splitCoordinateLineColumns);
272 
273  geometryKind getGeometryKind() const;
274  };
275 }
Definition: AbstractIjkGridRepresentation.h:46
Definition: IjkGridParametricRepresentation.h:48
Definition: AbstractHdfProxy.h:44
Definition: AbstractLocal3dCrs.h:40
virtual ~IjkGridParametricRepresentation()
Definition: IjkGridParametricRepresentation.h:95
Definition: EpcDocument.h:79
Definition: IjkGridParametricRepresentation.h:42
Definition: AbstractFeatureInterpretation.h:45
IjkGridParametricRepresentation(gsoap_resqml2_0_1::_resqml2__IjkGridRepresentation *fromGsoap)
Definition: IjkGridParametricRepresentation.h:89