-
-
Notifications
You must be signed in to change notification settings - Fork 901
Expand file tree
/
Copy pathConversionResult.cpp
More file actions
31 lines (24 loc) · 1.08 KB
/
ConversionResult.cpp
File metadata and controls
31 lines (24 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "ConversionResult.h"
#include "IfcGeomRepresentation.h"
#include <iomanip>
IfcGeom::Representation::Triangulation * IfcGeom::ConversionResultShape::Triangulate(const ifcopenshell::geometry::Settings& settings) const
{
auto t = IfcGeom::Representation::Triangulation::empty(settings);
static ifcopenshell::geometry::taxonomy::matrix4 iden;
Triangulate(settings, iden, t, -1, -1);
return t;
}
using namespace ifcopenshell::geometry::taxonomy;
void IfcGeom::ConversionResult::append(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf) {
placement_ = make<matrix4>(placement_->ccomponents() * trsf->ccomponents());
}
void IfcGeom::ConversionResult::prepend(ifcopenshell::geometry::taxonomy::matrix4::ptr trsf) {
placement_ = make<matrix4>(trsf->ccomponents() * placement_->ccomponents());
}
std::string IfcGeom::NumberNativeDouble::to_string() const {
std::stringstream ss;
ss << std::setprecision(std::numeric_limits<double>::digits10 + 1) << value_;
return ss.str();
}
template struct IFC_GEOM_API IfcGeom::OpaqueCoordinate<3>;
template struct IFC_GEOM_API IfcGeom::OpaqueCoordinate<4>;