Andrej730
523e51c775
use json serialization for #4599
...
changed my mind about 5410f14aa , probably better to use `json.dumps` to keep it consistent with how we serialize other attributes
2024-05-01 18:26:58 +05:00
Andrej730
5410f14aa1
ifc2sql - stringify psets list values #4599
2024-05-01 18:03:25 +05:00
Andrej730
45b2411c2b
Fix #4598 after 229c7285c
2024-05-01 17:43:31 +05:00
Andrej730
9f12091c7f
fix bug assigning materials
...
it was clearing all other blender materials - e.g. blender materials associated with representation items styles. Also had the same issue with affecting extra elements as with unassigning materials
2024-05-01 16:42:20 +05:00
Andrej730
bef5d3cca5
blenderbim - fix bug with unassigning material
...
When you would unassign material (e.g. implicitly by removing the object), it might have also removed materials slots from other occurrences of the same type.
Which may had some unexpected sideffects later on - as unassigned styles saving IFC project (BBIM unassigned styles based on a assumption that it was the user decision to remove the materials and related styles).
2024-05-01 16:42:20 +05:00
Andrej730
0f548eb93e
Indicate in UI if type material was overridden by occurrence material
...
Example - https://i.imgur.com/T1hidJg.png
+small optimization in material_name
2024-05-01 16:42:20 +05:00
Andrej730
374348bb81
IfcImporter small optimization
2024-05-01 16:42:20 +05:00
Andrej730
b42f6b1827
ifc delete to show time it took if it was more than 10 secs
2024-05-01 16:42:20 +05:00
Andrej730
addcf531f0
owner.update_owner_history - optimization
...
as it may be used very often
2024-05-01 16:42:20 +05:00
Andrej730
0ef683013a
RegenerateGlobalIds - more informative fixing duplicates
2024-05-01 16:42:20 +05:00
Andrej730
137a306269
typing
2024-05-01 16:42:20 +05:00
Andrej730
fc0ffd1c02
fix a typo #4596 😬
blenderbim-240501
2024-05-01 15:40:45 +05:00
Bruno Perdigão
04172a87cb
when bpy.ops.bim.object_duplicate_move_linked_aggregate is called from the panel, the new objects are placed based on the 3d cursor position
2024-04-30 17:50:31 -03:00
Bruno Perdigão
97e0c43702
Merge pull request #4440 from brunoperdigao/fix-normal-duplication-of-linked-aggregate
...
Fix normal duplication of linked aggregate
blenderbim-240430
2024-04-30 17:01:44 -03:00
Thomas Krijnen
7af9944c27
find_openings() on representation as a hint for hybrid kernel
2024-04-29 21:29:34 +02:00
Thomas Krijnen
405fe4097d
Preliminary attempt at hybrid kernel
2024-04-29 21:03:33 +02:00
Thomas Krijnen
6f540e61ac
Remove outdated todo note
2024-04-29 21:03:09 +02:00
Thomas Krijnen
710f19af08
Prevent stackoverflow on long alignments in adjustments
2024-04-29 21:02:31 +02:00
Thomas Krijnen
e6cc500227
Some basic code to lookup lengths for pre ADD2 schemas
2024-04-29 21:00:59 +02:00
Thomas Krijnen
4e35e7455f
Also lookup style association on solids
2024-04-29 20:57:09 +02:00
Thomas Krijnen
6fdf46f151
Add back support for IfcSphere
2024-04-29 20:56:37 +02:00
Thomas Krijnen
ae2600afb9
Set style name
2024-04-29 20:51:17 +02:00
Thomas Krijnen
d382cf7e23
Fix WeldVertices default in IfcConvert
2024-04-29 20:49:11 +02:00
Thomas Krijnen
aef2d05364
Add back IFC4X3 sec schema to default in cmake
2024-04-29 20:48:43 +02:00
Andrej730
8dde98f543
fix #4592 (after 0da3270)
...
Before IFC4 Shape Aspects counldn't be part of IfcRepresentationMap
blenderbim-240429
2024-04-29 15:22:26 +05:00
Ryan Schultz
9962a0c905
small fix to previous commit. Solves https://github.com/IfcOpenShell/IfcOpenShell/commit/4b56b341243d6b0eed82e8533848b124e82e1344#commitcomment-141442796
2024-04-28 18:57:42 -05:00
Ryan Schultz
4b56b34124
Tweaked UI for Linked Aggregates https://imgur.com/a/rExISKO
blenderbim-240428
2024-04-28 10:34:52 -05:00
Thomas Krijnen
f857c513c5
submodule
2024-04-28 10:17:57 +02:00
Kaare Hansen
41df6410bd
Comment std::cout causing console spam
2024-04-28 10:11:32 +02:00
Ryan Schultz
dcbd6a925d
small fix for #4361 . remove IfcProject for class iterator. See https://github.com/IfcOpenShell/IfcOpenShell/issues/4361#issuecomment-2081223615
2024-04-27 18:13:38 -05:00
Ryan Schultz
3848a21136
fix #4361 : Have the aggregate empty turn on too, if at least one object in the aggregate, is turned on as well
2024-04-27 11:31:39 -05:00
Andrej730
8af37cb4ec
Fix #4586 occurred after e14d96e6e
2024-04-27 12:03:56 +05:00
Ryan Schultz
44c28e9a4c
fix #4327 : reorder format as well
2024-04-26 20:48:59 -05:00
Ryan Schultz
677324927c
fix #4431 : prompt for name, when creating aggregate
blenderbim-240427
2024-04-26 20:09:20 -05:00
Massimo Fabbro
d212344c54
Covering tool more user friendly UI ...
2024-04-26 17:19:28 +02:00
Massimo Fabbro
74da327803
Fix create space from cursor bug where spaces were created always in zero elevation
2024-04-26 17:19:28 +02:00
Massimo Fabbro
f021041b31
Remove the (maybe) unnecessary poll functions for spatial tool and cleaner error messages
2024-04-26 17:19:28 +02:00
Massimo Fabbro
c05d2df116
now spaces created with spatial tool have relative zero elevation origin point
2024-04-26 17:19:28 +02:00
Andrej730
2b926f7906
more descriptive error setting non-optional attributes with None
...
Example:
```
import ifcopenshell
import ifcopenshell.api.owner.settings
ifc_file = ifcopenshell.file(schema="IFC2X3")
ifc_file.createIfcOwnerHistory(OwningUser=None)
# Before:
# Traceback (most recent call last):
# File "\test.py", line 16, in <module>
# ifcopenshell.api.run("owner.create_owner_history", ifc_file)
# File "\ifcopenshell\api\__init__.py", line 172, in run
# result = usecase_class(ifc_file, **settings).execute()
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# File "\ifcopenshell\api\owner\create_owner_history.py", line 111, in execute
# return self.file.create_entity(
# ^^^^^^^^^^^^^^^^^^^^^^^^
# File "\ifcopenshell\file.py", line 350, in create_entity
# e[idx] = arg
# ~^^^^^
# File "\ifcopenshell\entity_instance.py", line 305, in __setitem__
# self.wrapped_data.setArgumentAsNull(idx)
# File "\ifcopenshell\ifcopenshell_wrapper.py", line 5285, in setArgumentAsNull
# return _ifcopenshell_wrapper.entity_instance_setArgumentAsNull(self, i)
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# RuntimeError: Attribute not set
# After:
# Traceback (most recent call last):
# File "\test.py", line 16, in <module>
# ifcopenshell.api.run("owner.create_owner_history", ifc_file)
# File "\ifcopenshell\api\__init__.py", line 172, in run
# result = usecase_class(ifc_file, **settings).execute()
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# File "\ifcopenshell\api\owner\create_owner_history.py", line 111, in execute
# return self.file.create_entity(
# ^^^^^^^^^^^^^^^^^^^^^^^^
# File "\ifcopenshell\file.py", line 350, in create_entity
# e[idx] = arg
# ~^^^^^
# File "\ifcopenshell\entity_instance.py", line 316, in __setitem__
# raise ValueError(
# ValueError: attribute 'OwningUser' is not optional for entity instance of type 'IFC2X3.IfcOwnerHistory'
```
2024-04-26 18:23:19 +05:00
Andrej730
3ac69043d6
bbim to provide default user and organisation in ifc2x3 #4574
...
previously every operation that would try to create owner history would fail with the error below if there wasn't IfcPersonAndOrganisation in the project.
2024-04-26 18:23:19 +05:00
Andrej730
f726708815
edit_object_placement - small optimizations
2024-04-26 18:23:19 +05:00
Andrej730
21e153087a
edit_object_placement - adherence support
...
Update edit_object_placement.py
2024-04-26 18:23:18 +05:00
Andrej730
31d85b715a
typing
2024-04-26 18:23:18 +05:00
Andrej730
344cc1fb7d
file.by_type docs note
2024-04-26 11:49:44 +05:00
Andrej730
82a0c6396c
BBIM support importing IfcRelAdheresToElement #4565
2024-04-26 11:44:52 +05:00
Andrej730
1cea3d21e8
BBIM support importing IfcRelAdheresToElement #4565
blenderbim-240426
2024-04-26 11:44:32 +05:00
Andrej730
640320f70d
shape_builder - create non-optional position for profiles in ifc2x3
2024-04-25 18:05:47 +05:00
Andrej730
29352092aa
fix issue creating 3d location for 2d placement in ifc2x3
2024-04-25 18:05:47 +05:00
Andrej730
5b877b549a
fix numpy typing #4579
...
On older numpy versions, np.ndarray was less forgiving and wasn't allowing passing 1 argument instead of required 2.
And turned out numpy doesn't yet have typing for shapes (https://github.com/numpy/numpy/issues/16544 ), so all matrices and other shapes specified as `npt.NDArray[np.float64]`.
Fixed type discrepancies for `get_edges` and `get_faces` and also had to fix `import_ifc` as Blender apparently has problems with storing np.int32 in custom attributes (https://projects.blender.org/blender/blender/issues/121072 ), tested that Blender is okay with np.int32 in other cases we had (addressing BMesh.verts[i] where `i` is np.int32).
2024-04-25 18:05:47 +05:00
Andrej730
721466c429
typing
2024-04-25 18:05:47 +05:00