Use model-offset in IfcGeom::Kernel and add model-rotation

This commit is contained in:
blocovin
2020-01-31 15:55:04 +01:00
committed by Thomas Krijnen
parent 76e7205692
commit 6e2038c1f5
9 changed files with 97 additions and 47 deletions
+8
View File
@@ -21,6 +21,7 @@
#define IFCGEOM_H
#include <cmath>
#include <array>
static const double ALMOST_ZERO = 1.e-9;
@@ -37,6 +38,7 @@ inline static bool ALMOST_THE_SAME(const T& a, const T& b, double tolerance=ALMO
#include <gp_GTrsf2d.hxx>
#include <gp_Trsf.hxx>
#include <gp_Trsf2d.hxx>
#include <gp_Quaternion.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Face.hxx>
@@ -222,6 +224,9 @@ private:
double modelling_precision;
double dimensionality;
double layerset_first;
gp_Vec offset = gp_Vec{0.0, 0.0, 0.0};
gp_Quaternion rotation = gp_Quaternion{};
gp_Trsf offset_and_rotation = gp_Trsf();
#ifndef NO_CACHE
MAKE_TYPE_NAME(Cache) cache;
@@ -264,6 +269,9 @@ public:
return *this;
}
void set_offset(const std::array<double, 3>& offset);
void set_rotation(const std::array<double, 4>& rotation);
bool convert_wire_to_face(const TopoDS_Wire& wire, TopoDS_Face& face);
bool convert_curve_to_wire(const Handle(Geom_Curve)& curve, TopoDS_Wire& wire);
bool convert_shapes(const IfcUtil::IfcBaseClass* L, IfcRepresentationShapeItems& result);