Commit Graph

8415 Commits

Author SHA1 Message Date
Andrej730 8d18a8a023 Fix for f88835b #3271
Now we do not rely on small offset to keep using inner curves to create linings, if some part of the lining is not present (which happens on mullions and transoms) we'll create U or L shape extrusion instead of rectangle with inner curve.

Long story short - this should keep ifc for windows valid.
2024-04-15 13:25:51 +02:00
Andrej730 e3b77613d3 Corrected L shapes in window lining after e89a9cd #3271
From this - https://i.imgur.com/hQuCcR3.png
To this - https://i.imgur.com/qZ2Lyfo.png

It's a bit hacky since we still use really small offsets to keep "The outer curve shall enclose all inner curves." rule for IfcArbitraryProfileDefWithVoids valid.
2024-04-15 13:25:51 +02:00
Andrej730 61be440545 Disable default stream mode for now to avoid errors #3354 2024-04-15 13:25:51 +02:00
Andrej730 1a7382ef40 Poll message for bim.file_unassociate/bim.file_associate 2024-04-15 13:25:51 +02:00
Andrej730 8a9dcbad2f Fixed error on saving styles without textures after 3aff29dec 2024-04-15 13:25:51 +02:00
Andrej730 4e1acc7955 Added IFC override operators to outliner/object context menus #3345
Outliner context menu - https://i.imgur.com/TkJKbLh.png
Object context menu - https://i.imgur.com/JXOEdYH.png
2024-04-15 13:25:50 +02:00
Dion Moult 9d462dab7d Docs now point to the popular Search IFC Class website. 2024-04-15 13:25:50 +02:00
Dion Moult bde5b52495 You can now exclude classes from streaming in ifcopenshell.stream 2024-04-15 13:25:50 +02:00
Andrej730 2fbb3c8ac6 adjust window offset on transoms/mullions for symmetry #3271
Before -  https://i.imgur.com/DbEzJ9H.png
After - https://i.imgur.com/0CERh86.png

Added it for modifier preview and ifc 2d and 3d repr but still need to work some things in 3d representation (L shape lining is not always detected correctly).
2024-04-15 13:25:50 +02:00
Dion Moult 531dc21d8e New option to enable streaming IFC data into BBIM.
To test, go into add-on preferences and enable "Should Stream". Then load an IFC-SPF in advanced mode, and disable "Load Geometry" before loading (the geometry iterator doesn't work with streaming).
2024-04-15 13:25:50 +02:00
Dion Moult 17582f00cf Naive implementation of file stream and Lark based IFC-SPF reader to handle huge IFCs. 2024-04-15 13:25:50 +02:00
Andrej730 bc20b4a899 Fixing tests after 2dc9dc200 2024-04-15 13:25:50 +02:00
Andrej730 6d152c4fc4 Support for import IfcSurfaceStyleWithTextures
Added UI for adding textures in BBIM shader graph generator

https://imgur.com/a/BI5pOZn
2024-04-15 13:25:50 +02:00
Dion Moult 9beae21615 See #3347. Hotfix latest IfcOpenShell SQLite features when making builds. 2024-04-15 13:25:50 +02:00
Dion Moult 115bd32846 The BlenderBIM Add-on now supports loading IFCSQLite files! 2024-04-15 13:25:50 +02:00
Dion Moult 304a5594bb You can now toggle loading geometry in advanced mode when loading a project 2024-04-15 13:25:50 +02:00
Dion Moult fee6ea52ba ifcopenshell.sqlite wrapper now handles JSON fields by default, which is significantly more performant
f attributes holding entity lists are expanded in SQL, this means that you end up with significantly more rows. Also, you cannot have the ifc_id marked as a UNIQUE field / benefit from unique primary key index. So leaving the fields as JSON is actually significantly more efficient (almost 10X faster to load a model into BBIM).
2024-04-15 13:25:50 +02:00
Dion Moult af796d5f9d Ifc2Sql patch now can store inverses for efficient queries. 2024-04-15 13:25:50 +02:00
Andrej730 0a22e8d7c2 Fixed typo in e3a7f7627 2024-04-15 13:25:50 +02:00
Andrej730 46bc71eac9 Fixing bug after 28cc168
Was causing some tests to fail
2024-04-15 13:25:50 +02:00
Andrej730 5cb1936412 Avoid ui errors after 2dc9dc200 2024-04-15 13:25:50 +02:00
Andrej730 91fa5b1ec6 Unhide in render for not excluded objects #3338
Objects were hidden in render but never unhidden if they were no more in drawing's .Exlcude
2024-04-15 13:25:50 +02:00
Andrej730 48d91dac21 Generating IFC compatible shader graphs
Added new panel. in shader graph N-panel that allows you to create fully GLTF and IFC compatible shader graphs by just tweaking parameters from the panel. Note that it's still saved to IFC only when you hit "Save Current Style", before that it's still just stored in blender.

https://imgur.com/a/vmkoLPH

The premise is that if you want to have non-external style you'd be able to create it entirely from this panel - so there will no need to guess or to remember which parameters from the graph are supported by IFC and which are not.

It's still work in progress, still need to polish it, add support for more reflectance methods and add suport for textures (need to be able to import/export it with .ifc and set them from this panel).
2024-04-15 13:25:50 +02:00
Andrej730 ebcc6b534d Fixed #3342 2024-04-15 13:25:50 +02:00
Andrej730 f79053433f Set shading flat by default to solve #3336
Before blender 3.6 it was setting flat shading by default, so we just keeping the same behaviour.
2024-04-15 13:25:50 +02:00
Thomas Krijnen 20f279dfa3 IFC4X3 codegen #2805 2024-04-15 13:24:59 +02:00
Thomas Krijnen 3266648896 IfcGeom dynamic casting updates #2805 2024-04-15 13:23:11 +02:00
Andrej730 77839efd6a option to keep the viewport position on activating drawing #3333
currently it works with alt clicking activate drawing button
https://i.imgur.com/lgvP4QA.png
2024-04-15 13:03:26 +02:00
Andrej730 7f6cf90759 Fixed #3335 caused by 36b746d 2024-04-15 13:03:26 +02:00
Bruno Postle 7e9cef2d8e BBIM fix Git panel polling repo on refresh (#3096)
Just scrolling Git panel shouldn't do any Git IO
2024-04-15 13:03:26 +02:00
Massimo Fabbro eb225070d3 Add toggle space visibiity button into spatial tool menu 2024-04-15 13:03:01 +02:00
Andrej730 2ac74fb535 refactor with SKIP_SAVE option on operator props
Co-Authored-By: Gorgious56 <25156105+Gorgious56@users.noreply.github.com>
2024-04-15 13:03:00 +02:00
Andrej730 89146ea046 More options to save .ifc as relative path in blender 2024-04-15 13:03:00 +02:00
Andrej730 7f10eaa14f Fixed tests after a4a6dce 2024-04-15 13:03:00 +02:00
Andrej730 4d3ed81971 Fixed test after b035129 2024-04-15 13:03:00 +02:00
Andrej730 5e019bbc42 Fixed test after c8c0c9a
Taking into account that now we have error messages if user will try to remove the last material layer which would make layer set invalid ifc.

FAILED test/bim/test_feature.py::test_remove_material_set_layer - AssertionError: Failed to run operator bpy.ops.bim.remove_layer(layer=IfcStore.get_file().by_id(93).MaterialLayers[...
2024-04-15 13:03:00 +02:00
Andrej730 765d52d4e1 Fixed missing ifc file in api call after 28cc168
Some bim test was failing because of it

FAILED test/bim/test_feature.py::test_assign_material__material_profile_set - AssertionError: No material Default found in profiled materials: []
2024-04-15 13:03:00 +02:00
Andrej730 07401c4b1c Fixed void tests after d3d2c36 2024-04-15 13:03:00 +02:00
Andrej730 0f206fe709 Fixing test after 1c12a98
FAILED test/bim/test_feature.py::test_export_ifc__with_basic_contents_and_saving_as_a_relative_path - AssertionError: Value is C:\IfcOpenShell\src\blenderbim\test\files\temp\export.ifc
2024-04-15 13:03:00 +02:00
Andrej730 3a0d09a6dc Small fix related to 5c2ae98c0 and a bit more descriptive operator error
FAILED test/bim/test_feature.py::test_create_project__ifc2x3 - AssertionError: Failed to run operator bpy.ops.bim.create_project
2024-04-15 13:03:00 +02:00
Andrej730 5397b95df5 Fixing collections tests related to 99d9c0f5b
FAILED test/bim/test_feature.py::test_remove_drawing - AssertionError: The collection "IfcGroup/PLAN_VIEW" does not exist
2024-04-15 13:03:00 +02:00
Bruno Postle 489436449c BlenderBIM push Git tags to remote
Shows error message if push fails
2024-04-15 13:03:00 +02:00
Andrej730 a7283ca538 Fixed duplicated objects collections issue after 586707dd2
Duplicated objects were not able to have their own collection after 586707dd2

Also fixed bim test
FAILED test/bim/test_feature.py::test_copy_a_storey - AssertionError: assert 'IfcBuildingStorey/My Storey.001' in ['IfcBuildingStorey/My Storey']
2024-04-15 13:03:00 +02:00
Andrej730 6b0200e1f0 Preserving original name on unlinking
Unlinking was using copied object name for the unlinked object instead of the original one.
So it worked like Cube -> IfcWall/Cube -> Cube.001 and bim test was failing:
FAILED test/bim/test_feature.py::test_unlink_object - AssertionError: The object "Cube" does not exist
2024-04-15 13:03:00 +02:00
Andrej730 f45e3b99ca Fixed couple bugs in test_feature
1) Explicitly set empty ifc project not to load demo library - was still loading because it was using my default scene which caused errors.
2) typo in dimension check assertion message
2024-04-15 13:03:00 +02:00
Andrej730 787f9cd7be Fixing collectors tests after 1f43ec8 2024-04-15 13:03:00 +02:00
Andrej730 ea9457a49f Fixing tool tests 2024-04-15 13:03:00 +02:00
Andrej730 664d0e0fa6 Fixing core tests 2024-04-15 13:03:00 +02:00
Andrej730 f4067abc42 Fixed import error with filtering out IfcGrid's spatial element #3283
Fixed error that was occuring if you try to import .ifc file where spatial element contains only grid and will use advanced mode, filter mode = "IFC Class" and check "Filter Spatial Elements".

Error occured because spatial element was filtered out but then when ifc grid was created and importer to find a spatial element based collection for the grid it couldn't find it.

Traceback:
Error: Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\project\operator.py", line 595, in execute
    ifc_importer.execute()
  File "\blenderbim\bim\import_ifc.py", line 260, in execute
    self.place_objects_in_collections()
  File "\blenderbim\bim\import_ifc.py", line 1494, in place_objects_in_collections
    self.place_object_in_collection(self.file.by_id(ifc_definition_id), obj)
  File "\blenderbim\bim\import_ifc.py", line 1498, in place_object_in_collection
    self.place_object_in_decomposition_collection(element, obj)
  File "\blenderbim\bim\import_ifc.py", line 1517, in place_object_in_decomposition_collection
    return self.place_object_in_spatial_decomposition_collection(element, obj)
  File "\blenderbim\bim\import_ifc.py", line 1545, in place_object_in_spatial_decomposition_collection
    self.collections[container.GlobalId].children.link(grid_collection)
KeyError: '33AiKftFj2aAf2MqQr5Gs7'
2024-04-15 13:03:00 +02:00
Andrej730 ae44957464 Fixed getting filtered spatial elements at import for ifc2x3 #3283
In ifc2x3 IfcProject is not IfcContext because there is no IfcContext in ifc2x3 and it was causing the error below on .ifc import with filtered spatial elements.
Also added small refactor

Traceback:
Error: Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\project\operator.py", line 595, in execute
    ifc_importer.execute()
  File "\blenderbim\bim\import_ifc.py", line 253, in execute
    self.create_spatial_elements()
  File "\blenderbim\bim\import_ifc.py", line 688, in create_spatial_elements
    self.create_generic_elements(self.spatial_elements)
  File "\blenderbim\bim\import_ifc.py", line 698, in create_generic_elements
    products = self.create_products(elements)
  File "\blenderbim\bim\import_ifc.py", line 717, in create_products
    iterator = ifcopenshell.geom.iterator(settings, self.file, multiprocessing.cpu_count(), include=products)
  File "\blenderbim\libs\site\packages\ifcopenshell\geom\main.py", line 99, in __init__
    raise ValueError("include and exclude need to be an aggregate of IfcProduct?")
ValueError: include and exclude need to be an aggregate of IfcProduct?
2024-04-15 13:03:00 +02:00