xBimTeam / XbimEssentials

A .NET library to work with data in the IFC format. This is the core component of the Xbim Toolkit
https://xbimteam.github.io/
Other
477 stars 171 forks source link

IfcAnnotation details? #524

Closed seghier closed 9 months ago

seghier commented 9 months ago

Hello How can we get the details of the annotation dtails IfcAnnotation: (start , end) points and distance value?

i use this but i am not sure about it and what i need to get the details?

private void PrintHierarchy(IIfcObjectDefinition o, int level, DataTable resultTable)
{
    var newRow = resultTable.NewRow();
    newRow["Level"] = level;
    newRow["Name"] = o.Name;
    newRow["Type"] = o.GetType().Name;

    if (o is IfcAnnotation annotation)
    {
        //annotation .....?
    }
.............
.............
}
andyward commented 9 months ago

What are you trying to do? An IfcAnnotation is just a special form of IfcProduct and so will have Representation and ObjectPlacement from the parent. A good way to understand the relationships is to view the model in XbimXplorer

It's a complex area to work in if you're new to IFC and xbim, but take a look at the IFC docs at https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/schema/ifcproductextension/lexical/ifcannotation.htm

seghier commented 9 months ago

You need first check XbimXplorer if can read annotations and show them as dimensions

andyward commented 9 months ago

Closing. No time for time wasters...