mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
black .
This commit is contained in:
@@ -160,7 +160,7 @@ class BIMBSDDProperties(PropertyGroup):
|
||||
default=False,
|
||||
)
|
||||
classification_psets: CollectionProperty(name="Classification Psets", type=BSDDPset)
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
active_dictionary: str
|
||||
active_dictionary: str
|
||||
@@ -179,7 +179,7 @@ class BIMBSDDProperties(PropertyGroup):
|
||||
should_filter_ifc_class: bool
|
||||
use_only_ifc_properties: bool
|
||||
classification_psets: bpy.types.bpy_prop_collection_idprop[BSDDPset]
|
||||
|
||||
|
||||
@property
|
||||
def active_class(self) -> Union[BSDDClassification, None]:
|
||||
return tool.Blender.get_active_uilist_element(self.classes, self.active_class_index)
|
||||
|
||||
@@ -83,6 +83,7 @@ class BIM_PT_bsdd(Panel):
|
||||
row = self.layout.row()
|
||||
row.operator("bim.load_bsdd_dictionaries")
|
||||
|
||||
|
||||
class BIM_UL_bsdd_dictionaries(UIList):
|
||||
def draw_item(
|
||||
self,
|
||||
|
||||
@@ -3871,7 +3871,6 @@ class AddReferenceImage(bpy.types.Operator, tool.Ifc.Operator, ImportHelper):
|
||||
layout.prop(self, "x_length")
|
||||
layout.prop(self, "y_length")
|
||||
|
||||
|
||||
def _execute(self, context):
|
||||
project_props = tool.Project.get_project_props()
|
||||
project_props.load_indexed_maps = self.show_texture_solid_mode
|
||||
@@ -3900,7 +3899,7 @@ class AddReferenceImage(bpy.types.Operator, tool.Ifc.Operator, ImportHelper):
|
||||
unit_scale = ifcopenshell.util.unit.calculate_unit_scale(ifc_file)
|
||||
hx = self.x_length * 0.5 / unit_scale
|
||||
hy = self.y_length * 0.5 / unit_scale
|
||||
verts = [(-hx, -hy, 0.0), ( hx, -hy, 0.0), ( hx, hy, 0.0), (-hx, hy, 0.0)]
|
||||
verts = [(-hx, -hy, 0.0), (hx, -hy, 0.0), (hx, hy, 0.0), (-hx, hy, 0.0)]
|
||||
item = builder.mesh(verts, [[0, 1, 2, 3]])
|
||||
|
||||
ifc_context = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Body", "MODEL_VIEW")
|
||||
|
||||
@@ -897,7 +897,7 @@ class OverrideDelete(bpy.types.Operator):
|
||||
|
||||
if not is_valid_data_block:
|
||||
continue
|
||||
|
||||
|
||||
element = tool.Ifc.get_entity(obj)
|
||||
if element:
|
||||
if tool.Geometry.is_locked(element):
|
||||
|
||||
@@ -658,7 +658,8 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences):
|
||||
name="Load Test Dictionaries", description="Load dictionaries that are for testing only", default=False
|
||||
)
|
||||
bsdd_baseurl: StringProperty(
|
||||
name="bSDD API Base URL", description="Base URL for data dictionary API requests, e.g. https://api.bsdd.buildingsmart.org/api/",
|
||||
name="bSDD API Base URL",
|
||||
description="Base URL for data dictionary API requests, e.g. https://api.bsdd.buildingsmart.org/api/",
|
||||
default="https://api.bsdd.buildingsmart.org/api/",
|
||||
)
|
||||
should_disable_undo_on_save: BoolProperty(
|
||||
|
||||
@@ -1581,8 +1581,12 @@ class Blender(bonsai.core.tool.Blender):
|
||||
default_scale = default_dpi * default_pixel_size
|
||||
system = bpy.context.preferences.system
|
||||
system_scale = system.dpi * system.pixel_size
|
||||
return (system_scale / default_scale) * base_size *platform_scale * tool.Blender.get_addon_preferences().decorator_font_scale
|
||||
|
||||
return (
|
||||
(system_scale / default_scale)
|
||||
* base_size
|
||||
* platform_scale
|
||||
* tool.Blender.get_addon_preferences().decorator_font_scale
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def apply_transform_as_local(cls, obj: bpy.types.Object) -> bool:
|
||||
|
||||
@@ -316,7 +316,9 @@ class Georeference(bonsai.core.tool.Georeference):
|
||||
|
||||
@classmethod
|
||||
def global2local(cls, matrix, is_specified_in_map_units: bool) -> tuple[float, float, float]:
|
||||
matrix = ifcopenshell.util.geolocation.auto_global2local(tool.Ifc.get(), matrix, is_specified_in_map_units=is_specified_in_map_units)
|
||||
matrix = ifcopenshell.util.geolocation.auto_global2local(
|
||||
tool.Ifc.get(), matrix, is_specified_in_map_units=is_specified_in_map_units
|
||||
)
|
||||
props = cls.get_georeference_props()
|
||||
if props.has_blender_offset:
|
||||
matrix = ifcopenshell.util.geolocation.global2local(
|
||||
|
||||
@@ -162,7 +162,7 @@ class TestEditTextLiterals(NewFile):
|
||||
context = ifc.createIfcGeometricRepresentationSubContext(ContextType="Plan", ContextIdentifier="Annotation")
|
||||
item = ifc.createIfcTextLiteralWithExtent(Literal="Literal", Path="RIGHT", BoxAlignment="bottom-left")
|
||||
builder = ShapeBuilder(tool.Ifc.get())
|
||||
polyline = builder.polyline([(0.,0.,0.), (1.,0.,0.)])
|
||||
polyline = builder.polyline([(0.0, 0.0, 0.0), (1.0, 0.0, 0.0)])
|
||||
representation = ifc.createIfcShapeRepresentation(ContextOfItems=context, Items=[item, polyline])
|
||||
element.Representation.Representations = [representation]
|
||||
tool.Ifc.link(element, obj)
|
||||
|
||||
Reference in New Issue
Block a user