mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Reformat commenting, remove prints, and remove BrickStore.project
This commit is contained in:
@@ -319,24 +319,21 @@ class Brick(blenderbim.core.tool.Brick):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def serialize_brick(cls, file_name):
|
def serialize_brick(cls, file_name):
|
||||||
#temporary file path, could either be user selected for "save as" or use the BrickStore.path for simply "save"
|
#temporary file path, could either be user selected for "save as" or use the BrickStore.path for simply "save"
|
||||||
print("Serializing: \"" + file_name + "\" ... ")
|
|
||||||
cwd = os.path.dirname(os.path.realpath(__file__))
|
cwd = os.path.dirname(os.path.realpath(__file__))
|
||||||
dest = os.path.join(cwd, "..", "bim", "schema", file_name)
|
dest = os.path.join(cwd, "..", "bim", "schema", file_name)
|
||||||
BrickStore.get_project().serialize(destination=dest, format="turtle")
|
BrickStore.get_project().serialize(destination=dest, format="turtle")
|
||||||
print("finished!")
|
|
||||||
|
|
||||||
class BrickStore:
|
class BrickStore:
|
||||||
schema = None # this is now a os path
|
schema = None # this is now a os path
|
||||||
graph = None # this is the VersionedGraphCollection with 2 arbitrarily named graphs: "schema" and "project"
|
path = None # file path if the project was loaded in
|
||||||
# "schema" holds the Brick.ttl metadata; "project" holds all the authored entities
|
graph = None # this is the VersionedGraphCollection with 2 arbitrarily named graphs: "schema" and "project"
|
||||||
project = None # this is the graph named "project" from the VersionedGraphCollection
|
# "SCHEMA" holds the Brick.ttl metadata; "PROJECT" holds all the authored entities
|
||||||
path = None
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def purge():
|
def purge():
|
||||||
BrickStore.schema = None
|
BrickStore.schema = None
|
||||||
BrickStore.graph = None
|
BrickStore.graph = None
|
||||||
BrickStore.project = None
|
|
||||||
BrickStore.path = None
|
BrickStore.path = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user