Commit Graph

396 Commits

Author SHA1 Message Date
Andrej730 5a5e1e9892 disable chaching sound running the bim tests
to save someone's ears (probably mine 😁) from running 10 chaching sounds per second
2024-04-15 13:30:40 +02:00
Trashman247 d2815415df Rework NewBrick and LoadBrick in test_brick.py to fit with new VGC format
- VGC means VersionedGraphCollection.
- BrickStore.schema is now a filepath, so make that the case in the testing also.
2024-04-15 13:29:29 +02:00
Andrej730 bc20b4a899 Fixing tests after 2dc9dc200 2024-04-15 13:25:50 +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 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
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 17ee5e6f43 Getting shader graph nodes by type rather than name #3316
Because relying on names doesn't work for non english users
2024-04-15 12:04:44 +02:00
Sigma Dimensions 0959a7f6a3 Refactor and re-use common spatial_tool.select_products 2024-04-15 11:44:55 +02:00
Andrej730 a57f9e984b Tests for external svg references 2024-04-15 10:59:02 +02:00
Andrej730 c930eb7603 References for adding external svgs to the sheets
It works exactly the same as schedules - you add some .svg file, path to it stored in ifc and you can attach it to the sheet.

UI - https://i.imgur.com/tGbCGBb.png

Still need to add some tests for references
2024-04-15 10:34:50 +02:00
Sigma Dimensions 2a791eef52 Run costing tests and rename changed methods 2024-04-15 10:34:41 +02:00
Dion Moult 5f4fef42ac See #3069. Continued refactoring to not rely on users_collection[0]. 2024-04-15 10:34:41 +02:00
Dion Moult 4f15ec1f67 Fix regressions after making aggregate based on selected objects. 2024-04-15 10:34:41 +02:00
Dion Moult 804dbee2c3 Fix #3069. WARNING: dangerous change. Objects that have their own collection now have a pointer to that collection. This fixes a variety of subtle sync bugs. 2024-04-15 10:34:41 +02:00
Andrej730 d2d6a9e7d4 Remove test to reproduce #3169 as irrelevant 2024-04-15 10:34:41 +02:00
Andrej730 0dfb34a730 Added test to cover 2629172ff 2024-04-15 10:34:41 +02:00
Dion Moult 43bfd51ccb Fix #3181. 2024-04-15 09:58:26 +02:00
Andrej730 9403b8cbf0 Added default Model/Annotation/PLAN_VIEW to support e68fdb2db 2024-04-15 09:58:25 +02:00
Andrej730 afda99d2f4 Test that drawing styles are loaded 2024-04-15 09:58:25 +02:00
Andrej730 a07d782683 Added test scenario to reproduce #3169
Can be easily called with `pytest .\test\bim\test_feature.py -k "issue"`

Commented some lines out to make sure it doesn't interrupt someone's test process.

Need to uncomment `When I press "bim.create_drawing"` if you want to see if it freezes for you.

You can also uncomment `And I save sample test files and open in blender` to see the freeze manually in Blender client.
2024-04-15 09:58:24 +02:00
Andrej730 ce9769b1e1 Test to cover drawing maintaining sheet position #3155
Updated to gitignore to include some new folders that are created during tests
2024-04-15 09:58:24 +02:00
Andrej730 2d67950503 3d annotations for FALL, SECTION_LEVEL, PLAN_LEVEL #3145
Before that commit if you created those types of annotations and then reopened .ifc file (without .blend) then you would lose their z coordinate and therefore would lose their value (because they were created previously as 2d annotations).

Now those annotations created as 3d to avoid that problem. I've also added temporary fallback that will turn your existing annotations to 3d next time you edit them.
2024-04-15 09:58:24 +02:00
Andrej730 ec39cdfc6d Added some tests for changing ifc text 2024-04-15 09:58:24 +02:00
Andrej730 ae0ae76ee6 Fixing bug with changing text size #3159
Bug appeared after 046940f but it was there before - it was just kind of compensated by the other bug.
Because of that bug blender text size value was reupdated before saving it to pset therefore pset never received a new value.

Also added some refactor, planned to write some test to get this error covered.
2024-04-15 09:58:24 +02:00
Andrej730 91387b3aa8 Saving drawing shading styles to ifc #2991
Now shading styles are stored in ifc. It's actually stored in json file (by default it's in projects "assets/shading_styles.json") and the path to it saved in `EPset_Drawing.ShadingStyles`.
Current shading styles is stored in `EPset_Drawing.CurrentShadingStyle`.

This change could potentially cause problems but I've added some temporary fallback to make sure `EPset_Drawing.ShadingStyles` will be set to some default path and default shading styles will be copied to the project's folder.
2024-04-15 09:58:24 +02:00
Dion Moult b8431a8c33 Fix failing tests in preparation for release. 2024-04-15 09:56:38 +02:00
Dion Moult 8b173e5b4d Fix fundamental bug where area and volume units were ignored on new projects. 2024-04-15 09:56:38 +02:00
Dion Moult c615f7469a See #1676. You can now duplicate space boundaries. 2024-04-15 09:56:37 +02:00
Andrej730 499edf960d Test command to load blend file during test scenario for debugging 2024-04-15 09:56:36 +02:00
Andrej730 17cb72896f Fixed bug with double conversion of height/extrusion length #3073
Also fixed some tests
2024-04-15 09:56:36 +02:00
Sigma Dimensions 55250aba6d BBIM 4D features & fixes:
- feature to re-order tasks
- fixes for task sorting
- further workSchedule UI/UX improvements
- forgotten bits and bobs
2024-04-15 09:52:38 +02:00
Sigma Dimensions 83344e4f43 - BBIM 4D: features to review and edit Resource productivity data on the fly
- IOS: new resource utilitiy functions
2024-04-15 09:52:38 +02:00
Andrej730 6ee8369114 test_qto.py black format 2024-04-15 09:49:52 +02:00
Andrej730 ccba3a3b8b Tests for calculating quantities for prefix and imperial project units 2024-04-15 09:49:52 +02:00
Sigma Dimensions dae8d6bdc1 fix "cost_item quantity updates" bug when editing a QTO 2024-04-15 09:37:50 +02:00
Dion Moult fe8220f9a7 Add support for editing ref latitude/longitude 2024-04-15 09:37:49 +02:00
Dion Moult 507f03640a Fix #3003. 2024-04-15 09:37:49 +02:00
Andrej730 fcdfa5dd23 Annotation Tool
Added Annotation Tool that allows you create annotation types and their occurences. It will also allow us to get rid of "Annotation" panel in N-panel.

I've recorded bunch of short videos to demonstrate the features:

- bulk tagging - currently works only for "Text" and "Stair arrow" type of annotations, adds annotations to all selected objects, automatically assigns products to the annotations
https://user-images.githubusercontent.com/9417531/231968358-28cbb762-3349-470a-beef-d1ab21882769.mp4

- creating annotation type with representation - all occurences will share the same representation which makes bulk tagging really powerful if you use variables like {{PredefinedType}}, {{GlobalId}}, {{Name}}, {{Description}}, {{ObjectType}}, {{Tag}}

https://user-images.githubusercontent.com/9417531/231970500-333514c6-6406-4ef5-a9e7-fddfcc9a2436.mp4

- creating annotation type without representation - it allows occurences to have unique text or line geometry but still share the same classes from inherited property set

Examples:
  creating text type without representation to create title case annotations
  https://user-images.githubusercontent.com/9417531/231969361-bda5f924-a8c8-4f5a-ba61-461aa7101f73.mp4

  creating type for oblique dimension annotations
  https://user-images.githubusercontent.com/9417531/231969902-38e8c3f4-45a6-4c98-bba4-2956288ce10a.mp4

- readjusting - if you created some annotations using bulk tagging but the products were changed / moved afterwards now you can select those annotations and "readjust" them according to new product's position / measurements
https://user-images.githubusercontent.com/9417531/231968975-ee8d6589-60ee-4575-9be2-b0ce68d43ffa.mp4

PS In this commit I've also moved all icons to 1 .blend file and added instructions how to regenerate them.
2024-04-15 09:37:49 +02:00
Dion Moult c852678437 See #2978. Fix crash upon drawing deletion. 2024-04-15 09:37:49 +02:00
Dion Moult cf640a971d Fix #2968. Deletions are no longer postponed. Should fix or reveal a lot of sync errors. 2024-04-15 09:37:48 +02:00
Dion Moult c4c3fc1bfa Fix bug where switching representations didn't update the material checksum, leading to unnecessary material syncs at export time. 2024-04-15 09:37:48 +02:00
Dion Moult 4e94d0dc10 Fix #2516. Add/build/remove/view/rename/copy sheet/drawing/schedule now all references and updates user configurable relative paths. 2024-04-15 09:25:50 +02:00