Bruno Postle
891752a569
Move blender object manipulation to inner loop
...
create_orientation_slots() can be called a lot of times recursively, so
only do creation and deletion of dummy objects when absolutely necessary
2025-02-24 19:56:37 +00:00
Bruno Postle
6faef6564e
s/element/product/ in create_orientation_slots()
...
This method should work with anything that has an ObjectPlacement, ie.
an IfcProduct
2025-02-24 19:38:29 +00:00
Bruno Postle
62bd495a9e
Create transform orientation slots #6128
...
Blender supports named UCS coordinate systems. Refreshing the spatial
decomposition panel now creates orientation slots for each unique
spatial element orientation.
Additionally, setting the default spatial container selects an
appropriate orientation slot. eg. if a building is rotated, selecting to
work in a storey will set the orientation to the building orientation.
These slots are only created/updated in the spatial decomposition panel,
maybe they should also be created when loading the file and other
places.
The blender API doesn't currently allow listing custom orientation slots
for deletion, so if a spatial element is deleted or renamed, the old
orientation slot will persist for the rest of the session.
2025-02-23 22:29:42 +00:00
Andrej730
b93cbbf989
black .
2025-02-23 13:29:12 +00:00
Dion Moult
37baa7a57b
Fix #5845 . Allow non GRAPH_VIEW reference representations. Apparently it's a thing in the docs.
...
If anybody can explain to me how Reference is meant to be used (the
example in the docs is really ambiguous) please do :)
bonsai-0.8.2-alpha2502180945
2025-02-18 20:45:05 +11:00
Dion Moult
7ca2c043b5
Fix #6179 . Allow searching for materials in parametric object UI.
bonsai-0.8.2-alpha2502180938
2025-02-18 20:37:50 +11:00
Dion Moult
1e3ddce5c2
Fix #6174 . Accommodate invalid index maps, and also implement an early return for single colours.
...
A single colour index map is a waste but some IFCs have it apparently.
bonsai-0.8.2-alpha2502180739
2025-02-18 18:39:22 +11:00
Dion Moult
c79020aeab
See #5888 . Debugging undos is hard, so include the operator name in the event log.
bonsai-0.8.2-alpha2502180536
2025-02-18 16:31:36 +11:00
Dion Moult
645298e9d6
See #5888 . Fix crash due to improper modal undo handling. It now considers both FINISH and CANCELLED states.
2025-02-18 16:30:27 +11:00
Dion Moult
ae76d3253d
See #5888 . Fix bug where loading type thumbnails made undo history not synced with Blender.
...
If a tool.Ifc.Operator updates a prop, the prop update function will
only call _after_ the operator finishes (and therefore adds an undo step
to the undo stack). If the prop update function then calls another
tool.Ifc.Operator, that will result in another "top-level" operator
call. This second operator _won't_ get added to Blender's undo history,
yet the Bonsai history / IfcOpenShell history will have another undo
step added. Yikes!
TL;DR don't call tool.Ifc.Operator from a prop update function.
2025-02-18 16:27:53 +11:00
Bruno Perdigão
693f7c5397
Fix #6119
bonsai-0.8.2-alpha2502172104
2025-02-17 18:03:25 -03:00
Bruno Perdigão
a8960957c0
Fix #6083
bonsai-0.8.2-alpha2502172009
bonsai-0.8.2-alpha2502172010
2025-02-17 17:09:13 -03:00
Bruno Perdigão
c609aea1de
Black .
bonsai-0.8.2-alpha2502171947
2025-02-17 16:46:58 -03:00
Bruno Perdigão
247bff4075
Polyline tool initial support for custom transformations.
...
Still early development. Only works for XY plane.
https://imgur.com/a/qW8gMFW
2025-02-17 16:46:58 -03:00
Bruno Perdigão
5a3a032fe6
Snap - modify intersection plane origin to be related to the view location.
2025-02-17 16:46:58 -03:00
Andrej730
5d8c2f2ec2
deprecate test-safe #5192
bonsai-0.8.2-alpha2502171305
2025-02-17 17:58:45 +05:00
Andrej730
93ee92c401
Profiles, Materials UI - indicate in UI currently edited element
2025-02-17 17:58:45 +05:00
Andrej730
8c2d71b306
Rename library references from UI
...
Example - https://imgur.com/a/Ez99d1N
2025-02-17 17:58:45 +05:00
Andrej730
8f1446bfa4
Library UI - rename assets and libraries from UI
...
Example - https://imgur.com/a/0kcQrb2
2025-02-17 17:58:45 +05:00
Andrej730
32608ff194
py -m ifcopenshell.validate to use argparse
...
So command would fail if no arguments provided and there would hints on how to use it.
2025-02-17 17:58:45 +05:00
Andrej730
b0fbea60ae
typing
2025-02-17 17:58:44 +05:00
Dion Moult
8f261be338
See #5839 . More accurately consider the relating product definition when checking for shape aspects.
bonsai-0.8.2-alpha2502160609
2025-02-16 17:08:55 +11:00
Dion Moult
42e184c936
Fix #5839 . Appending an asset now also considers shape aspects.
2025-02-16 17:08:34 +11:00
Dion Moult
e0a93626a5
Fix #6038 . Standardardise passing around as_posix() paths
2025-02-16 16:17:18 +11:00
Dion Moult
aaa4be1a94
Fix #5691 . UI tweak to show less colour, more text for usability.
2025-02-16 15:54:28 +11:00
Dion Moult
9f453d54d8
Piles should also default to vertical, just like columns
bonsai-0.8.2-alpha2502160443
2025-02-16 15:43:03 +11:00
Dion Moult
b226a79ee8
See #5888 . Fix bug where polyline tools weren't part of the undo system.
bonsai-0.8.2-alpha2502160049
2025-02-16 11:48:51 +11:00
Dion Moult
774a770c48
Purge usage of mathutils in grid API functions
...
The only thing left is add_representation which is Blender specific
anyway and is slowly being refactored out.
bonsai-0.8.2-alpha2502152121
2025-02-16 08:20:59 +11:00
Dion Moult
aff90e89f7
Don't burn CPU cycles for updating parametric windows
bonsai-0.8.2-alpha2502152047
2025-02-16 07:47:03 +11:00
Dion Moult
aad4dad9a7
Migrate documentation for IfcTester and make optional deps mandatory in PyPI
...
I don't like this, but PyPI makes it really, really hard to "discover"
optional deps and what they're used for. So it's just easier to make it
a mandatory dependency and advanced users can always strip it out. This
stops user reports about "it doesn't work out of the box I only did pip
install ifctester"
2025-02-16 07:46:22 +11:00
Dion Moult
6ac6f13018
Fix #5824 . Prioritise 3D over 2D. Only then consider subcontexts.
...
It's unexpected in our 3D default viewing world to have 2D first over
3D.
bonsai-0.8.2-alpha2502150804
bonsai-0.8.2-alpha2502150805
2025-02-15 19:03:52 +11:00
Dion Moult
d23cfcb2cf
Fix #2981 . Standard case windows can now have different materials and implement shape aspects.
bonsai-0.8.2-alpha2502150732
bonsai-0.8.2-alpha2502150731
2025-02-15 18:31:25 +11:00
Dion Moult
71668fbaf1
Only switch representation once when creating a door
...
Previously it would switch representation (and sync changes) every
single time a new representation was created (in the
replace_obj_ifc_representation function). I think this is misplaced
responsibility. The function should change the representation, but not
be responsible for switching.
2025-02-15 18:29:13 +11:00
Dion Moult
81b7f3dc30
New API function to set shape aspect constituents
2025-02-15 18:26:13 +11:00
Dion Moult
a0fa861b92
Shape builder can now created triangulated face sets
bonsai-0.8.2-alpha2502150510
2025-02-15 16:10:12 +11:00
Dion Moult
a63c8e1d70
Don't burn CPU cycles recalculating the door every draw call in parametric door interface
2025-02-15 16:09:26 +11:00
Andrej730
3e1d1bf7fa
Library UI - tree view
...
Example of tree view with libraries hierarchy - https://imgur.com/a/zPuaoPv
Example of library assignment in non-tree view - https://imgur.com/a/9kZFblj
bonsai-0.8.2-alpha2502141252
2025-02-14 17:51:47 +05:00
Andrej730
20e1fc2618
Fix bug in get_container not passing specified ifc_class to the parent #6155
2025-02-14 17:49:51 +05:00
Andrej730
1014487d82
black .
2025-02-14 17:49:47 +05:00
Dion Moult
3832077d0f
Fix recent regression where util.shape.get_vertices returns a read-only array, so you can't edit in place (e.g. for offsets)
bonsai-0.8.2-alpha2502140206
2025-02-14 13:06:09 +11:00
Bruno Perdigão
768bf17b05
Small fix in snap.
bonsai-0.8.2-alpha2502132127
2025-02-13 18:26:44 -03:00
Bruno Perdigão
fb4ad5290f
Fix mix_snap_and_axis() to ignore intersection too close from polyline.
...
Follows 5fe87bf5aa
bonsai-0.8.2-alpha2502132022
2025-02-13 17:20:10 -03:00
Bruno Perdigão
f20bdd0ab6
Fix issue where detected snap vector where being changed by other function.
...
It was probably a reference issue. Copying the vectors solved the issue.
2025-02-13 16:49:37 -03:00
Bruno Perdigão
5fe87bf5aa
Modify mix_snap_and_axis() to select the snapping point closest to the last point.
bonsai-0.8.2-alpha2502131752
2025-02-13 14:51:40 -03:00
Bruno Perdigão
c23a20df84
Small fix
2025-02-13 14:51:40 -03:00
Bruno Perdigão
b87cd33b12
Polyline tool a snapping system small refactor.
2025-02-13 14:51:40 -03:00
Bruno Perdigão
8acd5321b0
Fix polyline tool angle lock when using XZ and YZ plane
2025-02-13 14:51:39 -03:00
Bruno Perdigão
1165ef3f33
More refactor of the snapping system, after 7e239ac511e991fd8ccf32add878024d921db38b
2025-02-13 14:51:39 -03:00
Bruno Perdigão
2b7108a1d8
Refactor snapping points data structure.
2025-02-13 14:51:39 -03:00
Bruno Perdigão
33d9e050ec
Fix #6123
2025-02-13 14:51:39 -03:00