Commit Graph

8133 Commits

Author SHA1 Message Date
Gorgious c7381c8092 Fix Relating type enum not correctly initializing 2024-04-15 09:58:25 +02:00
Gorgious db283eb137 The type manager now switches to the type when clicking on the "select type" button. Duplicating a type also changes the active type in the type manager 2024-04-15 09:58:25 +02:00
Gorgious 62f2144245 Selecting types and instances now show a helpful tooltip when the object is not selectable (due to being hidden or in a hidden collection) 2024-04-15 09:58:25 +02:00
Gorgious 9d9d1660ff You can now duplicate a type from the properties panel
+ change the "paste" icon for the  "duplicate" icon
2024-04-15 09:58:25 +02:00
Gorgious 4843068458 "Select instances" button is now grayed out when the type doesn't have any instance 2024-04-15 09:58:25 +02:00
Bruno Postle 3884260bcf BlenderBIM set gitattributes and autocrlf
Force Git to always treat IFC files as text.
Store IFC in Git with LF line-endings, but checked-out files are
CRLF on Windows.
2024-04-15 09:58:25 +02:00
Andrej730 27655dcf35 Roof modifier - more descriptive errors on invalid footprints #3171 2024-04-15 09:58:25 +02:00
Andrej730 b66fac5041 Default material layer thickness for adding new layers
Same as when you create IfcMaterialLayerSet
2024-04-15 09:58:25 +02:00
Andrej730 9b221452d5 UI problem with creating empty material layer set causing issues #3169
Now it's also possible to select some material that will be used for they first layer of material layer set.
2024-04-15 09:58:25 +02:00
Ryan Schultz e94350db93 bulk assignment of objects to an aggregate. 2024-04-15 09:58:25 +02:00
Andrej730 e7510231d5 Added a descriptive error on attempt of deleting last material layer 2024-04-15 09:58:25 +02:00
Andrej730 63b394109b Fixed error loading .ifc and activating view for drawing with underlay 2024-04-15 09:58:25 +02:00
Ryan Schultz 1fafc42d36 partially addresses #3103. 2024-04-15 09:58:25 +02:00
Sigma Dimensions 6e41a25953 fix contracting/expanding schedule of rates 2024-04-15 09:58:25 +02:00
Sigma Dimensions 5e5d4f57f4 Fix selecting unassigned work/cost schedule products 2024-04-15 09:58:25 +02:00
Sigma Dimensions 9e0f1db6dc small fix for work schedule derived start/end dates 2024-04-15 09:58:25 +02:00
Sigma Dimensions 4950f249b6 BBIMD: enable deleting sequence relationships from list of predecessors/successors 2024-04-15 09:58:25 +02:00
Sigma Dimensions f81b8eae87 remove annoying print statement 2024-04-15 09:58:25 +02:00
Sigma Dimensions 53aa7a8abb ios api task fix: remove orphan IfcRelNests when deleting tasks 2024-04-15 09:58:25 +02:00
Sigma Dimensions 24af5b8904 BBIM D: Copy cost items, export Cost Schedules individually, start improving Cost Schedule UI 2024-04-15 09:58:25 +02:00
Sigma Dimensions b1e5e1914e Easier grouping of materials by allowing material attributes editing from the IfcMaterial subpanel in the scene properties tab 2024-04-15 09:58:25 +02:00
Bruno Postle 2c69e3c44c Allow missing/broken GitPython
`import git` can fail badly with a broken xcode installation, so
we let blenderbim run anyway
2024-04-15 09:58:25 +02:00
Bruno Postle a8d20717cb Fix merging of remote branches (#3096)
You can now 'clone' a remote repository and 'push' to it. There is no 'pull'
functionality because this can fail badly, so there is a 'fetch' which
retrieves all remote branches without merging (and never fails). The
user can then select the remote branch in the branch pull-down and merge
it.
2024-04-15 09:58:25 +02:00
Andrej730 f7b2a68ed3 Detect BBIM railings at import to import as meshes not curves #3144
Sometimes railing could consist just of one IFCSWEPTDISKSOLID then it will be considered native swept disk solid and imported as a curve.

But when user create BBIM railing they edit it as a mesh and curve might look a bit different. Therefore we detect it now at import to make sure it's going to be reprsented the same way as it was saved.
2024-04-15 09:58:25 +02:00
Andrej730 3601a1d43b Reset active drawing id if we removed the active drawing
Previously there was an error if you remove all drawings:
```
Traceback (most recent call last):
  File "\addons\blenderbim\bim\module\drawing\ui.py", line 182, in draw
    DrawingsData.load()
  File "\addons\blenderbim\bim\module\drawing\data.py", line 106, in load
    "active_drawing_pset_data": cls.active_drawing_pset_data(),
  File "\addons\blenderbim\bim\module\drawing\data.py", line 134, in active_drawing_pset_data
    drawing = ifc_file.by_id(bpy.context.scene.DocProperties.active_drawing_id)
  File "\addons\blenderbim\libs\site\packages\ifcopenshell\file.py", line 326, in by_id
    return self[id]
  File "\addons\blenderbim\libs\site\packages\ifcopenshell\file.py", line 314, in __getitem__
    return entity_instance(self.wrapped_data.by_id(key), self)
  File "\addons\blenderbim\libs\site\packages\ifcopenshell\ifcopenshell_wrapper.py", line 4517, in by_id
    return _ifcopenshell_wrapper.file_by_id(self, id)
RuntimeError: Instance #1 077 not found
```
2024-04-15 09:58:25 +02:00
Andrej730 af2e0b07c3 fixed neg values in format_distance & section/plan level #3175 2024-04-15 09:58:25 +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 4f8851f007 Fixed error on rebuilding sheet with underlays
Also added description and more clear name for `bim.open_sheet`

Error was:
```
Error: Python: Traceback (most recent call last):
  File "\addons\blenderbim\bim\module\drawing\operator.py", line 82, in execute
    IfcStore.execute_ifc_operator(self, context)
  File "\addons\blenderbim\bim\ifc.py", line 410, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "\addons\blenderbim\bim\module\drawing\operator.py", line 1177, in _execute
    del raster_references[reference.Location]
TypeError: list indices must be integers or slices, not str
```
2024-04-15 09:58:25 +02:00
Andrej730 c37b71a3d3 Update drawing styles on changing Underlay checkbox #3172 2024-04-15 09:58:25 +02:00
Bruno Postle fabfa6ad7a Git remote fetch and push operations (#3096) 2024-04-15 09:58:24 +02:00
Ryan Schultz bda25b7932 allow elevations to show negative values
removed RL - not standard throughout the world
2024-04-15 09:58:24 +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 9c9b8b265c Maintaining drawing's sheet position on raster x/y changes #3155
Example - https://i.imgur.com/uiNWhIq.png
2024-04-15 09:58:24 +02:00
Andrej730 00a1699eab More consistent PlanLevel and SectionLevel in viewport and svg
Now it's using first vert instead of last to calculate height (same way svgwriter does it)
2024-04-15 09:58:24 +02:00
Andrej730 e06fa6267e Showing decorations on activating view #3146 2024-04-15 09:58:24 +02:00
Andrej730 539d218b25 AngleDecorator - changed edges / arc colors
Now angle annotation edges (not the arc itself) are greyed out when you're not editing them - that way they won't draw unnecessary attention. When you're in edit mode they'll appear white and the angle arc will appear blue.

Demo - https://imgur.com/a/lsgp9G4
2024-04-15 09:58:24 +02:00
Andrej730 1ec50fb125 Positioning AngleDecorator text at the center of the arc
Before - https://i.imgur.com/0VxFkg9.png
After - https://i.imgur.com/ibDnlbE.png
2024-04-15 09:58:24 +02:00
Andrej730 5ac6b1cd87 More smoothed lines for annotations with angles and circles 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 0c0906d06a Fixed bug with annotations update #3159
toggleDecorations was interrupted because it was trying to update text for non text element
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 87dba7c066 Fixed ifc text annotation preview not showing during edit #3159
Error was:

```
Traceback (most recent call last):
  File "\scripts\addons\blenderbim\bim\module\drawing\decoration.py", line 1899, in __call__
    decorator.decorate(context, obj)
  File "\scripts\addons\blenderbim\bim\module\drawing\decoration.py", line 1451, in decorate
    self.draw_text(context, obj)
  File "\scripts\addons\blenderbim\bim\module\drawing\decoration.py", line 540, in draw_text
    symbol = text_data["Symbol"]
KeyError: 'Symbol'
```
2024-04-15 09:58:24 +02:00
Andrej730 6aa372d2b6 Schedule Builder - some naive support for font size in text #3154 2024-04-15 09:58:24 +02:00
Andrej730 e8fc86a041 Schedule Builder - support for bold and italic text in cells #3154 2024-04-15 09:58:24 +02:00
Andrej730 c51c3e5e3c Schedule builder - fixing cell alignment #3154
Noticed that it's actually not merging cell style with col style as I did before but just prioritizing cell style if it's defined
2024-04-15 09:58:24 +02:00
Andrej730 26a3fe8a5d Schedule cells limit without print range to prevent system freeze
What I've found that sometimes you might get into situation (especially if .ods was created / processed in Excel) you might get a lot unnecessary columns and rows (in fact excel always seems to save 1048576x16384 table) and trying to print this kind of table results in investing a lot of RAM into it and possible system freeze.

Now there is a check if table has more than 10000 cells (number is completely made up 😁) then it would require user to define print range in the table to prevent the issue.
2024-04-15 09:58:24 +02:00
Andrej730 e5add946fe Scheduler builder enhancements #3154
Now it supports
1) print ranges - in svg you'll get only the part that's included in print-range.
2) children styles - sometimes cells inherit center alignment from column styles and before that commit text wouldn't be centered in svg in that case
3) repeating rows support
2024-04-15 09:58:24 +02:00