mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
typing
This commit is contained in:
@@ -40,11 +40,11 @@ from logging import Logger
|
||||
|
||||
|
||||
class IfcExporter:
|
||||
def __init__(self, ifc_export_settings):
|
||||
def __init__(self, ifc_export_settings: IfcExportSettings):
|
||||
self.ifc_export_settings = ifc_export_settings
|
||||
|
||||
def export(self):
|
||||
self.file = IfcStore.get_file()
|
||||
self.file = tool.Ifc.get()
|
||||
self.set_header()
|
||||
IfcStore.update_cache()
|
||||
self.sync_all_objects()
|
||||
|
||||
@@ -28,6 +28,12 @@ if TYPE_CHECKING:
|
||||
def edit_object_placement(
|
||||
ifc: tool.Ifc, geometry: tool.Geometry, surveyor: tool.Surveyor, obj: Optional[bpy.types.Object] = None
|
||||
) -> None:
|
||||
"""Sync current object placement.
|
||||
|
||||
- apply and clear object scale;
|
||||
- write current object position to IFC;
|
||||
- update position checksums;
|
||||
"""
|
||||
element = ifc.get_entity(obj)
|
||||
if not element:
|
||||
return
|
||||
|
||||
@@ -82,7 +82,11 @@ class Geometry(bonsai.core.tool.Geometry):
|
||||
|
||||
@classmethod
|
||||
def clear_scale(cls, obj: bpy.types.Object) -> None:
|
||||
# Note that clearing scale has no impact on cameras.
|
||||
"""Apply and clear object scale.
|
||||
|
||||
If it's a mesh object, scale will be applied to it's mesh.
|
||||
Note that clearing scale has no impact on cameras.
|
||||
"""
|
||||
if cls.is_scaled(obj):
|
||||
if not obj.data:
|
||||
location, rotation, _ = obj.matrix_world.decompose()
|
||||
|
||||
Reference in New Issue
Block a user