mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 06:32:09 +00:00
Wrap more classes into ifcopenshell:: namespace
This commit is contained in:
@@ -58,7 +58,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAsymmetricIShapeProfileDef&
|
||||
const double tol = settings_.get<settings::Precision>().get();
|
||||
|
||||
if (xb < tol || xt < tol || y < tol || d1 < tol || ftb < tol || ftt < tol) {
|
||||
logger_.message(::logger::LOG_NOTICE, "GEO", 264, "Skipping zero sized profile:", inst);
|
||||
logger_.message(ifcopenshell::logger::LOG_NOTICE, "GEO", 264, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2PlacementLinear& inst)
|
||||
|
||||
/*
|
||||
if (hasAxis != hasRef) {
|
||||
::logger::root().warning("Axis and RefDirection should be specified together", inst);
|
||||
ifcopenshell::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(ifcopenshell::logger::LOG_NOTICE, "GEO", 241, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ using namespace ifcopenshell::geom;
|
||||
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(ifcopenshell::logger::LOG_ERROR, "GEO", 237, "Radius not greater than zero for:", inst);
|
||||
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::root().error("Not implemented", *it);
|
||||
ifcopenshell::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::root().notice("Infinite IfcLine used as ParentCurve of segment, treating as a segment", *it);
|
||||
ifcopenshell::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::root().warning("Segment length below tolerance", *it);
|
||||
ifcopenshell::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::root().message(failed_on_purpose ? ::logger::LOG_WARNING : ::logger::LOG_ERROR, "Failed to convert curve:", curve);
|
||||
ifcopenshell::logger::root().message(failed_on_purpose ? ifcopenshell::logger::LOG_WARNING : ifcopenshell::logger::LOG_ERROR, "Failed to convert curve:", curve);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCompositeCurve* l, TopoDS_Wi
|
||||
}
|
||||
|
||||
if (converted_segments.Extent() == 0) {
|
||||
::logger::root().message(::logger::LOG_ERROR, "No segment successfully converted:", l);
|
||||
ifcopenshell::logger::root().message(ifcopenshell::logger::LOG_ERROR, "No segment successfully converted:", l);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -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(ifcopenshell::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(ifcopenshell::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(ifcopenshell::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(ifcopenshell::logger::LOG_ERROR, "GEO", 258, "Radius not greater than zero for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ using namespace ifcopenshell::geom;
|
||||
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(ifcopenshell::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::geom;
|
||||
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(ifcopenshell::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::root().error("Non-invertible matrix at " + std::to_string(distalong) + " conversion will likely fail.");
|
||||
ifcopenshell::logger::root().error("Non-invertible matrix at " + std::to_string(distalong) + " conversion will likely fail.");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -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(ifcopenshell::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(ifcopenshell::logger::LOG_NOTICE, "GEO", 264, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -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(ifcopenshell::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(ifcopenshell::logger::LOG_NOTICE, "GEO", 266, "Legs do not intersect for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcObjectPlacement& inst) {
|
||||
}
|
||||
}
|
||||
#else
|
||||
::logger::root().warning("Using --site-local-placement or --building-local-placement on IFC4.2 might have issues");
|
||||
ifcopenshell::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::root().warning("Computed placement differs from fallback", inst);
|
||||
ifcopenshell::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::root().warning("Ignoring singular matrix:", inst);
|
||||
ifcopenshell::logger::root().warning("Ignoring singular matrix:", 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(ifcopenshell::logger::LOG_WARNING, "GEO", 278, "Not enough edges for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -51,11 +51,11 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcPolyLoop& 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(ifcopenshell::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(ifcopenshell::logger::LOG_WARNING, "GEO", 281, "Not enough edges for:", 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(ifcopenshell::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(ifcopenshell::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::root().message(::logger::LOG_ERROR, "Unsupported BasisSurface:", inst.BasisSurface());
|
||||
ifcopenshell::logger::root().message(ifcopenshell::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::root().warning("Warning Axis and SweptArea intersecting", l);
|
||||
ifcopenshell::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(ifcopenshell::logger::LOG_NOTICE, "GEO", 284, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -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::root().error("Failed to convert reference surface", l);
|
||||
ifcopenshell::logger::root().error("Failed to convert reference surface", l);
|
||||
return false;
|
||||
}
|
||||
if (util::count(surface_shell, TopAbs_FACE) != 1) {
|
||||
::logger::root().error("Non-continuous reference surface", l);
|
||||
ifcopenshell::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::root().message(::logger::LOG_WARNING, "The Directrix does not lie on the ReferenceSurface", l);
|
||||
ifcopenshell::logger::root().message(ifcopenshell::logger::LOG_WARNING, "The Directrix does not lie on the ReferenceSurface", l);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,19 +241,19 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSweptDiskSolid& inst) {
|
||||
i += 1;
|
||||
j += 1;
|
||||
} else {
|
||||
::logger::root().error("Unexpected amount of fillet edges generated");
|
||||
ifcopenshell::logger::root().error("Unexpected amount of fillet edges generated");
|
||||
}
|
||||
} else {
|
||||
::logger::root().error("Unable to build fillet, probably edge too short");
|
||||
ifcopenshell::logger::root().error("Unable to build fillet, probably edge too short");
|
||||
}
|
||||
} else {
|
||||
::logger::root().error("Colinear edges, not applying fillet");
|
||||
ifcopenshell::logger::root().error("Colinear edges, not applying fillet");
|
||||
}
|
||||
i++;
|
||||
j++;
|
||||
}
|
||||
} else {
|
||||
::logger::root().error("Not enough edges for applying fillet");
|
||||
ifcopenshell::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::root().error("Directrix is not polyhedral, ignoring FilletRadius");
|
||||
ifcopenshell::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::root().message(::logger::LOG_WARNING, "Failed to subtract inner radius void for:", l);
|
||||
ifcopenshell::logger::root().message(ifcopenshell::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(ifcopenshell::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(ifcopenshell::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(ifcopenshell::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(ifcopenshell::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::root().warning("Skipping degenerate segment", l);
|
||||
ifcopenshell::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::root().warning("Substituted edge with linear approximation", l);
|
||||
ifcopenshell::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(ifcopenshell::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(ifcopenshell::logger::LOG_NOTICE, "GEO", 299, "Skipping zero sized profile:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ using namespace ifcopenshell::geom;
|
||||
|
||||
namespace {
|
||||
struct POSTFIX_SCHEMA(factory_t) {
|
||||
abstract_mapping* operator()(ifcopenshell::file* file, ifcopenshell::geom::settings& settings, ::logger& logger) const {
|
||||
abstract_mapping* operator()(ifcopenshell::file* file, ifcopenshell::geom::settings& settings, ifcopenshell::logger& logger) const {
|
||||
ifcopenshell::geom::POSTFIX_SCHEMA(mapping)* m = new ifcopenshell::geom::POSTFIX_SCHEMA(mapping)(file, settings, logger);
|
||||
return m;
|
||||
}
|
||||
@@ -774,7 +774,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(ifcopenshell::logger::LOG_ERROR, "GEO", 307, "No operation defined for:", inst);
|
||||
}
|
||||
return item;
|
||||
}
|
||||
@@ -927,7 +927,7 @@ 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(ifcopenshell::logger::LOG_ERROR, "GEO", 311, ss.str());
|
||||
}
|
||||
|
||||
if (!length_unit_encountered) {
|
||||
@@ -1012,7 +1012,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(ifcopenshell::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;
|
||||
@@ -1063,7 +1063,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(ifcopenshell::logger::LOG_WARNING, "GEO", 315, "No axis representation for:", product);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1138,7 +1138,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(ifcopenshell::logger::LOG_WARNING, "GEO", 316, "No single extrusion found in body representation for:", product);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1153,7 +1153,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(ifcopenshell::logger::LOG_ERROR, "GEO", 317, "Failed to convert placement for extrusion of:", product);
|
||||
return false;
|
||||
} else {
|
||||
extrusion_position = m4;
|
||||
@@ -1163,7 +1163,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(ifcopenshell::logger::LOG_ERROR, "GEO", 318, "Failed to convert direction for extrusion of:", product);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,19 +75,19 @@ namespace geom {
|
||||
}
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
logger_.message(::logger::LOG_ERROR, "GEO", 325, std::string(e.what()) + "\nFailed to convert:", inst);
|
||||
logger_.message(ifcopenshell::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(ifcopenshell::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(ifcopenshell::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, ifcopenshell::geom::settings& settings, ::logger& logger = ::logger::root()) : abstract_mapping(settings, logger), file_(file), placement_rel_to_type_(nullptr) {
|
||||
POSTFIX_SCHEMA(mapping)(ifcopenshell::file* file, ifcopenshell::geom::settings& settings, ifcopenshell::logger& logger = ifcopenshell::logger::root()) : abstract_mapping(settings, logger), file_(file), placement_rel_to_type_(nullptr) {
|
||||
initialize_units_();
|
||||
}
|
||||
virtual ifcopenshell::geom::taxonomy::ptr map(const express::base&);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace ifcopenshell {
|
||||
|
||||
namespace {
|
||||
struct POSTFIX_SCHEMA(factory_t) {
|
||||
abstract_mapping* operator()(ifcopenshell::file* file, ifcopenshell::geom::settings& settings, ::logger& logger) const {
|
||||
abstract_mapping* operator()(ifcopenshell::file* file, ifcopenshell::geom::settings& settings, ifcopenshell::logger& logger) const {
|
||||
return new POSTFIX_SCHEMA(mapping)(file, settings, logger);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user