mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
typing
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user