MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / loadFile

Method loadFile

src/qtviewer/IfcViewerWidget.cpp:143–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143void IfcViewerWidget::loadFile(const std::string& filePath)
144{
145 std::vector<osg::ref_ptr<osg::MatrixTransform>> matrixTransforms;
146
147 if(!m_parser.Parse(filePath, matrixTransforms)) {
148 MessageLogger::log("Failed to prepare IFC geometry");
149 return;
150 }
151
152 MessageLogger::log("\nIFC geometry prepared");
153
154 for (auto matrixTransform : matrixTransforms) {
155 root->addChild(matrixTransform);
156 }
157
158 // set initial camera position
159 orientScene(root);
160
161 // request redraw
162 update();
163}
164
165void IfcViewerWidget::orientScene(osg::ref_ptr<osg::Group> rootGroup)
166{

Callers

nothing calls this directly

Calls 1

ParseMethod · 0.80

Tested by

no test coverage detected