mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 21:53:40 +00:00
After-merge clean-ups
This commit is contained in:
@@ -28,7 +28,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis1Placement& inst) {
|
||||
taxonomy::point3::ptr v = taxonomy::cast<taxonomy::point3>(map(inst.Location()));
|
||||
P = *v->components_;
|
||||
} catch (const std::exception&) {
|
||||
logger_.Warning("GEO", 232, "Placement with invalid Location:", inst);
|
||||
logger_.warning("GEO", 232, "Placement with invalid Location:", inst);
|
||||
}
|
||||
const bool hasAxis = inst.Axis();
|
||||
if (hasAxis) {
|
||||
|
||||
@@ -29,7 +29,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2Placement2D& inst) {
|
||||
taxonomy::point3::ptr v = taxonomy::cast<taxonomy::point3>(map(inst.Location()));
|
||||
P = *v->components_;
|
||||
} catch (const std::exception&) {
|
||||
logger_.Warning("GEO", 233, "Placement with invalid Location:", inst);
|
||||
logger_.warning("GEO", 233, "Placement with invalid Location:", inst);
|
||||
}
|
||||
const bool hasRef = !!inst.RefDirection();
|
||||
if (hasRef) {
|
||||
|
||||
@@ -29,13 +29,13 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2Placement3D& inst) {
|
||||
taxonomy::point3::ptr v = taxonomy::cast<taxonomy::point3>(map(inst.Location()));
|
||||
o = *v->components_;
|
||||
} catch (const std::exception&) {
|
||||
logger_.Warning("GEO", 234, "Placement with invalid Location:", inst);
|
||||
logger_.warning("GEO", 234, "Placement with invalid Location:", inst);
|
||||
}
|
||||
const bool hasAxis = !!inst.Axis();
|
||||
const bool hasRef = !!inst.RefDirection();
|
||||
|
||||
if (hasAxis != hasRef) {
|
||||
logger_.Warning("GEO", 235, "Axis and RefDirection should be specified together", inst);
|
||||
logger_.warning("GEO", 235, "Axis and RefDirection should be specified together", inst);
|
||||
}
|
||||
|
||||
if (hasAxis) {
|
||||
|
||||
@@ -26,7 +26,7 @@ using namespace ifcopenshell::geometry;
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2PlacementLinear& inst) {
|
||||
|
||||
if (!inst.Location().as<IfcSchema::IfcPointByDistanceExpression>()) {
|
||||
logger_.Error("GEO", 236, std::runtime_error("Location must be IfcPointByDistanceExpression for IfcAxis2PlacementLinear"));
|
||||
logger_.error("GEO", 236, std::runtime_error("Location must be IfcPointByDistanceExpression for IfcAxis2PlacementLinear"));
|
||||
}
|
||||
|
||||
Eigen::Vector3d o, axis(0, 0, 1), refDirection;
|
||||
@@ -45,7 +45,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2PlacementLinear& inst)
|
||||
|
||||
/*
|
||||
if (hasAxis != hasRef) {
|
||||
logger::warning("Axis and RefDirection should be specified together", inst);
|
||||
::logger::root().warning("Axis and RefDirection should be specified together", inst);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCShapeProfileDef& inst) {
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if ( x < tol || y < tol || d1 < tol || d2 < tol) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 241, "Skipping zero sized profile:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 241, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ using namespace ifcopenshell::geometry;
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCircle& inst) {
|
||||
const double r = inst.Radius() * length_unit_;
|
||||
if (r < settings_.get<settings::Precision>().get()) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 237, "Radius not greater than zero for:", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 237, "Radius not greater than zero for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,11 +34,11 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve& inst) {
|
||||
|
||||
for (auto& segment : segments) {
|
||||
if (segment.as<IfcSchema::IfcCompositeCurveSegment>() && segment.as<IfcSchema::IfcCompositeCurveSegment>().ParentCurve().as<IfcSchema::IfcLine>()) {
|
||||
logger_.Notice("GEO", 238, "Infinite IfcLine used as ParentCurve of segment, treating as a segment", segment);
|
||||
logger_.notice("GEO", 238, "Infinite IfcLine used as ParentCurve of segment, treating as a segment", segment);
|
||||
double u0 = 0.0;
|
||||
double u1 = segment.as<IfcSchema::IfcCompositeCurveSegment>().ParentCurve().as<IfcSchema::IfcLine>().Dir().Magnitude() * length_unit_;
|
||||
if (u1 < settings_.get<settings::Precision>().get()) {
|
||||
logger_.Warning("GEO", 239, "Segment length below tolerance", segment);
|
||||
logger_.warning("GEO", 239, "Segment length below tolerance", segment);
|
||||
}
|
||||
|
||||
auto e = taxonomy::make<taxonomy::edge>();
|
||||
@@ -70,7 +70,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve& inst) {
|
||||
e->end = 2.0 * boost::math::constants::pi<double>();
|
||||
loop->children.push_back(e);
|
||||
} else {
|
||||
logger_.Warning("GEO", 240, "Unexpected segment type", segment);
|
||||
logger_.warning("GEO", 240, "Unexpected segment type", segment);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wi
|
||||
for (auto it = segments->begin(); it != segments->end(); ++it) {
|
||||
|
||||
if (!(*it)->declaration().is(IfcSchema::IfcCompositeCurveSegment::Class())) {
|
||||
logger::error("Not implemented", *it);
|
||||
::logger::root().error("Not implemented", *it);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -141,13 +141,13 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wi
|
||||
TopoDS_Wire segment;
|
||||
|
||||
if (curve->as<IfcSchema::IfcLine>()) {
|
||||
logger::notice("Infinite IfcLine used as ParentCurve of segment, treating as a segment", *it);
|
||||
::logger::root().notice("Infinite IfcLine used as ParentCurve of segment, treating as a segment", *it);
|
||||
Handle_Geom_Curve handle;
|
||||
convert_curve(curve, handle);
|
||||
double u0 = 0.0;
|
||||
double u1 = curve->as<IfcSchema::IfcLine>()->Dir()->Magnitude() * length_unit_;
|
||||
if (u1 < getValue(GV_PRECISION)) {
|
||||
logger::warning("Segment length below tolerance", *it);
|
||||
::logger::root().warning("Segment length below tolerance", *it);
|
||||
}
|
||||
BRepBuilderAPI_MakeEdge me(handle, u0, u1);
|
||||
if (me.IsDone()) {
|
||||
@@ -157,7 +157,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wi
|
||||
}
|
||||
} else if (!convert_wire(curve, segment)) {
|
||||
const bool failed_on_purpose = curve->as<IfcSchema::IfcPolyline>() && !segment.IsNull();
|
||||
logger::message(failed_on_purpose ? logger::LOG_WARNING : logger::LOG_ERROR, "Failed to convert curve:", curve);
|
||||
::logger::root().message(failed_on_purpose ? ::logger::LOG_WARNING : ::logger::LOG_ERROR, "Failed to convert curve:", curve);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -168,12 +168,12 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wi
|
||||
ShapeFix_ShapeTolerance FTol;
|
||||
FTol.SetTolerance(segment, getValue(GV_PRECISION), TopAbs_WIRE);
|
||||
|
||||
converted_segments.Append(segment);
|
||||
converted_segments.append(segment);
|
||||
|
||||
}
|
||||
|
||||
if (converted_segments.Extent() == 0) {
|
||||
logger::message(logger::LOG_ERROR, "No segment successfully converted:", l);
|
||||
::logger::root().message(::logger::LOG_ERROR, "No segment successfully converted:", l);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ struct cant_curve_segment_function {
|
||||
class curve_segment_evaluator {
|
||||
private:
|
||||
mapping* mapping_ = nullptr;
|
||||
Logger& logger_;
|
||||
logger& logger_;
|
||||
IfcSchema::IfcCurveSegment inst_; // this curve segment instance
|
||||
double length_unit_;
|
||||
double start_;
|
||||
@@ -260,10 +260,10 @@ class curve_segment_evaluator {
|
||||
emit_next = true;
|
||||
}
|
||||
} else {
|
||||
mapping_->logger().Warning("GEO", 242, "IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the next segment.");
|
||||
mapping_->logger().warning("GEO", 242, "IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the next segment.");
|
||||
}
|
||||
} else {
|
||||
logger::warning("IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the next segment.");
|
||||
::logger::root().warning("IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the next segment.");
|
||||
}
|
||||
|
||||
bool is_horizontal = false;
|
||||
@@ -283,7 +283,7 @@ class curve_segment_evaluator {
|
||||
if ((is_horizontal + is_vertical + is_cant) != 1) {
|
||||
// We have to choose the correct functor based on usage. We can't
|
||||
// support multiple, because we don't know the caller at this point.
|
||||
mapping_->logger().Error("UNS", 10, std::runtime_error("multiple uses of IfcSegmentCurve not supported"), inst_);
|
||||
mapping_->logger().error("UNS", 10, std::runtime_error("multiple uses of IfcSegmentCurve not supported"), inst_);
|
||||
}
|
||||
|
||||
segment_type_ = is_horizontal ? ST_HORIZONTAL : is_vertical ? ST_VERTICAL : is_cant ? ST_CANT : ST_HORIZONTAL;
|
||||
@@ -321,7 +321,7 @@ class curve_segment_evaluator {
|
||||
end_point = segmented_reference_curve.EndPoint();
|
||||
}
|
||||
} else {
|
||||
mapping_->logger().Warning("GEO", 243, "IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the end point.");
|
||||
mapping_->logger().warning("GEO", 243, "IfcCurveSegment belongs to multiple IfcCompositeCurve instances. Cannot determine the end point.");
|
||||
}
|
||||
if (end_point) {
|
||||
next_segment_placement_ = taxonomy::cast<taxonomy::matrix4>(mapping_->map(end_point))->ccomponents();
|
||||
@@ -343,7 +343,7 @@ class curve_segment_evaluator {
|
||||
|
||||
taxonomy::ptr get_segment_curve_function() {
|
||||
if (!parent_curve_fn_ || !parent_curve_start_point_) {
|
||||
mapping_->logger().Error("UNS", 11, std::runtime_error(inst_->ParentCurve()->declaration().name() + " not implemented"), inst_);
|
||||
mapping_->logger().error("UNS", 11, std::runtime_error(inst_->ParentCurve()->declaration().name() + " not implemented"), inst_);
|
||||
}
|
||||
|
||||
auto length = fabs(this->length());
|
||||
@@ -476,13 +476,13 @@ class curve_segment_evaluator {
|
||||
projected_length_ = length_;
|
||||
}
|
||||
} else if (segment_type_ == ST_CANT) {
|
||||
mapping_->logger().Error("GEO", 244, std::runtime_error("Unexpected segment type encountered - cant is handled in set_cant_spiral_function - should never get here"));
|
||||
mapping_->logger().error("GEO", 244, std::runtime_error("Unexpected segment type encountered - cant is handled in set_cant_spiral_function - should never get here"));
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); }
|
||||
);
|
||||
} else {
|
||||
mapping_->logger().Error("GEO", 245, "Unexpected segment type encountered");
|
||||
mapping_->logger().error("GEO", 245, "Unexpected segment type encountered");
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); }
|
||||
@@ -643,13 +643,13 @@ class curve_segment_evaluator {
|
||||
|
||||
set_cant_spiral_function(*super, *slope, cant);
|
||||
} else if (segment_type_ == ST_VERTICAL) {
|
||||
mapping_->logger().Error("GEO", 246, "IfcCosineSpiral cannot be used for vertical alignment");
|
||||
mapping_->logger().error("GEO", 246, "IfcCosineSpiral cannot be used for vertical alignment");
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); }
|
||||
);
|
||||
} else {
|
||||
mapping_->logger().Error("GEO", 247, "Unexpected segment type encountered");
|
||||
mapping_->logger().error("GEO", 247, "Unexpected segment type encountered");
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); }
|
||||
@@ -712,12 +712,12 @@ class curve_segment_evaluator {
|
||||
|
||||
set_cant_spiral_function(*super, *slope, cant);
|
||||
} else if (segment_type_ == ST_VERTICAL) {
|
||||
mapping_->logger().Error("GEO", 248, "IfcSineSpiral cannot be used for vertical alignment");
|
||||
mapping_->logger().error("GEO", 248, "IfcSineSpiral cannot be used for vertical alignment");
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); });
|
||||
} else {
|
||||
mapping_->logger().Error("GEO", 249, "Unexpected segment type encountered");
|
||||
mapping_->logger().error("GEO", 249, "Unexpected segment type encountered");
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); });
|
||||
@@ -978,12 +978,12 @@ class curve_segment_evaluator {
|
||||
}
|
||||
|
||||
} else if (segment_type_ == ST_CANT) {
|
||||
mapping_->logger().Warning("UNS", 12, "Use of IfcCircle for cant is not supported");
|
||||
mapping_->logger().warning("UNS", 12, "Use of IfcCircle for cant is not supported");
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); });
|
||||
} else {
|
||||
mapping_->logger().Error("GEO", 250, "Unexpected segment type encountered");
|
||||
mapping_->logger().error("GEO", 250, "Unexpected segment type encountered");
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); });
|
||||
@@ -1069,7 +1069,7 @@ class curve_segment_evaluator {
|
||||
|
||||
parent_curve_start_point_ = (*parent_curve_fn_)(start_);
|
||||
} else {
|
||||
mapping_->logger().Warning("GEO", 251, "Unexpected segment type encountered");
|
||||
mapping_->logger().warning("GEO", 251, "Unexpected segment type encountered");
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); });
|
||||
@@ -1083,7 +1083,7 @@ class curve_segment_evaluator {
|
||||
auto coeffY = pc.CoefficientsY().value_or(std::vector<double>());
|
||||
auto coeffZ = pc.CoefficientsZ().value_or(std::vector<double>());
|
||||
if (!coeffZ.empty()) {
|
||||
mapping_->logger().Warning("GEO", 252, "Expected IfcPolynomialCurve.CoefficientsZ to be undefined for alignment geometry. Coefficients ignored.", pc);
|
||||
mapping_->logger().warning("GEO", 252, "Expected IfcPolynomialCurve.CoefficientsZ to be undefined for alignment geometry. Coefficients ignored.", pc);
|
||||
}
|
||||
|
||||
if (segment_type_ == ST_HORIZONTAL || segment_type_ == ST_VERTICAL) {
|
||||
@@ -1149,7 +1149,7 @@ class curve_segment_evaluator {
|
||||
auto result = boost::math::tools::bracket_and_solve_root(f, x, 2.0, true, tol, max_iter);
|
||||
x = result.first;
|
||||
} catch (...) {
|
||||
logger_.Warning("GEO", 253, "root solver failed");
|
||||
logger_.warning("GEO", 253, "root solver failed");
|
||||
}
|
||||
return x;
|
||||
};
|
||||
@@ -1210,12 +1210,12 @@ class curve_segment_evaluator {
|
||||
|
||||
parent_curve_start_point_ = (*parent_curve_fn_)(0.0); // start is added to u in parent_curve_fn_, so use 0.0 here
|
||||
} else if (segment_type_ == ST_CANT) {
|
||||
mapping_->logger().Warning("UNS", 13, std::runtime_error("Use of IfcPolynomialCurve for cant is not supported"));
|
||||
mapping_->logger().warning("UNS", 13, std::runtime_error("Use of IfcPolynomialCurve for cant is not supported"));
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); });
|
||||
} else {
|
||||
mapping_->logger().Error("GEO", 254, std::runtime_error("Unexpected segment type encountered"));
|
||||
mapping_->logger().error("GEO", 254, std::runtime_error("Unexpected segment type encountered"));
|
||||
parent_curve_fn_ = std::make_shared<parent_curve_function>(
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); },
|
||||
[](double /*u*/) -> Eigen::Matrix4d { return Eigen::Matrix4d::Identity(); });
|
||||
|
||||
@@ -25,14 +25,14 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcEdge& inst) {
|
||||
auto v1 = inst.EdgeStart().as<IfcSchema::IfcVertexPoint>();
|
||||
auto v2 = inst.EdgeEnd().as<IfcSchema::IfcVertexPoint>();
|
||||
if (!v1 || !v2) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 255, "Only IfcVertexPoints are supported for EdgeStart and -End", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 255, "Only IfcVertexPoints are supported for EdgeStart and -End", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto pnt1 = v1.VertexGeometry();
|
||||
auto pnt2 = v2.VertexGeometry();
|
||||
if (!pnt1.declaration().is(IfcSchema::IfcCartesianPoint::Class()) || !pnt2.declaration().is(IfcSchema::IfcCartesianPoint::Class())) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 256, "Only IfcCartesianPoints are supported for VertexGeometry", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 256, "Only IfcCartesianPoints are supported for VertexGeometry", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcEllipse& inst) {
|
||||
double y = inst.SemiAxis2() * length_unit_;
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
if (x < tol || y < tol) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 257, "Radius not greater than zero for:", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 257, "Radius not greater than zero for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcEllipseProfileDef& inst) {
|
||||
double ry = inst.SemiAxis2() * length_unit_;
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
if (rx < tol || ry < tol) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 258, "Radius not greater than zero for:", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 258, "Radius not greater than zero for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ using namespace ifcopenshell::geometry;
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcExtrudedAreaSolid& inst) {
|
||||
const double height = inst.Depth() * length_unit_;
|
||||
if (height < settings_.get<settings::Precision>().get()) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 89, "Non-positive extrusion height encountered for:", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 89, "Non-positive extrusion height encountered for:", inst);
|
||||
#ifndef PERMISSIVE_EXTRUSION
|
||||
return nullptr;
|
||||
#endif
|
||||
|
||||
@@ -27,7 +27,7 @@ using namespace ifcopenshell::geometry;
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcExtrudedAreaSolidTapered& inst) {
|
||||
const double height = inst.Depth() * length_unit_;
|
||||
if (height < settings_.get<settings::Precision>().get()) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 89, "Non-positive extrusion height encountered for:", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 89, "Non-positive extrusion height encountered for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFixedReferenceSweptAreaSolid
|
||||
auto condition_number = svd.singularValues()(0)
|
||||
/ svd.singularValues()(svd.singularValues().size() - 1);
|
||||
if (condition_number > 1.e10) {
|
||||
logger::error("Non-invertible matrix at " + std::to_string(distalong) + " conversion will likely fail.");
|
||||
::logger::root().error("Non-invertible matrix at " + std::to_string(distalong) + " conversion will likely fail.");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ using namespace ifcopenshell::geometry;
|
||||
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcGradientCurve& inst) {
|
||||
if (!inst.BaseCurve().as<IfcSchema::IfcCompositeCurve>())
|
||||
logger_.Warning("GEO", 261, "Expected IfcGradientCurve.BaseCurve to be IfcCompositeCurve", inst); // CT 4.1.7.1.1.2
|
||||
logger_.warning("GEO", 261, "Expected IfcGradientCurve.BaseCurve to be IfcCompositeCurve", inst); // CT 4.1.7.1.1.2
|
||||
|
||||
auto segments = inst.Segments();
|
||||
|
||||
@@ -41,11 +41,11 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcGradientCurve& inst) {
|
||||
// for this reason, a dynamic cast is used and if crv is a function_item it is added to the span
|
||||
spans.push_back(fi);
|
||||
} else {
|
||||
logger_.Error("UNS", 14, "Unsupported");
|
||||
logger_.error("UNS", 14, "Unsupported");
|
||||
return nullptr;
|
||||
}
|
||||
} else {
|
||||
logger_.Error("UNS", 15, "Unsupported");
|
||||
logger_.error("UNS", 15, "Unsupported");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcGradientCurve& inst) {
|
||||
|
||||
// check to see if there is valid overlap of the horizontal and vertical domains
|
||||
if (!(0 < gradient_function->length())) {
|
||||
logger_.Error("GEO", 262, "IfcGradientCurve does not have a common domain with BaseCurve");
|
||||
logger_.error("GEO", 262, "IfcGradientCurve does not have a common domain with BaseCurve");
|
||||
gradient_function = nullptr; // not valid
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcHalfSpaceSolid& inst) {
|
||||
auto surface = inst.BaseSurface();
|
||||
auto plane = surface.as<IfcSchema::IfcPlane>();
|
||||
if (!plane) {
|
||||
logger_.Message(Logger::LOG_ERROR, "UNS", 16, "Unsupported BaseSurface:", surface);
|
||||
logger_.message(::logger::LOG_ERROR, "UNS", 16, "Unsupported BaseSurface:", surface);
|
||||
return nullptr;
|
||||
}
|
||||
auto p = taxonomy::make<taxonomy::plane>();
|
||||
|
||||
@@ -80,7 +80,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcIShapeProfileDef& inst) {
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if (x1 < tol || x2 < tol || y < tol || d1 < tol || ft1 < tol || ft2 < tol) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 264, "Skipping zero sized profile:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 264, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcIndexedPolyCurve& inst) {
|
||||
e->basis = circ;
|
||||
loop->children.push_back(e);
|
||||
} else {
|
||||
logger_.Warning("GEO", 263, "Ignoring segment on", inst);
|
||||
logger_.warning("GEO", 263, "Ignoring segment on", inst);
|
||||
}
|
||||
} else {
|
||||
throw ifcopenshell::exception("Unexpected IfcIndexedPolyCurve segment of type " + segment.concrete().declaration().name());
|
||||
|
||||
@@ -45,7 +45,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcLShapeProfileDef& inst) {
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if ( x < tol || y < tol || d < tol) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 265, "Skipping zero sized profile:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 265, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcLShapeProfileDef& inst) {
|
||||
const double det = a1*b2 - a2*b1;
|
||||
|
||||
if (std::fabs(det) < 1.e-5) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 266, "Legs do not intersect for:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 266, "Legs do not intersect for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,13 +47,13 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcObjectPlacement& inst) {
|
||||
// element we're ignoring, but we don't want to traverse the entire model.
|
||||
#ifdef SCHEMA_IfcObjectPlacement_HAS_ReferencedByPlacements
|
||||
if (depth < 2) {
|
||||
std::vector<IfcSchema::IfcObjectPlacement> refs = placement.ReferencedByPlacements();
|
||||
auto refs = placement.ReferencedByPlacements();
|
||||
for (auto& ref : refs) {
|
||||
q.emplace_back(ref, depth + 1);
|
||||
q.emplace_back(ref.template as<IfcSchema::IfcObjectPlacement>(), depth + 1);
|
||||
}
|
||||
}
|
||||
#else
|
||||
logger::warning("Using --site-local-placement or --building-local-placement on IFC4.2 might have issues");
|
||||
::logger::root().warning("Using --site-local-placement or --building-local-placement on IFC4.2 might have issues");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -126,7 +126,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcObjectPlacement& inst) {
|
||||
if (fallback) {
|
||||
auto mapped_fallback = taxonomy::cast<taxonomy::matrix4>(map(fallback));
|
||||
if (!result->ccomponents().isApprox(mapped_fallback->ccomponents())) {
|
||||
logger::warning("Computed placement differs from fallback", inst);
|
||||
::logger::root().warning("Computed placement differs from fallback", inst);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcObjectPlacement& inst) {
|
||||
|
||||
auto abs_det = std::abs(result->ccomponents().determinant());
|
||||
if (abs_det < 1.e-7) {
|
||||
logger::warning("Ignoring singular matrix:", inst);
|
||||
::logger::root().warning("Ignoring singular matrix:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ using namespace ifcopenshell::geometry;
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcOffsetCurveByDistances& inst) {
|
||||
auto offset_values = inst.OffsetValues();
|
||||
if (offset_values.empty()) {
|
||||
logger_.Error("GEO", 270, "IfcOffsetCurveByDistances must have at least one offset value");
|
||||
logger_.error("GEO", 270, "IfcOffsetCurveByDistances must have at least one offset value");
|
||||
}
|
||||
|
||||
auto& first_offset_value = offset_values.front();
|
||||
@@ -56,7 +56,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcOffsetCurveByDistances& inst
|
||||
auto basis_curve_fn = taxonomy::dcast<taxonomy::function_item>(map(basis_curve));
|
||||
if (!basis_curve_fn) {
|
||||
// Only implement on alignment curves
|
||||
logger_.Warning("GEO", 271, "IfcOffsetCurveByDistances is only implemented for BasisCurves curves based on taxonomy::function_item", inst);
|
||||
logger_.warning("GEO", 271, "IfcOffsetCurveByDistances is only implemented for BasisCurves curves based on taxonomy::function_item", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcOffsetCurveByDistances& inst
|
||||
first_distance *= length_unit_;
|
||||
|
||||
if (first_distance < 0.0) {
|
||||
logger_.Warning("GEO", 272, "IfcOffsetCurveByDistance first offset value is before the start of the curve.");
|
||||
logger_.warning("GEO", 272, "IfcOffsetCurveByDistance first offset value is before the start of the curve.");
|
||||
}
|
||||
|
||||
if(0.0 < first_distance)
|
||||
@@ -110,7 +110,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcOffsetCurveByDistances& inst
|
||||
|
||||
if (dn < dp) // next is before previous
|
||||
{
|
||||
logger_.Warning("GEO", 273, "IfcOffsetCurveByDistance offset value is out of bounds.");
|
||||
logger_.warning("GEO", 273, "IfcOffsetCurveByDistance offset value is out of bounds.");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ const double PI = boost::math::constants::pi<double>();
|
||||
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcOpenCrossProfileDef& inst) {
|
||||
if (inst.ProfileType() != IfcSchema::IfcProfileTypeEnum::IfcProfileType_CURVE) {
|
||||
logger_.Warning("GEO", 274, "Expected IfcOpenCrossProfileDef.ProfileType to be CURVE", inst);
|
||||
logger_.warning("GEO", 274, "Expected IfcOpenCrossProfileDef.ProfileType to be CURVE", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcOpenCrossProfileDef& inst) {
|
||||
auto angles = inst.Slopes(); // these are actually angles, but the attribute is called Slopes
|
||||
|
||||
if (widths.size() != angles.size()) {
|
||||
logger_.Warning("GEO", 275, "Expected Widths and Slopes to be equal length, but got " + std::to_string(widths.size()) + " and " + std::to_string(angles.size()) + " respectively", inst);
|
||||
logger_.warning("GEO", 275, "Expected Widths and Slopes to be equal length, but got " + std::to_string(widths.size()) + " and " + std::to_string(angles.size()) + " respectively", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcPolyLoop& inst) {
|
||||
// A loop should consist of at least three vertices
|
||||
int original_count = polygon.size();
|
||||
if (original_count < 3) {
|
||||
logger_.Message(Logger::LOG_WARNING, "GEO", 278, "Not enough edges for:", inst);
|
||||
logger_.message(::logger::LOG_WARNING, "GEO", 278, "Not enough edges for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -45,17 +45,17 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcPolyLoop& inst) {
|
||||
auto previous_size = polygon.size();
|
||||
remove_duplicate_points_from_loop(polygon, true, eps);
|
||||
if (polygon.size() != previous_size) {
|
||||
logger_.Warning("GEO", 279, "Removed " + std::to_string(previous_size - polygon.size()) + " (near) duplicate points from:", inst);
|
||||
logger_.warning("GEO", 279, "Removed " + std::to_string(previous_size - polygon.size()) + " (near) duplicate points from:", inst);
|
||||
}
|
||||
|
||||
int count = polygon.size();
|
||||
if (original_count - count != 0) {
|
||||
std::stringstream ss; ss << (original_count - count) << " edges removed for:";
|
||||
logger_.Message(Logger::LOG_WARNING, "GEO", 280, ss.str(), inst);
|
||||
logger_.message(::logger::LOG_WARNING, "GEO", 280, ss.str(), inst);
|
||||
}
|
||||
|
||||
if (count < 3) {
|
||||
logger_.Message(Logger::LOG_WARNING, "GEO", 281, "Not enough edges for:", inst);
|
||||
logger_.message(::logger::LOG_WARNING, "GEO", 281, "Not enough edges for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,12 +44,12 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcPolyline& inst) {
|
||||
auto previous_size = polygon.size();
|
||||
remove_duplicate_points_from_loop(polygon, closed_by_proximity, eps);
|
||||
if (polygon.size() != previous_size) {
|
||||
logger_.Warning("GEO", 276, "Removed " + std::to_string(previous_size - polygon.size()) + " (near) duplicate points from:", inst);
|
||||
logger_.warning("GEO", 276, "Removed " + std::to_string(previous_size - polygon.size()) + " (near) duplicate points from:", inst);
|
||||
}
|
||||
|
||||
if (polygon.size() < 2) {
|
||||
// We somehow need to signal we fail this curve on purpose not to trigger an error.
|
||||
logger_.Warning("GEO", 277, "Invalid polyline with " + std::to_string(polygon.size()) + " points:", inst);
|
||||
logger_.warning("GEO", 277, "Invalid polyline with " + std::to_string(polygon.size()) + " points:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRectangleHollowProfileDef& i
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if (x < tol || y < tol) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 282, "Skipping zero sized profile:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 282, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRectangleProfileDef& inst) {
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if (x < tol || y < tol) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 283, "Skipping zero sized profile:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 283, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRectangularTrimmedSurface& i
|
||||
|
||||
/*
|
||||
if (!inst.BasisSurface()->declaration().is(IfcSchema::IfcPlane::Class())) {
|
||||
logger::message(logger::LOG_ERROR, "Unsupported BasisSurface:", inst.BasisSurface());
|
||||
::logger::root().message(::logger::LOG_ERROR, "Unsupported BasisSurface:", inst.BasisSurface());
|
||||
return false;
|
||||
}
|
||||
gp_Pln pln;
|
||||
|
||||
@@ -86,7 +86,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRevolvedAreaSolid& inst) {
|
||||
}
|
||||
|
||||
if (intersecting) {
|
||||
logger::warning("Warning Axis and SweptArea intersecting", l);
|
||||
::logger::root().warning("Warning Axis and SweptArea intersecting", l);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRoundedRectangleProfileDef&
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if (x < tol || y < tol) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 284, "Skipping zero sized profile:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 284, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSectionedSolidHorizontal& in
|
||||
auto fn = taxonomy::dcast<taxonomy::function_item>(dir);
|
||||
if (!fn) {
|
||||
// Only implement on alignment curves
|
||||
logger_.Warning("GEO", 285, "IfcSectionedSolidHorizontal is only implemented for Directrix curves based on taxonomy::function_item", inst);
|
||||
logger_.warning("GEO", 285, "IfcSectionedSolidHorizontal is only implemented for Directrix curves based on taxonomy::function_item", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -91,11 +91,11 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSectionedSolidHorizontal& in
|
||||
profile_rotations.push_back(rot);
|
||||
}
|
||||
if (faces.size() != profile_offsets.size()) {
|
||||
logger_.Warning("GEO", 286, "Expected CrossSections and CrossSectionPositions to be equal length, but got " + std::to_string(faces.size()) + " and " + std::to_string(profile_offsets.size()) + " respectively", inst);
|
||||
logger_.warning("GEO", 286, "Expected CrossSections and CrossSectionPositions to be equal length, but got " + std::to_string(faces.size()) + " and " + std::to_string(profile_offsets.size()) + " respectively", inst);
|
||||
return nullptr;
|
||||
}
|
||||
if (faces.size() < 2) {
|
||||
logger_.Warning("GEO", 287, "Expected at least two cross sections, but got " + std::to_string(faces.size()), inst);
|
||||
logger_.warning("GEO", 287, "Expected at least two cross sections, but got " + std::to_string(faces.size()), inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSectionedSurface& inst) {
|
||||
auto fn = taxonomy::dcast<taxonomy::function_item>(dir);
|
||||
if (!fn) {
|
||||
// Only implement on alignment curves
|
||||
logger_.Warning("GEO", 288, "IfcSectionedSurface is only implemented for Directrix curves based on taxonomy::function_item", inst);
|
||||
logger_.warning("GEO", 288, "IfcSectionedSurface is only implemented for Directrix curves based on taxonomy::function_item", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -97,11 +97,11 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSectionedSurface& inst) {
|
||||
return nullptr;
|
||||
#endif
|
||||
if (faces.size() != profile_offsets.size()) {
|
||||
logger_.Warning("GEO", 289, "Expected CrossSections and CrossSectionPositions to be equal length, but got " + std::to_string(faces.size()) + " and " + std::to_string(profile_offsets.size()) + " respectively", inst);
|
||||
logger_.warning("GEO", 289, "Expected CrossSections and CrossSectionPositions to be equal length, but got " + std::to_string(faces.size()) + " and " + std::to_string(profile_offsets.size()) + " respectively", inst);
|
||||
return nullptr;
|
||||
}
|
||||
if (faces.size() < 2) {
|
||||
logger_.Warning("GEO", 290, "Expected at least two cross sections, but got " + std::to_string(faces.size()), inst);
|
||||
logger_.warning("GEO", 290, "Expected at least two cross sections, but got " + std::to_string(faces.size()), inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ using namespace ifcopenshell::geometry;
|
||||
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSegmentedReferenceCurve& inst) {
|
||||
if (!inst.BaseCurve().as<IfcSchema::IfcGradientCurve>())
|
||||
logger_.Warning("GEO", 291, "Expected IfcSegmentedReferenceCurve.BaseCurve to be IfcGradient", inst); // CT 4.1.7.1.1.3
|
||||
logger_.warning("GEO", 291, "Expected IfcSegmentedReferenceCurve.BaseCurve to be IfcGradient", inst); // CT 4.1.7.1.1.3
|
||||
|
||||
auto segments = inst.Segments();
|
||||
|
||||
@@ -41,11 +41,11 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSegmentedReferenceCurve& ins
|
||||
// for this reason, a dynamic cast is used and if crv is a function_item it is added to the span
|
||||
spans.push_back(fi);
|
||||
} else {
|
||||
logger_.Error("UNS", 17, "Unsupported");
|
||||
logger_.error("UNS", 17, "Unsupported");
|
||||
return nullptr;
|
||||
}
|
||||
} else {
|
||||
logger_.Error("UNS", 18, "Unsupported");
|
||||
logger_.error("UNS", 18, "Unsupported");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSegmentedReferenceCurve& ins
|
||||
|
||||
auto cant_function = taxonomy::make<taxonomy::cant_function>(gradient, cant, inst);
|
||||
if (!(0 < cant_function->length())) {
|
||||
logger_.Error("GEO", 292, "IfcSegmentedReferenceCurve does not have a common domain with BaseCurve");
|
||||
logger_.error("GEO", 292, "IfcSegmentedReferenceCurve does not have a common domain with BaseCurve");
|
||||
cant_function = nullptr;
|
||||
}
|
||||
return cant_function;
|
||||
|
||||
@@ -49,11 +49,11 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceCurveSweptAreaSolid&
|
||||
if (!is_plane) {
|
||||
TopoDS_Shape surface_shell;
|
||||
if (!convert_shape(inst.ReferenceSurface(), surface_shell)) {
|
||||
logger::error("Failed to convert reference surface", l);
|
||||
::logger::root().error("Failed to convert reference surface", l);
|
||||
return false;
|
||||
}
|
||||
if (util::count(surface_shell, TopAbs_FACE) != 1) {
|
||||
logger::error("Non-continuous reference surface", l);
|
||||
::logger::root().error("Non-continuous reference surface", l);
|
||||
return false;
|
||||
}
|
||||
surface_face = TopoDS::Face(TopExp_Explorer(surface_shell, TopAbs_FACE).Current());
|
||||
@@ -76,7 +76,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceCurveSweptAreaSolid&
|
||||
for (TopExp_Explorer exp(wire, TopAbs_VERTEX); exp.More(); exp.Next()) {
|
||||
if (pln.Distance(BRep_Tool::Pnt(TopoDS::Vertex(exp.Current()))) > ALMOST_ZERO) {
|
||||
directrix_on_plane = false;
|
||||
logger::message(logger::LOG_WARNING, "The Directrix does not lie on the ReferenceSurface", l);
|
||||
::logger::root().message(::logger::LOG_WARNING, "The Directrix does not lie on the ReferenceSurface", l);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSweptDiskSolid& inst) {
|
||||
sp = inst.StartParam();
|
||||
ep = inst.EndParam();
|
||||
} catch (const ifcopenshell::exception& e) {
|
||||
logger_.Warning("GEO", 293, e);
|
||||
logger_.warning("GEO", 293, e);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -241,19 +241,19 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSweptDiskSolid& inst) {
|
||||
i += 1;
|
||||
j += 1;
|
||||
} else {
|
||||
logger::error("Unexpected amount of fillet edges generated");
|
||||
::logger::root().error("Unexpected amount of fillet edges generated");
|
||||
}
|
||||
} else {
|
||||
logger::error("Unable to build fillet, probably edge too short");
|
||||
::logger::root().error("Unable to build fillet, probably edge too short");
|
||||
}
|
||||
} else {
|
||||
logger::error("Colinear edges, not applying fillet");
|
||||
::logger::root().error("Colinear edges, not applying fillet");
|
||||
}
|
||||
i++;
|
||||
j++;
|
||||
}
|
||||
} else {
|
||||
logger::error("Not enough edges for applying fillet");
|
||||
::logger::root().error("Not enough edges for applying fillet");
|
||||
}
|
||||
|
||||
TopoDS_Wire new_wire;
|
||||
@@ -266,7 +266,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSweptDiskSolid& inst) {
|
||||
|
||||
wire = new_wire;
|
||||
} else {
|
||||
logger::error("Directrix is not polyhedral, ignoring FilletRadius");
|
||||
::logger::root().error("Directrix is not polyhedral, ignoring FilletRadius");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSweptDiskSolid& inst) {
|
||||
}
|
||||
|
||||
if (!is_valid) {
|
||||
logger::message(logger::LOG_WARNING, "Failed to subtract inner radius void for:", l);
|
||||
::logger::root().message(::logger::LOG_WARNING, "Failed to subtract inner radius void for:", l);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcTShapeProfileDef& inst) {
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if (x < tol || y < tol || d1 < tol || d2 < tol) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 296, "Skipping zero sized profile:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 296, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcTShapeProfileDef& inst) {
|
||||
const double det = a1*b2 - a2*b1;
|
||||
|
||||
if (std::fabs(det) < 1.e-5) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 297, "Web and flange do not intersect for:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 297, "Web and flange do not intersect for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcTrapeziumProfileDef& inst) {
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if (x1 < tol || w < tol || y < tol) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 294, "Skipping zero sized profile:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 294, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcTrimmedCurve& inst) {
|
||||
bool trim_cartesian_failed = !trim_cartesian;
|
||||
if (trim_cartesian) {
|
||||
if ((pnts[0]->ccomponents() - pnts[1]->ccomponents()).norm() < (2 * tol)) {
|
||||
logger_.Message(Logger::LOG_WARNING, "GEO", 295, "Skipping segment with length below tolerance level:", inst);
|
||||
logger_.message(::logger::LOG_WARNING, "GEO", 295, "Skipping segment with length below tolerance level:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
tc->start = pnts[0];
|
||||
@@ -140,7 +140,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcTrimmedCurve& inst) {
|
||||
TopoDS_Vertex v0, v1;
|
||||
TopExp::Vertices(e, v0, v1);
|
||||
if (v0.IsSame(v1)) {
|
||||
logger::warning("Skipping degenerate segment", l);
|
||||
::logger::root().warning("Skipping degenerate segment", l);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcTrimmedCurve& inst) {
|
||||
TopoDS_Vertex v0, v1;
|
||||
TopExp::Vertices(e, v0, v1);
|
||||
e = TopoDS::Edge(BRepBuilderAPI_MakeEdge(v0, v1).Edge().Oriented(e.Orientation()));
|
||||
logger::warning("Substituted edge with linear approximation", l);
|
||||
::logger::root().warning("Substituted edge with linear approximation", l);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcUShapeProfileDef& inst) {
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if (x < tol || y < tol || d1 < tol || d2 < tol) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 298, "Skipping zero sized profile:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 298, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcZShapeProfileDef& inst) {
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if (x < tol || y < tol || dx < tol || dy < tol) {
|
||||
logger_.Message(Logger::LOG_NOTICE, "GEO", 299, "Skipping zero sized profile:", inst);
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 299, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ using namespace IfcGeom;
|
||||
|
||||
namespace {
|
||||
struct POSTFIX_SCHEMA(factory_t) {
|
||||
abstract_mapping* operator()(ifcopenshell::file* file, Settings& settings, Logger& logger) const {
|
||||
abstract_mapping* operator()(ifcopenshell::file* file, Settings& settings, ::logger& logger) const {
|
||||
ifcopenshell::geometry::POSTFIX_SCHEMA(mapping)* m = new ifcopenshell::geometry::POSTFIX_SCHEMA(mapping)(file, settings, logger);
|
||||
return m;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ std::vector<IfcSchema::IfcProduct> mapping::products_represented_by(const IfcSch
|
||||
try {
|
||||
target = taxonomy::cast<taxonomy::matrix4>(map(item.MappingTarget()));
|
||||
} catch (const std::exception& e) {
|
||||
logger_.Error("GEO", 300, e);
|
||||
logger_.error("GEO", 300, e);
|
||||
continue;
|
||||
}
|
||||
if (!target->is_identity()) {
|
||||
@@ -335,8 +335,8 @@ const express::Base mapping::get_single_material_association(const express::Base
|
||||
|
||||
try {
|
||||
associated_material = associated_materials.front().RelatingMaterial().concrete();
|
||||
} catch(IfcParse::IfcException& e) {
|
||||
logger_.Error("GEO", 301, e.what());
|
||||
} catch(ifcopenshell::exception& e) {
|
||||
logger_.error("GEO", 301, e.what());
|
||||
}
|
||||
|
||||
if (associated_material) {
|
||||
@@ -349,7 +349,7 @@ const express::Base mapping::get_single_material_association(const express::Base
|
||||
IfcSchema::IfcMaterialLayerSet layerset;
|
||||
if (auto m = associated_material.as<IfcSchema::IfcMaterialLayerSetUsage>()) {
|
||||
if (m.get("ForLayerSet").isNull()) {
|
||||
logger_.Warning("GEO", 302, "Missing ForLayerSet for:", m);
|
||||
logger_.warning("GEO", 302, "Missing ForLayerSet for:", m);
|
||||
return express::Base{};
|
||||
}
|
||||
layerset = m.ForLayerSet();
|
||||
@@ -369,7 +369,7 @@ const express::Base mapping::get_single_material_association(const express::Base
|
||||
IfcSchema::IfcMaterialProfileSet profileset;
|
||||
if (auto m = associated_material.as<IfcSchema::IfcMaterialProfileSetUsage>()) {
|
||||
if (m.get("ForProfileSet").isNull()) {
|
||||
logger_.Warning("GEO", 303, "Missing ForProfileSet for:", m);
|
||||
logger_.warning("GEO", 303, "Missing ForProfileSet for:", m);
|
||||
return express::Base{};
|
||||
}
|
||||
profileset = m.ForProfileSet();
|
||||
@@ -414,7 +414,7 @@ IfcSchema::IfcRepresentation mapping::representation_mapped_to(const IfcSchema::
|
||||
try {
|
||||
target = taxonomy::cast<taxonomy::matrix4>(map(mapped_item.MappingTarget()));
|
||||
} catch (const std::exception& e) {
|
||||
logger_.Error("GEO", 304, e);
|
||||
logger_.error("GEO", 304, e);
|
||||
}
|
||||
if (target && target->is_identity()) {
|
||||
IfcSchema::IfcRepresentationMap rmap = mapped_item.MappingSource();
|
||||
@@ -587,7 +587,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcMaterial& material) {
|
||||
failed_on_purpose_.insert(material);
|
||||
return nullptr;
|
||||
}
|
||||
logger_.Warning("UNS", 19, "Skipping unsupported material style for material: ", material);
|
||||
logger_.warning("UNS", 19, "Skipping unsupported material style for material: ", material);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -620,7 +620,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcStyledItem& inst) {
|
||||
|
||||
if (!style) {
|
||||
// E.g. IfcCurveStyle is skipped as unsupported.
|
||||
logger_.Warning("GEO", 305, "Only IfcSurfaceStyle is supported, couldn't find it in IfcStyledItem: ", inst);
|
||||
logger_.warning("GEO", 305, "Only IfcSurfaceStyle is supported, couldn't find it in IfcStyledItem: ", inst);
|
||||
failed_on_purpose_.insert(inst);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -715,7 +715,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSurfaceStyle& style) {
|
||||
|
||||
taxonomy::ptr mapping::map(const express::Base& inst) {
|
||||
if (!inst) {
|
||||
logger_.Error("GEO", 306, "Warning nullptr passed to map() function");
|
||||
logger_.error("GEO", 306, "Warning nullptr passed to map() function");
|
||||
return nullptr;
|
||||
}
|
||||
auto iden = inst.identity();
|
||||
@@ -742,7 +742,7 @@ taxonomy::ptr mapping::map(const express::Base& inst) {
|
||||
cache_.insert({iden, item});
|
||||
}
|
||||
} else if (!matched) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 307, "No operation defined for:", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 307, "No operation defined for:", inst);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
@@ -850,10 +850,10 @@ void mapping::initialize_units_() {
|
||||
auto& project = projects.front();
|
||||
unit_assignment = project.UnitsInContext();
|
||||
} else {
|
||||
logger_.Warning("GEO", 308, "Not a single project or context in file");
|
||||
logger_.warning("GEO", 308, "Not a single project or context in file");
|
||||
}
|
||||
if (!unit_assignment) {
|
||||
logger_.Warning("GEO", 309, "Unable to detect unit information");
|
||||
logger_.warning("GEO", 309, "Unable to detect unit information");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ void mapping::initialize_units_() {
|
||||
try {
|
||||
auto units = unit_assignment.Units();
|
||||
if (units.empty()) {
|
||||
logger_.Warning("GEO", 310, "No unit information found");
|
||||
logger_.warning("GEO", 310, "No unit information found");
|
||||
} else {
|
||||
for (auto& base : units) {
|
||||
if (auto named_unit = base.as<IfcSchema::IfcNamedUnit>()) {
|
||||
@@ -895,15 +895,15 @@ void mapping::initialize_units_() {
|
||||
} catch (const ifcopenshell::exception& ex) {
|
||||
std::stringstream ss;
|
||||
ss << "Failed to determine unit information '" << ex.what() << "'";
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 311, ss.str());
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 311, ss.str());
|
||||
}
|
||||
|
||||
if (!length_unit_encountered) {
|
||||
logger_.Warning("GEO", 312, "No length unit encountered");
|
||||
logger_.warning("GEO", 312, "No length unit encountered");
|
||||
}
|
||||
|
||||
if (!angle_unit_encountered) {
|
||||
logger_.Warning("GEO", 313, "No plane angle unit encountered");
|
||||
logger_.warning("GEO", 313, "No plane angle unit encountered");
|
||||
}
|
||||
|
||||
// @todo move to a more descriptive function
|
||||
@@ -920,7 +920,7 @@ void mapping::initialize_units_() {
|
||||
if (vs.size() == 3) {
|
||||
offset_and_rotation_ *= Eigen::Affine3d(Eigen::Translation3d(vs[0], vs[1], vs[2])).matrix();
|
||||
} else {
|
||||
logger_.Error("SYS", 31, "Expected 3 values for model-offset setting");
|
||||
logger_.error("SYS", 31, "Expected 3 values for model-offset setting");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -933,7 +933,7 @@ void mapping::initialize_units_() {
|
||||
m4 << m3;
|
||||
offset_and_rotation_ *= m4;
|
||||
} else {
|
||||
logger_.Error("SYS", 32, "Expected 4 values for model-rotation setting");
|
||||
logger_.error("SYS", 32, "Expected 4 values for model-rotation setting");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -980,7 +980,7 @@ void mapping::initialize_settings() {
|
||||
|
||||
if (any_precision_encountered) {
|
||||
if (lowest_precision_encountered < 1.e-7) {
|
||||
logger_.Message(Logger::LOG_WARNING, "SYS", 33, "Precision lower than 0.0000001 meter not enforced");
|
||||
logger_.message(::logger::LOG_WARNING, "SYS", 33, "Precision lower than 0.0000001 meter not enforced");
|
||||
precision_to_set = 1.e-7;
|
||||
} else {
|
||||
precision_to_set = lowest_precision_encountered;
|
||||
@@ -1017,7 +1017,7 @@ bool mapping::get_layerset_information(const express::Base& p, layerset_informat
|
||||
IfcSchema::IfcRepresentation body_representation = find_representation(product, "Body");
|
||||
|
||||
if (!body_representation) {
|
||||
logger_.Warning("GEO", 314, "No body representation for product", product);
|
||||
logger_.warning("GEO", 314, "No body representation for product", product);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1031,7 +1031,7 @@ bool mapping::get_layerset_information(const express::Base& p, layerset_informat
|
||||
IfcSchema::IfcRepresentation axis_representation = find_representation(product, "Axis");
|
||||
|
||||
if (!axis_representation) {
|
||||
logger_.Message(Logger::LOG_WARNING, "GEO", 315, "No axis representation for:", product);
|
||||
logger_.message(::logger::LOG_WARNING, "GEO", 315, "No axis representation for:", product);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1106,7 +1106,7 @@ bool mapping::get_layerset_information(const express::Base& p, layerset_informat
|
||||
}
|
||||
|
||||
if (extrusions.size() != 1) {
|
||||
logger_.Message(Logger::LOG_WARNING, "GEO", 316, "No single extrusion found in body representation for:", product);
|
||||
logger_.message(::logger::LOG_WARNING, "GEO", 316, "No single extrusion found in body representation for:", product);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1121,7 +1121,7 @@ bool mapping::get_layerset_information(const express::Base& p, layerset_informat
|
||||
if (has_position) {
|
||||
auto m4 = taxonomy::cast<taxonomy::matrix4>(map(extrusion.Position()));
|
||||
if (!m4) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 317, "Failed to convert placement for extrusion of:", product);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 317, "Failed to convert placement for extrusion of:", product);
|
||||
return false;
|
||||
} else {
|
||||
extrusion_position = m4;
|
||||
@@ -1131,7 +1131,7 @@ bool mapping::get_layerset_information(const express::Base& p, layerset_informat
|
||||
taxonomy::direction3::ptr extrusion_direction = taxonomy::cast<taxonomy::direction3>(map(extrusion.ExtrudedDirection()));
|
||||
|
||||
if (!extrusion_direction) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 318, "Failed to convert direction for extrusion of:", product);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 318, "Failed to convert direction for extrusion of:", product);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1203,13 +1203,13 @@ void mapping::addRepresentationsFromContextIds(std::vector<IfcSchema::IfcReprese
|
||||
IfcSchema::IfcGeometricRepresentationContext context;
|
||||
try {
|
||||
context = file_->instance_by_id(context_id).as<IfcSchema::IfcGeometricRepresentationContext>();
|
||||
} catch (IfcParse::IfcException& e) {
|
||||
logger_.Error("GEO", 319, e);
|
||||
} catch (ifcopenshell::exception& e) {
|
||||
logger_.error("GEO", 319, e);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!context) {
|
||||
logger_.Error("GEO", 320, "Failed to process context ID " + std::to_string(context_id));
|
||||
logger_.error("GEO", 320, "Failed to process context ID " + std::to_string(context_id));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1258,14 +1258,14 @@ void mapping::addRepresentationsFromDefaultContexts(std::vector<IfcSchema::IfcRe
|
||||
boost::to_lower(context_type);
|
||||
|
||||
if (allowed_context_types.find(context_type) == allowed_context_types.end()) {
|
||||
logger_.Warning("GEO", 321, std::string("ContextType '") + *context->ContextType() + "' not allowed:", context);
|
||||
logger_.warning("GEO", 321, std::string("ContextType '") + *context.ContextType() + "' not allowed:", context);
|
||||
}
|
||||
if (context_types.find(context_type) != context_types.end()) {
|
||||
filtered_contexts.push_back(context);
|
||||
}
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
logger_.Error("GEO", 322, e);
|
||||
logger_.error("GEO", 322, e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1294,7 +1294,7 @@ void mapping::addRepresentationsFromDefaultContexts(std::vector<IfcSchema::IfcRe
|
||||
}
|
||||
|
||||
if (representations.empty()) {
|
||||
logger_.Warning("GEO", 323, "No representations encountered in relevant contexts, using all");
|
||||
logger_.warning("GEO", 323, "No representations encountered in relevant contexts, using all");
|
||||
auto all_reps = file_->instances_by_type<IfcSchema::IfcRepresentation>();
|
||||
representations = all_reps;
|
||||
}
|
||||
@@ -1375,8 +1375,8 @@ express::Base mapping::representation_of(const express::Base& product) {
|
||||
}
|
||||
intersection_no_box.push_back(r);
|
||||
}
|
||||
if (intersection_no_box->size() > 1) {
|
||||
logger_.Warning("GEO", 324, "Multiple applicable representations found for element, selecting arbitrary");
|
||||
if (intersection_no_box.size() > 1) {
|
||||
logger_.warning("GEO", 324, "Multiple applicable representations found for element, selecting arbitrary");
|
||||
}
|
||||
if (intersection_no_box.size()) {
|
||||
return intersection_no_box.front();
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <cstdint>
|
||||
#include <unordered_set>
|
||||
|
||||
#include INCLUDE_SCHEMA(../../ifcparse, IfcSchema)
|
||||
#include INCLUDE_SCHEMA_DEFINITIONS(../../ifcparse, IfcSchema)
|
||||
#include INCLUDE_SCHEMA(../../ifcparse/schemas, IfcSchema)
|
||||
#include INCLUDE_SCHEMA_DEFINITIONS(../../ifcparse/schemas, IfcSchema)
|
||||
|
||||
namespace ifcopenshell {
|
||||
|
||||
@@ -71,19 +71,19 @@ namespace geometry {
|
||||
}
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 325, std::string(e.what()) + "\nFailed to convert:", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 325, std::string(e.what()) + "\nFailed to convert:", inst);
|
||||
}
|
||||
} else if (failed_on_purpose_.find(inst) == failed_on_purpose_.end()) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 326, "Failed to convert:", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 326, "Failed to convert:", inst);
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
logger_.Message(Logger::LOG_ERROR, "GEO", 327, std::string(e.what()) + "\nFailed to convert:", inst);
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 327, std::string(e.what()) + "\nFailed to convert:", inst);
|
||||
}
|
||||
}
|
||||
}
|
||||
IfcSchema::IfcStyledItem find_style(const IfcSchema::IfcRepresentationItem&);
|
||||
public:
|
||||
POSTFIX_SCHEMA(mapping)(ifcopenshell::file* file, Settings& settings, Logger& logger = Logger::Root()) : abstract_mapping(settings), file_(file), placement_rel_to_type_(nullptr) {
|
||||
POSTFIX_SCHEMA(mapping)(ifcopenshell::file* file, Settings& settings, ::logger& logger = ::logger::root()) : abstract_mapping(settings, logger), file_(file), placement_rel_to_type_(nullptr) {
|
||||
initialize_units_();
|
||||
}
|
||||
virtual ifcopenshell::geometry::taxonomy::ptr map(const express::Base&);
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace ifcopenshell {
|
||||
|
||||
namespace {
|
||||
struct POSTFIX_SCHEMA(factory_t) {
|
||||
abstract_mapping* operator()(ifcopenshell::file* file, Settings& settings) const {
|
||||
return new POSTFIX_SCHEMA(mapping)(file, settings);
|
||||
abstract_mapping* operator()(ifcopenshell::file* file, Settings& settings, ::logger& logger) const {
|
||||
return new POSTFIX_SCHEMA(mapping)(file, settings, logger);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user