Commit Graph

8106 Commits

Author SHA1 Message Date
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
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
Bruno Postle 046a356915 BlenderBIM Git clone repository operator (#3096) 2024-04-15 09:58:24 +02:00
Gorgious 5e6ffd9ab6 use tool module instead of local function to activate object 2024-04-15 09:58:24 +02:00
Bruno Postle 8b85875b45 BlenderBIM Git tagging documentation 2024-04-15 09:58:24 +02:00
Bruno Postle a4e9f304d9 BlenderBIM list and create git tags #3096 2024-04-15 09:58:24 +02:00
Andrej730 41ef46cb88 Multiline in dimension description / suffix / prefix #3005
Also added some offset for dimension text in viewport to make it more similar to svg
2024-04-15 09:58:24 +02:00
Andrej730 dff88c7560 Option to add prefix and suffix to dimension annotation #3005
Example - https://imgur.com/a/0NkStWm
2024-04-15 09:56:51 +02:00
Andrej730 6e290d585e Ifc CSV Export template now also saves the expression #3034
Previously saved templates wouldn't work now, they need to be either recreated or modified to make them work.

Example of old template format:
`["Name", "class", "type.Name"]`

Example of new template format:
`{"expression": ".IfcDoor", "attributes": ["Name", "class", "type.Name"]}`

Note that this would work too:
`{"attributes": ["Name", "class", "type.Name"]}`
2024-04-15 09:56:51 +02:00
Andrej730 03e373aaff Not all curve annotation types were detected at the import #3090 2024-04-15 09:56:51 +02:00
Gorgious 4f47366976 Fix #3128 : RefLatitude and RefLongitude attributes now show their description on right click + add a snippet to tell the user how to format the values 2024-04-15 09:56:51 +02:00
Bruno Postle 957bcaa21b Report ifcmerge conflicts in pop-up #3096 2024-04-15 09:56:51 +02:00
Kristoffer Andersen 1a86752ed0 Update meta.yaml
pin daily conda builds to occt 7.7.0
2024-04-15 09:56:51 +02:00
Gorgious56 078e50423f Fix typo in get_pset docstring 2024-04-15 09:56:51 +02:00
Andrej730 436f81d137 Migrating shaders to builtins to support M1 #2897
Migrated all shaders from geometry shaders to builtins (all geometry data now calculated in python before passing to shader) to make them more reliable and support Metal backend on Mac M1 (tested that it works - both annotations and gizmo).

The current downside is that there is no more custom frag shaders too - meaning we do not support dashed lines in the annotations (currently Hidden and Grid just use a bit less bright annotation color).
2024-04-15 09:56:51 +02:00
Bruno Perdigão edd5686c13 changed custom scale input 2024-04-15 09:56:51 +02:00
Bruno Postle 838b0b04fb Selecting a git revision updates info box 2024-04-15 09:56:51 +02:00
Sigma Dimensions da5b9e2b22 Fix task json issue due to "Bad control character in string literal in JSON at position XXXX" 2024-04-15 09:56:51 +02:00
Sigma Dimensions f6a6201c30 Convenient Pie Menu shortcut to aggregate selected objects to active object 2024-04-15 09:56:51 +02:00
Sigma Dimensions da13f4cb46 fix toggle_cost_item_parent 2024-04-15 09:56:51 +02:00
Sigma Dimensions 607cb253d2 Fix baseline gantt chart bug when new tasks are added to the planned schedule 2024-04-15 09:56:51 +02:00
Dion Moult dff827db59 Minor improvements to shape utility. 2024-04-15 09:56:51 +02:00
Dion Moult c5154ec594 See #2673. Bundle IfcTester for PyPI. 2024-04-15 09:56:51 +02:00
arun 3ea7e28b12 corrected get_extrusions function 2024-04-15 09:56:51 +02:00
Dion Moult 3b66822fe2 Add shape utility to easily get profiles and extrusions 2024-04-15 09:56:38 +02:00
Bruno Postle d7a74dd6a4 BlenderBIM ifc file association (linux only) #2399 2024-04-15 09:56:38 +02:00
Bruno Postle b987d5ca7c Rename blenderbim.sh, better initialisation #2399 2024-04-15 09:56:38 +02:00
Dion Moult b8431a8c33 Fix failing tests in preparation for release. 2024-04-15 09:56:38 +02:00