Andrej730
25d8fff5fd
remove_representation - small optimizations
...
check schema version instead of accessing attribute directly (hasattr under the hood is just doing getattr and checking whether it returns AttributeError), so one less IFC access
Similar thing with element.Item to access IFC just once.
2025-02-20 19:12:24 +05:00
Andrej730
331f491d50
typing
2025-02-20 19:12:24 +05:00
Andrej730
174f909137
Fix #6192
2025-02-20 17:01:12 +05:00
Dion Moult
f4d101788d
Fix insane bug when replacing element that looped through every single element.
2025-02-20 19:18:35 +11:00
Andrej730
67bac441ad
typing
2025-02-19 18:31:06 +05:00
Andrej730
4efb79e472
fix missing get_spline_points in add_representation
2025-02-18 18:50:35 +05:00
Andrej730
527e0f3dbf
set_element_value - fix error for Python 3.9
...
types.EllipsisType was added only in 3.10
2025-02-18 18:50:35 +05:00
Andrej730
8ea3142451
Fix errors removing layers/constituents after eeac0a2
2025-02-18 18:50:35 +05:00
Andrej730
a68cb74699
ifcopenshell.alignment - fix error in Python 3.9
...
match statement was added only in Python 3.10
2025-02-18 18:50:35 +05:00
Andrej730
17642ca4e9
typing
2025-02-18 18:50:34 +05:00
Andrej730
83a351b1c7
black .
2025-02-18 18:50:33 +05: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 :)
2025-02-18 20:45:05 +11: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
42e184c936
Fix #5839 . Appending an asset now also considers shape aspects.
2025-02-16 17:08:34 +11:00
Dion Moult
b226a79ee8
See #5888 . Fix bug where polyline tools weren't part of the undo system.
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.
2025-02-16 08:20:59 +11:00
Dion Moult
aff90e89f7
Don't burn CPU cycles for updating parametric windows
2025-02-16 07:47:03 +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.
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.
2025-02-15 18:31:25 +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
2025-02-15 16:10:12 +11: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
f39e6ccb54
typing
2025-02-12 18:39:27 +05:00
Andrej730
f6087613f0
add_representation - use numpy arrays for calculations that include model offset
2025-02-11 18:14:45 +05:00
Andrej730
57d7d83ebb
Fix Python <3.10 support #6141
2025-02-11 16:50:07 +05:00
Dion Moult
ddf7d1b0b9
Change default behaviour of remove_representation not to remove named profiles
...
I guess this is a Bonsaism but it makes sense as named profiles are
significant, and it isn't the first time materials and profiles have
been treated as "rooted" in a sense. It's also annoying to keep on
having my profile library drop off when I'm just switching profiles.
2025-02-11 20:01:19 +11:00
Dion Moult
eeac0a2e30
Fix bug where removing material set items weren't consistent in how they purged materials and profiles
...
Previously remove_profile would purge unused materials and profiles, but
remove_layer and remove_constituent wouldn't. This was as subtle
inconsitency. Now everything by default consistently retains materials
and profiles, and has options to change this default.
2025-02-11 20:00:17 +11:00
Andrej730
e1c49ad317
Fix error adding transom to parametric door #6129
2025-02-10 16:47:14 +05:00
Dion Moult
1d2214efd9
Fix IfcOpenShell-Python on Python 3.10
...
Elipsis is not allowed for generic typing
2025-02-10 17:26:03 +11:00
Andrej730
59dd105e99
fix get_applicable_entities / get_applicable_types missing schema #6108
2025-02-08 07:54:49 +11:00
Dion Moult
2cc4f96b7f
Fix failing project feature tests. Fix regression where appending an asset might append a named style twice.
2025-02-07 22:02:44 +11:00
Dion Moult
c40d21d945
Fix #6106 . True north must always be 2D.
2025-02-07 13:19:33 +11:00
Dion Moult
3aa4fa580b
Fix regression where you couldn't upgrade schema of IFCs with invalid headers
2025-02-07 12:38:52 +11:00
Dion Moult
b7fb5c90bc
Continue fixing failing tool tests. Fix regression where UV coordinates might have the wrong order.
2025-02-06 17:22:54 +11:00
Andrej730
c16894cabf
Fix bug in 124c028 saving defined unit as defining
2025-02-05 18:27:27 +05:00
Dion Moult
e86624873b
Fix segfault from editing a IFC2X3 georeferencing pset with a null map unit.
...
Doing createIfcIdentifier(None) segfaults.
2025-02-05 14:10:41 +11:00
Andrej730
56f0c19a85
append_asset to support IfcPresentationLayerAssignment #6023
2025-02-04 17:37:56 +05:00
Andrej730
d4f44cb0a1
typing
2025-02-04 17:37:55 +05:00
Dion Moult
50ed756353
Found out layer names don't exist in IFC2X3 that's incredible
2025-02-03 16:04:56 +11:00
Dion Moult
dc79e9e005
More utility functions to jump between representations, styles, and shape aspects
...
It's a bit uncertain where these belong best, we'll find out over time
2025-02-01 16:11:37 +11:00
Dion Moult
d25f57ec40
See #2981 . Adding a door representation now also adds associated shape aspects
...
It doesn't add materials though, that's a separate responsibility right
now
2025-02-01 16:02:57 +11:00
Dion Moult
9f93779ac2
Adding set items can now specify a name at creation for convenience
2025-02-01 16:00:43 +11:00
Dion Moult
8436817408
Update incorrect docs and raise suspicion about how shape aspect styles are assigned
2025-02-01 15:55:34 +11:00
Dion Moult
1a98504328
Fix bug and typo where getting shape aspects for non-geometric types (e.g. walls) would fail
...
This caused an error when updating a style of a material used in a wall
type
2025-02-01 15:54:57 +11:00
Dion Moult
79e4ba5b19
New usecase to add shape aspect with tests
2025-02-01 00:46:00 +11:00
Andrej730
c2ae3dcb08
append_asset - extend existing rels matching them by project guid
...
Mentioned in #6039
2025-01-31 17:12:31 +05:00
Andrej730
089f15a5cc
fix a typo
2025-01-31 15:06:37 +05:00
Thomas Krijnen
919df92888
Virtual inheritance configurable at codegen time
2025-01-30 13:12:42 +01:00
Andrej730
553872ced2
append_asset - fix issue appending elements that have as_entity() -> None #6037 #6039
2025-01-30 16:06:19 +05:00