BCF XML V3 Topic handler.

Module Contents#

class bcf.v3.topic.TopicHandler(topic_dir: Optional[zipfile.Path] = None, xml_handler: Optional[bcf.xml_parser.AbstractXmlParserSerializer] = None)#

BCF Topic and related objects handler.

__eq__(self, other: object) bool | NoReturn#

Return self==value.

_load_bim_snippet(self) Optional[bytes]#
_save_bim_snippet(self, destination_zip: bcf.inmemory_zipfile.ZipFileInterface) None#
_save_viewpoints(self, destination_zip: bcf.inmemory_zipfile.ZipFileInterface, topic_dir: str) None#
_save_xml(self, destination_zip: bcf.inmemory_zipfile.ZipFileInterface, item: Any, target: str) None#
add_viewpoint(self, element: ifcopenshell.entity_instance) None#

Add a viewpoint tergeting an IFC element to the topic.


element: The IFC element.

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

Add a viewpoint tergeting an IFC element to the topic.


element: The IFC element.

add_visinfo_handler(self, new_viewpoint: bcf.v3.visinfo.VisualizationInfoHandler) None#
property bim_snippet(self) Optional[bytes]#
property comments(self) list[bcf.v3.model.Comment]#

Return the comments of the topic.

classmethod create_new(cls, title: str, description: str, author: str, topic_type: str = '', topic_status: str = '', xml_handler: Optional[bcf.xml_parser.AbstractXmlParserSerializer] = None) TopicHandler#

Create a new BCF topic.


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.


The BCF topic definition.

property guid(self) Optional[str]#

Return the GUID of the topic.

property header(self) Optional[bcf.v3.model.Header]#

Return the header of the topic.

property markup(self) Optional[bcf.v3.model.Markup]#
save(self, destination_zip: bcf.inmemory_zipfile.ZipFileInterface) None#

Save the topic to a BCF zip file.


bcf_zip: The BCF zip file to save to.

property topic(self) bcf.v3.model.Topic#

Return the Topic object.

property viewpoints(self) dict[str, bcf.v3.visinfo.VisualizationInfoHandler]#