This commit is contained in:
Andrej730
2024-12-20 18:30:43 +05:00
parent 579628fcb1
commit a79c4b1ace
9 changed files with 63 additions and 45 deletions
@@ -18,9 +18,10 @@
import datetime
import ifcopenshell
import ifcopenshell.util.schema
def create_file(version: str = "IFC4") -> ifcopenshell.file:
def create_file(version: ifcopenshell.util.schema.IFC_SCHEMA = "IFC4") -> ifcopenshell.file:
"""Create a blank IFC model file object
Create a new IFC file object based on the nominated schema version. The
@@ -34,9 +35,7 @@ def create_file(version: str = "IFC4") -> ifcopenshell.file:
:param version: The schema version of the IFC file. Choose from
"IFC2X3", "IFC4", or "IFC4X3". If you have loaded in a custom
schema, you may specify that schema identifier here too.
:type version: str, optional
:return: The created IFC file object.
:rtype: ifcopenshell.file
Example:
+1 -3
View File
@@ -222,7 +222,7 @@ class file:
def __init__(
self,
f: Optional[ifcopenshell_wrapper.file] = None,
schema: Optional[str] = None,
schema: Optional[ifcopenshell.util.schema.IFC_SCHEMA] = None,
schema_version: Optional[tuple[int, int, int, int]] = None,
):
"""Create a new blank IFC model
@@ -239,7 +239,6 @@ class file:
or "IFC4X3". These refer to the ISO approved versions of IFC.
Defaults to "IFC4" if not specified, which is currently recommended
for all new projects.
:type schema: string
:param schema_version: If you want to specify an exact version of IFC
that may not be an ISO approved version, use this argument instead
of ``schema``. IFC versions on technical.buildingsmart.org are
@@ -248,7 +247,6 @@ class file:
ADD2 TC1, which is the official version approved by ISO when people
refer to "IFC4". Generally you should not use this argument unless
you are testing non-ISO IFC releases.
:type schema_version: tuple[int, int, int, int]
Example: