aothms / ifc-usdj

.usda to json transformer and ThreeJS-based visualizer
2 stars 2 forks source link

Missing IFC to USD mapping ifcOpenShell script? #1

Open SeanSnyders opened 3 months ago

SeanSnyders commented 3 months ago

Hi @aothms , The readme mentions mapping from IFC to USD using ifcOpenShell, but the repo does not seem to contain this script / mapping. It would be good to see what you have used there to generate the image in the readme. Thanks!

aothms commented 3 months ago

Hi Sean, Thanks for your interest in this. I'd be happy to organize a way to have more people look into this. There is a C++ USD serializer in IfcOpenShell which means you can use IfcConvert to convert from .ifc to .usda. However, we never really found a way to package USD in our daily builds. Mostly because it relies environment variables and supplementary data that makes it somewhat hard to make portable without something like an installer which we currently don't have for ifcopenshell. So getting access to this functionality currently relies on compiling yourself, which is a

Also note that this is not a full mapping yet, it's mostly a serialization of interpreted triangulated geometry coming from IFC (because that's what the other serializers in IfcConvert do). I do plan to take a thorough look at USD schemas and see if we can make some strategic modular mappings to retain 90% of the IFC semantics on the spatial structure + properties + materials side with minimal complexity.

The background to this is IFC5, where I'm advocating for an "explicit geometry first" approach. Start from explicit face sets and superimpose the necessary additional representations and semantic data to be able to reconstruct and validate the design intent.

Let me know if based on this you envision any next steps and what I can do to help.

https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.8.0/src/serializers/USDSerializer.cpp