Как получить абсолютные координаты объекта IFC?

Я разрабатываю небольшой Java API, который манипулирует объектами IFC (Industry Foundation Class). Для этого я использую внешние инструменты, такие как BIMserver.

Прямо сейчас я пытаюсь получить координаты каждого объекта, который является экземпляром IfcProduct. Однако я просто получаю относительные координаты другого IfcProduct через IfcLocalPlacement, а не абсолютные координаты объекта. Следовательно, референтом для каждого объекта является сущность, в которой он содержится.

Моя цель - рассчитать расстояние между объектами IFC (просто чтобы показать информацию пользователю, я не пытаюсь визуализировать объекты и т.д.). Например, расстояние между IfcSpace и IfcDistributionControlElement.

Кто-нибудь знает, как получить абсолютные координаты (не относительные координаты) каждого объекта IFC? Если вы знаете какие-то API или библиотеки, которые могли бы мне помочь, вы тоже можете их прислать.


person J. Taylor    schedule 16.07.2016    source источник


Ответы (1)


Вам нужно применить/сложить все разные IfcLocalPlacement в дереве, пока не достигнете IfcProject контейнера. Вы также можете найти объяснение здесь, в документации для IFC2X3 и здесь, в документы для IFC4 (насколько я вижу, спецификации для IfcLocalPlacement не изменились):

Следующие соглашения должны применяться в качестве относительных позиций по умолчанию, если используется относительное размещение. Соглашения даны для всех пяти прямых подтипов IfcProduct, IfcSpatialStructureElement, IfcElement, IfcAnnotation, IfcGrid, IfcPort. Более подробная информация о размещении дана на уровне подтипов этих пяти упомянутых типов.

  • For the subtypes of IfcSpatialStructureElement the following conventions apply
    • IfcSite shall be placed absolutely within the world coordinate system established by the geometric representation context of the IfcProject
    • IfcBuilding должен быть размещен относительно локального размещения IfcSite
    • IfcBuildingStorey должен быть размещен относительно локального размещения IfcBuilding
  • For IfcGrid and IfcAnnotation the convention applies that it shall be placed relative
    • to the local placement of its container (IfcSite, IfcBuilding, IfcBuildingStorey)
      • it should be the same container element that is referenced by the IfcRelContainedInSpatialStructure containment relationship,
  • For IfcPort the convention applies that it shall be placed relative
    • to the local placement of the element it belongs to (IfcElement)
      • it should be the same element that is referenced by the IfcRelConnectsPortToElement connection relationship,
  • For IfcElement the convention applies that it shall be placed relative:
    • to the local placement of its container (IfcSite, IfcBuilding, IfcBuildingStorey)
      • it should be the same container element that is referenced by the IfcRelContainedInSpatialStructure containment relationship,
    • to the local placement of the IfcElement to which it is tied by an element composition relationship
      • for features that are located relative to the main component (such as openings), as expressed by IfcRelVoidsElement and IfcRelProjectsElement,
      • для элементов, которые заполняют проем (например, двери или окна), как указано IfcRelFillsElement,
      • для покрытий, которые покрывают элемент, выраженный IfcRelCoversBldgElements,
      • для подкомпонентов, объединенных с основным компонентом, что выражается IfcRelAggregates и IfcRelNests)
person Wilt    schedule 23.08.2016