mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
Implemented: Application icons; OpenSceneGraph to handle OpenGL with Qt; devicePixelRatio() for handing render on highDPI displays; Sample 3D with handler; MouseHandler not yet working as expected (WIP)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "ParseIfcFile.h"
|
||||
#include "MessageLogger.h"
|
||||
|
||||
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
|
||||
|
||||
@@ -6,11 +7,6 @@ ParseIfcFile::ParseIfcFile() {}
|
||||
|
||||
ParseIfcFile::~ParseIfcFile() {}
|
||||
|
||||
void ParseIfcFile::outputMsg(const std::string& msg)
|
||||
{
|
||||
emit parsingInfo(QString::fromStdString(msg));
|
||||
}
|
||||
|
||||
void ParseIfcFile::Parse(const std::string& filePath)
|
||||
{
|
||||
IfcParse::IfcFile file(filePath);
|
||||
@@ -21,7 +17,7 @@ void ParseIfcFile::Parse(const std::string& filePath)
|
||||
|
||||
IfcGeom::Iterator* it = new IfcGeom::Iterator(settings, &file);
|
||||
if (!it->initialize()) {
|
||||
outputMsg("Error: Iterator failed to initialize! Aborting.");
|
||||
MessageLogger::log("Error: Iterator failed to initialize! Aborting.");
|
||||
delete it;
|
||||
return;
|
||||
}
|
||||
@@ -29,14 +25,14 @@ void ParseIfcFile::Parse(const std::string& filePath)
|
||||
do {
|
||||
//const IfcGeom::BRepElement* bRepElem = it->get_native();
|
||||
const IfcGeom::TriangulationElement* triElem = static_cast<const IfcGeom::TriangulationElement*>(it->get());
|
||||
outputMsg(triElem->type() + ": " + triElem->name());
|
||||
MessageLogger::log(triElem->type() + ": " + triElem->name());
|
||||
|
||||
const boost::shared_ptr<IfcGeom::Representation::Triangulation>& triElemGeom = triElem->geometry_pointer();
|
||||
|
||||
// materials
|
||||
const std::vector<IfcGeom::Material>& elemMats = triElemGeom->materials();
|
||||
for (auto mat : elemMats) {
|
||||
outputMsg(" " + mat.original_name());
|
||||
MessageLogger::log(" " + mat.original_name());
|
||||
}
|
||||
} while (it->next());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user