Dion Moult
a3b6a6ea39
Black geom/main.py
2024-06-15 23:50:37 +10:00
Dion Moult
8246d2c593
Aggressively refactor out functions relevant to guessing a false origin to tool.Loader
2024-06-15 23:50:27 +10:00
Dion Moult
1db26aab15
Fix #4837 . Make mathutils dependency optional.
...
In the long term, I'd like to replace mathutils with numpy.
2024-06-15 15:10:36 +10:00
Dion Moult
9331292dd1
Fix bug where editing qtos was hardcoded to IFC4.
2024-06-15 14:07:27 +10:00
Dion Moult
cad7db0162
See #4838 . Consistently use schema_identifiers throughout the code instead of schema to be more explicit.
...
This also means in the future we are better shaped to be a prototyping platform for future IFC versions.
2024-06-15 14:05:37 +10:00
Andrej730
99338187de
prevent possible errors initializing swig wrapper's Settings #4861
2024-06-13 18:19:12 +05:00
Thomas Krijnen
79c0246e6a
Don't sort enum names for correspondence with header
2024-06-12 11:47:27 +02:00
Andrej730
f54f45a051
geom.settings - add a tooltip for available settings #4832
...
example - https://i.imgur.com/eTdqv5J.png
added a test so we won't miss if some setting will be added/removed
2024-06-11 18:26:18 +05:00
Dion Moult
b009913cf4
Fix #4511 . IfcOpenShell builds now read from the VERSION file and expose a __version__ var.
2024-06-11 13:11:14 +10:00
Thomas Krijnen
593fba98c1
Fix USE_PYTHON_OPENCASCADE setting #4832
2024-06-10 21:12:37 +02:00
Andrej730
51f859d8e4
typing
2024-06-10 17:43:06 +05:00
Andrej730
6552463ed9
sequence.remove_task to remove IfcRecurrencePattern
2024-06-10 16:55:21 +05:00
Andrej730
d56da70cae
sequence.assign_recurrence_pattern - fix bug assigning pattern to a task time recurring
...
It wasn't considering that IfcTaskTimeRecurring might be just created and IfcTaskTimeRecurring.Recurrence is None resulting in error below
File "\api\sequence\assign_recurrence_pattern.py", line 120, in assign_recurrence_pattern
if len(file.get_inverse(settings["parent"].Recurrence)) == 1:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\file.py", line 524, in get_inverse
inverses = [entity_instance(e, self) for e in self.wrapped_data.get_inverse(inst.wrapped_data)]
AttributeError: 'NoneType' object has no attribute 'wrapped_data'
2024-06-10 16:55:21 +05:00
Andrej730
6cab7d964e
sequence.remove_work_time to remove IfcRecurrencePattern
...
Previously it was leaving them orphaned.
2024-06-10 16:55:21 +05:00
Andrej730
1343741cfd
sequence.remove_work_calendar to remove related work times
...
Previously they were leaved orphaned
2024-06-10 16:55:20 +05:00
Andrej730
7c713eee65
nest.remove_task to clean up ownerhistory in more cases
...
1) It wasn't removing ownerhistory in the case if task was RelatingObject in IfcRelNests
2) Replaced handling of IfcRelNests as an inverse with direct api calls.
3) Added some basic tests.
2024-06-10 15:51:03 +05:00
Dion Moult
cdce612566
Update all geom settings to new v0.8 syntax
2024-06-09 16:15:55 +10:00
Dion Moult
03b277626f
See #4832 . Use shape.transformation.matrix in v0.8.0
2024-06-08 14:50:02 +10:00
Dion Moult
c4dfbdbe2e
Merge branch 'v0.7.0' into v0.8.0
2024-06-07 23:48:39 +10:00
Andrej730
db98f13982
typing
2024-06-07 17:15:52 +05:00
Andrej730
61c2a2c6c6
remove_work_schedule to unassign a work schedule from a work plan #4819
2024-06-07 17:15:51 +05:00
Andrej730
5c41baeaf1
remove_work_plan - unassign work schedules #4819
2024-06-07 17:15:51 +05:00
Dion Moult
f0a19cb054
Fix #4815 . Purge deprecated old selector syntax.
2024-06-07 20:08:11 +10:00
Dion Moult
af5838cba6
Fix #4821 . Bug where empty true norths were still set.
2024-06-07 16:30:19 +10:00
Dion Moult
d0058a1bde
Fix #4802 . Fix ability to edit CARTESIAN_POINT offset meshes in offset models.
2024-06-07 14:32:00 +10:00
Dion Moult
60ae4e80ce
New get_contained util.element function
2024-06-05 13:04:50 +10:00
Andrej730
5fb7e6e375
resource.remove_resource - fix issue removing resources in ifc2x3
2024-06-03 17:44:05 +05:00
Andrej730
c399eb259a
resource.add_resource_quantity to ensure quantity type is supported
2024-06-03 17:44:05 +05:00
Andrej730
5ccdf187d5
change type of exception when setting non-optional property to TypeError
...
TypeError is more correct since error occurs when user is trying to set some attribute value with None while atttribute doesn't support None type. ValueError is typically raised when provided value has a correct type but unsupported value.
2024-06-03 17:44:05 +05:00
Andrej730
4a5d1eba0b
specify exported api methods in __all__
...
It's py.types requirement, similar to 6e2edbf
Example issue without __all__:
import ifcopenshell
import ifcopenshell.api.project
# "create_file" is not exported from module "ifcopenshell.api.project"
ifcopenshell.api.project.create_file()
2024-06-03 17:44:05 +05:00
Andrej730
70091aa28b
typing
2024-06-03 17:44:04 +05:00
Dion Moult
c5d1801e1e
Fix #4786 . Speed up parent filter.
2024-06-02 17:39:23 +10:00
Ryan Schultz
e2dc5f4a48
small tweak
2024-06-01 08:19:41 -05:00
Dion Moult
70064359c3
Whoops x2
2024-06-01 20:52:05 +10:00
Dion Moult
d8b74cf125
Whoops
2024-06-01 20:30:32 +10:00
Dion Moult
00c13c5ea4
Fix #4756 . You can now use parent as a key in a selector key.
2024-06-01 17:30:21 +10:00
Dion Moult
e26dae67aa
Convenience function for calculators to get maximum XY length
...
This is useful for 2D profiles
2024-06-01 15:11:29 +10:00
Dion Moult
6e30cd2ba7
Fix #4638 . You can now filter by parent (in the spatial hierarchy)
2024-06-01 15:10:45 +10:00
Dion Moult
0f9ea1e1e7
New utility functions to get parent in spatial hierarchy, filled void, and voided element
2024-06-01 15:09:05 +10:00
Dion Moult
128ffc8fd7
Fix bug where selector didn't handle "not equals" correctly for locations or groups
2024-06-01 14:53:55 +10:00
Andrej730
162e66b775
typing
2024-05-31 18:20:46 +05:00
Andrej730
c05abc4d5b
ifc4x3 support for adding IfcQuantityCount #4776
...
In IFC4X3 IfcQuantityCount is now more strict and requires only interger values.
Error for a reference:
TypeError: attribute 'CountValue' for entity 'IFC4X3.IfcQuantityCount' is expecting value of type 'INT', got 'float'.
2024-05-31 18:20:46 +05:00
Andrej730
dacb3b101c
small docs fix
2024-05-31 18:20:46 +05:00
Andrej730
45a1655485
typing
2024-05-29 18:00:44 +05:00
Andrej730
ce26d931c1
regenerate ifc4x3 pset templates after the release
...
Change log
Different props in pset 'Pset_BuildingCommon':
- new props: ElevationOfTerrain, ElevationOfRefHeight
New template 'Pset_DoorLiningProperties' with props: LiningDepth, LiningThickness, ThresholdDepth, ThresholdThickness, TransomThickness, TransomOffset, LiningOffset, ThresholdOffset, CasingThickness, CasingDepth, LiningToPanelOffsetX, LiningToPanelOffsetY
New template 'Pset_DoorPanelProperties' with props: PanelDepth, PanelOperation, PanelWidth, PanelPosition
New template 'Pset_PermeableCoveringProperties' with props: OperationType, PanelPosition, FrameDepth, FrameThickness
Different props in pset 'Pset_Stationing':
- new props: HasIncreasingStation
New template 'Pset_WindowLiningProperties' with props: LiningDepth, LiningThickness, TransomThickness, MullionThickness, FirstTransomOffset, SecondTransomOffset, FirstMullionOffset, SecondMullionOffset, LiningOffset, LiningToPanelOffsetX, LiningToPanelOffsetY
New template 'Pset_WindowPanelProperties' with props: OperationType, PanelPosition, FrameDepth, FrameThickness
2024-05-28 18:01:33 +05:00
Andrej730
eeaa0a5530
Fill IfcPropertySetTemplate.TemplateType in ifc2x3 pset templates
2024-05-28 18:00:22 +05:00
Dion Moult
54951d2102
Add convenience max/min functions for xyz and side_area shape calculations
2024-05-28 17:30:01 +10:00
Dion Moult
8403c32e76
Adjust selector's behaviour to use the elements argument as a filtering subset
...
This was always the original intention, but never worked as designed. This is so that you don't need to filter the entire file (which can be huge).
2024-05-28 17:30:01 +10:00
Andrej730
02fd78df14
datetime2ifc to support None values as it was before ebd03e9 #4734
2024-05-27 17:34:28 +05:00
Dion Moult
7142f3856c
Add documentation for some unit utilities
2024-05-27 09:42:28 +10:00