mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 00:03:17 +00:00
Cmake install config fixes
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include INCLUDE_SCHEMA_DEFINITIONS(ifcparse/schemas, IfcSchema)
|
||||
|
||||
#include "ifcparse/hierarchy_helper.h"
|
||||
#include "plugin/plugin.h"
|
||||
|
||||
#include "../ifcgeom/Serialization/Serialization.h"
|
||||
|
||||
@@ -62,6 +63,10 @@ void createGroundShape(TopoDS_Shape& shape);
|
||||
|
||||
int main() {
|
||||
|
||||
#ifdef IFCOPENSHELL_EXAMPLE_PLUGIN_PATH
|
||||
ifcopenshell::plugin::set_search_paths({IFCOPENSHELL_EXAMPLE_PLUGIN_PATH});
|
||||
#endif
|
||||
|
||||
// The hierarchy_helper is a subclass of the regular file that provides several
|
||||
// convenience functions for working with geometry in IFC files.
|
||||
hierarchy_helper<IfcSchema> file;
|
||||
@@ -99,8 +104,8 @@ int main() {
|
||||
auto building_shape = IfcGeom::serialise(file, building_shell, false).as<IfcSchema::IfcProductDefinitionShape>();
|
||||
|
||||
file.add_entity(building_shape);
|
||||
auto rep = building_shape.Representations().begin();
|
||||
rep->setContextOfItems(file.getRepresentationContext("model"));
|
||||
auto building_representations = building_shape.Representations();
|
||||
building_representations.front().setContextOfItems(file.getRepresentationContext("model"));
|
||||
|
||||
building.setRepresentation(building_shape);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user