Same for LogDebug -> LogVerboseDebug

pull/3232/head
Malcolm Tyrrell 2020-05-18 11:55:14 +01:00
parent df2630d0e8
commit 14692368d5
8 changed files with 27 additions and 15 deletions

View File

@ -2719,7 +2719,7 @@ void FBXConverter::GenerateNodeAnimations(std::vector<aiNodeAnim *> &node_anims,
if (doc.Settings().optimizeEmptyAnimationCurves && if (doc.Settings().optimizeEmptyAnimationCurves &&
IsRedundantAnimationData(target, comp, (chain[i]->second))) { IsRedundantAnimationData(target, comp, (chain[i]->second))) {
FBXImporter::LogDebug("dropping redundant animation channel for node " + target.Name()); FBXImporter::LogVerboseDebug("dropping redundant animation channel for node " + target.Name());
continue; continue;
} }

View File

@ -221,7 +221,7 @@ void ProcessBooleanHalfSpaceDifference(const Schema_2x3::IfcHalfSpaceSolid *hs,
result.mVerts.pop_back(); result.mVerts.pop_back();
} }
} }
IFCImporter::LogDebug("generating CSG geometry by plane clipping (IfcBooleanClippingResult)"); IFCImporter::LogVerboseDebug("generating CSG geometry by plane clipping (IfcBooleanClippingResult)");
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -658,7 +658,7 @@ void ProcessPolygonalBoundedBooleanHalfSpaceDifference(const Schema_2x3::IfcPoly
} }
} }
} }
IFCImporter::LogDebug("generating CSG geometry by plane clipping with polygonal bounding (IfcBooleanClippingResult)"); IFCImporter::LogVerboseDebug("generating CSG geometry by plane clipping with polygonal bounding (IfcBooleanClippingResult)");
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -706,7 +706,7 @@ void ProcessBooleanExtrudedAreaSolidDifference(const Schema_2x3::IfcExtrudedArea
vit += pcount; vit += pcount;
} }
IFCImporter::LogDebug("generating CSG geometry by geometric difference to a solid (IfcExtrudedAreaSolid)"); IFCImporter::LogVerboseDebug("generating CSG geometry by geometric difference to a solid (IfcExtrudedAreaSolid)");
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------

View File

@ -223,7 +223,7 @@ public:
} }
if ( (std::string)curveSegment.Transition != "CONTINUOUS" ) { if ( (std::string)curveSegment.Transition != "CONTINUOUS" ) {
IFCImporter::LogDebug("ignoring transition code on composite curve segment, only continuous transitions are supported"); IFCImporter::LogVerboseDebug("ignoring transition code on composite curve segment, only continuous transitions are supported");
} }
curves.push_back( CurveEntry(bc,IsTrue(curveSegment.SameSense)) ); curves.push_back( CurveEntry(bc,IsTrue(curveSegment.SameSense)) );

View File

@ -319,7 +319,7 @@ void ProcessRevolvedAreaSolid(const Schema_2x3::IfcRevolvedAreaSolid& solid, Tem
ConvertAxisPlacement(trafo, solid.Position); ConvertAxisPlacement(trafo, solid.Position);
result.Transform(trafo); result.Transform(trafo);
IFCImporter::LogDebug("generate mesh procedurally by radial extrusion (IfcRevolvedAreaSolid)"); IFCImporter::LogVerboseDebug("generate mesh procedurally by radial extrusion (IfcRevolvedAreaSolid)");
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -457,7 +457,7 @@ void ProcessSweptDiskSolid(const Schema_2x3::IfcSweptDiskSolid &solid, TempMesh&
} }
} }
IFCImporter::LogDebug("generate mesh procedurally by sweeping a disk along a curve (IfcSweptDiskSolid)"); IFCImporter::LogVerboseDebug("generate mesh procedurally by sweeping a disk along a curve (IfcSweptDiskSolid)");
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -660,7 +660,7 @@ void ProcessExtrudedArea(const Schema_2x3::IfcExtrudedAreaSolid& solid, const Te
IFCImporter::LogWarn("failed to resolve all openings, presumably their topology is not supported by Assimp"); IFCImporter::LogWarn("failed to resolve all openings, presumably their topology is not supported by Assimp");
} }
IFCImporter::LogDebug("generate mesh procedurally by extrusion (IfcExtrudedAreaSolid)"); IFCImporter::LogVerboseDebug("generate mesh procedurally by extrusion (IfcExtrudedAreaSolid)");
// If this is an opening element, store both the extruded mesh and the 2D profile mesh // If this is an opening element, store both the extruded mesh and the 2D profile mesh
// it was created from. Return an empty mesh to the caller. // it was created from. Return an empty mesh to the caller.

View File

@ -641,14 +641,14 @@ aiNode *ProcessSpatialStructure(aiNode *parent, const Schema_2x3::IfcProduct &el
bool skipGeometry = false; bool skipGeometry = false;
if (conv.settings.skipSpaceRepresentations) { if (conv.settings.skipSpaceRepresentations) {
if (el.ToPtr<Schema_2x3::IfcSpace>()) { if (el.ToPtr<Schema_2x3::IfcSpace>()) {
IFCImporter::LogDebug("skipping IfcSpace entity due to importer settings"); IFCImporter::LogVerboseDebug("skipping IfcSpace entity due to importer settings");
skipGeometry = true; skipGeometry = true;
} }
} }
if (conv.settings.skipAnnotations) { if (conv.settings.skipAnnotations) {
if (el.ToPtr<Schema_2x3::IfcAnnotation>()) { if (el.ToPtr<Schema_2x3::IfcAnnotation>()) {
IFCImporter::LogDebug("skipping IfcAnnotation entity due to importer settings"); IFCImporter::LogVerboseDebug("skipping IfcAnnotation entity due to importer settings");
return nullptr; return nullptr;
} }
} }
@ -856,7 +856,7 @@ void ProcessSpatialStructures(ConversionData &conv) {
if (!prod) { if (!prod) {
continue; continue;
} }
IFCImporter::LogDebug("looking at spatial structure `" + (prod->Name ? prod->Name.Get() : "unnamed") + "`" + (prod->ObjectType ? " which is of type " + prod->ObjectType.Get() : "")); IFCImporter::LogVerboseDebug("looking at spatial structure `" + (prod->Name ? prod->Name.Get() : "unnamed") + "`" + (prod->ObjectType ? " which is of type " + prod->ObjectType.Get() : ""));
// the primary sites are referenced by an IFCRELAGGREGATES element which assigns them to the IFCPRODUCT // the primary sites are referenced by an IFCRELAGGREGATES element which assigns them to the IFCPRODUCT
const STEP::DB::RefMap &refs = conv.db.GetRefs(); const STEP::DB::RefMap &refs = conv.db.GetRefs();
@ -868,7 +868,7 @@ void ProcessSpatialStructures(ConversionData &conv) {
// comparing pointer values is not sufficient, we would need to cast them to the same type first // comparing pointer values is not sufficient, we would need to cast them to the same type first
// as there is multiple inheritance in the game. // as there is multiple inheritance in the game.
if (def.GetID() == prod->GetID()) { if (def.GetID() == prod->GetID()) {
IFCImporter::LogDebug("selecting this spatial structure as root structure"); IFCImporter::LogVerboseDebug("selecting this spatial structure as root structure");
// got it, this is one primary site. // got it, this is one primary site.
nodes.push_back(ProcessSpatialStructure(NULL, *prod, conv, NULL)); nodes.push_back(ProcessSpatialStructure(NULL, *prod, conv, NULL));
} }

View File

@ -1359,7 +1359,7 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
break; break;
} }
else { else {
IFCImporter::LogDebug("merging overlapping openings"); IFCImporter::LogVerboseDebug("merging overlapping openings");
ExtractVerticesFromClipper(poly[0].outer, temp_contour, false); ExtractVerticesFromClipper(poly[0].outer, temp_contour, false);
// Generate the union of the bounding boxes // Generate the union of the bounding boxes

View File

@ -162,7 +162,7 @@ void TempMesh::RemoveDegenerates()
} }
if(drop) { if(drop) {
IFCImporter::LogDebug("removing degenerate faces"); IFCImporter::LogVerboseDebug("removing degenerate faces");
} }
} }
@ -437,7 +437,7 @@ void TempMesh::RemoveAdjacentDuplicates() {
base += cnt; base += cnt;
} }
if(drop) { if(drop) {
IFCImporter::LogDebug("removing duplicate vertices"); IFCImporter::LogVerboseDebug("removing duplicate vertices");
} }
} }

View File

@ -94,6 +94,12 @@ public:
} }
} }
static void LogVerboseDebug(const Formatter::format& message) {
if (!DefaultLogger::isNullLogger()) {
ASSIMP_LOG_VERBOSE_DEBUG(Prefix()+(std::string)message);
}
}
// https://sourceforge.net/tracker/?func=detail&atid=1067632&aid=3358562&group_id=226462 // https://sourceforge.net/tracker/?func=detail&atid=1067632&aid=3358562&group_id=226462
#if !defined(__GNUC__) || !defined(__APPLE__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) #if !defined(__GNUC__) || !defined(__APPLE__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
@ -125,6 +131,12 @@ public:
} }
} }
// ------------------------------------------------------------------------------------------------
static void LogVerboseDebug (const char* message) {
if (!DefaultLogger::isNullLogger()) {
LogVerboseDebug(Formatter::format(message));
}
}
#endif #endif
private: private: