Andrej730
871710a0aa
Fix remove_representation error #6059
...
After to_delete was explicitly added as an attribute to ifcopenshell.file (previously it was kind of hacky assigned during batch remove).
2025-01-29 16:02:50 +05:00
Andrej730
85e0fa9147
assign/unassign layer - mention representations
2025-01-29 16:02:50 +05:00
Dion Moult
424cd96fef
Add warning that api.run is deprecated
2025-01-29 19:53:50 +11:00
raj-open
1b3b74127a
guid-stdlibs > v0.8.0: linting
2025-01-28 21:46:34 +01:00
raj-open
85308133e2
guid-stdlibs > v0.8.0: added unit tests
...
NOTE: added in prefix-cases post PR review
2025-01-28 21:46:34 +01:00
raj-open
64a027cfba
guid-stdlibs > v0.8.0: linting
2025-01-28 21:46:34 +01:00
raj-open
285c4bff67
guid-stdlibs > v0.8.0: used underlying base64-to-hex to speed up computations
...
NOTE: The conversions remain exactly as before. But by using standard libraries for conversion, we clean up computations.
2025-01-28 21:46:34 +01:00
Bruno Perdigão
c2c2d2d8f3
Revert 87c7309724. I misunderstood the expected behavior.
2025-01-28 17:37:20 -03:00
Bruno Perdigão
87c7309724
See #5938 . Fix bug where x_angle where changing the wall thickness.
2025-01-28 16:28:23 -03:00
Andrej730
f43e33b969
apped_asset - fix passed removed elements after 3ffc0bc #6044
...
Before 3ffc0bc checking identities were handled by file.add but now it's handled append_asset, therefore should be a way to clean removed entities.
2025-01-28 17:22:26 +05:00
Andrej730
c0306fc729
typing
2025-01-28 17:22:26 +05:00
Andrej730
7bfe844d53
Rename void to feature in code 03bfd828e2
2025-01-28 15:23:43 +05:00
Andrej730
23648ef221
remove duplicated add_feature method
...
It was moved to feature module in 03bfd828e2
2025-01-28 15:23:43 +05:00
Dion Moult
03bfd828e2
See #5919 . API now has support for features, not just openings. Void module is renamed to feature.
2025-01-28 14:18:17 +11:00
Dion Moult
5300f4c78f
Fix failing tests
2025-01-28 10:54:37 +11:00
Dion Moult
8e29e7cdee
Be a bit more forgiving in calculate unit scale to not glitch out on models with no project.
...
It's technically invalid but useful for small snippets.
2025-01-28 10:46:24 +11:00
Dion Moult
6e0954e855
Purge constants file that came from PR.
2025-01-28 10:45:54 +11:00
Andrej730
744487c786
fix test_element after 7b62b03
2025-01-27 17:41:31 +05:00
Andrej730
5fe77b659a
ifcopenshell.util.element.get_elements_by_profile
2025-01-27 17:41:31 +05:00
Andrej730
e71a220f21
typing
2025-01-27 17:41:30 +05:00
Andrej730
7b4fa6b5c0
black .
2025-01-27 17:41:30 +05:00
Dion Moult
3582dc43d9
Add tests for PR #5257 (using cache for fetching units)
2025-01-27 14:40:15 +11:00
Dion Moult
c0aaebcbe9
Fix bug where assigning units didn't necessarily assign to the project, and also didn't overwrite existing units of the same type.
2025-01-27 14:23:02 +11:00
Dion Moult
4af6c24314
Completely untested refactor of #5257 .
...
Removes dependency of file to util (util should depend on file, not vice
versa). Removes auxiliary method.
2025-01-26 21:11:11 +11:00
Dion Moult
ecd72912aa
Purge constants from PR #5257 .
...
I'm not sure I agree here, considering that types are dynamic based on
schema version.
2025-01-26 19:07:02 +11:00
Raj
124c02897c
Feature faster unit method ---> Main ( #5257 )
...
* feature_faster_unit_method > main: added constants
* feature_faster_unit_method > main: extended `file` class to dynamically save unit information
* feature_faster_unit_method > main: refactored `get_property_unit` method
1. split out case that returns the wrong type (dictionary of units) into its own method
2. cleaned up (but preserved) logic
3. refactored common part of all cases (the method which prioritises unit then value-entity then measure_class)
---------
Co-authored-by: raj-open <raj-open@users.noreply.github.com >
Co-authored-by: Dion Moult <dion@thinkmoult.com >
2025-01-26 19:04:49 +11:00
Bruno Perdigão
2b1a59a4f8
Refactor how offset and direction sense interact for wall and slabs.
2025-01-25 16:05:04 -03:00
Dion Moult
38835a4092
See #6030 . You can now select elements in groups recursively.
2025-01-25 14:11:42 +11:00
Andrej730
f3fc55f246
Change <logical> primitive data type from bool to enum
...
As it also has a third value "UNKNOWN" which has it's own meanig in IFC and therefore IfcLogical cannot be represented by simple booleans.
Example in Bonsai - https://i.imgur.com/xuPMcwA.png
2025-01-24 18:45:13 +05:00
Andrej730
d37caedda7
layer.add_layer_with_style
2025-01-24 18:45:12 +05:00
Dion Moult
1083651d0a
Bump IOS back up to 2024-12-14
2025-01-24 09:49:44 +11:00
Andrej730
3eeb58dded
assign_structural_analysis_model to support batching
2025-01-23 18:14:17 +05:00
Andrej730
42d01ac222
Fix append_asset conversion issue after 3ffc0bc #6012
...
Custom file.add wasn't considering IfcLengthMeasure attributes...
2025-01-23 18:14:16 +05:00
Andrej730
5bc91ec4e4
append_asset - fix bug identifying None profiles as equivalent
2025-01-23 18:14:16 +05:00
Andrej730
5c3045b4db
Temporarily disable 3ffc0bc due to a bug with units conversion
2025-01-22 20:45:06 +05:00
Andrej730
b812d21282
Fix non-existent name argument in add_si_unit docs
2025-01-22 19:07:44 +05:00
Andrej730
605a29786c
Fix tests after 7b62b03
...
Since calculate_unit_scale now requires a project.
def calculate_unit_scale(ifc_file: ifcopenshell.file, unit_type: str = "LENGTHUNIT") -> float:
"""Returns a unit scale factor to convert to and from IFC project units and SI units.
Example:
.. code:: python
ifc_project_length * unit_scale = si_meters
si_meters / unit_scale = ifc_project_length
:param ifc_file: The IFC file.
:param unit_type: The type of SI unit, defaults to "LENGTHUNIT"
:returns: The scale factor
"""
> if not (units := ifc_file.by_type("IfcProject")[0].UnitsInContext):
E IndexError: list index out of range
2025-01-22 18:24:52 +05:00
Andrej730
74a9669fa8
Fix error tabbing into IfcRevolvedAreaSolid with a boolean + add resolve_base_items
...
resolve_items couldn't find IfcRevolvedAreaSolid inside a boolean result
2025-01-22 16:35:22 +05:00
Andrej730
391091ad12
typing
2025-01-22 16:34:58 +05:00
Andrej730
a774a75509
black .
2025-01-22 16:00:11 +05:00
Bruno Perdigão
c72f17068c
Add support for direction sense and offset in slabs with x_angle
2025-01-21 10:49:29 -03:00
Bruno Perdigão
5cf4740f8e
Add direction sense and offset support for slabs
2025-01-21 10:49:29 -03:00
Bruno Perdigão
3740b86678
Add handlers to update layer when adding and removing material layer
2025-01-21 10:49:29 -03:00
Dion Moult
7b62b035c9
Fix #5964 . Only get the unit assignment from the project to prevent ambiguity.
...
I really don't know why I didn't do this before.
2025-01-20 23:50:03 +11:00
Andrej730
3ffc0bc39c
append_asset to use custom file.add to prevent duplicating profiles and materials #5925
2025-01-20 16:23:31 +05:00
Andrej730
ecf0d255f7
Roll back build from a65aa92 #6001
2025-01-20 16:16:39 +05:00
Andrej730
c0499a2c88
black .
2025-01-20 16:16:38 +05:00
Dion Moult
a65aa92c87
See #5999 . Revert to older bot build before speed regression.
2025-01-20 12:15:36 +11:00
Dion Moult
5c058dff3e
Fix #5766 . Bump IOS.
2025-01-19 21:49:51 +11:00
Dion Moult
a57a0eb4eb
See #5972 . Prioritise clipping results where possible.
2025-01-19 01:09:11 +11:00