mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 11:43:53 +00:00
Minor changes to conversion result numbers
This commit is contained in:
@@ -11,11 +11,10 @@
|
||||
|
||||
using IfcGeom::OpaqueNumber;
|
||||
using IfcGeom::OpaqueCoordinate;
|
||||
using IfcGeom::NumberNativeDouble;
|
||||
using IfcGeom::ConversionResultShape;
|
||||
|
||||
#ifdef IFOPSH_SIMPLE_KERNEL
|
||||
#define NumberType NumberNativeDouble
|
||||
#define NumberType OpaqueNumber
|
||||
#else
|
||||
using ifcopenshell::geometry::NumberEpeck;
|
||||
#define NumberType NumberEpeck
|
||||
@@ -103,6 +102,15 @@ namespace {
|
||||
});
|
||||
}
|
||||
|
||||
void apply_normalized_plane_map(const plane_map<Kernel_>& mp, std::list<cgal_plane_t>& planes) {
|
||||
for (auto& plane : planes) {
|
||||
auto it = mp.find(normalized_plane_for_map<Kernel_>(plane));
|
||||
if (it != mp.end()) {
|
||||
plane = it->second;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cgal_vector_t wire_normal(const cgal_wire_t& wire) {
|
||||
typename Kernel_::FT a(0), b(0), c(0);
|
||||
if (wire.size() < 3) {
|
||||
@@ -1196,6 +1204,7 @@ std::size_t ifcopenshell::geometry::CgalShapeHalfSpaceDecomposition::map(OpaqueC
|
||||
std::size_t mutated = 0;
|
||||
auto nw = shape_->map(mp, mutated);
|
||||
shape_ = std::move(nw);
|
||||
apply_normalized_plane_map(mp, planes_);
|
||||
return mutated;
|
||||
}
|
||||
|
||||
@@ -1214,6 +1223,7 @@ std::size_t ifcopenshell::geometry::CgalShapeHalfSpaceDecomposition::map(const s
|
||||
std::size_t mutated = 0;
|
||||
auto nw = shape_->map(mp, mutated);
|
||||
shape_ = std::move(nw);
|
||||
apply_normalized_plane_map(mp, planes_);
|
||||
return mutated;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user