Commit Graph

79 Commits

Author SHA1 Message Date
Andrej730 b34882e6d1 semi-automatic setup for necessary directories 2024-04-16 11:26:46 +02:00
Andrej730 4a0625e730 register translations dict only if addon is already loaded 2024-04-16 11:26:46 +02:00
Andrej730 3973a6ab4d open .po directory operator 2024-04-16 11:26:46 +02:00
Andrej730 b9ecc394cf Operator to disable BBIM and restart Blender
as it's needed to reload the translations

Update bbim_setup_translations.py

Update bbim_setup_translations.py
2024-04-16 11:26:46 +02:00
Andrej730 b3990e7267 convert setup_translations to blender addon for UI 2024-04-16 11:26:46 +02:00
Andrej730 f8ca92279d monkey patch blender's dump_addon_messages
The way blender gather messages to translate is:
1) disable the addon
2) parse all available strings
3) enable the addon
4) parse all strings available strings again and subtract the ones gathered at step 2.

But due Blender bug (https://projects.blender.org/blender/blender/issues/116579) not all addon parts unregistered at step 1, so some addon's strings left out and gathered at step 2 and then subtracted at step 4. At the end, we loose them and they will be missing from resulting translations files.

I've monkey patched dump_addon_messages so it now works a bit more safe:
0) It expects addon to be disabled and Blender restarted after
1) Gather all Blender strings
2) Enable addon
3) Gather all Blender strings again and subtract strings from step 1.
2024-04-16 11:26:46 +02:00
Andrej730 e9078453eb setup_translations - original dump_addon_messages
same as with dump_py_messages - this commit is needed to track monkey patch changes later on
2024-04-16 11:26:46 +02:00
Andrej730 df41f541de fix error converting translations to .po if .po files already exist 2024-04-16 11:26:46 +02:00
Andrej730 a2ea7bf1d8 monkey patch dump_py_messages to ignore blenderbim dependencies 2024-04-16 11:26:46 +02:00
Andrej730 a4be606a37 setup_translations - original dump_py_messages
as we're going to monkey patch it and this commit is needed to keep the history of changes
2024-04-16 11:26:46 +02:00
Andrej730 4342a03246 update translations in current blender session 2024-04-16 11:26:46 +02:00
Andrej730 b0c0839d3e setup_translations.py - use just 1 directory to store .po files
and use temp directory to store .po files for ui_translate.export/import
2024-04-16 11:26:46 +02:00
Andrej730 0371c2c74e BBIM script to reload/export/import translation strings #889 2024-04-16 11:26:46 +02:00
Andrej730 8b9790822e setup_pytest to find site-packages folder near sys.executable
Used to get errors running setup_pytest.py having python 3.10 installed on my pc (`sys_paths[-1]` was the system's python folder, not the blender's python).
2024-04-16 11:05:23 +02:00
Dion Moult 1a7b95bf1e Minor fix to Uniclass classification 2024-04-16 11:05:23 +02:00
Dion Moult 11eefab4fc Add support for latest uniclass and add Uniclass July 2023 2024-04-16 11:05:23 +02:00
Andrej730 959f05d154 shapebuilder - replace y extrusion args with shortcut for readibility 2024-04-16 10:37:15 +02:00
Dion Moult c4eed78ca1 Update documentation with new selector keys. 2024-04-16 10:34:29 +02:00
Dion Moult 59c8326c51 See #3682. You can now add symbols and multisymbols (i.e. one vertex per symbol) annotations. New default symbols for setout points in demo library. 2024-04-16 10:30:32 +02:00
Andrej730 2808715406 Rename IFC AU Library to IFC Furniture library
Just thought watching BIM Voice last video that some people may overlook it like something Australia specific with "IFC AU Library" name.
2024-04-16 10:26:51 +02:00
Dion Moult feec0e2437 Fix more failing tests. 2024-04-16 10:25:01 +02:00
rileywong311 26b6bc2b3c Merge Brick classification
https://github.com/rileywong311/BrickIfcClassification
2024-04-16 10:24:56 +02:00
rileywong311 0e685f6fb2 Merge IfcClassification
https://github.com/Moult/IfcClassification/tree/master
2024-04-16 10:24:56 +02:00
Andrej730 60d62c2dd4 sort keys in the entity to type mapping 2024-04-16 10:10:50 +02:00
Andrej730 871902de12 More general solution for #3466 2024-04-16 10:10:50 +02:00
Dion Moult 418a3feb6c Fix #3453. Hidden annotation type removed, and demo library now comes with linetypes for dashed, fine, thin, medium, thick, and strong. 2024-04-16 10:10:50 +02:00
Dion Moult e4063f8de5 Demo library now ships with example text annotation types (door tag, window tag, etc) 2024-04-16 10:05:51 +02:00
Andrej730 4b03cace3e moving code to shape builder 2024-04-16 10:05:50 +02:00
Gorgious56 7aab0ccfd7 Fix Ifc modifier error after #3393064 because of legacy context.object
For some reason in the scene properties context.object returns None even if an object is active  in the viewport, so ifc modifiers would randomly throw errors. AFAIK functionally they are supposed to point to the same thing, but active_object seems to be the superior one and context.object deprecated and kept for legacy reasons. Couldn't find dev quote but I'm sure I saw it at some point
2024-04-16 10:05:49 +02:00
Andrej730 01ebb649d9 Library for US AISC15 Steel Profiles #3203 2024-04-16 10:05:08 +02:00
Dion Moult d29f0f171c Override Ctrl-N new file menu to make it easier to start new projects and new IFC icon. 2024-04-16 10:05:08 +02:00
Andrej730 236581baa3 w-type US steel profiles #3203 2024-04-15 13:30:41 +02:00
Dion Moult ef98bd5120 Convert Ifc2Sql script to IfcPatch recipe and add geometry support 2024-04-15 12:04:43 +02:00
Dion Moult ada978ed1f Toggle between full schema (i.e. all tables for every declaration) and partial schema dump into SQL 2024-04-15 11:44:55 +02:00
Dion Moult a4224b104d Experimental support for storage of IFC in MySQL and SQLite 2024-04-15 11:44:55 +02:00
Massimo Fabbro f7c83df793 Move the recipe into the blenderbim script folder and rewrite it as a script 2024-04-15 10:34:41 +02:00
Andrej730 83f5241694 Fixed couple bugs in furniture library
1) last polyline point was failing on Consecutive rule causing validation errors
2) Fixed wrong ifc class for dishwasher (was used occurence class instead of type)
2024-04-15 09:49:53 +02:00
Ryan Schultz 5c301da21e Library - changed to correct class 2024-04-15 09:37:49 +02:00
Andrej730 d2124e1c8b Fixed bugs with furniture library toilets and basins #2976
Bug was introduced in cf6acd5 when `shape_builder.get_rectangle_coords` started returning coords in counter-clockwise order instead of clockwise.
2024-04-15 09:37:49 +02:00
Andrej730 7f058ab8bf removed redundant parts from generate_steel_profiles_library.py
removed never used methods and contexts
2024-04-15 09:25:49 +02:00
Andrej730 be75ef2596 Fixed ifc validation errors for furniture library #2925
Fixed bunch of validation errors with furniture library:

- IfcSpaceType PredefinedType wasn't optional
`<attribute PredefinedType: <enumeration IfcSpaceTypeEnum: (EXTERNAL, GFA, INTERNAL, NOTDEFINED, PARKING, SPACE, USERDEFINED)>> Not optional`

- some object had 0.0 depth extrusion
```
Rule IfcPositiveLengthMeasure_WR1:
    (self > 0.)
Violated by:
    (0.0 > 0.0)
```

- some orphan representations violating:
```
Rule IfcShapeModel_WR11:
    ((sizeof(self.OfProductRepresentation) == 1) ^ (sizeof(self.RepresentationMap) == 1) ^ (sizeof(ofshapeaspect) == 1))
Violated by:
    ((0 == 1 ^ 0 == 1) ^ 0 == 1)
     +  where 0 = sizeof(())
     +    where () = #9091=IfcShapeRepresentation(#15,'Body','SweptSolid',(#9090)).OfProductRepresentation
     +  and   0 = sizeof(())
     +    where () = #9091=IfcShapeRepresentation(#15,'Body','SweptSolid',(#9090)).RepresentationMap
     +  and   0 = sizeof(())
```
2024-04-15 09:25:48 +02:00
Andrej730 75d3da9908 Fixed all unit.add_si_unit uses after fd87747
Now they were causing `TypeError: Usecase.__init__() got an unexpected keyword argument 'name'`
2024-04-15 09:25:48 +02:00
Andrej730 31f6baaf67 small refactor for Ifc.edit and tool.Ifc
1) replaced IfcStore.edited_objs.add with tool.Ifc.edit
2) updated interface in tool.py
3) removed unlink from tool.Ifc - it was declared there twice
2023-03-17 17:50:56 +05:00
Dion Moult 363ddc2a9b Minor fix 2023-02-27 20:49:45 +11:00
Dion Moult 2fe2c349fd Fix #2743. obj2ifc scripts updated to support multiple OBJ files. 2023-02-23 22:17:34 +11:00
Andrej730 d52618277e Ifc4x3 - entity-types mapping
- added mapping entity-types mapping based on iso release of ifc4x3

- added some manual corrections for `generate_util_type_json.py` if someone would regenerate the map for ifc4.

- manual correction in ifc4x3 mapping for IfcCivilElement. It could be removed in the future releases of IFC if https://github.com/buildingSMART/IFC4.3.x-development/issues/583 is resolved

If curious to look what were the changes for mapping between ifc4 and ifc4x3:
https://github.com/IfcOpenShell/IfcOpenShell/commit/da51253fb0a9d08aa93f5fe3c074d3592b3aa997#diff-98f525c91bb47b9820e603fba61cc015d3e6ae7261593d727c51114e3ff73aa7
2023-02-17 17:57:16 +05:00
Andrej730 a8400ec963 geonodes prototype copyright 2023-02-06 18:44:09 +05:00
Dion Moult a7cc58fb50 Update libraries to use Plan/Body/PLAN_VIEW instead of annotations. 2023-02-04 14:09:35 +11:00
Andrej730 f9bff64f0d ifc geonodes modifier prototype 2023-01-30 13:45:52 +05:00
Andrej730 9f0ad9be3c Black formatting window modifier 2023-01-25 11:13:41 +05:00