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

Function getBcfViewpoints

src/bonsai/bonsai/bim/module/bcf/prop.py:93–103  ·  view source on GitHub ↗
(self, context, force_update=False)

Source from the content-addressed store, hash-verified

91
92
93def getBcfViewpoints(self, context, force_update=False):
94 global bcfviewpoints_enum
95 if bcfviewpoints_enum is None or force_update: # Retrieving Viewpoints is slow. Make sure we only do when needed
96 bcfviewpoints_enum = []
97 props = tool.Bcf.get_bcf_props()
98 bcfxml = bcfstore.BcfStore.get_bcfxml()
99 assert bcfxml
100 topic = props.active_topic
101 viewpoints = bcfxml.topics[topic.name].viewpoints.keys() if topic else []
102 bcfviewpoints_enum.extend([(v, f"Viewpoint {i+1}", "") for i, v in enumerate(viewpoints)])
103 return bcfviewpoints_enum
104
105
106class BcfBimSnippet(PropertyGroup):

Callers 2

refreshBcfTopicFunction · 0.85
BcfTopicClass · 0.85

Calls 4

get_bcf_propsMethod · 0.80
get_bcfxmlMethod · 0.80
keysMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected