MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / load

Method load

src/bcf/bcf/v3/visinfo.py:57–79  ·  view source on GitHub ↗

Load the VisualizationInfo and related objects from a BCF zip file. Args: topic_dir: The directory in the BCF zip file to load from. vpt: The ViewPoint to load. xml_handler: The XML handler to use to parse the VisualizationInfo. Returns:

(
        cls,
        topic_dir: zipfile.Path,
        vpt: mdl.ViewPoint,
        xml_handler: Optional[AbstractXmlParserSerializer] = None,
    )

Source from the content-addressed store, hash-verified

55
56 @classmethod
57 def load(
58 cls,
59 topic_dir: zipfile.Path,
60 vpt: mdl.ViewPoint,
61 xml_handler: Optional[AbstractXmlParserSerializer] = None,
62 ) -> Optional["VisualizationInfoHandler"]:
63 """
64 Load the VisualizationInfo and related objects from a BCF zip file.
65
66 Args:
67 topic_dir: The directory in the BCF zip file to load from.
68 vpt: The ViewPoint to load.
69 xml_handler: The XML handler to use to parse the VisualizationInfo.
70
71 Returns:
72 The VisualizationInfoHandler object.
73 """
74 visinfo = cls._load_visinfo(topic_dir, vpt.viewpoint, xml_handler)
75 if not visinfo:
76 return None
77 snapshot = cls._load_snapshot(topic_dir, vpt.snapshot)
78 bitmaps = cls._load_bitmaps(topic_dir, visinfo)
79 return cls(visinfo, snapshot, bitmaps, xml_handler)
80
81 @staticmethod
82 def _load_visinfo(

Callers 1

from_topic_viewpointsMethod · 0.45

Calls 3

_load_visinfoMethod · 0.45
_load_snapshotMethod · 0.45
_load_bitmapsMethod · 0.45

Tested by

no test coverage detected