mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
e45b41c04b
I was able to hardcode load an ifc file, by uncommenting the hard coded parse ifcfile, but I was unable to open and load files with the qt menu.
38 lines
920 B
C++
38 lines
920 B
C++
#ifndef PARSEIFCFILE_H
|
|
#define PARSEIFCFILE_H
|
|
|
|
#include "../ifcgeom/Iterator.h"
|
|
#include "osg/Geometry"
|
|
#include "osg/Material"
|
|
#include "osg/MatrixTransform"
|
|
#include "osg/ref_ptr"
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class ParseIfcFile : public QObject {
|
|
|
|
public:
|
|
ParseIfcFile();
|
|
~ParseIfcFile();
|
|
|
|
bool Parse(
|
|
const std::string& filePath,
|
|
std::vector<osg::ref_ptr<osg::MatrixTransform>>& matrixTransforms);
|
|
|
|
private:
|
|
void buildTriangleNodes(
|
|
const std::vector<int>& fVertIds,
|
|
const std::vector<double>& elemVertices,
|
|
const std::vector<double>& elemNormals,
|
|
size_t index,
|
|
osg::ref_ptr<osg::Vec3Array> osgVertices,
|
|
osg::ref_ptr<osg::Vec3Array> osgNormals);
|
|
|
|
osg::ref_ptr<osg::Material> getOsgMaterial(const ifcopenshell::geometry::taxonomy::style::ptr& material);
|
|
};
|
|
|
|
#endif // PARSEIFCFILE_H
|