Commit Graph

120 Commits

Author SHA1 Message Date
Dion Moult bee4e77d63 Fix #3432. Bug where null applicable occurrence of a type product caused the annotation tool to fail. 2024-04-16 10:05:47 +02:00
Dion Moult 5a0192c5c4 Fix #3420. Fix missing sheet references on drawings and incorrect direction of section references. 2024-04-16 10:05:47 +02:00
Dion Moult e75afc9ffb Fix #3417. Apply 50mm offset to camera to ensure text isn't "behind" the camera. This 50mm convention is used in quite a few places, we should standardise it. 2024-04-16 10:05:46 +02:00
Andrej730 acc5ca339f Using EPset_Drawing data instead of camera props on drawing print #3396
Previously if you change `HasUnderlay` in pset it caused errors because camera properties `has_underlay` wasn't updated.
Still some work need to be done for updating keep camera properties in sync with pset - probably we can should call something like `tool.Drawing.import_drawing()` on EPset_Drawing edit
2024-04-16 10:05:08 +02:00
Dion Moult 4359769d54 See #3411. Sheets are now sorted alphabetically by default. 2024-04-16 10:05:08 +02:00
Dion Moult 05a3a33a9a Drawing panels now moved to the drawings and documents "tab" 2024-04-16 10:05:07 +02:00
Dion Moult 02bca5a622 Fix #3402. Activate drawing no longer affects the visibility of non-IFC objects. 2024-04-16 10:05:07 +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
Dion Moult b5c4b87238 Fix #3069. (Again) review all occurrences of users_collection and collection.name 2024-04-15 10:59:03 +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
Dion Moult 16582e2691 Fix #3212. Bug where viewport camera bisection didn't have enough tolerance and sometimes wasn't visible. 2024-04-15 09:58:26 +02:00
Dion Moult 228cce74ac Fix #3209. Handle loading of custom scales, fix incomplete NTS implementation, and use Lark for more reliable imperial scale parsing. 2024-04-15 09:58:26 +02:00
Dion Moult 0a3b9c4e2b Fix #3210. Revert "BBIM Drawings: Exclude ifc objects hidden from render view"
This reverts commit 6f39648077.
2024-04-15 09:58:26 +02:00
Sigma Dimensions 1bf83ab0b9 BBIM Drawings: Exclude ifc objects hidden from render view 2024-04-15 09:58:26 +02:00
Andrej730 74d5d20d07 Revision Clouds - new annotation type
Short demonstration - https://github.com/IfcOpenShell/IfcOpenShell/assets/9417531/90c9b458-0bae-40a2-9eee-d748e57c24a3

Curently it doesn't have any special representation in viewport and it doesn't have any customisable parameters.

You might get come across error "Revision cloud edges must form just 1 polygon" - it means your edges either don't form any polygon or form 2 or more, both cases are not supported.
2024-04-15 09:58:26 +02:00
Dion Moult 43bfd51ccb Fix #3181. 2024-04-15 09:58:26 +02:00
Dion Moult 122e17d5b5 Fix #3086. 2024-04-15 09:58:25 +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 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
Andrej730 7b5ece2f4a A bit more intuitive adding drawing/schedule to the sheet
Now it will detect currently active sheet even if you have sheet's drawing/titleblock/schedule selected.
2024-04-15 09:56:37 +02:00
Dion Moult 62657e7b9b Filter elements visible in the camera view. Drawing generation is now significantly faster on larger projects (e.g. 24s down to 10s for a portion of the Revit sample project) 2024-04-15 09:52:38 +02:00
Dion Moult 4f8510ad60 Fix #3046. Renaming drawings now updates all drawing references on sheets. 2024-04-15 09:49:53 +02:00
Dion Moult b1b57a9ec9 Fix #3055. Get paths using forward slashes for platform compatibility. 2024-04-15 09:49:53 +02:00
Dion Moult af140c1861 See #3002. Spaces are now managed separately so that they don't conflict with projection polygon merging and raycasting. 2024-04-15 09:49:53 +02:00
Andrej730 c03666c395 Fixed error in disabling text exiting after deleting text literal 2024-04-15 09:49:52 +02:00
Dion Moult 6a25d05e5d Fix #3021. IfcSpatialElements are included in drawings by default. 2024-04-15 09:49:52 +02:00
Andrej730 1cf524b95d Fixed bug in bim.select_assigned_product
It was trying to call method `Drawingcls.get_active_object()` that didn't exist
2024-04-15 09:37:49 +02:00
Dion Moult 507f03640a Fix #3003. 2024-04-15 09:37:49 +02:00
Dion Moult 2b81da2c50 See #2975. Fix bug where custom scales were not loaded correctly. 2024-04-15 09:37:49 +02:00
Dion Moult 00a40024a9 Fix bug where changing object visibility didn't first check for view layer existence. 2024-04-15 09:37:49 +02:00
Dion Moult d9726efee0 Fix #2986. Reimplement Metadata property of EPset_Drawing to include arbitrary metadata as CSS classes. 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 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 7ba65857bd New activate model operator to switch back to a MODEL_VIEW target view subcontext 2024-04-15 09:37:48 +02:00
Dion Moult 92a8bf27c8 Activating a drawing now automatically switches to the preferred target view representation of all elements 2024-04-15 09:37:48 +02:00
Dion Moult 9d006f4eb3 New "cut decorator" that draws cut lines in drawings. 2024-04-15 09:37:48 +02:00
Andrej730 37949a0d80 Added checkboxes to drawing list to mark multiple selected drawings
Checkboxes affect the drawings that will be used when you shift click "Create drawing", "Open Drawing", "Remove Drawing". Previously those opeartors were always applying the action to all drawings.

Also added option to remove selected drawings with shift+click to "Remove Drawing" and added new operator "Select all drawings" to select drawings in one click (you can shift click it to delsect all drawings).

Example - https://i.imgur.com/GAGghu5.png
2024-04-15 09:37:48 +02:00
Dion Moult ba8e6288bc Fix #2955. You can now store default paths in a project pset. 2024-04-15 09:25:51 +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
Andrej730 6f5e39849a Including/Excluding IfcAnnotations from drawing #2903
Including or excluding elements from the drawing using EPset_Drawing.Include/Exclude now also works for IfcAnnotation elements. Both in viewport (on "activate view") and on svg print.

Related change - annotation decorations are now hidden in viewport if their object is hidden.
2024-04-15 09:25:50 +02:00
Andrej730 deacc91470 Fixed errors from 9bca705 2024-04-15 09:25:50 +02:00
Dion Moult c881ed655c Fix #2960. 2024-04-15 09:25:50 +02:00
Dion Moult 47709662b9 See #2516. References to titleblocks, layouts, and published sheets are now explicitly stored. Titleblock paths are now configurable. Generated filenames are sanitised. 2024-04-15 09:25:50 +02:00
Dion Moult 2e466ead37 See #2516. WARNING: breaking changes! Restructure drawing system to use relative paths based on IfcDocumentReference Locations. 2024-04-15 09:25:50 +02:00
Andrej730 5864873945 Solved producing orphan objects data on drawing deletion 2024-04-15 09:25:50 +02:00
Andrej730 d86a1cedc1 Sync viewport visibility based on EPset_Drawing/Include Exclude #2613
It's not real time, it's triggered on using "Activate view" button in "Drawings" section.
2024-04-15 09:25:49 +02:00
Dion Moult ea5069a991 See #2881. Add support for evaluated commands in smart text literals 2024-04-15 09:25:48 +02:00
Andrej730 d4a8de95c5 Automatically adjusted STAIR_ARROWs now stop at the top thread
Previously they were ending at the end of the stair object and problem was that the end of the object could be at the slab underneath the stair.

Example - https://i.imgur.com/Y43v0GM.png
Before - https://i.imgur.com/Ze9DoK2.png
2024-04-15 09:25:48 +02:00