Closed carlosbritoccg closed 5 years ago
Hi @carlosbritoccg, this sounds like an exciting application and I'm glad you have chosen xBIM for this. Your code seems to be all right at first look. The only place you might want to check is the part where you are selecting an existing model context:
var modelContext = model.Instances.OfType<IfcGeometricRepresentationContext>().FirstOrDefault();
IFC models often contain more than one context and bounding boxes are only expected to exist in some of them. So, if the processing applications uses contexts to filter what it is importing, it might be filtered out if you use the wrong one.
At the same time I can imagine that Revit might just ignore the bounding box completely because it doesn't have any direct equivalent in its data model and might be assumed to only be a generalised representation for an object with more detailed representation in other geometry context.
You would need to check Revit importer to find out if it supports import of bounding boxes at all. It would be great if you could publish your findings in this thread if you find anything interesting.
Hello Carlos, I think that the problem is that you're using a bounding box. You should use a sphere as representation and also tag the 3D annotation with the correct RepresentationType and RepresentationIdentifier. See the IFC manual on 3D annotations for that.
PS: Also working from ccg. :-p
Hello,
We're developing an MR application (with Microsoft's HoloLens) that allows for adding 3D annotations to an architectural model. These annotations are attached to particular elements in the building (such as walls or doors) and as such, have a specific position within them, as well as informative text. We represent the annotation itself with an instance of the IfcAnnotation class with an IfcShapeRepresentation (IfcBoundingBox) for geometry. This annotation is correctly represented when opening the IFC file in xBimXplorer, however other applications, such as Autodesk Revit or BIM vision ignore it (actually BIM vision is aware of the annotation, but considers that it doesn't have a geometric representation or placement). We would like to know if there's something we might be missing in our code, or if something we're doing is not standard.
Steps (or code) to reproduce the issue:
We include the relevant code of our application:
Minimal file to reproduce the issue:
This is an annotated file, as output of the above program. annotated.zip
Expected behavior:
We would like to visualize the annotation with other software.
Actual behavior or exception details:
Autodesk Revit fully ignores the annotation, while BIM vision displays the annotation without geometrical representation or placement.