bcf.v3.topic

BCF XML V3 Topic handler.

Module Contents

class bcf.v3.topic.TopicHandler(topic_dir: zipfile.Path | None = None, xml_handler: bcf.xml_parser.AbstractXmlParserSerializer | None = None)

BCF Topic and related objects handler.

property bim_snippet: bytes | None
property comments: list[bcf.v3.model.Comment]

Return the comments of the topic.

property guid: str | None

Return the GUID of the topic.

property header: bcf.v3.model.Header | None

Return the header of the topic.

property markup: bcf.v3.model.Markup | None
property topic: bcf.v3.model.Topic

Return the Topic object.

property viewpoints: dict[str, bcf.v3.visinfo.VisualizationInfoHandler]
add_viewpoint(element: ifcopenshell.entity_instance) None

Add a viewpoint tergeting an IFC element to the topic.

Args:

element: The IFC element.

add_viewpoint_from_point_and_guids(position: numpy.typing.NDArray[numpy.float_], *guids: str) None

Add a viewpoint tergeting an IFC element to the topic.

Args:

element: The IFC element.

add_visinfo_handler(new_viewpoint: bcf.v3.visinfo.VisualizationInfoHandler) None
classmethod create_new(title: str, description: str, author: str, topic_type: str = '', topic_status: str = '', xml_handler: bcf.xml_parser.AbstractXmlParserSerializer | None = None) TopicHandler

Create a new BCF topic.

Args:

title: The title of the topic. description: The description of the topic. author: The author of the topic. topic_type: The type of the topic. topic_status: The status of the topic. xml_handler: The XML parser/serializer to use.

Returns:

The BCF topic definition.

save(destination_zip: bcf.inmemory_zipfile.ZipFileInterface) None

Save the topic to a BCF zip file.

Args:

bcf_zip: The BCF zip file to save to.