- Provide logging information to IfcBlender

- Disallow open curves for IfcPolygonalBoundedHalfSpace [fixes #3405490 Incorrectly rendered wall in FZK-Haus-EliteCAD.ifc]
- Disable tolerance on IfcCompositeCurve
- Try to convert IfcConnectedFaceSets to TopoDS_Solids regardless of whether they are open or closed shells, improves openings in IFC files exported by Revit
- Provide debugging information based on shape volume on IfcBooleanClippingResult and IfcOpeningElement
This commit is contained in:
Thomas Krijnen
2011-10-12 16:43:29 +00:00
parent e6c5e5e10c
commit 34efb480d6
11 changed files with 78 additions and 25 deletions
+13 -2
View File
@@ -677,10 +677,11 @@ void Ifc::Dispose() {
bytype.clear();
byid.clear();
byref.clear();
file->Close();
file->Close();
delete file;
delete tokens;
offsets.clear();
log_stream.clear();
}
float UnitPrefixToValue( Ifc2x3::IfcSIPrefix::IfcSIPrefix v ) {
@@ -702,13 +703,22 @@ float UnitPrefixToValue( Ifc2x3::IfcSIPrefix::IfcSIPrefix v ) {
else if ( v == Ifc2x3::IfcSIPrefix::ATTO ) return (float) 1e-18;
else return 1.0f;
}
void Ifc::SetOutput(std::ostream* l1, std::ostream* l2) { log1 = l1; log2 = l2; }
void Ifc::SetOutput(std::ostream* l1, std::ostream* l2) {
log1 = l1;
log2 = l2;
if ( ! log2 ) {
log2 = &log_stream;
}
}
void Ifc::LogMessage(const std::string& type, const std::string& message, const IfcAbstractEntityPtr entity) {
if ( log2 ) {
(*log2) << "[" << type << "] " << message << std::endl;
if ( entity ) (*log2) << entity->toString() << std::endl;
}
}
std::string Ifc::GetLog() {
return log_stream.str();
}
File* Ifc::file = 0;
std::ostream* Ifc::log1 = 0;
@@ -722,3 +732,4 @@ MapEntitiesByType Ifc::bytype;
MapEntityById Ifc::byid;
MapEntitiesByRef Ifc::byref;
MapOffsetById Ifc::offsets;
std::stringstream Ifc::log_stream;