Compare commits

...

2106 Commits

Author SHA1 Message Date
Bruno Postle dbe2c541c7 Orientation slot feature now has limited scope
No support for setting up blender orientation slots for multiple
containers or for non-spatial elements.  Setting the default container
switches to an appropriate orientation slot if the orientation of this
container isn't global.
2025-03-22 08:40:20 +00:00
Bruno Postle 7d4a017c15 Don't create orientation slots for all spaces
Trying to create orientation slots for all spaces could potentially
involve a lot of duplicate method calls because blender has no way to
query the list of existing orientation slots, so we can't check to see
if setting a slot is necessary.

So this patch now simply creates/overwrites and uses a single
orientation slot whenever the user switches the default spatial
container, and then only if the spatial orientation is non-world.
2025-03-14 19:17:50 +00:00
Bruno Postle 14f5aa7c4f Merge branch 'v0.8.0' into orientation_slots 2025-02-24 22:07:27 +00:00
Bruno Postle c585c789ac Follow orientation through ContainedInStructure
create_orientation_slots() can be given an element and it will find the
highest matching parent product orientation via elements and/or
spatial elements
2025-02-24 21:53:42 +00:00
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
Thomas Krijnen 70182d943d Update build_osx.yml 2025-02-24 17:11:01 +01:00
Andrej730 0bd4451ce9 Fix issue not cleaning up the mesh after 76277c35d2 2025-02-24 19:31:36 +05:00
Andrej730 899ada0019 Fix purge unused types test after 3bb4243 2025-02-24 18:52:35 +05:00
Andrej730 f6ae711f6c Fix feature tests failing due to AuthoringData changes
relating_type_id now relies on type_elements which relies on ifc_class_current and they wasn't updated when ifc_class was changed.

Typical failing test looked like "TypeError: bpy_struct: item.attr = val: expected a string enum, not int".
2025-02-24 18:52:35 +05:00
Andrej730 1d815cdb67 Fix issue reloading AuthoringData from workspace at every draw call
If data was already loaded for BIMTool ("all") this ` elif ifc_element_type == "all" and AuthoringData.data["ifc_element_type"] is not None:` would always fail and this `AuthoringData.data["ifc_element_type"] != ifc_element_type` would always result to True, constantly recalculating data on every draw call.

This may uncover some issues that were hidden by the constant update (e.g. the bug fixed in the next commit).

Simplified it so now ifc_element_type is almost always referring to either ifc class or None. It's still using "all" in the BIMTool itself but then it's converted to None when passed to draw methods.
2025-02-24 18:52:35 +05:00
Andrej730 ce6339869d Fix some feature tests 2025-02-24 18:52:35 +05:00
Andrej730 5eb9cb2ee4 len(get_inverse) -> get_total_inverses 2025-02-24 18:52:35 +05:00
Andrej730 6eda4e389c typing 2025-02-24 18:52:34 +05:00
Andrej730 0783f8082e black . 2025-02-24 18:52:34 +05:00
Thomas Krijnen 3854afb34d Update build-all.py; --force when fetch tags 2025-02-24 14:01:48 +01:00
Thomas Krijnen 0b2321f478 Add template keyword 2025-02-24 13:33:53 +01:00
Thomas Krijnen 5510fb1e3c Add constexpr 2025-02-24 13:30:45 +01:00
Thomas Krijnen 7331f7361f Workaround explicit in-class specialization to if constexpr #6206 2025-02-24 13:30:24 +01:00
Andrej730 e06684e274 Comment out outdated code #6200 2025-02-24 16:46:32 +05:00
Andrej730 57d6e9b544 Fix error reassigning class for structural items 2025-02-24 15:15:54 +05:00
Andrej730 5fa0aa03e4 util.schema.is_a - use c++ implementation 2025-02-24 15:15:54 +05:00
Andrej730 1d2ac9426d Fix error during class reassignment after 43cc7a0 2025-02-24 15:15:54 +05:00
Andrej730 e79a85a4fd bim.edit_container_attributes - remove deprecated operator
Currently you can edit container name directly from spatial manager, so this operator is no longer needed (and it also was missing from UI either way).
2025-02-24 15:15:54 +05:00
Andrej730 076a6c152d fix typo 2025-02-24 15:15:54 +05:00
Andrej730 76277c35d2 Fix for 365393aa07
ahh, forgot that representation is already removed at this point
2025-02-24 15:01:00 +05:00
Thomas Krijnen a81b4a7dbb Create build_all.yml 2025-02-24 10:30:49 +01:00
Andrej730 ee8a3927b4 Fix displaying some attr types names after e8cb9e7 #6216 2025-02-24 14:20:49 +05:00
Andrej730 365393aa07 Fix #6209 after 67bac44 2025-02-24 14:01:24 +05: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
Thomas Krijnen 9289e1d0cc Try catch to keep the people happy #6176 2025-02-23 15:50:31 +01:00
Thomas Krijnen c30b5cbc08 Add std::array typemap #6137 #6191 #6196 2025-02-23 15:22:36 +01:00
Thomas Krijnen 9736345d79 Test case #6173 2025-02-23 14:46:31 +01:00
Thomas Krijnen 5599e52184 Option to retain original edges in cgal for non-boolean non-face-with-voids inputs #6173 2025-02-23 14:46:10 +01:00
Andrej730 b93cbbf989 black . 2025-02-23 13:29:12 +00:00
Thomas Krijnen ce26af5a7e Use ProfileType in mapping #6175 2025-02-23 11:01:17 +01:00
Dion Moult 973c9e2ec9 See #1227. Implement axis updating for new wall join code. 2025-02-23 18:59:17 +11:00
Dion Moult 29a890662e See #6201. Another typing regression fix. 2025-02-23 18:30:58 +11:00
Dion Moult b42c3ba8c2 See #1227. Wall layer test script now supports atstart/atend combo test cases and materials. 2025-02-23 17:28:14 +11:00
Dion Moult a7509dbe29 See #1227. Experimental support for 3D layerset slicing. 2025-02-23 17:27:32 +11:00
Dion Moult 23158b1b7e Fix #6201. Regression in creating drawings due to typing in 67bac441ad 2025-02-23 12:02:50 +11:00
Richard Brice 8c16f394c1 Updates alignment api
Fixes mapping of vertical alignment parabola business logic to geometry. Adds creation function of h and v alignment. Adds stationing referent at start of alignment. Fixes utility functions
2025-02-22 16:16:59 -08:00
Richard Brice 12f8a1f769 Adds utility to stringize station values 2025-02-22 16:15:00 -08:00
Richard Brice 7ffd2742d6 Fixes bug mapping geometry for IfcSectionedSolidHorizontal that was introduced in 26ba761 2025-02-22 16:11:10 -08:00
Richard Brice 6429fe34ed Implements IfcHierarchyHelper.addRelatedObject for IfcRelDefinesByType 2025-02-22 16:11:06 -08:00
Jonas Frei d38f56e82d fix: bug in initialization of gltf serialiser fixed 2025-02-22 15:31:45 +01:00
Dion Moult c549dea943 See #1227. Test script for priority-aware wall layer joins. 2025-02-22 20:01:17 +11:00
Andrej730 894c05e138 Fix old typo in 686f4a0 2025-02-21 18:45:23 +05:00
Andrej730 92c2fc0b7f Fix errors regarding added PredefinedType to IfcAnnotations in IFC4X3 #6200
In IFC4X3 IfcAnnotation now has PredefinedType and checking ObjectType isn't enough.
2025-02-21 18:45:23 +05:00
Andrej730 ee2fa739bb remove_deep2 - fix traversing same element twice
(I hope I don't miss anything, no tests seem to fail and performance is increased significantly) but because `subelement_queue` initiated with the `traverse` all `element`'s subelements will be traversed inside `while` loop twice - once as a part of initial queue and another time when `element` is traversed inside the loop and all those elements added to the queue again.
Now we just initiate the `queue` with the `element` and it will be traversed inside the loop like any other element.
2025-02-21 18:45:12 +05:00
Andrej730 f7efbe5924 remove_representation - optimizations
1) `do_not_delete` performs best when it's set
2) also_consider when `element` related elements go first, so there will be no need to traverse all other elements to see if they cover `element`'s inverses.
2025-02-21 18:45:11 +05:00
Andrej730 6e20ee9fea remove_deep2 - also_considered_inverses optimization
1) replaced walk with traverse(max_levels=1)
2) early return if there total_inverses == 0
3) early return if also_considered_inverses is enough to cover total_inverses
2025-02-21 18:45:11 +05:00
Andrej730 e6d3396630 typing 2025-02-21 18:45:11 +05:00
Andrej730 cf1647a451 Fix bugs in 17642ca4e9 2025-02-21 17:31:33 +05:00
Andrej730 69535c53e0 Fix typo in 4bb32b252d #6199
ahh
2025-02-21 17:31:33 +05:00
Bruno Perdigão fed8c21625 Polyline tool - Improves the preview fix for #6083 by avoiding overlapping edges. 2025-02-20 22:52:42 -03:00
Bruno Perdigão 0f92c2d26b Fix #6161
Error - cannot access local variable 'snap_point'
2025-02-20 22:21:44 -03:00
Bruno Perdigão c11060b46a Fix #6185 issue when trying to create a slab with only two points. 2025-02-20 21:13:39 -03:00
Bruno Perdigão 9f0d408e79 See #6190. Polyline tool support for XZ and YZ planes for profiles. 2025-02-20 18:46:23 -03:00
Bruno Perdigão d37baa4e0c Fix calculation for polyline tool when working with X, Y and Z. 2025-02-20 18:22:10 -03:00
Bruno Perdigão ae4f125371 Fix auto-angle snapping in polyline tools.
When locked to a plane, the mouse will be loosely locked to and angle
that is divided by 15 degrees. This was not working properly for "XZ"
and "YZ" planes.
2025-02-20 18:22:10 -03:00
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
Dion Moult b19ece18c6 Fix minor regression in linking models due to new tool call. 2025-02-20 23:21:59 +11:00
Andrej730 abddc739fe Fix UI for 4bb32b252d 2025-02-20 17:19:31 +05:00
Andrej730 174f909137 Fix #6192 2025-02-20 17:01:12 +05:00
Andrej730 a826115803 Project Library UI - allow expanding libraries hierarchy even if there are no assets yet 2025-02-20 14:33:00 +05:00
Andrej730 79abbad796 Project Library UI - fix library asset count not considering assets from sublibraries
As a result if all elements were assigned to sublibrary, it was showing that library itself has 0 assets and wasn't allowing to expand to see the sublibraries.
2025-02-20 14:33:00 +05:00
Andrej730 04a20b5c80 small fix for 4bb32b252d 2025-02-20 14:33:00 +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 4bb32b252d IFC Delete - add logs to system console
In some cases deletion can take ages, so there should be at least some way for user to find out how it's going.
2025-02-19 18:31:30 +05:00
Andrej730 8b92b28dfc should_clean_mesh - add description 2025-02-19 18:31:09 +05:00
Andrej730 43cc7a0304 Replace direct access to IfcStore with tool.Ifc 2025-02-19 18:31:07 +05:00
Andrej730 67bac441ad typing 2025-02-19 18:31:06 +05:00
Andrej730 6c511f6b1b Project library UI - fix missing elements added to parent libraries
Previously if there was library A and it had sublibrary B and then some element were directly assigned to library A, UI still wouldn't show this element and would show only elements assigned to the B, the last library in the hierarchy
2025-02-19 17:53:59 +05:00
Dion Moult deb0a46acb Fix #6186. Don't hide filter UI if there are no results. 2025-02-19 17:52:34 +11:00
Dion Moult ee0599e263 Fix #6136. Allow setting of custom tmp dir, useful for packaged envs like flatpak 2025-02-19 17:44:48 +11:00
Dion Moult a8efd53d6b Fix #6182. For convenience, precalculate scale value for projected CRS map unit map conversion 2025-02-19 16:41:20 +11:00
Dion Moult 02f0c92a41 Fix bug where updating the null value on an enum property would lead to infinite recursion 2025-02-19 16:39:24 +11:00
Bruno Perdigão f11e09c7d8 See #6121. Area measurement tool now uses IFC area unit. 2025-02-18 19:37:22 -03:00
Richard Brice bb1e00e474 Fixes problems mapping vertical alignment segments business logic to geometry 2025-02-18 12:43:11 -08: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
Dion Moult 7ca2c043b5 Fix #6179. Allow searching for materials in parametric object UI. 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.
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. 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 2025-02-17 18:03:25 -03:00
Bruno Perdigão a8960957c0 Fix #6083 2025-02-17 17:09:13 -03:00
Bruno Perdigão c609aea1de Black . 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 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. 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 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. 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 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.
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 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 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
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) 2025-02-14 13:06:09 +11:00
Bruno Perdigão 768bf17b05 Small fix in snap. 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
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. 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
Andrej730 b88fd964bc bim.refresh_library - add missing undo flag
It's unsafe in Blender to leave operators that edit blend data without undo flag.
2025-02-13 18:55:44 +05:00
Andrej730 0b32c89c26 use_smooth - use correct buffer length
apparently it wasn't creating any issues but still creating larger buffer than necessary
2025-02-13 18:55:44 +05:00
Andrej730 9db1783062 more numpy arrays to match expected buffer type 2025-02-13 18:55:44 +05:00
Dion Moult 2d54a48f8e Add option for door glazing material 2025-02-13 19:18:17 +11:00
Dion Moult 39a30f2577 Redesign profile edit interface to be consistent like all other list+edit button interfaces
I kept on clicking the wrong thing
2025-02-13 19:18:02 +11:00
Dion Moult 1e946fd98e Fix three small but significant typos in previous fixes.
BTW @andrej730 that optimisation is awesome. Here's a timeit:

import bpy
import numpy as np
import timeit

obj = bpy.context.active_object
verts = obj.data.vertices

def foreach_get_method():
    coords = np.empty(len(verts) * 3, dtype=np.float32)
    obj.data.vertices.foreach_get("co", coords)
    coords = coords.reshape(-1, 3)
    coords = coords.astype("d")
    coords /= 10
    return coords

def list_comprehension_method():
    coords = [v.co / 10 for v in verts]
    return coords

# Number of times each function will be executed
num_runs = 10000

t_listcomp = timeit.timeit(list_comprehension_method, number=num_runs)
t_foreach = timeit.timeit(foreach_get_method, number=num_runs)

print("foreach method: {:.6f} seconds over {} runs".format(t_foreach,
num_runs))
print("List comprehension method: {:.6f} seconds over {}
runs".format(t_listcomp, num_runs))

# foreach method: 0.088656 seconds over 10000 runs
# List comprehension method: 0.644446 seconds over 10000 runs
2025-02-13 13:07:29 +11:00
Richard Brice 79046e2970 Compute horizontal project of vertical spiral curve 2025-02-12 16:47:51 -08:00
Dion Moult f6c6cc9a1b Fix #6131. Fix bug where you could potentially create an invalid composite profile with no profiles. 2025-02-13 07:35:58 +11:00
Dion Moult af03953ef7 Apparently you couldn't edit composite profile defs. Now you can. 2025-02-13 07:35:58 +11:00
Thomas Krijnen cdcbc2ad3b Fix 2d boolean check for periodic curves #6147 2025-02-12 16:08:32 +01:00
Andrej730 ba2456ad36 Move common code to create_mesh_from_shape 2025-02-12 18:39:27 +05:00
Andrej730 299b5bcf6b Optimize loading meshes using numpy arrays
1) avoid calling geometry.xxx multiple times as each time it creates a new copy
2) use numpy arrays with correct data type, so Blender could perform buffer copy significantly reducing overhead
2025-02-12 18:39:27 +05:00
Andrej730 cb95539cb0 reuse get_cartesian_point_offset 2025-02-12 18:39:27 +05:00
Andrej730 7b78ebc0f3 Fix possible float precision issues similar to f6087613f0 2025-02-12 18:39:27 +05:00
Andrej730 f39e6ccb54 typing 2025-02-12 18:39:27 +05:00
Dion Moult 3e1710c6fc Fix bug where duplicating a curve (which would result in a new curve) didn't go in the same collection nor was linked to the right item due to a typo 2025-02-12 23:53:54 +11:00
Thomas Krijnen fac5104bd8 Take into account edge orientation also for polygonal edges #6113 2025-02-12 10:57:30 +01:00
Thomas Krijnen 51c4059771 20.04 is closing down 2025-02-12 10:31:14 +01:00
Dion Moult f24de9d384 Fix bug where you couldn't add a meshlike object in a boolean hierarchy 2025-02-12 15:36:57 +11:00
Dion Moult 1e08a71c5a Fix bug where disabling item mode didn't also quit from the boolean editing mode
These two modes should be tied together.
2025-02-12 15:31:56 +11:00
Dion Moult 24b4be3ea1 Fix bug where item positions weren't synced before changing numeric attributes 2025-02-12 08:40:21 +11:00
Dion Moult d2420c2e45 Revert "Hotfix for PyPI < python 3.11". Release made.
This reverts commit d093d80698.
2025-02-12 08:03:36 +11:00
Dion Moult d093d80698 Hotfix for PyPI < python 3.11 2025-02-12 07:53:20 +11:00
Bruno Perdigão aef972a518 Enable snapping of overlapped objects when viewport is in x-ray mode. 2025-02-11 12:31:24 -03:00
Bruno Perdigão 06c6fa5dff Fix #6064
Slabs offset are now measured perpendicularly.
2025-02-11 10:33:29 -03:00
Andrej730 f6087613f0 add_representation - use numpy arrays for calculations that include model offset 2025-02-11 18:14:45 +05:00
Andrej730 45e36590eb Add paste buffer to outliner context menu #6139 2025-02-11 18:14:45 +05:00
Andrej730 7f37acfd38 Fix typo 2025-02-11 18:14:44 +05:00
Andrej730 de2329c352 bim.override_paste_buffer - add description 2025-02-11 18:14:44 +05:00
Andrej730 09abf0c7ab bim.override_paste_buffer - fix issue when ctrl-v might unlink currently selected ifc elements 2025-02-11 18:14:44 +05:00
Andrej730 77c2e626b3 Add info message on paste
Original Blender `view3d.pastebuffer` had an info missing and it wasn't displayed in UI since it's coming from suboperator. New info message also mentions that objects were unlinked from IFC
2025-02-11 18:14:44 +05:00
Andrej730 9ea6a1fc75 typing 2025-02-11 18:14:44 +05:00
Andrej730 5b7964f04c black . 2025-02-11 18:14:44 +05:00
Andrej730 57d7d83ebb Fix Python <3.10 support #6141 2025-02-11 16:50:07 +05:00
tim 2f4c3de92d New icons
add_from_closed_loop and add_from_perimeter
2025-02-11 21:32:03 +11:00
tim 136270b566 IFC icon in Scene dropdown
custom white mode support for IFC icon in scene drop down menu
2025-02-11 21:31:15 +11:00
tim 557a5f03d2 Icon mode for Open-Recent-IFC-Project
Added UIData class with function for storing icon color mode. Open Recent IFC Project icons now supports blender dark, blender light, and custom "white" themes
2025-02-11 21:31:15 +11:00
tim 4e1ff8ea6a Icon mode for IFC Modes
Added UIData class with function for storing icon color mode. IFC Mode dropdown now supports blender dark, blender light, and custom "white" themes
2025-02-11 21:31:15 +11:00
tim 08680d8726 Geographic Element Tool Icon
My tree was missing
2025-02-11 21:31:15 +11:00
Dion Moult 53cf1ee0a1 Fix UI bug where changing the profile name didn't result in the UI being refreshed 2025-02-11 20:03:50 +11: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
Dion Moult 1f83b4f7a0 Fix bug where non-columns would still behave like columns if they were profiled which is unintuitive
On second thoughts only columns should go up, everything else should go
wherever you click to. Not really a bug, just an unexpected default.
2025-02-11 18:54:45 +11:00
Dion Moult ada8cc90ef Very minor docs rst syntax fix 2025-02-11 18:53:32 +11:00
Andrej730 21562d7e7d Add distinguishable name for arrays constraints 2025-02-11 12:06:40 +05:00
Andrej730 77f9dbf4f0 small fix for 4c0a7e1ca9
mentioned in #6129
2025-02-10 19:11:13 +05:00
Andrej730 875dd37579 Save Blender preferences on Blender Restart #6095 2025-02-10 17:41:28 +05:00
Andrej730 e1c49ad317 Fix error adding transom to parametric door #6129 2025-02-10 16:47:14 +05:00
Andrej730 8e9d4be55d Improve error logs for failing profiles #6131 2025-02-10 16:47:14 +05:00
Andrej730 65d65972ac Fix occurrence name function prop missing after ce8bdff 2025-02-10 16:47:14 +05:00
Andrej730 b2d66bbb89 Fix bug where selecting element / element type without representation wasn't updating bim tools active type 2025-02-10 16:47:13 +05:00
Andrej730 d8a250f153 Update Annotation Tool types when selecting elements #6134
Similar to other BIM Tools

Update handler.py
2025-02-10 16:47:13 +05:00
Andrej730 4c0a7e1ca9 typing 2025-02-10 16:47:13 +05:00
Dion Moult 11c6b55f7c Revise the modern COBie 2.4 implementation to also allow PointOfContact/WarrantyPeriod
Legacy COBie 2.4 allowed this but not sure why it dropped off.
2025-02-10 17:26:51 +11: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
Dion Moult cb027c80f9 Fix dev install script - brick schema directory changed 2025-02-10 10:50:25 +11:00
Dion Moult 44c7c6d14e Bump to 0.8.2 2025-02-09 16:45:44 +11:00
Dion Moult 3e7f244100 Drop Windows 32bit support for this release as it isn't built. We can restore it in the future if needed. 2025-02-09 14:59:15 +11:00
Dion Moult da1c92c42b Bump IOS
Previous one didn't have the full matrix, so we can't release with it
2025-02-09 14:53:32 +11:00
Dion Moult 17682498da Minor UI cleanup for reorganised visibility buttons 2025-02-09 14:53:09 +11:00
Dion Moult 5db6738ac2 Test to see if this has any impact on reloading the add-on. 2025-02-08 19:27:34 +11:00
Dion Moult eabdb5d281 Consolidate selection and visibility tools in the spatial manager into a single location with a single function for filtering
There were a number of inconsistencies between the modes and how keyword
filtering affected results. This should resolve it.
2025-02-08 16:38:29 +11:00
Andrej730 59dd105e99 fix get_applicable_entities / get_applicable_types missing schema #6108 2025-02-08 07:54:49 +11:00
Andrej730 a28070afef Hide Edit Profile for material sets without profiles #6103 2025-02-08 07:54:49 +11:00
Andrej730 689e2718e5 Fix conversion to profile for breps #6103 2025-02-08 07:54:49 +11:00
Andrej730 a2ab3972c8 bim.update_representation - add note about about material unassignment 2025-02-08 07:54:49 +11:00
Andrej730 667223da8e typing 2025-02-08 07:54:49 +11:00
tim 1e58a517a0 Dark mode extend icon (#6112)
dm_extend.png icon was missing

Co-authored-by: tim <tjrhyder@gmail.com>
2025-02-08 07:51:33 +11:00
Dion Moult fcee54c572 Fix regression when removing an active representation.
Some tests removed since they no longer make sense with the new item
editing mode.
2025-02-08 00:21:38 +11:00
Dion Moult 889a9e3891 Tweak failing test to now allow assigning elements to scaled multi-user objects
Previously this was not allowed, but I don't see why not
2025-02-08 00:20:25 +11:00
Dion Moult 7bc1992963 Fix regression where adding a new occurrence should not change your active context back to body if you've switched it. 2025-02-07 23:52:55 +11:00
Dion Moult 49c3a55456 Fix failing pset_template tests. Regression in 5bd24b276 for editing pset template properties. 2025-02-07 23:33:33 +11:00
Dion Moult f11d79f8c1 Fix cost and drawing feature tests 2025-02-07 22:40:17 +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 bb46a1659d Fix light and georeference feature tests
Not setting the year meant our date calc tests would fail every year :)
2025-02-07 17:19:27 +11:00
Dion Moult f09002c7e2 Fix regression in caeabe2 where actor data didn't load. 2025-02-07 16:58:45 +11:00
Dion Moult 9f75a14204 Update issue templates 2025-02-07 13:31:59 +11:00
Dion Moult c40d21d945 Fix #6106. True north must always be 2D. 2025-02-07 13:19:33 +11:00
Dion Moult 0d3245102f Fix remaining failing tool tests 2025-02-07 13:12:02 +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 4c255cca43 Fix failing model tests and regression 0899a2a8 where switching geometry can invalidate old meshes
The fix in 0899a2a8 ensured that when you switched geometry, all other
elements (sharing the same type or representation) would also switch
alongside it. However it would lead to mesh invalidation which broke
some assumptions in the style code. The style code also repeated a lot
of the logic of switch representation (i.e. finding shared
representations) so this seems simpler.

In general the whole representation part of the code is messy and
hopefully over time it'll get better.
2025-02-07 12:35:08 +11:00
Dion Moult e603ebed04 Fix bug where loading a types ignored style assigned via a material
For occurrences, the iterator would populate ios_materials if there is a
material / style associated with it. However, for types we do
create_shape to the representation directly, so we need to do the
material / style check manually.
2025-02-07 12:29:17 +11:00
Andrej730 38e6f09c91 Fix #6096 2025-02-06 18:26:14 +05:00
Andrej730 6473fa4b67 Deprecate workaround for universal wheels
Tested on Blender 4.3.2 and universal wheels are now supported without this hack, see https://projects.blender.org/blender/blender/issues/125091
2025-02-06 18:26:14 +05:00
Andrej730 38adaf4d18 Fix running critical tests in ci 2025-02-06 18:26:14 +05: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
Dion Moult 23efb09ba6 Add links to Linux packages 2025-02-06 09:46:59 +11:00
Dion Moult cf6280b928 Rename BlenderBIM to Bonsai in a few more spots 2025-02-06 09:24:25 +11:00
Andrej730 c16894cabf Fix bug in 124c028 saving defined unit as defining 2025-02-05 18:27:27 +05:00
Andrej730 5df297c23c Fix failing facet test after 124c028 2025-02-05 18:27:27 +05:00
Andrej730 b2b3a83463 ci - fix missing ifctester for tests 2025-02-05 18:27:27 +05:00
Andrej730 4b0b0191ba Test enabling/disabling Bonsai before uploading to unstable repo #6075 2025-02-05 18:27:27 +05:00
Dion Moult a92306d413 Fix #6097. Be more defensive against selection state when moving objects into new containers. 2025-02-05 20:28:29 +11:00
Dion Moult f457ce8270 Fix failing unit/system/geometry tool tests. Fix regression where object scales weren't applied in the new add element approach. 2025-02-05 18:50:37 +11:00
Dion Moult 590c2e120c Fix failing drawing tool tests. Also consolidate relative paths using tool.Ifc.get_uri.
The same issue of handling relative paths, doing as_posix, checking
drives, etc was solved again and again in slightly different ways. This
centralises it.
2025-02-05 17:17:09 +11:00
Dion Moult 13746eb55e Fix CI job a unique name so it can be used as a requirement for PRs
It seems as though the UI only selects by job name and we use the name
"build" everywhere.
2025-02-05 14:28:42 +11:00
Dion Moult 55b9c7d6bf Fix failing ifcpatch tests 2025-02-05 14:10:41 +11: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 ae11f205f3 Fix missing unregister for some tools #6075
PileTool, PlateTool, RampFlightTool, StairFlightTool were never unregistered leading to issues on Bonsai update
2025-02-04 17:37:57 +05:00
Andrej730 457f9c6aef Select pset template for the pset in pset template ui for editing
Example - https://imgur.com/a/h46Ewhk
2025-02-04 17:37:56 +05:00
Andrej730 cc88bd4a9d Fix issue adding project library if other library was already in edit 2025-02-04 17:37:56 +05:00
Andrej730 8f74f4d9f1 Change IfcProjectLibrary's parent library from UI
Example - https://imgur.com/a/4PZr0px
It's very clunky and mainly exposed just to be available in some way, it will all make more sense when we display project libraries as trees in project library ui.
2025-02-04 17:37:56 +05:00
Andrej730 56f0c19a85 append_asset to support IfcPresentationLayerAssignment #6023 2025-02-04 17:37:56 +05:00
Andrej730 76747bdf5a Recent files - dim button for filepaths that do not exist
Example - https://i.imgur.com/dwEBtG6.png
2025-02-04 17:37:56 +05:00
Andrej730 a4de196259 space module operators - remove unnecessary ifc operators 2025-02-04 17:37:56 +05:00
Andrej730 049b157c8a bim.toggle_space_visibility - description 2025-02-04 17:37:56 +05:00
Andrej730 7ec1bc5272 Fix error toggling boundary decorations after one was removed #6088 2025-02-04 17:37:56 +05:00
Andrej730 d4f44cb0a1 typing 2025-02-04 17:37:55 +05:00
Andrej730 ecd7282150 black . 2025-02-04 17:37:55 +05:00
Dion Moult bd2c3a0ca1 Continue fixing tool tests.
Just chipping away at it give me time.
2025-02-04 17:04:29 +11:00
Louis Trümpler f0f2dda40e Add assign constituent fractions recipe (#5979)
* Add AssignConstituentFractions recipe

* license, units & added context description

* removed src, using better unit handling and several other small improvements based on feedback
2025-02-04 14:23:08 +11:00
Dion Moult 0c41f0c32c Fix #6094. Fix failing core tests. 2025-02-04 13:36:28 +11:00
Dion Moult a35ef32ee6 Forgot to commit docs for serialiser settings 2025-02-04 07:35:34 +11:00
Andrej730 00eff23b74 Rename bim_boundary_properties -> BIMBoundaryProperties for consistency 2025-02-03 17:43:01 +05:00
Andrej730 88af3eb1a6 Explicitly enable Bonsai in the second Blender instance #6092
To cover cases when Bonsai was enabled in current Blender sesssion and user prefs are not saved.
2025-02-03 17:28:48 +05:00
Andrej730 a48d774337 typing 2025-02-03 17:28:47 +05:00
Andrej730 734cd47ea5 black . 2025-02-03 17:28:47 +05:00
Dion Moult 5159a69225 Fix #6070. Button was pointing to the wrong function to confirm/cancel editing an extrusion profile.
Probably a copy paste mistake during the UI refactor.
2025-02-03 23:07:16 +11:00
Dion Moult 2f2072cf7f Fix #6080. Bug where renaming introduced suffixes during bulk reassignment of classes. 2025-02-03 23:00:04 +11:00
Andrej730 8c47f2a72f Fix issue infinitely adding new ports on bim.show_ports #6074 2025-02-03 16:37:51 +05:00
Andrej730 a6632167be system module operators - remove unnecessary ifc operator 2025-02-03 16:37:46 +05:00
Andrej730 12d1fd221d Clean up orphaned curves creating new elevation/section annotations 2025-02-03 13:45:54 +05:00
Andrej730 10642618e5 Fix error entering item mode for elevation/section annotations #6081 2025-02-03 13:45:54 +05:00
Andrej730 be4f6ac222 small fix for 3eaf4367ad 2025-02-03 12:45:05 +05:00
Andrej730 3eaf4367ad Fix #6082 2025-02-03 12:40:36 +05:00
Andrej730 305b4c27b5 fix a typo 2025-02-03 11:45:41 +05:00
Andrej730 b56f2d7514 black . - ignore simple_spf submodule 2025-02-03 11:43:08 +05:00
Andrej730 cf026dccc2 bump ios build #5987 2025-02-03 11:43:08 +05:00
Dion Moult c5185aaf54 Fix #6085. Failing unit test. 2025-02-03 16:33:04 +11:00
Dion Moult 50ed756353 Found out layer names don't exist in IFC2X3 that's incredible 2025-02-03 16:04:56 +11:00
tim 0f0578e1c5 Geographic Element Tool (#6089)
New icon tool for adding landscape elements

Co-authored-by: tim <tjrhyder@gmail.com>
2025-02-03 15:38:10 +11:00
Herlianto 0d086fda33 delete unused import (#6093) 2025-02-03 15:35:55 +11:00
Dion Moult f3f7510b48 Fix #6087. (again)
I don't know why depress was used. To make it colour in blue?
2025-02-03 12:36:18 +11:00
Thomas Krijnen b2a4529904 Don't fail on empty build deps cache #6054 2025-02-02 10:00:56 +01:00
Thomas Krijnen 7de50ff0c5 Don't fail on empty build deps cache #6054 2025-02-02 09:46:13 +01:00
Thomas Krijnen 7b0a7e51bb Try 'Build IfcOpenShell Linux ARM' workflow #6054 2025-02-02 09:35:15 +01:00
Thomas Krijnen 507d13363d delete obsolete files 2025-02-02 09:21:01 +01:00
Thomas Krijnen 9713b06d75 delete obsolete files 2025-02-02 09:01:24 +01:00
Dion Moult be6a4de6f0 Fix #6087. High CPU usage due to function in draw call.
I assume this is the problem.
2025-02-02 17:05:56 +11:00
Dion Moult ea85a4247a Fix #6079. Regression in editing space boundaries due to leftover line in commit. 2025-02-01 16:42:06 +11:00
tim f377d794a0 Unify icon modes to work with default Blender Light theme (#6078)
Force the color of the icons in the Properties-Scene tab to match Regular Text
Use the icon display mode function to detect where to use dm_ifc.png or lm_ifc.png

Co-authored-by: tim <tjrhyder@gmail.com>
2025-02-01 16:18:48 +11:00
tim 16d077f1cb Rename dm_IFC.png to dm_ifc.png (#6076)
renaming to lowercase to match lm_ifc presidents.
2025-02-01 16:18:26 +11:00
Dion Moult 3f62f72f35 See #2981. First attempt at having the door generator also do shape aspects, material constituents, and styles all simultaneously 2025-02-01 16:15:58 +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
Bruno Postle 1680c3135a Update to latest ifcmerge on Windows
Handle missing IfcRelationship - eg. if all sofas are deleted the
IfcRelDefinesByType is deleted too, but we reincarnate as an empty list
so it can be merged.

Sanity check internal graph - If an entity is deleted in one branch but
has a new usage in another branch, merging would break the graph leaving
a dangling reference. ie.  now you can't delete types, materials etc..
in one branch while using them for new objects in another and still
expect the merge to succeed.
2025-01-31 15:05:34 +00:00
Dion Moult 79e4ba5b19 New usecase to add shape aspect with tests 2025-02-01 00:46:00 +11:00
Andrej730 d6d1f7714f black . to ignore ifcconvert's cityjson submodule 2025-01-31 18:21:23 +05:00
Andrej730 68543c7f05 Simplify types used in debug module express methods #6071 2025-01-31 18:21:14 +05:00
Andrej730 135655f8a0 bim.add_pset - remove unnecessary ifc operator 2025-01-31 17:12:32 +05:00
Andrej730 df49356104 Support adding a new IfcProjectLibrary from UI
Example - https://imgur.com/a/NUQkvHf
2025-01-31 17:12:31 +05:00
Andrej730 04bcf8e2a9 Fix error switching between libraries 2025-01-31 17:12:31 +05:00
Andrej730 9f17ec5bf5 Support editing project library attributes
Example - https://imgur.com/a/MFtLDlh
2025-01-31 17:12:31 +05:00
Andrej730 67aa8f1413 Update project library enum on changing library file 2025-01-31 17:12:31 +05:00
Andrej730 8469d10c85 Project library UI - make filter optional and allow assigning to different libraries 2025-01-31 17:12:31 +05:00
Andrej730 87cbc66c99 typing 2025-01-31 17:12:31 +05: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
Andrej730 bc33cb6391 append_asset - remove unnecessary partial 2025-01-30 16:06:19 +05:00
Dion Moult d010d4e1b5 Fix #6067. Bug where adding a door ignored the Z offset option. 2025-01-30 19:52:33 +11:00
Andrej730 af29f264a8 Show info message when trying to edit presentation layer and project has no layers #6051
Instead of the error.
Also fix a bug with update callback was attached to the wrong prop.
2025-01-30 13:42:01 +05:00
Dion Moult 2570864f58 Fix #6066. Bug where spatial manager didn't toggle visibility correctly for spaces.
Previously I was only toggling Blender collections which is an
optimisation for large projects but will result in incorrect behaviour
if things aren't in the collection you think they're in. So for now it's
slower but more correct. We can optimise it later.
2025-01-30 19:17:12 +11:00
Dion Moult 2ad48aba36 Fix bug where download CSV icon would disappear on web interface after refreshing table data 2025-01-30 18:55:05 +11:00
Dion Moult 4e17a2d6de The shape builder can now create half space solids for convenience 2025-01-30 18:44:38 +11:00
Dion Moult eaaec4a12d Fix ridiculous bug where util.element.get_container didn't consider all parents and therefore didn't correctly contain feature elements in the spatial hierarchy 2025-01-30 18:44:27 +11:00
Dion Moult abec29af7f Fix attribute tests. Turns out latest pytest-bdd is stricter when parsing feature files and fails when encountering our blank demo tutorial file. 2025-01-30 17:59:13 +11:00
Dion Moult 838e22d27c Fix #6060. Updating long name in spatial manager now also edits attribute for convenience.
Editing attributes now also refreshes the spatial manager (i.e. vice
versa), and so does bulk attribute copying.
2025-01-30 17:47:29 +11:00
Dion Moult 8f78fe56de Prevent copying globalids to selected objects as it makes no sense 2025-01-30 17:46:23 +11:00
Andrej730 e435863500 Fix missing pset templates after 5e93097 #6049 2025-01-30 11:30:52 +05:00
Dion Moult 15d43e9166 Fix bug where spatial object may not exist when renaming from the spatial tree (e.g. partial loads), and also refresh UI (to see updated attributes) 2025-01-30 17:07:57 +11:00
Dion Moult 1768026891 Fix #5854. Update docs with new IOS v0.8 settings. 2025-01-30 15:32:14 +11:00
sboddy d6443e46f6 Update debugging guide to deal with MS's Marketplace changes. (#6035) 2025-01-30 08:08:28 +11:00
tim 77722fcf89 New Tools (#5983)
* New tools wip

- New icons: Opening, Furniture, Roof, Railing
- New groupings
- New tools: Opening tools (not working), Furniture (needs default), Roof
- New defaults: Railing, Roof (Hip Roof doesn't work)

* WIP on (no branch)

* Railing icon fixed

* New icons added, old icons tweaked

* Working version

* Just updating some wip - not ready for review yet

* Tool icon update

- New: pile, plate, ramp, ramp flight, stair, stair flight, roof, railing, footing, member, curtain wall
- Updated: wall, window, door, cable
- Expanded tool descriptions to include predefined types
- Added relevant default types
- Revised tool grouping

* IfcStairType and IfcRampType icon's removed

* Curtain wall removed

---------

Co-authored-by: tim <tjrhyder@gmail.com>
2025-01-30 08:07:54 +11:00
Thomas Krijnen 241329325d Update ci.yml - 22.04 2025-01-29 20:10:19 +01:00
Bruno Perdigão 2e70544bb8 Adjust offset in "change_extrusion_x_angle" to maintain position relative to the slab's top face. 2025-01-29 14:01:23 -03:00
Bruno Perdigão 03267a441a Fix #6058 2025-01-29 14:01:23 -03:00
Kipre 4bee713455 Fix transform matrix computation in Axis2Placement3D 2025-01-29 15:37:59 +01:00
Andrej730 1d6e560b4f Change entire material category name from UI #6061
Example - https://imgur.com/a/LJUkC2l
2025-01-29 18:16:05 +05:00
Andrej730 71a6ad8cb0 Display assets count for the loaded library
Example - https://imgur.com/a/yZTkZgu
2025-01-29 18:16:05 +05:00
Andrej730 83d7cda26b Select IfcProjectLibrary to display for the loaded library
Example - https://imgur.com/a/14LOL0J
2025-01-29 18:16:05 +05:00
Andrej730 8bddde49a2 Hide assign/unassign library declaration button for elements that cannot be declared
E.g. IfcMaterials, IfcProfileDefs
2025-01-29 18:16:05 +05:00
Andrej730 909a7ad7a2 Project libraries UI - use cached project library data
instead of accessing IFC directly on every draw call
2025-01-29 18:16:05 +05:00
Andrej730 c9da643fe1 typing 2025-01-29 18:16:04 +05:00
Andrej730 0599138bca Fix #6050 after 5e93097 2025-01-29 17:25:30 +05:00
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 5d3dc84556 Tabbing now works consistently on all elements including those with usage
This means that seeing the extrusion type graphically is now possible,
adding booleans is now through a consistent interface. It's still
possible to immediately edit the axis via Alt-E and profile via Shift-E.
This helps consoliate code too.
2025-01-29 21:38:01 +11:00
Dion Moult a9abf1e993 Forgot to remove these mentions
Still need to update tests
2025-01-29 21:32:26 +11:00
Dion Moult c2b00e09cf Remove elements menu and purge the "potential" openings feature as this is now properly integrated in the new element menu 2025-01-29 19:55:42 +11:00
Dion Moult 121af475a7 The collector should be responsible for handling global fixed display settings too perhaps 2025-01-29 19:54:25 +11:00
Dion Moult 424cd96fef Add warning that api.run is deprecated 2025-01-29 19:53:50 +11:00
Bruno Postle 84392f1457 Typo: strucutural > structural 2025-01-28 21:20:20 +00: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
Bruno Perdigão d9903e93f2 See #5938. This commit starts fixing this issue by:
- Fix wall decorator with obtuse angles.
- Preventing slabs from using obtuse angles, for now.
2025-01-28 16:10:17 -03:00
Andrej730 ab0549daa6 Support editing representation's presentation layers from UI
Example - https://imgur.com/a/QgtSUoq
2025-01-28 17:22:26 +05: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 cc014e9792 Change message when no object queries in a linked model
to give a hint for new users
2025-01-28 17:22:26 +05:00
Andrej730 c0306fc729 typing 2025-01-28 17:22:26 +05:00
Andrej730 7b94a8d1f5 black . 2025-01-28 17:22:25 +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 693244e20e Fix bug in SetFalseOrigin which incorrectly handled z height and also add ability to handle non-mapconversion based transformations.
I can't believe I accidentally left out the minus sign. The ability to
handle simple remapping of location A --> B is useful for software that
doesn't support map conversion properly.
2025-01-28 17:33:15 +11: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
Dion Moult 4d052ba864 Fix bug where decorator had errors if the 3D location was outside the 2D window.
Checking for none for `location_3d_to_region_2d` should always be done.
2025-01-28 10:33:08 +11:00
Bruno Perdigão 562c32b96e Fix issue where area measurement lines where not showing correctly. 2025-01-27 18:58:02 -03:00
Bruno Perdigão 818ad536af Small fix after a4a52d6576 2025-01-27 18:49:19 -03:00
Bruno Perdigão a4a52d6576 Make slab's editing profile to horizontal orientation when x_angle is present. 2025-01-27 15:16:22 -03:00
Bruno Perdigão 47b2a00614 Fix Z location for wall axis decorator 2025-01-27 10:59:21 -03:00
Andrej730 ff4d3adf0b Select Layer In Layers UI
Example - https://imgur.com/a/bXctIxc
2025-01-27 17:41:32 +05:00
Andrej730 13a182cd95 Representation Items UI - support editing layers
Example - https://imgur.com/a/3fn051N
2025-01-27 17:41:31 +05:00
Andrej730 56af23b89f revert possible empty layer names in ui 2025-01-27 17:41:31 +05:00
Andrej730 605cf8d99a Styles UI - add indicator for currently edited style
Example - https://i.imgur.com/YT0a63S.png
2025-01-27 17:41:31 +05:00
Andrej730 744487c786 fix test_element after 7b62b03 2025-01-27 17:41:31 +05:00
Andrej730 b735ce74ad Bonsai - Select By Profile operator
Location - https://imgur.com/a/gInY1sl
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 5bd24b2760 Enable pset template prop editing on adding a new one #6019 2025-01-27 17:41:30 +05:00
Andrej730 14a792a1e7 Enable pset template editing on adding a new one #6019 2025-01-27 17:41:30 +05:00
Andrej730 7b4fa6b5c0 black . 2025-01-27 17:41:30 +05:00
Gorgious56 378086ac7b Fix bug when trying to delete an opening object that was already deleted 2025-01-27 12:56:27 +01:00
Dion Moult c4dbbe85fc Fix bug where library wasn't actually removed when unlinking an IFC.
Previously the collection and scene object was removed, but this is
obviously not sufficient since the bpy.data.library still exists (which
meant that if you relinked it, regardless of your cache setting, it'd
just load the existing Blender file which is completely useless).
2025-01-27 20:41:26 +11:00
Dion Moult 559db259a3 See #6030. Add isolate, show, and hide operators to group manager. 2025-01-27 17:14:13 +11: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
Raj 3b1e893d34 Linting-Workflow ---> v0.8.0 | Make wf only fail on syntax errors instead of unformatted code (#6041)
* linting-workflow > v0.8.0: make QA only throw warning instead of error on unprettified code with no syntax errors

Without a Linting policy, the workflow should only fail if code base contains syntax errors.

* linting-workflow > v0.8.0: better logging

* linting-workflow > v0.8.0: changed instruction to notice-type

---------

Co-authored-by: raj-open <raj-open@users.noreply.github.com>
2025-01-26 18:54:46 +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 c49ca699eb Forgot to commit new feature tool 2025-01-25 21:39:54 +11:00
Dion Moult 75c6505121 See #5919. You can now add openings through "Add Element" just like everything else.
This means that openings can (and default to) start with extrusions. It
also starts to open up the possibility to add other types of feature
elements. Still really incomplete.
2025-01-25 20:43:08 +11:00
Dion Moult 2c531501c3 Fix #5614. Fix bug where removing an object that had voids showing didn't also remove the voids. 2025-01-25 16:36:57 +11:00
Dion Moult eab527e7a2 Fix #6033. Add tools for generate slab from wall and vice versa in the toolbox. Still needs a nice icon. 2025-01-25 15:59:11 +11:00
Dion Moult 83368d7ee1 Fix #6014. Incorrect units used for position matrix when detecting profiles. Fix by @brunoperdigao 2025-01-25 15:20:01 +11:00
Dion Moult 38835a4092 See #6030. You can now select elements in groups recursively. 2025-01-25 14:11:42 +11:00
Dion Moult a2a4da596f Fix #6030. Consolidate group management into single UI and allow for bulk assign / unassign. 2025-01-25 14:01:56 +11:00
Bruno Perdigão 5fbb496818 Improve wall axis decorator.
- Blue: base
- White: side
- Green: reference
- Arrow: direction
See: https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcMaterialLayerSetUsage.htm
2025-01-24 16:46:03 -03:00
Bruno Perdigão 8b3bf8200f Add wall and slab regeneration when editing layer set usage, after 755d178b6b 2025-01-24 16:36:24 -03:00
Andrej730 fbab13339c set_material_name to prevent triggering name callback if it's not necessary 2025-01-24 18:45:14 +05:00
Andrej730 57150e9f63 deprecate style.edit_presentation_style listener 2025-01-24 18:45:14 +05:00
Andrej730 e4ded8c477 Fix editing IfcSurfaceStyle attributes
Apparently it was broken for a while now...
2025-01-24 18:45:14 +05:00
Andrej730 d21c24b070 Bonsai - support editing IfcPresentationLayerWithStyle attributes
Example - https://imgur.com/a/JRs8RZm
2025-01-24 18:45:13 +05:00
Andrej730 e3ea12a517 Reuse export_attributes for layers, groups, constraints, classifications 2025-01-24 18:45:13 +05:00
Andrej730 60f8044820 Support adding IfcPresentationLayerWithStyle from UI
Example - https://i.imgur.com/0mssU2s.png
2025-01-24 18:45:13 +05:00
Andrej730 d5b1b6f66a Reuse draw_attributes for groups, layers, structures and systems 2025-01-24 18:45:13 +05: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
Andrej730 d1082897b1 bim.select_representation_item - add poll message 2025-01-24 18:45:12 +05:00
Andrej730 c12636f4cc black . 2025-01-24 18:45:12 +05:00
Andrej730 35d20e649d button to open pset templates user folder
to make it more discoverable

Example - https://i.imgur.com/BKN3rkj.png
2025-01-24 12:57:41 +05:00
Andrej730 5c7bea6dea bim.open_path - utility operator 2025-01-24 12:57:40 +05:00
Andrej730 d979c6a044 bim.open_uri - display url in description 2025-01-24 12:57:40 +05:00
Andrej730 65f2da4beb Fix creating pset templates after 5e930972d6 #6017 2025-01-24 12:34:36 +05:00
Dion Moult 755d178b6b Fix bug where adding / removing layers never triggered a regeneration of walls.
Continue our slow, ongoing purge of listeners.
2025-01-24 17:28:45 +11:00
Dion Moult f1187e33d9 Don't show IFC product selection in the type manager since it's assumed to be IfcElementType from context 2025-01-24 16:36:07 +11:00
Dion Moult 2ec7882c57 Fix #6034. Boundary module now uses the collector tool like everything else. 2025-01-24 09:57:33 +11:00
Dion Moult 1083651d0a Bump IOS back up to 2024-12-14 2025-01-24 09:49:44 +11:00
Dion Moult 03bd34d98c Workaround for speed regression in advanced brep models. See #5999. 2025-01-24 09:47:17 +11:00
Bruno Perdigão fa174feaae Refactor wall offset and direction after f724bb692 2025-01-23 15:33:39 -03:00
Bruno Perdigão 5ec5594c69 Polyline slab tool - You can now change offset and direction
As it was implemented in Polyline wall tool, the user can press "O" to
change offset and "F" to flip the direction
2025-01-23 15:33:39 -03:00
Bruno Perdigão 4f77df99a5 Add slab preview decorator 2025-01-23 15:33:39 -03:00
Thomas Krijnen fa191e44f2 cgal kernel: Move orientation logic #5987 2025-01-23 16:35:51 +01:00
Thomas Krijnen 638b2c59ea Catch string encoding errors and set status #5992 2025-01-23 16:20:06 +01:00
Bruno Perdigão 4aff6ac842 Fix profile tool after 8b678309f 2025-01-23 11:21:29 -03:00
Andrej730 f67e3f35c7 Fix error tabbing into point cloud representations 2025-01-23 18:14:17 +05:00
Andrej730 1ea6d2a194 Add IfcStructuralPointConnection to reimport_element_representations 2025-01-23 18:14:17 +05:00
Andrej730 3c96ad2965 Fix error tabbing into IfcStructuralPointConnections 2025-01-23 18:14:17 +05:00
Andrej730 4ee8176654 Bonsai to display units for force measure props
Example - https://i.imgur.com/EhcyIxp.png
2025-01-23 18:14:17 +05:00
Andrej730 4717dffcdc Bonsai - assign/unassign structural model for all selected elements 2025-01-23 18:14:17 +05:00
Andrej730 3eeb58dded assign_structural_analysis_model to support batching 2025-01-23 18:14:17 +05:00
Andrej730 70f17c2094 Structural operators - remove unnecessary Ifc Operators 2025-01-23 18:14:17 +05:00
Andrej730 2e71765f4f Fix structural operator names for consistency with Blender naming 2025-01-23 18:14:16 +05:00
Andrej730 582476cabe Fix LoadGroupDecorationData data item name for consistency 2025-01-23 18:14:16 +05:00
Andrej730 8f9417a59a Fix UI errors in Structural Analysis panel when project has no IfcStructuralAnalysisModel 2025-01-23 18:14:16 +05:00
Andrej730 e18475e1ef Use cancel icon for disabling operators for consistency 2025-01-23 18:14:16 +05:00
Andrej730 d38608ea04 Fix UI errors with not unset active library id after disabling editing
It lead to UI errors when library was removed and Bonsai was still trying to get it from active_library_id.
2025-01-23 18:14:16 +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 ad99990f17 typing 2025-01-23 18:14:15 +05:00
Andrej730 8dce7b9f68 black . 2025-01-23 18:14:15 +05:00
Bruno Perdigão d8342134a0 Wall polyline tool - refactor offset functionality 2025-01-23 09:31:28 -03:00
Bruno Perdigão 8b678309fd Refactor polyline tool instructions.
Follows 8fc0d7a808
2025-01-23 09:31:28 -03:00
Bruno Perdigão 88dc9d7633 Enable "shift + mouse wheel" to function before locking angle. 2025-01-23 09:31:28 -03:00
Bruno Perdigão 09dbae7c56 Replace hard-coded unit scale with ifcopenshell.util.unit.calculate_unit_scale 2025-01-23 09:31:28 -03:00
Dion Moult c6b64baccb Fix #6028. Deprecate schema dir as it's basically just data. 2025-01-23 23:10:40 +11:00
Dion Moult 15bc968179 Remove dead code from schema.py
Slowly getting to a point where we can completely delete this legacy
file.
2025-01-23 22:59:41 +11:00
Dion Moult b7e4904905 Change gitkeep into gitignore and move ignore up to root gitignore
I kept on getting confused on why things were being ignored in the data
dir and didn't know where to look.
2025-01-23 22:48:25 +11:00
Kipre 039b7ef4ca Fix issue with eliminate_touching_operands 2025-01-23 11:23:34 +01:00
Dion Moult e2f10a5784 Minor UI improvement to keep the right alignment of total elements in the material manager 2025-01-23 20:54:43 +11:00
Dion Moult adff44febd Snaps are on by default
Users can still turn them off. We are a precision modeling app after all
:)
2025-01-23 20:44:20 +11:00
Dion Moult 35d2791657 Fix warning when aggregate decorator cannot be drawn on the screen. 2025-01-23 20:29:21 +11:00
Scott Lecher a7a9fcc73a adds calculations for projected_length of gradient curve segments (#6006) 2025-01-22 15:37:29 -08: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 083aa4da85 Fix error after 5e93097 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
Dion Moult 3dfc7097b2 Fix #6013. Fix bug where Blender object names weren't updated when using copy attributes. 2025-01-22 22:54:58 +11:00
Andrej730 4adca79301 Fix edit_attributes triggering name_callback and adding indices to names #6013
It was triggering name_callback, adding indices to the names and writing the name with index to ifc.

Also now check previous and new object name explicitly instead of relying on `obj.name` as it may have Blender indices (Blender doesn't support multiple objects sharing the same name).
2025-01-22 16:35:23 +05:00
Andrej730 a8672bc5cb root.set_object_name to reuse loader.get_name 2025-01-22 16:35:23 +05:00
Andrej730 882bacf91a bim.copy_attribute_to_selection - add info message
It's important to have somewhere information on how many elements were actually affected since some of the selected objects may not support the used attribute.

Example - https://i.imgur.com/UrLNWcF.png
2025-01-22 16:35:23 +05:00
Andrej730 23a6721f8e Fix bim.copy_attribute_to_selection missing undo 2025-01-22 16:35:23 +05:00
Andrej730 db93ca1067 bim.inspect_from_object - support representation items 2025-01-22 16:35:22 +05:00
Andrej730 f02fd69934 Bonsai - deprecate bpy.app.version checks
As we support only Blender 4.2+
2025-01-22 16:35:22 +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 6ce4b5d0e8 Fix error selecting boolean (RepresentationItemObject missing ifc_definition_id) 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
Andrej730 06f25b9846 bim.select_boolean - fix operator name 2025-01-22 11:50:49 +05:00
Andrej730 b752f798bd bim.enable_editing_booleans - add poll message 2025-01-22 11:50:48 +05:00
Andrej730 5ca615114f Also support changing profile for other sweptsolids
E.g. changing it for IfcRevolvedAreaSolid - https://imgur.com/a/jHOC8rt
2025-01-22 11:50:48 +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 372654267c Fix issues with add/remove layer handler when using "Quick Create Type". 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
Bruno Perdigão 325d6138d3 Add more options to Bonsai snap target. Follow 5649708ca4 2025-01-21 10:10:57 -03:00
Gorgious56 fc58b1769c Improve logic for https://github.com/IfcOpenShell/IfcOpenShell/commit/bced62bd5c6615ec1ff8c3a6af3334e469e5f9fa 2025-01-21 13:56:32 +01:00
Dion Moult 82fbec68d1 Fix #5973. You can now select the item from the item panel. 2025-01-21 23:52:33 +11:00
Andrej730 bb1ec569bc Option to name existing used unnamed profiles
Example - https://imgur.com/a/IhMbs6K
2025-01-21 17:31:21 +05:00
Andrej730 5a766e79bd Show error message trying to edit not supported type of profile
E.g. previously if you would tab into editing IfcExtrudedAreaSolid that was using not supported profile type (e.g. IFCCSHAPEPROFILEDEF) it would import it as empty geometry and tabbing out then would save it corrupting the original profile. Now there is an error message that it's not yet supported - https://i.imgur.com/NzksYVP.png
2025-01-21 17:31:21 +05:00
Andrej730 ff337bc849 Change currently edited item's profile
Example - https://imgur.com/a/2yiVIW5
2025-01-21 17:31:20 +05:00
Andrej730 992424c748 Update item decorator when moving item in viewport
Before this fix - https://imgur.com/a/mhpBvCG
2025-01-21 17:31:20 +05:00
Andrej730 0268f140ad typing 2025-01-21 17:31:20 +05:00
Andrej730 59c0719b03 black . 2025-01-21 17:31:20 +05:00
Andrej730 c91fbc4d40 Setup user data dir
Create some empty folders in the user data directory to hint the user.
2025-01-21 17:30:38 +05:00
Gorgious56 bced62bd5c When switching between ElementType and Element, keep the same class and predefined type if possible 2025-01-21 13:29:25 +01:00
Dion Moult b809bc89f0 See #5973. Representation items UI now works in item mode. 2025-01-21 23:28:33 +11:00
Dion Moult 2452b1be50 See #5973. Only show shape aspect attributes if creating a new shape aspect to make it clearer how to use the UI.
Previously the UI for creating new aspects and reusing an existing
aspect showed simultaneously which was confusing.
2025-01-21 23:21:07 +11:00
John Yani 7de8427a28 [Bonsai docs] Update version switching logic (#6005)
* Create brand.html

* Update custom.css for version switcher

* Update brand.html

* Update brand.html

Improve select box logic
2025-01-21 11:06:24 +11:00
John Yani ee0adf2fff [Bonsai docs] Add version switcher to sidebar and update custom styles (#6004)
* Create brand.html

* Update custom.css for version switcher

* Update brand.html
2025-01-21 10:24:53 +11:00
John Yani 2ce420ef6f Follow up #5994 (#6003)
* Create docs-deployment.yml

* Update docs-deployment.yml

Add CNAME

* Update docs-deployment.yml

* Create docs-deployment-unstable.yml

* Add requirements.txt

* Change trigger branch
2025-01-21 08:45:39 +11:00
Bruno Perdigão 290849d43a Fix snap to axis after 5649708ca 2025-01-20 14:59:04 -03:00
Andrej730 5e930972d6 User 'data' folder #5564
Bonsai now creates a user data folder that allows you overriding Bonsai data files. E.g. you can put you own `default.css` as `data/assets/default.css` in that folder and it will override the `default.css` Bonsai is using for the drawings. Previously you could have change internal `default.css` but Bonsai would always restore the original one on every update / reinstallation.

You can also store your .ifc files in data/libraries or data/templates and Bonsai will ensure they're loaded and you won't need to worry about Bonsai removing them later.

E.g. on Windows this path is `C:\Users\xxx\AppData\Roaming\bonsai\bonsai\data`/

You can also find path in the preferences - https://i.imgur.com/kwMc0JU.png
2025-01-20 19:32:59 +05:00
Bruno Perdigão c08d25de42 Change Bonsai snap target UI to column. 2025-01-20 11:31:58 -03:00
Bruno Perdigão 5649708ca4 Add support and UI for Bonsai snap target.
The user can now select snap target for Bonsai polyline tool.
The options are shown in the bottom of Blender's Snapping panel.
2025-01-20 10:56:22 -03:00
Bruno Perdigão 9e81a3da17 Rename "Edge-Intersection" to "Edge Intersection" 2025-01-20 10:56:22 -03:00
Bruno Perdigão b509374c27 Add initial curve snapping functionality 2025-01-20 10:56:22 -03:00
Gorgious56 704bb27cf5 You can now user ALT + Click to ensure an object is unlinked from non-IFC collections when assigning a new container 2025-01-20 14:25:55 +01: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
Dion Moult c5fe80db7b Make georeferencing decorator use soft limits. Don't scale font. 2025-01-20 23:48:51 +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 0a266bba5d Fix #6000 2025-01-20 16:16:39 +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
John Yani 3ad247b9a7 Automatic build and deploy bonsai docs on push (#5994)
* Create docs-deployment.yml

* Update docs-deployment.yml

Add CNAME

* Update docs-deployment.yml

* Create docs-deployment-unstable.yml

* Add requirements.txt
2025-01-20 21:13:21 +11:00
Bruno Postle 13b93a9ea8 Move cache_dir from site-packages to local folder (#5856)
Previously cache_dir was located under site-packages, which is managed
by blender and could be read-only. Now location defaults to eg.
~/.cache/bonsai or equivalent location on other platforms. See #5564

Note this adds a dependency on the platformdirs python module
2025-01-20 13:14:51 +05:00
Dion Moult ebdfe2bccd Fix #5319. Workaround for upstream bpypolyskel bug where dormer ridges were not flat. 2025-01-20 17:17:37 +11:00
Dion Moult 942c3fec87 Add missing bin directory 2025-01-20 14:35:50 +11:00
Dion Moult 651c24bbfe See #5799. Fix segfault in upstream Blender when unlinking material objects in specific scenario.
I can't explain this one so I'm pretty embarrassed to commit this, but
it crashes (see situation in #5799) on my machine and I can't recreate
it outside this scenario. In any case I think as a general strategy we
should:

 1. Minimise reliance on msgbus
 2. Msgbus listeners themselves should be wary of invalid state (e.g. if
object is now unlinked)
 3. Not clear listeners (don't overreach)
2025-01-20 14:01:11 +11:00
Dion Moult b2213592ea Fix #5799. Also purge presentation style assignment when purging unused styles. 2025-01-20 13:59:00 +11:00
Dion Moult c311b65af5 See #5799. Allow merging unnamed styles.
Styles are special because their names aren't critically semantic. It's
more to do with the style definition.
2025-01-20 13:58:39 +11:00
Dion Moult e8b097e2cb See #5799. Remove slow / unnecessary material criticals that also have a risk of crashing
In general Blender on my machine at least sometimes has huge lag with
material previews.
2025-01-20 13:57:07 +11:00
Dion Moult 193ff1cd0c Mention builds website in docs. 2025-01-20 12:15:49 +11:00
Dion Moult a65aa92c87 See #5999. Revert to older bot build before speed regression. 2025-01-20 12:15:36 +11:00
Dion Moult 6af19bc98d Fix 3x slower major speed regression introduced in 98a9550260
The commit that introduced the problem was trying to optimise rendering
dense meshes with the opening decorator. However, it introduced more
calculation in the initial project load and stored more data on every
object. This resulted in models loading 3x slower for me which is pretty
major. The original problem needs further investigation.
2025-01-20 11:24:19 +11:00
Dion Moult 5769c0d442 Fix #5754. Cosmetic bug where UI was not refreshed when using advanced mode causing incomplete decorators to be drawn. 2025-01-20 00:25:29 +11:00
Dion Moult 5c058dff3e Fix #5766. Bump IOS. 2025-01-19 21:49:51 +11:00
Dion Moult f86e414055 Forgot to add a placement for new elements which is invalid. 2025-01-19 21:38:52 +11:00
Dion Moult c17febac0c Fix #5996. Bug where getting selected or active objects was not clear.
Sometimes we want to fetch selected objects, and that includes the
active object, even if the active object isn't actually highlighted in
the viewport (albiet rare, I think?).

Conversely sometimes we want to get the active object, even if it isn't
actually highlighted. The tool.Blender functions now have kwargs to
distinguish between these.
2025-01-19 17:17:56 +11:00
Dion Moult 2d811a6786 Fix fetching layers in item mode. Apparently the inverse name changes slightly.
Maybe because an item has a single layer whereas the shape is meant to
have many layers?
2025-01-19 17:09:32 +11:00
Dion Moult 6eed5607c4 Fix #5972. Purge old non-item-based boolean code 2025-01-19 17:09:02 +11:00
Dion Moult 0b46a31c25 Add item menu is now tailored for CSG representations.
I find this a bit of a strange behaviour in IFC. Imagine you start with
a Tessellation representation type. You're only allowed meshy things, no
solid extrusion. And vice versa if you have a SweptSolid representation
type.

Now imagine you suddenly create a boolean. Now, you can mix both
tessellations and solids together.
2025-01-19 16:58:10 +11:00
Dion Moult 4d7f078f8b Ensure item decorator is updated when editing things in item mode. 2025-01-19 16:56:31 +11:00
Dion Moult 046f7cbfd2 See #5972. You can now select booleans recursively. 2025-01-19 13:54:40 +11:00
Bruno Postle 4152641d1f Ensure files in libs/bin are executable
When blender extracts wheels it doesn't preserve executable permissions
2025-01-18 21:17:43 +00:00
Bruno Postle ec55c8183f remove duplicate 'libs' folder
The Bonsai installer contained a 'libs' folder in both the ZIP bundle
and the bonsai wheel, but only the one in the wheel was actually used
2025-01-18 19:59:57 +00:00
Bruno Postle b54741dd0b Merge branch 'v0.8.0' of github.com:IfcOpenShell/IfcOpenShell into v0.8.0 2025-01-18 19:18:15 +00:00
Bruno Postle b4190876b0 Actually put ifcmerge in the linux ZIP installer 2025-01-18 19:16:50 +00:00
Bruno Perdigão 864eeb42e9 Add filling objectcs to OverrideMove 2025-01-18 15:15:54 -03:00
Bruno Perdigão 7fcb7c6433 Allow moving the current aggregate/nest when aggregate/nest mode is active 2025-01-18 12:17:28 -03:00
Bruno Perdigão 015d8f6722 Add nest mode operators to workspace UI. 2025-01-18 12:06:00 -03:00
Bruno Perdigão c07c2d7692 Complement changes from abd05e939a 2025-01-18 11:48:37 -03:00
Dion Moult a57a0eb4eb See #5972. Prioritise clipping results where possible. 2025-01-19 01:09:11 +11:00
Dion Moult e40644c4f6 See #5972. You can now remove boolean operations in the stack without deleting operands. 2025-01-19 01:08:47 +11:00
Dion Moult 8c746b1a2c Validate representation type items when leaving item mode. 2025-01-19 00:30:30 +11:00
Dion Moult 8e98aecc0b Document add boolean API 2025-01-19 00:30:30 +11:00
Bruno Postle 34a2d95524 Bonsai offers to install Git and ifcmerge (#5961)
The ZIP installer now contains a `libs/bin` folder that contains
`ifcmerge`. Bonsai on `register()` adds this folder to the system `PATH`
for the current Blender session. Advantage of this is that we don't have
to fiddle with the registry on windows, or install files to
`~/.local/bin` on Linux, it _should_ work on Darwin, updates are
automatic, and we have a mechanism to ship other executables if
required.

(Note that ifcmerge.exe increases the size of the Windows Bonsai ZIP
download by about 7MB)

If Git isn't installed on Windows, the Git panel now offers to install
it from the Windows Package Manager Community Repository using `winget`.
2025-01-18 10:22:45 +00:00
Dion Moult a12427e44a See #5972. Add tests for adding boolean and check against recursive booleans and invalid boolean items. 2025-01-18 21:13:54 +11:00
Dion Moult 35734f4b67 Guess representation type from items based on where rule
Previously we never implemented this in a very strict way so it was
prone to mistakes.
2025-01-18 18:35:13 +11:00
Dion Moult c54ea1e5d2 Shape builder can now create blocks 2025-01-18 18:34:40 +11:00
Bruno Perdigão abd05e939a Add nest decorator 2025-01-17 23:00:05 -03:00
Bruno Perdigão d02c5ca1e6 Rename OverridaAggregateMove to OverrideMove.
It now deals with nests too.
2025-01-17 22:58:29 -03:00
Bruno Perdigão a5afba03ab Add "nest mode" similar to "aggregate mode". 2025-01-17 22:47:11 -03:00
Bruno Perdigão 3f914cdf27 Remove unused handler from AggregateModeDecorator 2025-01-17 22:43:05 -03:00
Bruno Perdigão 1d03e916f3 Fix after c4f85dffa4 2025-01-17 17:45:21 -03:00
Bruno Perdigão fd279234f3 Fix #5818 2025-01-17 16:41:01 -03:00
Bruno Perdigão a44439655c Install Bonsai decorators from Viewport Overlays in load_post. 2025-01-17 16:23:40 -03:00
Bruno Perdigão c4f85dffa4 Fix OverrideMoveAggregate to work for multiple layers of aggregates. 2025-01-17 15:51:26 -03:00
Bruno Perdigão 8d63845f3d Change AddSlabFromWalls to consistently create walls in a counterclockwise direction.
This guarantees that the external face of the walls aligns with the edges of the slab.
2025-01-17 15:09:57 -03:00
Thomas Krijnen e0e24948be Update build_rocky.yml - safe.directory 2025-01-17 14:07:36 +01:00
Thomas Krijnen 84420a8973 Don't allow empty sha for add_commit_sha 2025-01-17 13:57:14 +01:00
Dion Moult 7ee055f4f3 See #5972. You can now add half space solid items in item mode. 2025-01-17 23:02:32 +11:00
Andrej730 1f436bcec6 replace date picker util operators with wm.context_set_string
Since they were just setting a scene property which can be done by a default operator.
2025-01-17 17:00:06 +05:00
Andrej730 468c1a2580 Highlight currently selected date in date picker
Example - https://imgur.com/a/ItNg9sZ
2025-01-17 17:00:06 +05:00
Andrej730 e8cb9e7f3c Date picker to support IfcDateTime
See https://imgur.com/a/9a7JfMO
2025-01-17 17:00:06 +05:00
Andrej730 fa98a7e8f7 black . 2025-01-17 17:00:06 +05:00
Andrej730 686a5e7387 Fix #5988 after 6fb0f5e63a 2025-01-17 15:24:02 +05:00
Dion Moult e1da08579c See #5972. You can now add booleans in item editing mode, with support for all three boolean operators. 2025-01-17 20:55:27 +11:00
Dion Moult 0a87e92dcf Move geoference visualisation UI into panel header to be consistent. 2025-01-17 20:54:06 +11:00
Dion Moult 24b3cfc067 Fix #5897. Fix #5488. Fix #5498. Bug where you couldn't edit newly added annotation.
The annotation adding code was a bit of a mess, spread around
create_annotation, create_annotation_occurrence, and
bpy.ops.bim.add_annotation. I've now consolidated it all into
core.add_annotation and updated it to work with the new item editing
mode (basically new objects need to reload their representation to
populate item_ids). Things are still messy, but a bit less now.
2025-01-17 20:53:29 +11:00
Thomas Krijnen c163b260cf Try solve #5989 2025-01-17 10:45:21 +01:00
Andrej730 9e50c89c01 Work schedule UI - use cached data instead of accesing IFC 2025-01-16 18:30:44 +05:00
Andrej730 b28a3b6e32 Basic header for work schedule panel header #5928
Example - https://i.imgur.com/9thZQCX.png
2025-01-16 18:30:44 +05:00
Andrej730 9573628bf6 fix typo in sequence/prop.py and use more consistent name for props
Issue was that taskcolumns_enum doesn't exist
2025-01-16 18:30:44 +05:00
Andrej730 5f034bf4a9 bim.copy_railing_parameters - add poll message 2025-01-16 17:36:12 +05:00
Andrej730 de6e54040a FilledOpeningGenerator - update only parts instead of the full decomposition
similar to 0662b0c
2025-01-16 17:36:12 +05:00
Andrej730 50b39fdd10 bim.clone_opening - update affected representations 2025-01-16 17:36:12 +05:00
Andrej730 eef04fb91c bim.clone_opening - always show in opening's ui
Otherwise it was hidden until user guesses that 2 objects need to be selected for it to appear.
Also, not sure if it's useful operator anymore - it seems just duplicating an opening and then adding it does the same thing.
2025-01-16 17:36:11 +05:00
Andrej730 a383f60915 Show voided elements in UI
E.g. show voided wall when window or wall's opening is selected.
Example - https://i.imgur.com/jxjWPeE.png
2025-01-16 17:36:11 +05:00
Andrej730 44131a7fe5 Select filling objects from UI
Example - https://i.imgur.com/BijTwgo.png
2025-01-16 17:36:11 +05:00
Andrej730 c66f2131e2 bim.select_entity - move to bim module
as it can be generally useful, not just in tester
2025-01-16 17:36:11 +05:00
Andrej730 035999d0c3 bim.update_openings_focus - remove unnecessary ifc operator 2025-01-16 17:36:11 +05:00
Andrej730 61d68b74ca bim.add_filled_opening - remove unused operator 2025-01-16 17:36:10 +05:00
Andrej730 133459faec typo 2025-01-16 17:36:10 +05:00
Andrej730 6fb0f5e63a typing 2025-01-16 17:36:10 +05:00
Andrej730 2859e9632e black . 2025-01-16 17:36:10 +05:00
Andrej730 521a8183e7 Fix #5953 after d6e6a6d 2025-01-16 17:36:09 +05:00
Dion Moult a63f67ad32 Fix #5841. Incorrect axis usage when generating LAYER2 elements from polyline. 2025-01-16 23:19:11 +11:00
Dion Moult aeba2885e4 Fix #5984. Incorrect axis usage when generating slabs. 2025-01-16 23:11:51 +11:00
Dion Moult f50ae2faa5 See #5972. You can now load a hierarchy to visualise the boolean result tree. 2025-01-16 22:58:17 +11:00
Dion Moult bd739f8bfd Fix undo bug when marking booleans as manual 2025-01-16 22:39:37 +11:00
Dion Moult 5b2243089d See #5972. You can now delete boolean operands in item editing mode. 2025-01-16 22:10:28 +11:00
Dion Moult 2fe4680ca1 See #5972. Boolean operands are now loaded in item editing mode and are editable. 2025-01-16 21:28:05 +11:00
Taku Makoni 21624d6065 Wrong Import Package (#5982) 2025-01-16 12:20:59 +11:00
Taku Makoni b9f40342b2 Grammatical error 2025-01-16 11:52:09 +11:00
Bruno Perdigão 3e879c6156 Change how new objects added are handled in aggregate mode.
When in aggregate mode, new objects will now be automatically assigned to
the current aggregate.
2025-01-15 16:11:27 -03:00
Bruno Perdigão c360b91f4a Remove constraints from the aggregates. 2025-01-15 16:11:27 -03:00
Andrej730 23b1a71cba Support adding duplicated existing boolean
Example - https://imgur.com/a/rRQz9dx
2025-01-15 18:41:21 +05:00
Andrej730 5d17554d04 bim.add_boolean - support adding multiple booleans at once
Example - https://imgur.com/a/IWDqMRT
2025-01-15 18:41:20 +05:00
Andrej730 1f3fc3c2b9 bim.add_openings - display in UI if multiple potential openings are selected 2025-01-15 18:41:20 +05:00
Andrej730 d6da8a7ee1 Support duplicating potential openings and potential/existing booleans 2025-01-15 18:41:20 +05:00
Andrej730 cfb4cd8af9 bim.add_potential_opening - remove unused code
draw_settings() was never used
2025-01-15 18:41:20 +05:00
Andrej730 7eff4db4eb reuse add_tracked_opening 2025-01-15 18:41:19 +05:00
Andrej730 689688c76b Fix error selecting material usage in Materials UI
Previously it would error, now it selects related profile / layer set.
2025-01-15 18:41:19 +05:00
Andrej730 0ea513818b Support assigning material sets as usages from UI #5933
It's on alt+click in Materials UI, see example - https://imgur.com/a/8gP7iAZ
2025-01-15 18:41:19 +05:00
Andrej730 2fdcb41c4e black . 2025-01-15 18:41:19 +05:00
Dion Moult 65c99c57cd Prefill class / product type if using a particular BIM tool for convenience, and hide fields. 2025-01-15 22:04:58 +11:00
Dion Moult fe54b24f5f Fix bug where box decoration when adding empty geometry failed 2025-01-15 22:04:24 +11:00
Dion Moult 7fdfdbf8b4 Fix #5971. You can now specify a name and description when adding objects. Clean naming and description is critical! 2025-01-15 20:57:19 +11:00
Dion Moult 53906d824a Fix #5977. Silly mistake I forgot all([]) is still True. 2025-01-15 20:47:56 +11:00
Thomas Krijnen a687a90039 Break out multiple tasks per representation when rep is directly reused #5978 2025-01-15 10:24:52 +01:00
Thomas Krijnen c37fd6ae0b Don't throw exception but set to $ when encountering invalid instance name #5680 2025-01-15 10:08:31 +01:00
Dion Moult 06e8e2b35c Remove obsolete separate_verts_layer when marking edge angles for roofs
New roof system automatically handles this scenario (using poke
operator) so no need to mark it.
2025-01-15 19:46:34 +11:00
Dion Moult fd51b9a9e9 Fix #5968. Fix #4040. Rewrote roof generation using per face extrusions and cutting planes instead of edge sliding.
WARNING! The roof generation is now quite significantly different. This
WILL change your geometry when you refresh roofs from existing models.

 - The roof profile now always represents the top of eave. This better
represents how things are built rather than bottom of eave which was
previous.
 - The roof therefore always grows down from the profile. The rafter
edge angle can only be acute. This means that the roof will never grow
larger than the footprint profile that you've drawn. (before, the
footprint was not guaranteed to match).
 - The roof thickness is now the actual thickness of the roof, not the
"vertical dimension" of the roof. This means that the roof thickness can
now match intended layer thicknesses instead of you needing to do math
to work it out.

I've rewritten the internals of how roofs were generated to be hopefully
a lot simpler but as a tradeoff it's more restrictive. After the
skeleton is generated, non-uniform angles would be handled through
vertex splitting and moving. This works in simple scenarios but fails in
more complex ones. The new approach only handles non-uniform angles on
triangular faces. These faces are really easy to handle compared to
ngons, but are also more robust. The rafter edge angle is also now
handled using a clipping plane, which is a lot, lot simpler than vertex
sliding math.

Each face is now processed separately and then merged at the end. This
means that if a face has a different angle, it will now correctly
represent the different thickness at that portion of the roof.

In the process consistent roof thickness / rafter angle bugs were fixed.
2025-01-15 19:43:39 +11:00
Andrej730 3f2f296d5f Fix error with Shift-E #5975
E.g. two objects are selected - tesselation and profile and tesellation being active object. Using s-e with deselect tesselation object as it doens't have a usage but Bonsai would still try to run bim.enable_editing_extrusion_profile on it leading to the error.

Also fix possible issues for hotkey executed without active object (it seems all operators in hotkey do require active object)
2025-01-14 17:42:03 +05:00
Andrej730 020937835a Fix issue enabling ifcsverchok if sverchok installed under a different name #5913 2025-01-14 17:42:03 +05:00
Andrej730 a52e3615d6 Map ifc2x3 IfcAnnotationOccurrence to IfcStyledItems in ifc4 #5917 2025-01-14 17:41:58 +05:00
Andrej730 adb61c5a16 bonsai makefile - use new option for old no-clobber behaviour
Apparently (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62572) coreutils have changed `mv -n` to throw an error now instead of working silently, therefore our build was failing on Mac when Github Action switched from Ubuntu 22 to 24.
`--update=none` seems to restore the old behaviour.
2025-01-14 17:41:58 +05:00
Andrej730 a50973ede7 typing 2025-01-14 17:41:58 +05:00
Andrej730 74ca86678a ifcfm cobie - color code ods file tabs too 2025-01-14 13:48:50 +05:00
Gorgious56 ac2e69bd66 Don't close type manager when using the enum search feature while adding a new type
Also reduce the attribute name a bit
2025-01-14 08:44:21 +01:00
Dion Moult 595a3b3f87 Preselect IFC class when adding elements for convenience. 2025-01-14 14:22:15 +11:00
Dion Moult 48f534e7c1 Say "Type" instead of None in the general BIM tool. 2025-01-14 14:13:39 +11:00
Dion Moult 1ed770d454 Fix #5921. Bug when parsing IDS XML of facets with no attributes. 2025-01-14 13:36:33 +11:00
Dion Moult ec600ec72e IfcTester can now read from XML strings in addition to opening files on disk 2025-01-14 13:35:45 +11:00
Dion Moult adcc23541a Fix bug where starting a new file in an existing session would prompt an error.
Bpy.context.active_object is not available in-between loading / starting
a new file.
2025-01-14 13:35:01 +11:00
Dion Moult 9a77c94758 Fix #5967. Incorrect logic in the for/else block when adding new elements.
The for/else block was too greedy, meaning that if nothing was selected,
it would still try to create slabs from walls. I find for/else confusing
so I restructured the section to do more early returns and unindent the
logic.
2025-01-14 12:20:22 +11:00
Moritz Amberger e89d195f9b moved full_schema, is_strcit, should_expand, should_get_inverse, should_get_psets. should_get_geometry and should_skip_geometry_data to the Patcher class definition. deleted those parameters from the patch definition so that users are able to set them by themselves. removed the hardcoded tmp-File for the db_file name 2025-01-14 09:30:34 +11:00
tim 228e9d0571 Refactor detect_icon_color_mode to accept attribute path suffix
•	Removed bpy.context.preferences.themes[0] from the input and hardcoded it in the function.
	•	color_path now only requires the attribute path suffix (e.g., "user_interface.wcol_regular.text").
	•	Updated error handling to default to "dm" instead of "lm".
2025-01-14 09:22:53 +11:00
tim 7280669725 Typo 2025-01-14 09:22:53 +11:00
tim 83b8bb153d One function for model and cad custom icons
Apply detect_icon_color_mode function to model and cad workspaces
2025-01-14 09:22:53 +11:00
tim 88891409fd New icon color mode function
New function for determining which icon color mode to use: dark (dm) or light (lm)
2025-01-14 09:22:53 +11:00
tim b6ba1aaa8c Hide shortcuts from header 2025-01-14 09:22:22 +11:00
ti ffb3d2d6e9 check for None 2025-01-14 09:22:03 +11:00
Dion Moult efede9eb03 No idea why Github actions is failing for MacOS. All code looks good to me. 2025-01-14 00:14:03 +11:00
Andrej730 ac315e8a55 ifcfm cobie 2.4 - color code excel tabs
example - https://i.imgur.com/tSeqyjj.png
2025-01-13 17:53:02 +05:00
Andrej730 b7c18221f4 get_bbox - optimize by using numpy arrays 2025-01-13 17:53:02 +05:00
Andrej730 7a49f1611e get_shape_matrix - small optimization
reuse existing matrix instead of recreating new
2025-01-13 17:53:02 +05:00
Andrej730 5c0a7af830 cobie24 - implement Coordinate tab #5926 2025-01-13 17:53:02 +05:00
Andrej730 a968b61d02 np_matrix_to_euler, np_matrix_normalized 2025-01-13 17:53:01 +05:00
Andrej730 0ac9d739f8 remove unused code 2025-01-13 17:53:01 +05:00
Andrej730 74c6480808 bim.add_element to select added object 2025-01-13 17:53:01 +05:00
Andrej730 0601802005 typing 2025-01-13 17:53:01 +05:00
Dion Moult 9784fb1c49 Pyodide example app should use IfcShapeRepresentation to be valid 2025-01-13 23:12:49 +11:00
Gorgious56 039dcbaefa Stair Modifier : You can now set a total length target that will update individual tread runs automatically. You can lock the total length target and modify tread run or number of treads to keep the same global dimensions. 2025-01-13 12:04:13 +01:00
Gorgious56 1cd17fd5f8 Merge pull request #5947 from IfcOpenShell/update_type_manager
Update Type Manager
2025-01-13 09:40:42 +01:00
Gorgious56 2f0f9fe08b Merge branch 'v0.8.0' of https://github.com/IfcOpenShell/IfcOpenShell into update_type_manager 2025-01-13 09:38:41 +01:00
Gorgious56 50ed75fcc2 Fix potential bug where a class doesn't have a predefined type 2025-01-13 09:32:23 +01:00
Gorgious56 9eaf41c9f0 The filter search field now also filters description and predefined type 2025-01-13 09:28:56 +01:00
Dion Moult 581a674654 Fix #5952. Aggressively block scaling of IFC elements to prevent user confusion. 2025-01-13 18:01:25 +11:00
Dion Moult e29f686d3f Update setting literal from old name of "debug" to new name "debug-boolean". 2025-01-13 15:45:27 +11:00
Dion Moult 8cf7057abc Fix #5954. Special automatic movement of features shouldn't then also move children of those features.
If you move a wall, and that wall has features (e.g. openings), it's
desirable to also move those openings (because they are invisible). This
is a special exception to `should_transform_children` because the
definition of the feature (opening) is inherently tied to the parent
(wall).

What wasn't considered is that this would typically then also move
subchildren of the features (e.g. fills like doors). I'm surprised
nobody caught this earlier.

I did also consider another approach where if you move a wall, it moves
all unfilled openings, and if you move a door which fills a opening, it
moves the opening too. Intuitively it sounds nice, but it doesn't work
because:

 - Openings can have multiple fillings. If you move all fillings, they
all fight to move the openings.
 - All logic about children goes one way: a placement may have child
placements relative to it. This breaks the convention (if moving a door
instead moves its opening) which can make brains explode.
 - It starts to conflate rules about relative / referenced placements
with spatial decomposition. We assume all IFCs are valid and follows the
convention of relative placement but we cannot guarantee this. This also
leads to brain explosion.
2025-01-13 15:44:52 +11:00
Dion Moult 316b9554d4 Fix #5959. Bug where default selection basket in selector query was not added per facet list.
Previously the code looked for additive facets (entity, instance)
anywhere in the query, and then only added the default basket once at
the beginning of the query. This change makes it look for additive
facets in order (that way you could start with a default selection, and
then later use an additive facet) and does it per facet list (so you can
omit the additive facet at the beginning of each list).
2025-01-13 12:46:44 +11:00
tim 95fa6f39c4 New furniture icon
Chair icon for furniture
2025-01-13 10:47:35 +11:00
Thomas Krijnen 65ffbe081b Pyodide app readme 2025-01-12 15:50:19 +01:00
Thomas Krijnen 936984dd31 Update publish-pyodide-demo-app.yml 2025-01-12 15:16:57 +01:00
Thomas Krijnen 590c6eed0a Update publish-pyodide-demo-app.yml 2025-01-12 15:12:44 +01:00
Thomas Krijnen a696c7bbb5 Update publish-pyodide-demo-app.yml 2025-01-12 15:10:59 +01:00
Thomas Krijnen 6ff1d06938 Create publish-pyodide-demo-app.yml 2025-01-12 15:07:44 +01:00
Thomas Krijnen 6deb7121cc demo-app/CNAME 2025-01-12 15:00:54 +01:00
Thomas Krijnen 6aec2f7a02 pyodide/app-demo 2025-01-12 14:50:20 +01:00
Dion Moult 0eb987fc07 Black 2025-01-12 22:43:41 +11:00
Dion Moult 04092d19be Refactor common function for parametric objects into tool.Model 2025-01-12 22:43:34 +11:00
Dion Moult 8364c87777 Fix #5941. Context override when adding objects should only have one object. This is a temporary fix.
The proper fix is to refactor add_door and friends into core. That way
it can be properly reused instead of this hacky context override.
2025-01-12 22:39:32 +11:00
Dion Moult 2d38d8520c Fix regression where you couldn't move spatial elements from the new aggregate move override. 2025-01-12 21:47:42 +11:00
Dion Moult 03d3b1e52c Changed my mind, remove AssignConstituentFractions patch. See #5441. 2025-01-12 17:51:32 +11:00
Dion Moult 79fe1bfcfc Minor fix from new patch recipe in PR #5441 (src no longer required) 2025-01-12 17:45:43 +11:00
Louis Trümpler 59c1d7fa54 Add AssignConstituentFractions recipe 2025-01-12 17:41:50 +11:00
tim f0e1be765d New Roof and Railing icons
https://github.com/IfcOpenShell/IfcOpenShell/issues/5375
2025-01-12 17:38:57 +11:00
Lucas Nascimento a2bfc006b7 black formatting 2025-01-12 17:25:21 +11:00
Lucas Nascimento dff9f56ce3 black formatting and changes in shader typing 2025-01-12 17:25:21 +11:00
LM-Nascimento 80996dee1f Update unit.py 2025-01-12 17:25:21 +11:00
Lucas Nascimento a329de9f71 licence comment 2025-01-12 17:25:21 +11:00
Lucas Nascimento 1918138f68 cleanup 2025-01-12 17:25:21 +11:00
Lucas Nascimento aa21fe9060 separate shader file from decoration data 2025-01-12 17:25:21 +11:00
Lucas Nascimento 6eee445502 Cleaning up and type hints 2025-01-12 17:25:21 +11:00
Lucas Nascimento 3eb29af496 seems to be working 2025-01-12 17:25:21 +11:00
Lucas Nascimento 2912580087 shit ton of changes 2025-01-12 17:25:21 +11:00
Lucas Nascimento 477725529b now with shader for point loads 2025-01-12 17:25:21 +11:00
Lucas Nascimento d915dc9df0 update decorator to match shader + changes to text rendering 2025-01-12 17:25:21 +11:00
Lucas Nascimento 53a2b87c97 updates to shader class 2025-01-12 17:25:21 +11:00
Lucas Nascimento d10b327c5f Initial commit, able to show structural curve action on the sample file of IFC documentation 2025-01-12 17:25:21 +11:00
Radek Hlaváček 293cd83a9c Update report.html
Adding "Skipped" grey colored container for specification and requirement if no applicable element is found
2025-01-12 17:14:22 +11:00
ti 07817ec6fc updated restriction types 2025-01-12 17:13:36 +11:00
c4rlosdias d1ad082979 Add derived unit 2025-01-12 17:12:20 +11:00
Thomas Krijnen ba9693519b Remove mathutils import from shape_builder.py 2025-01-12 17:05:32 +11:00
Dion Moult 41362e1582 Fix #5950. IfcTester now considers optional requirement facets as per latest documentation.
The IDS documentation used to state that "optional" on requirement
facets was "for information only" and didn't affect the pass / fail
state. This was changed a while ago (which I missed) to a new behaviour:
both no values and passing values will pass.
2025-01-12 16:28:14 +11:00
Dion Moult 8e77011dda Fix #5949. Remove material set psets panel in favour of merging into material manager psets panel.
Previously, to edit a single IfcMaterial pset, you'd do so in the
material manager. In contrast, to edit a IfcMaterialSet pset, you'd do
so only when assigned to an object. Not only is it bad to edit psets in
two locations, it also means you can't edit psets until you've first
assigned the material set to an object which is bad. Now it's less code,
and material / material set psets are in the same spot.

There still more consolidation work to do, to allow editing of sets in
the material manager and to figure out how to show item psets, but it's
a step in the right direction.
2025-01-12 15:45:02 +11:00
Dion Moult 02632440b0 See #5949. Only show material psets and classifications if actually editing in the material manager.
Previously, you could disable editing and it would still show irrelevant
psets or classifications.
2025-01-12 15:45:02 +11:00
Bruno Postle 0a4ab32810 Fix missing carriage return
SyntaxWarning: invalid escape sequence '\I'
2025-01-11 13:36:54 +00:00
Dion Moult c446aab9a0 Fix #5951. Regression when removing mathutils dependency from shape builder and parametric stairs were expecting Vector and instead got numpy. 2025-01-11 15:39:13 +11:00
Dion Moult 2e7cbb759e Fix #5955. Regression in 0983f812fd where you couldn't remove a style that wasn't being edited. 2025-01-11 14:51:18 +11:00
Gorgious56 68f175fc71 Fix bug when trying to add an ifc type occurence from the toolbar in the properties editor 2025-01-10 15:42:37 +01:00
Gorgious56 a428169a13 Fix bug when duplicating an ifc type 2025-01-10 15:29:31 +01:00
Gorgious56 7db0196791 Fix bug where the thumbnail of the active class wasn't updated 2025-01-10 15:17:26 +01:00
Gorgious56 4f4c557f61 Another attempt.
Went back to previous toolbar : icon + type name + dot grid icon which all launch the type manager.
    Validating the type manager popup now only closes it. Functionally is the same thing as clicking Cancel. Don't really know what to do to fix it. Does cancel make sense in the type manager ? Do we want to be able to undo what is possible to be done from within the type manager ?
    You can change the active type either with the dropdown in the popup and in the grid flow. I changed it so that changing the type in the dropdown jumps to the corresponding page. BTW first time using github copilot to figure out the maths and it worked magically :) . I'm not against removing the dropdown but I feel like it's nice to see a plain list to choose from.
    You can input a specific page number or scrub the page number field. Might be usefull if user has dozens of pages to flip through.
    Right now the search is very simple, it does not implement fuzzy search or anything fancy with *
2025-01-10 14:24:33 +01:00
Dion Moult d88adf2d02 See #5938. Correctly detect negative extrusion depths and directions. 2025-01-10 22:48:11 +11:00
Dion Moult 956b7dcb92 Fix #5941. Regression in ae22eec9 where active object wasn't considered when adding a parametric door. 2025-01-10 21:50:52 +11:00
Dion Moult 0a32149be3 Fix #5944. You can now tab / edit IfcAnnotationFillArea with the new item editing mode. 2025-01-10 19:49:04 +11:00
Gorgious56 aafb6fc426 Add search bar with simple filter function to the type manager 2025-01-10 09:44:12 +01:00
Dion Moult cac3d7f699 Fix #5939. Fix #2751. IfcPatch no longer needs the (rarely used) input src arg by default. 2025-01-10 16:59:45 +11:00
Dion Moult 83add56e6c Fix #5949. When duplicating objects, copy over IFC links (shape representation ID, item_ids, edge_item_ids) in a more reliable way 2025-01-10 15:22:53 +11:00
Dion Moult e4412e2f51 Black 2025-01-10 15:21:18 +11:00
Dion Moult 4a1422d292 New annotations should not go into the unsorted collection 2025-01-10 14:13:28 +11:00
Stephen Boddy 1e448cb170 Add mini-guide to setting up IDE for debugging 2025-01-10 12:34:56 +11:00
Bruno Perdigão 07bb7e68dd Fix #5932 2025-01-09 16:14:11 -03:00
Bruno Perdigão cf054e11a1 Refactor: improve preview decorators for other products, following 420a4cfdc 2025-01-09 15:59:15 -03:00
Bruno Perdigão 6b8024f835 Refactor: Improve profile preview decorator to prevent GPU context errors 2025-01-09 15:59:15 -03:00
Bruno Perdigão 66577fd30d Prevent polyline profile from being called by Column Tool 2025-01-09 15:59:15 -03:00
Bruno Perdigão 0124b7a0e9 Allow polyline profile for IfcCoveringType 2025-01-09 15:59:15 -03:00
Bruno Perdigão 737402cae4 Fix profile scale issue in profile preview decorator. 2025-01-09 15:59:15 -03:00
Bruno Perdigão 8b1d4ca5d4 Implement polyline tool for profiles. 2025-01-09 15:59:15 -03:00
Gorgious56 a6e953a550 Update Type Manager
Add back the type dropdown and looking glass icon in the toolbar
Clicking on a type in the manager no longer closes the popup anymore.
A visual indictor is displayed on the active type
Changed the parameters icon in the individual type interface

Fix bug in "Slab from Walls" Shift + A code
2025-01-09 17:45:40 +01:00
Dion Moult 40dcfd450f See #5940. Fix bug where using preserve existing in IfcCSV didn't fully purge extra rows, possibly leading to orphaned data (which LibreOffice will render as 0 if it is a number value type) 2025-01-09 18:25:00 +11:00
Dion Moult e220b6981e See #5940. Fix bug where ODS and XLSX didn't correctly check for whether summaries existed and sometimes printed out "None" rows 2025-01-09 18:24:09 +11:00
Dion Moult 84931fbbd2 See #5941. Don't show mode changes if an object is unselectable.
Unselectable things should be uneditable. That's what the lock/unlock is
for.
2025-01-09 17:40:52 +11:00
Gorgious56 2d5bc49ee0 Going in and out of AGGREGATE mode doesn't overwrite other objects' display type anymore 2025-01-08 16:53:59 +01:00
Gorgious56 d4ff789688 You can now mass enable edition, disable edition and validate edition of Ifc Entity Attributes.
This highlights a potential bug that already existed due to the way the attribute system is designed. Where the user mass-edits attributes from different IFC types, resulting in discrepancies due to the same attributes having a different index. eg IfcWindow has the Tag attribute at index 3, IfcDoor at index 4. So using the ALT modifier feature from vanilla Blender to mass-modify similarly named attributes on the Tag attribute of the IfcWindow will modify the PredefinedType attribute on the IfcDoor (index 3). For this reason I added the ALT modifier to the buttons so mass-operations are a conscious effort for more knowledgeable users. Might reconsider if problems arise but this is IMO a good QOL feature.

Also fix floating point precision errors on Pset float values stored as strings (re last commit)
2025-01-08 11:29:06 +01:00
Gorgious56 5c3f0f0df9 Fix floating precision artifacts when displaying float values in the Attributes panel
Minor fixes on previous commit
2025-01-08 10:28:27 +01:00
Bruno Perdigão 519e667464 Fix bug with bim.aggregate_assign_new_objects_in_aggregate_mode. 2025-01-07 18:17:32 -03:00
Bruno Perdigão e3abfd60cb Typo. 2025-01-07 18:16:59 -03:00
Bruno Perdigão 864e8d3a48 Typo. 2025-01-07 18:05:23 -03:00
Bruno Perdigão d2b05ea3dc Fix bug related to constraints and aggregate duplication 2025-01-07 18:00:47 -03:00
Thomas Krijnen d063bdbbf1 wasm wheel fixes 2025-01-07 20:56:16 +01:00
Thomas Krijnen a42a49e088 wasm wheel fixes 2025-01-07 20:47:25 +01:00
Gorgious56 ae22eec958 Door modifier operators now apply to all elligible selected objects. This makes it way easier to modify a single attribute in several unrelated parametric doors thanks to the ALT + input feature from vanilla Blender. This allows for mass-removing, mass-removing, mass-editing, mass-validating, and mass-cancelling edition of door modifiers.
Also allow UNDO for some door operators which seems like they should support it
And Fix #5937 : minor typo
2025-01-07 17:43:43 +01:00
Bruno Perdigão b657eee564 Change extrusion direction when converting to extrusion in Representation Utilities. 2025-01-07 12:41:15 -03:00
Thomas Krijnen 9d1daa4dc5 ifcpatch - try both out of tree and subpackage imports #5939 2025-01-07 15:43:44 +01:00
Bruno Perdigão dbf33283ab Add Bonsai decorators toggle to Blender Viewport Overlays.
https://imgur.com/auQcp2Y
2025-01-07 11:32:14 -03:00
Gorgious56 0983f812fd You can now use the Asset Browser to set a Material Asset as an external style.
To do so Right Click on a material in the Asset Browser then `Set To External Style`. The style editor must be loaded in the properties editor.

Also run black on a file from previous commit and fix a bug soft-locking the style editor when removing a style that is being edited
2025-01-07 14:55:17 +01:00
Thomas Krijnen 3ced6e7bb1 wasm wheel fixes 2025-01-07 13:23:10 +01:00
Richard Brice 933d845472 Fixes IfcPolynomialCurve when used as IfcCurveSegment.ParentCurve in horizontal alignments 2025-01-06 14:36:37 -08:00
Gorgious56 8313c05884 Merge pull request #5930 from Gorgious56/improve_modifiers
Modifiers QOL
2025-01-06 12:10:26 +01:00
Gorgious56 f6e588b48c You can now copy roof parameters from active to selected objects 2025-01-06 11:35:17 +01:00
Gorgious56 547c5fb8a9 TAB now applies modifier parameters on the active object. ESCAPE now cancels editing modifier parameters on the active object. 2025-01-06 11:06:41 +01:00
Gorgious56 570e29cfe4 Add operator to copy railing modifier parameters (#3413)
* You can now copy railing properties from active to selected

Hitting ESCAPE cancels editing railing path
2025-01-06 10:10:54 +01:00
Thomas Krijnen 2e35b07fa6 Fetch boost from github releases in build scripts 2025-01-06 10:05:59 +01:00
Thomas Krijnen 1b6ee26854 Don't fail on empty ReferencedSource in IfcTester 2025-01-05 14:40:27 +01:00
Thomas Krijnen 7b21858cd4 Inform about supported reporter types in IfcTester 2025-01-05 14:37:41 +01:00
Thomas Krijnen 12800bbeee IFCPATCH_RECIPE_DIR to allow loading out of tree recipes 2025-01-05 11:07:48 +01:00
Gorgious56 3a7488d54b Fix #3261 : You can now purge unused openings that do not intersect with their related building element.
It's a naive implementation and very inefficient. Moreover there may be false positives because it's testing overlapping the evaluated mesh element with all openings applied.
2025-01-03 17:37:46 +01:00
Gorgious56 7bfa926e6d Fix error when instantiating a wire mesh 2025-01-03 16:41:05 +01:00
Gorgious56 fd7a7d44c3 Special geometry data on meshes are also loaded as geometry attributes.
No functional change apart from in dissolve_triangulated_edges where it will try to load the attribute if it can. I believe it will be easier in the long term to use the builtin Attributes system. Unfortunately Curves don't support Attributes yet. Also, attributes are more lightweight compared to custom properties.
2025-01-03 16:12:51 +01:00
Gorgious56 fe6a6d1a0d You can now disable aggregate mode with ESCAPE in the 3D Viewport
- Fix minor typo
2025-01-03 15:04:28 +01:00
Gorgious56 98a9550260 Fix slowness when rendering dense meshes with the opening decorator
It uses a custom boolean attribute on the mesh to decide whether an edge should be displayed or not. I think later on it can be used to get rid of the dictionary accessors which make the blend file size skyrocket.
2025-01-03 14:12:16 +01:00
Gorgious56 fe253af5ae Don't draw triangulation artifact edges in the opening decorator 2025-01-03 13:04:37 +01:00
Gorgious56 e933ff08f8 Use relevant tool.Geometry functions for querying openings relations 2025-01-03 12:22:08 +01:00
Gorgious56 25af639dae Fix memory leaks due to orphaned meshes in the opening and boolean operations 2025-01-03 11:30:42 +01:00
Gorgious56 5b3e3fc646 Fix not being able to apply or hide specific openings 2025-01-03 10:54:54 +01:00
Gorgious56 57dbea2974 Fix #3854 : Assigning a class to a potential opening removes it from the openings pool
Also fix an error in previous commit
2025-01-03 10:33:41 +01:00
Gorgious56 cc3074cdcc #5919 : Add an option to set the opacity of the rest of the model when modifying openings
Option is located in the preferences
2025-01-03 10:01:36 +01:00
Gorgious56 4c9697d260 Consolidate logic for toggling display of openings 2025-01-03 09:59:47 +01:00
Gorgious56 8dfcea0e24 Fix internal openings list not being cleared when applying an opening 2025-01-03 09:42:55 +01:00
Gorgious56 f0fac7ad8b Reorganize addon preferences layout
Hopefully it's a little bit less daunting
2025-01-03 09:40:08 +01:00
Bruno Perdigão f6c34ac196 Refactor enable_constraints for performance reasons.
`context.view_layer.update()` was being called for every object in the loop.
Now it is just called after all the constraints are enabled.
2025-01-02 17:11:43 -03:00
Bruno Perdigão 5ebaaa6c8c Minor fix to disable_aggregate_mode(). 2025-01-02 17:11:43 -03:00
Bruno Perdigão 9838a54173 Minor fix in aggregate decorator. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 2c3c0b9d95 Improve performance for TAB into aggregate mode.
Use disable/enable constraint instead of `constraint.apply`. It keeps the
parts location with matrix calculation
2025-01-02 17:11:43 -03:00
Bruno Perdigão 548f6e0566 Improve performance for bim.aggregate_assing_new_objects_in_aggregate_mode()
Add constrain only to new objects instead of rebuilding all constraints from scratch.
2025-01-02 17:11:43 -03:00
Bruno Perdigão 3874d19caa Allow aggregate to me moved while in aggregate mode without moving its parts. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 87fee0b850 Add features for handling newly created objects in aggregate mode
- Highlight new objects in red when in aggregate mode
- Introduce an operator to add new objects to the current aggregate, accessible via a button in the header menu
2025-01-02 17:11:43 -03:00
Bruno Perdigão 3bccc993b7 Small fix in aggregate decorator. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 31ae2c5437 Create UI operators for aggregate mode in model workspace. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 85c48f6a63 Small refactor of aggregate decorator. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 833cc0604c Improve performance in aggregate mode by removing hide_select.
Additionally, update rendering of objects outside the aggregate to use
 'WIRE' instead of 'BOUNDS'.
2025-01-02 17:11:43 -03:00
Bruno Perdigão 3dd83598e9 Prevent TAB from editing objects outside the aggregate in aggregate mode. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 3050abdb87 Small fix. 2025-01-02 17:11:43 -03:00
Bruno Perdigão f7c4b13d0a Aggregate decorator refactor. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 91d3b8161e Integrate aggregate mode toggle with Bonsai's TAB edit mode override. 2025-01-02 17:11:43 -03:00
Bruno Perdigão e9cc205ddd Enable aggregate decorator by default on file startup. 2025-01-02 17:11:43 -03:00
Bruno Perdigão c48f50a67e Small fix in aggregate move selection. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 6d9ee8828e Small fix 2025-01-02 17:11:43 -03:00
Bruno Perdigão 28c95a7d9a Remove debug print statements. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 9a6ff7c37c Add bounding box decorator over aggregates. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 226ea10de8 Add aggregate mode decorator. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 3c590f097a Prevent aggregate objects to be edited by TAB when not in aggregate mode. 2025-01-02 17:11:43 -03:00
Bruno Perdigão cbdbd5bd83 Add operator to toggle aggregate mode on and off. 2025-01-02 17:11:43 -03:00
Bruno Perdigão ccdf1cee0a Hide selection of objects outside the aggregate when in "aggregate edit mode". 2025-01-02 17:11:43 -03:00
Bruno Perdigão 21d3b1d472 Small fix 2025-01-02 17:11:43 -03:00
Bruno Perdigão 0c7a0a6bda Add aggregate decorator. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 3dcded819f Add new way to move objects that are a part of an aggregate.
Now, when trying to move an object that is a part of an aggregate, the
`OverrideMoveAggregate` will be called, meaning that it will move the whole
aggregation. It works by creating constraints and moving the aggregate instead
of the selected object.

It also introduces the idea of editing an aggregate (no hotkey yet). When active, the user
will be able to move the parts of the aggregate instead of the whole aggregation: https://imgur.com/IcCGtPN
2025-01-02 17:11:43 -03:00
Bruno Perdigão 6f11f74aac Apply aggregate constraints instead of removing. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 0daf4c9324 Remove constraints when object is unassigned from the aggregate. 2025-01-02 17:11:43 -03:00
Bruno Perdigão 7f838f81b4 Add aggregate constraints to import_ifc.py 2025-01-02 17:11:43 -03:00
Bruno Perdigão cf9446c4a5 Constrain part objects to aggregate object when creating aggregations. 2025-01-02 17:11:43 -03:00
Richard Brice 26ba761c68 Refactors alignment geometry 2025-01-02 11:10:56 -08:00
Gorgious56 bb9be861c8 Fix blend file being saved twice in a row with CTRL-S
This caused a noticeable hiccup when a large file is saved twice on a network drive. Also it messed up the backup system.
2025-01-02 14:32:29 +01:00
Gorgious56 ad815b697e Fix #5570 : Regen button now appears in the toolbar for windows and doors 2025-01-02 14:12:26 +01:00
Gorgious56 ca90ddc0b4 Fix 3134 : Flip shortcut is now displayed in the toolbar for doors and windows 2025-01-02 14:02:00 +01:00
Gorgious56 fb35e80be0 Editing the representation of an opening now updates the gpu shader accordingly 2025-01-02 13:06:14 +01:00
Gorgious56 21a62116a8 You can now hide all openings by pressing ESCAPE in the 3D Viewport
- Also fix CTD on UNDO after pressing ESCAPE due to previous commit
2025-01-02 11:17:48 +01:00
Gorgious56 c2708b13d9 Minor fix on previous commit to correctly go out of ifc edit mode without saving representation 2025-01-02 10:54:55 +01:00
Gorgious56 b949efe8ba Fix #5849 : Use Keymap item instead of modal operator for override escape in 3D viewport
- Enables the vanilla Blender autosave feature back, since a running modal operator deactivates it
- ESC is not used by any other vanilla keymap in the 3D viewport (may be conflict with other addons)
- Hitting ESC over another type of editor (eg enum field in the properties editor) will not trigger disabling ifc item mode
- You can now hit ESC in IFC edit mode to cancel editing the geometry and go back to ifc object mode
2025-01-02 10:27:52 +01:00
Thomas Krijnen 463289e462 pyodide build (#5916) 2024-12-31 16:09:54 +01:00
Thomas Krijnen 2fbb47d797 build_pyodide.yml 2024-12-30 17:07:40 +01:00
Thomas Krijnen 6d3612bd5b WASM build updates 2024-12-30 16:47:59 +01:00
Thomas Krijnen 3592e3f9c0 cityjson off by default 2024-12-30 16:44:47 +01:00
Andrej730 8fc0d7a808 Polyline tool - use Blender icons for status bar text
To make it similar to default Blender operators.
Example - https://i.imgur.com/wUEQeQL.png
2024-12-30 17:28:01 +05:00
Andrej730 9454d281fc handle_snap_selection - disable in input mode
As it's used in mouse mode and in input mode it just recalculates the values.
2024-12-30 17:28:01 +05:00
Andrej730 64e4f00f19 Left mouse to cancel input mode in polyline tool
Previously it would just have no effect, now it should be more natural.
2024-12-30 17:07:53 +05:00
Andrej730 0f25701967 validate_input - add basic tests 2024-12-30 17:07:53 +05:00
Andrej730 80fec36b98 validate_input - allow typing feet value without feet symbol
Similar to how we don't require to specify meters when project is in meters.
2024-12-30 17:07:53 +05:00
Andrej730 1065239501 validate_input - add rounding to remove float garbage 2024-12-30 17:07:53 +05:00
Andrej730 8f4b0f1fd6 Fix error refresh linked aggregate with 2+ levels of aggregates #5911
Error occurred if IfcElementAssembly, that was currently refreshed, had another IfcElementAssembly as it's part. Then, it was removed twice - once during delete_objects and another time during delete_ifc_object, leading to the error.
2024-12-30 17:07:52 +05:00
Andrej730 6965399b2a typing 2024-12-30 17:07:52 +05:00
Andrej730 da9cbbc61b black . 2024-12-30 11:58:35 +05:00
Ryan Schultz b506b72d9f Toggle openings for part's aggregate as well. 2024-12-29 17:05:21 -06:00
Ryan Schultz 78afcf9c7a Be able to close openings no matter what is selected. 2024-12-29 16:07:56 -06:00
Ryan Schultz c562a2c2ac closes #5876: be able to 'apply void' no matter which order you select the wall (or any other class object) and void. 2024-12-29 12:49:38 -06:00
Thomas Krijnen f3c52c5cbf Quick wrapper clean-up 2024-12-29 15:53:21 +01:00
Thomas Krijnen 9fa44fdc3c Setting rename 2024-12-29 15:53:07 +01:00
Bruno Perdigão 973dd818c4 Add slab direction decorator.
It's useful when working with angled slabs. There is no UI for it yet.
2024-12-27 21:02:47 -03:00
Andrej730 f362ba4edc Fix typo
Co-Authored-By: sboddy <12862430+sboddy@users.noreply.github.com>
2024-12-27 21:21:54 +05:00
Andrej730 2b1126d24d Hide list attributes from attributes UI
As they're more internal and not very useful to users.
Example of list attributes popping up before this commit - https://i.imgur.com/Nxcb10O.png
2024-12-27 19:43:30 +05:00
Andrej730 227f315746 Support quantity take-off for element types
Previously it would ignore any element types and work only on occurrences though quantity sets do support product types in general.
2024-12-27 19:43:30 +05:00
Andrej730 d55a291589 get_top_area to calculate area for the roof #5899 2024-12-27 19:43:30 +05:00
Andrej730 6c6e40b07c get_side_area - add angle argument 2024-12-27 19:43:30 +05:00
Andrej730 810ad58c06 Fix get top area doc-string
It says that angles lower than the provided angle are ignored when it actually works the opposite way.
2024-12-27 19:43:29 +05:00
Andrej730 19c1394d94 typing 2024-12-27 19:43:29 +05:00
Andrej730 c770776228 Quantity take-off - add a fallback option #5899
If current set of rules (e.g. IfcOpenShell) doesn't provide a way to quantify some type of element, then user now have an option to fallback to other calculator (Blender).

Location - https://i.imgur.com/csIPOuo.png
2024-12-27 19:43:29 +05:00
Andrej730 00ba54f5f2 blender qto calculator - simplify x, y, z calculations 2024-12-27 19:43:29 +05:00
Andrej730 845ebb8543 Fix bug in Blender quantities calculator ignoring openings from an aggregate
It wasn't considering that object's geometry might be also altered by opening added not directly but to it's aggregate.
2024-12-27 19:43:29 +05:00
Andrej730 5ef10073cd black . 2024-12-27 19:43:28 +05:00
Bruno Perdigão b9423b191a Add AddWallsFromSlab operator.
This operator allows users to create walls from a slab.
When the wall tool is active, pressing `Shift + A` will generate walls based on the exterior polygon of the selected slab.
2024-12-27 11:27:30 -03:00
Bruno Perdigão ba5e968b8f Fix bug caused by refactor a6a8a0f4b. 2024-12-27 09:40:59 -03:00
Bruno Perdigão 5e77453d1d Add "Edge Intersection" option to snapping points. 2024-12-26 18:25:43 -03:00
Bruno Perdigão a6a8a0f4b7 Small refactor in snapping system. 2024-12-26 18:17:39 -03:00
Bruno Perdigão e65af4425e Add decorator for "Edge Intersection" snapping point. 2024-12-26 18:17:39 -03:00
Andrej730 a4aaf9b4c3 Add info message if some elements were skipped from quantification #5905
Example - https://i.imgur.com/DwklNFS.png
2024-12-26 18:27:55 +05:00
Andrej730 51c9e1eaa2 Save loaded paths to linked IFC models in IFC #5899
Short demo - https://imgur.com/a/3LIt9Sr
2024-12-26 18:26:26 +05:00
Andrej730 f8828d3853 If models linked using relative path - store path as relative to ifc, not blend
As now we do support storing the list of linked models in IFC.
2024-12-26 18:26:26 +05:00
Andrej730 03793db75f Keep IfcStore.path as empty string if file is not saved
Previously it would get cwd value in that case as bpy.path.abspath("//") returns cwd if .blend is not saved.
2024-12-26 18:26:26 +05:00
Thomas Krijnen faa13a938d Preliminary file existance check before attempting mapping 2024-12-26 14:03:36 +01:00
Thomas Krijnen 457f441187 Fix comparison in destructor 2024-12-26 14:03:36 +01:00
Andrej730 6486a8947c Fix macos builds 2024-12-26 15:36:51 +05:00
Andrej730 3b10d8a9c4 Fix error loading document references in ifc2x3 after 1655341 2024-12-25 17:40:52 +05:00
Andrej730 60d6252fe7 Change documents name/identification from UI
Example - https://imgur.com/a/TAkxxSF
2024-12-25 17:40:51 +05:00
Andrej730 ff147a4c24 Fallback for queries if no elements filter is provided #5901 2024-12-25 17:40:51 +05:00
Andrej730 e3aaf5defa dev_environment - stop script execution on errors 2024-12-25 15:21:00 +05:00
Andrej730 6aaaf99314 dev_environment - move wild cards out of quotation marks #5904 2024-12-25 15:21:00 +05:00
Andrej730 1e4420d824 dev_environment - remove redundant slash at the end of BLENDER_PATH
Co-Authored-By: tim <59872808+trhyder@users.noreply.github.com>
2024-12-25 15:21:00 +05:00
Andrej730 769025e084 typing 2024-12-25 15:20:40 +05:00
Andrej730 f62b8073c6 black . 2024-12-25 15:20:40 +05:00
Bruno Perdigão 75483edb22 Fix limitations in AddSlabFromWalls operator.
- The operator is now unaffected by the order in which walls are joined.
- It has been updated to support split walls.
2024-12-23 18:12:29 -03:00
Bruno Perdigão d44942fbae Typo 2024-12-23 18:10:35 -03:00
Bruno Perdigão 051da8e481 Allow mitre join to create a connection between contiguous walls. 2024-12-23 18:10:35 -03:00
Bruno Perdigão 46c7981842 Change "Split" function to create connection between the new walls. 2024-12-23 18:10:35 -03:00
Bruno Perdigão 7dbfe91b4b Allow intersect_edges_v2 to work with 2d vectors. 2024-12-23 18:10:35 -03:00
Andrej730 7e8094aaa0 bim.load_linked_project - move processing chunk code to common method 2024-12-23 18:59:56 +05:00
Andrej730 20172a29c2 small optimization
avoid copying arrays of data if not necessary
2024-12-23 18:59:56 +05:00
Andrej730 39b64775be bim.load_linked_project - add invoke for debugging purposes 2024-12-23 18:59:56 +05:00
Andrej730 170b6fc67e typing 2024-12-23 18:59:55 +05:00
Andrej730 6dfb25862c black . 2024-12-23 18:59:55 +05:00
Andrej730 f1080a8278 ifcopenshell.open - more robust file existence check 2024-12-23 16:19:56 +05:00
Andrej730 6b0b7989b0 Fix error appending elements without type #5902 2024-12-23 15:48:53 +05:00
Andrej730 9128bf2d47 Fix missing line after f22636d #5896 2024-12-23 15:32:15 +05:00
Andrej730 6edc6cec71 Fix Migrate not migrating ifc file header #5903 2024-12-23 12:33:32 +05:00
Andrej730 d0e2995a84 bim.copy_text_to_clipboard - more detailed tooltip
Now it will show the text being copied (e.g. attribute name).
2024-12-23 12:33:17 +05:00
Andrej730 31069d6643 Fix error creating polylines in ifc2x3 after 9fbcb39
By accident it was providing numpy array instead of ifc points entities.
2024-12-23 12:33:17 +05:00
Andrej730 09b4681413 Fix #5892
By accident not commited `attr = context.button_pointer` line that was leading to console errors
2024-12-23 11:35:55 +05:00
Ryan Schultz cb0fdbec66 Quick way to get search strings from selections: https://community.osarch.org/discussion/comment/23305/#Comment_23305 2024-12-22 11:25:42 -06:00
Bruno Perdigão 40f1055ac3 Add AddSlabFromWalls operator.
This operator allows users to create a slab from a selected closed loop of walls.
When the slab tool is active, pressing `Shift + A` will generate a slab based on the exterior polygon of the selected walls.
2024-12-20 17:42:13 -03:00
Bruno Perdigão 44ef07c43e Add WallAxisDecorator. 2024-12-20 17:42:13 -03:00
Andrej730 1f68464d46 Bonsai Attribute to support copying it's name to clipboard #5892
Example - https://i.imgur.com/Jf1jofZ.png
2024-12-20 19:39:47 +05:00
Andrej730 f7395ccd52 Fix misleading CAD Fillet hotkey, add some CAD hotkeys descriptions #5893
It was misleadingly displayed in UI as shift+v while it was shift+f.
2024-12-20 18:59:22 +05:00
Andrej730 a79c4b1ace typing 2024-12-20 18:59:22 +05:00
Thomas Krijnen 579628fcb1 Properly handle taxonomy::loft with curved edges coming from ExSolidTapered #5891 2024-12-20 13:49:33 +01:00
Andrej730 74fe1b4eb9 append_asset - ensure to update existing rels appending second asset
E.g. in #5890 pset was shared by 2 elements and they it worked is
1) it appended first element and it's rel to pset
2) it appended second element and skipped updating it's rel as it was appended before. Now it's going to update it to ensure it encludes second element too.

I believe, issue occurred after 8c28f52 when we stopped duplicating inverses and started to reuse them.
2024-12-20 12:47:10 +05:00
Bruno Perdigão 8c6eddfb66 Disable LEFTMOUSE when input mode is on, in polyline tool. 2024-12-19 20:02:39 -03:00
Andrej730 284ec46b81 add_door_representation - remove mathutils dependency #5192 2024-12-19 18:31:49 +05:00
Andrej730 d6e6a6d559 add_railing_representation - remove mathutils dependency #5192 2024-12-19 18:31:49 +05:00
Andrej730 f22636d880 add_window_representation - remove mathutils dependency #5192 2024-12-19 18:31:49 +05:00
Andrej730 eae92b55bb shape_builder - np utils 2024-12-19 18:31:49 +05:00
Andrej730 5b315bfa8f shape_builder - add test for mirror 2024-12-19 18:31:49 +05:00
Andrej730 5cd769e5b4 shape_builder tests - remove mathutils dependency #5192 2024-12-19 18:31:49 +05:00
Andrej730 e2b550f7af regenerate furniture library after migrating to numpy 2024-12-19 18:31:48 +05:00
Andrej730 bf892a6a06 Furniture library - small change after #4989 2024-12-19 18:31:48 +05:00
Andrej730 0e8eeb18ac shape_builder - remove mathutils dependency completely #5192 2024-12-19 18:31:48 +05:00
Andrej730 b4a0a5df6c mathutils deprecation - mep_bend_shape #5192 2024-12-19 18:31:48 +05:00
Andrej730 5469d3f9d5 mathutils deprecation - mep_transition_shape #5192 2024-12-19 18:31:48 +05:00
Andrej730 4a68285d1f mathutils deprecation - meshes #5192 2024-12-19 18:31:48 +05:00
Andrej730 01c2edfd16 mathutils deprecation - extrude #5192 2024-12-19 18:31:47 +05:00
Andrej730 c32616faca mathutils deprecation - mirror #5192 2024-12-19 18:31:47 +05:00
Andrej730 6e8815eacc mathutils deprecation - rotate #5192 2024-12-19 18:31:47 +05:00
Andrej730 8250f02866 mahtutils deprecation - translate #5192 2024-12-19 18:31:47 +05:00
Andrej730 c1ec42c95b mathutils deprecation - circle, plane, placements, curves #5192 2024-12-19 18:31:47 +05:00
Andrej730 63f56d2f21 mathutils -> numpy - polyline, rectangle #5192 2024-12-19 18:31:47 +05:00
Andrej730 bd0cf6cf3f black . 2024-12-19 18:31:46 +05:00
Andrej730 7be21bf02e mep - fix errors adding a bend/a transition
mesh is already removed by replace_object_ifc_representation
2024-12-19 18:31:46 +05:00
Thomas Krijnen 352e361ea5 Check for nullptr before resolving inverses 2024-12-19 10:40:59 +01:00
Thomas Krijnen 9efc9d2044 Fix iteration over indeterminate in rule execution 2024-12-18 11:45:47 +01:00
Thomas Krijnen d271fd1779 Fail faster on representation map not suitable for reuse #5672 2024-12-17 20:58:10 +01:00
Thomas Krijnen bd7c19a861 Defensiveness #5683 2024-12-17 20:57:01 +01:00
Thomas Krijnen abb1fe6f60 #5684 Ignore singular object placement 2024-12-17 13:30:21 +01:00
Thomas Krijnen 243e974866 Fetch when already cloned in nix build script 2024-12-17 12:28:32 +01:00
Ryan Schultz 07cf701e90 tweaks to a9defb94d0
thanks @Andrej730 for the direction.
2024-12-14 13:07:53 -06:00
Thomas Krijnen 1d271611c4 Try work-around brew install issue on OSX build 2024-12-14 15:34:42 +01:00
Thomas Krijnen 559ef3086a Only manual dispatch for full builds due to LFS quota 2024-12-14 15:34:15 +01:00
Andrej730 7f1b234045 Fix #5871 2024-12-13 19:07:58 +05:00
Andrej730 2251679479 Skip parts without polygons converting mesh to tessellation #5870
As IFC doesn't allow mixed geometry types anyway.
2024-12-13 19:07:57 +05:00
Andrej730 34e8e8911d geometry test - IfcSweptDiskSolid 2024-12-13 19:07:57 +05:00
Andrej730 c4945970e3 test IfcCircle values 2024-12-13 19:07:57 +05:00
Andrej730 99c752904a Fallback to add_representation for mesh curves #5870 (after 42f32e3) 2024-12-12 18:16:12 +05:00
Andrej730 8574057340 bim.hide_booleans to hide all selected booleans, not just active
short demo - https://imgur.com/a/1h2glfj
2024-12-12 17:44:55 +05:00
Andrej730 363c3b0010 bim.show_booleans to show booleans for all selected objects 2024-12-12 17:44:55 +05:00
Andrej730 e098a7c4fc Add option to disable loading index maps #5848
As currently it might still might take too long
2024-12-12 16:55:56 +05:00
Andrej730 ae61f28df7 Optimize loading index map - finding closest vert index #5848 2024-12-12 16:55:56 +05:00
Andrej730 d8cfc017d4 Optimize loading index map #5848
Use dict of face sets so we can get face data in O(1) instead of going through all of O(n).
2024-12-12 16:55:56 +05:00
Bruno Perdigão 4e0a813eb4 Fix Solar Analysis UI after changes in Sun Position Add-on.
Changes in this file: https://projects.blender.org/pioverfour/sun_position/src/branch/main/sun_calc.py
2024-12-11 16:39:12 -03:00
Bruno Perdigão a447776fd7 Change georeference decorator UI. 2024-12-11 16:38:24 -03:00
Thomas Krijnen eb68264bed Support inner loops in occt sweep_along_curve #5859 2024-12-11 10:54:01 +01:00
Thomas Krijnen a84a5815d6 Don't check for BOPAlgo_AlertAcquiredSelfIntersection at all for now 2024-12-10 21:45:39 +01:00
Thomas Krijnen 139b83ea0c Re-enable remove_duplicate_points_from_loop 2024-12-10 21:30:43 +01:00
Thomas Krijnen ab17c8ffd9 Re-enable force_close in profile curve handling 2024-12-10 21:26:58 +01:00
Thomas Krijnen 0708f49973 Re-enable wire self-intersection handling 2024-12-10 21:26:06 +01:00
Thomas Krijnen a728470b76 Allow BOPAlgo_AlertAcquiredSelfIntersection when its our final fuzziness attempt 2024-12-10 21:18:20 +01:00
Thomas Krijnen 72eed36313 Rework debug flags in settings 2024-12-10 21:17:37 +01:00
Andrej730 fc9bcb0b82 Support reloading disk solids representation that use Blender curves 2024-12-10 18:09:27 +05:00
Andrej730 5df93cbb52 Support InnerRadius for disk imported as Blender curves #5859 2024-12-10 18:09:26 +05:00
Andrej730 1e0ca1d891 convert-back-units test #5864 2024-12-10 18:09:26 +05:00
Andrej730 9cd4ff9de4 Fix error adding an occurrence with no type selected #5863 2024-12-10 18:09:26 +05:00
Andrej730 b1231b74e2 Save texture style without textures to remove texture style
Mentioned in 618ba51, it probably will be more natural this way - if there are no textures, we hide UV attribute to indicate that it won't be saved and on save we either do nothing, if texture style wasn't saved before, or remove it.
2024-12-10 18:09:26 +05:00
Thomas Krijnen ea68f90693 Fix other unit conversion issues #5864 2024-12-10 11:19:43 +01:00
Thomas Krijnen 064ccf8ab6 Always apply shape healing to faces with inner bounds for wrong orientation 2024-12-10 09:24:29 +01:00
Thomas Krijnen db865ec88f Revert submodule change in 586f9be077 2024-12-10 09:24:29 +01:00
Ryan Schultz 91a061325d Perform quantity take off near object's QTO. https://imgur.com/a/kzBA1GB 2024-12-09 15:13:13 -06:00
Andrej730 ce6a5080cd Added headers for resources and cost schedule
Need to polish it and readjust it, just adding some headers to make tables more readable.
https://i.imgur.com/5Lb8Vrc.png
https://i.imgur.com/UYysZF1.png
2024-12-09 18:30:12 +05:00
Andrej730 8039fcd6f7 Fix invalid ifc saving texture style without any textures / option to remove surface style
Now it won't allow saving texture style without textures and there is a button to remove part of surface style.
2024-12-09 18:30:05 +05:00
Andrej730 194e033662 Fix error editing lighting style attributes 08e38c6 2024-12-09 18:30:05 +05:00
Andrej730 77a4145dcf Fix error message creating texture style without render style
It was suggesting that it's possible to create it with just shading style though it's not currently supported.

Now it also appears when user is about to enable texture style editing, not when they're already trying to save the changes.
2024-12-09 18:30:05 +05:00
Andrej730 365d82f1d5 Loading texture maps - fallback to absolute paths
If it's not possible to get relative path, fallback to absolute path and show an info message.
2024-12-09 18:30:05 +05:00
Andrej730 618ba5187c Readable error trying to create a texture style without textures #5855 2024-12-09 18:30:04 +05:00
Andrej730 6090c1c669 typing 2024-12-09 18:30:04 +05:00
Andrej730 1572bf36a7 Add descriptions to style/material selection operators 2024-12-09 16:56:15 +05:00
Andrej730 2e0ca32653 black . 2024-12-09 16:56:14 +05:00
Ryan Schultz 5086fcc35a small fix to previous commit. 2024-12-08 20:12:03 -06:00
Ryan Schultz a9defb94d0 Improved UI for BIM_PT_object_material
also can run `bim.select_by_material` by clicking on material name
2024-12-08 20:01:49 -06:00
Ryan Schultz 586f9be077 When toggling openings, voids are wireframe.
Discussed: https://community.osarch.org/discussion/2592/any-objections-of-changing-voids-to-wireframe-when-you-toggle-openings
Also, if you keep hitting tab, it cycles in and out of edit mode.
2024-12-07 15:31:37 -06:00
civilx64 ad35ceef2a add missing import for ifcopenshell.api.georeference 2024-12-07 18:17:36 +01:00
Ryan Schultz 93ec1cbfc2 closes #5086: a preference to assign which classes display as wireframe upon opening the IFC file 2024-12-07 10:58:58 -06:00
Thomas Krijnen 8bba25497b Add material name in gltF 2024-12-07 16:36:40 +01:00
Thomas Krijnen 9160038359 Reuse more existing api in cgal face self-intersection detection #5820 2024-12-07 16:26:59 +01:00
Andrej730 c4ffc06a88 Bonsai - extract elements from selection #4316
Demo - https://imgchest.com/p/xny8qvox5yb
You can also now reuse 'bpy.data.texts['globalid-filter-3UvnD5Ml95zBDEcwAkAUIp']' kind of queries from Search in ExtractElements query.
2024-12-06 18:57:55 +05:00
Andrej730 2a713846ce bonsai ifcpatch - add warning for unsupported patches
For patches that require filepath to be provided explicitly (they are still supported with "Load from memory" unchecked).
2024-12-06 18:57:55 +05:00
Andrej730 c306014190 ifcpatch - input and file arguments #2751
documented when input is currently required
2024-12-06 18:57:55 +05:00
Andrej730 2da5f2d61e set_element_value - optimizations setting enum values
1) Identify from previous pset value whether prop was an enum (by checking if previous value is a list), instead of searching through prop templates

2) Compare previous and new enum values - if they match, skip editing IFC.
2024-12-06 18:57:54 +05:00
Andrej730 c7af55183b set_element_value for enums - add a test 2024-12-06 18:57:54 +05:00
Andrej730 6fe5af3170 Fix regression for switching to Point/PointCloud representations 2024-12-06 18:57:54 +05:00
Andrej730 73185293df Fix long time missing create_cog_representation
It was used in the code but method wasn't defined. I believe it was lost during 8b7d968 😁
2024-12-06 18:57:54 +05:00
Andrej730 6d01d71c60 add_representation.create_cartesian_point - fix missing z offset for 0 values 2024-12-06 18:57:54 +05:00
Andrej730 848af67fbb typing 2024-12-06 18:57:53 +05:00
Andrej730 8609bd12cc Fix default container label not updating #5817 2024-12-06 15:42:23 +05:00
Andrej730 3446643816 bim.switch_representation to handle representations with the same context
1) If object had multiple representations for the same context, then switch simply wouldn't work as it would always pick up the first representation it could find. Now it prioritizes the one user is selecting in UI.

2) If some object is selected and it also has multiple representations for the same context, then switch representation would switch it to any representation in that context it first finds. As user doesn't provide representation explicitly in that case, now it will stick to the already active representation on selected object if it matches the context, to avoid accident switches.

Notcied by working with example from #5824
2024-12-05 18:32:54 +05:00
Andrej730 1b61cbba8f typing 2024-12-05 18:28:45 +05:00
Andrej730 8d2b783b4a fix small bug in 939cc63ca 2024-12-05 17:24:33 +05:00
Andrej730 538365885b Hide output path for ifcpatch without output #4721 2024-12-05 17:24:33 +05:00
Andrej730 939cc63cae SplitByBuildingStorey - fix errors, fix Bonsai UI #4721
- The patch was failed when executed from Bonsai since self.src wasn't provided, fixed now.
- Added a temporary hack to diplsay file selector for this patch.
- small refactor.
2024-12-05 17:16:26 +05:00
Andrej730 13106d255c int formatting function #5039
Example - https://i.imgur.com/wDGFNci.png
2024-12-05 15:52:27 +05:00
Andrej730 9cf34f9d8c Select profile for profile type objects #5814
Demo - https://imgchest.com/p/9rydjxwanyk
2024-12-05 15:21:28 +05:00
Andrej730 eb87e7e866 Fix UI errors when selecting directories in file browser
It was only checking if it's existing path but wasn't checking whether it's a file, therefore directories with suffixes were slipping in and then failing during `IfcHeaderExtractor(filepath)`.
2024-12-04 17:46:55 +05:00
Andrej730 e4597708d7 simplify getting view 3d space
If area is VIEW_3D then area.spaces.active is always VIEW_3D too.
2024-12-04 17:46:55 +05:00
Andrej730 bb441ade3f Fix error loading external shader styles
Mentioned in logs from #5820
Turned out, `area.spaces` also contain all other spaces this area used (e.g. it used be view3d before it became a nodegraph) leading to errors. Simplifying it with `area.spaces.active`.
2024-12-04 17:46:55 +05:00
Andrej730 00a509aa0b typing 2024-12-04 17:46:55 +05:00
Andrej730 69fb486778 black . 2024-12-04 17:12:36 +05:00
Thomas Krijnen aef38bd869 Fix matrix access in XmlSerializer #5840 2024-12-04 10:39:01 +01:00
Andrej730 7b09c9ad3b Bonsai - handle invalid authorization None value in the header #5834 2024-12-04 14:16:51 +05:00
Richard Brice eadf35f031 Fixes unit conversion for polynomial coefficients 2024-12-02 14:45:05 -08:00
Thomas Krijnen f425794182 submodule 2024-12-01 20:26:18 +01:00
Thomas Krijnen 4d90684778 empty 2024-12-01 20:03:16 +01:00
Thomas Krijnen 049173286a Bump precision in wkt output 2024-12-01 19:05:22 +01:00
Thomas Krijnen 1ecf722111 Assert single polygon in arrange-spaces and no need for the closing point 2024-12-01 19:04:59 +01:00
Thomas Krijnen 85c0992975 submodule 2024-12-01 19:04:08 +01:00
Thomas Krijnen b9f790217e Initialize only_valid_ 2024-12-01 11:21:58 +01:00
Thomas Krijnen 4bb112ce71 Manually parse SVG polygons for space arrangement 2024-12-01 11:21:38 +01:00
Thomas Krijnen efd05158c4 Propagate unit settings 2024-12-01 11:21:15 +01:00
Thomas Krijnen 3a687fecda SVG reliance on UseElemHierarchy for storey decomposition 2024-12-01 11:20:37 +01:00
Thomas Krijnen df060d7f60 submodule 2024-12-01 11:19:34 +01:00
Ryan Schultz e3317af56d fix #5806: When unlocking spatial objects, that it turns on select-ability as well. 2024-11-30 15:40:26 -06:00
Thomas Krijnen da78a1107d Fix validation error in non-aggregate aggregate #5830 2024-11-30 17:49:29 +01:00
Ryan Schultz b52edcea40 Use Top/Bottom when LayerSetDirection = AXIS3 2024-11-29 09:55:42 -06:00
Thomas Krijnen 4ec8ceb134 Reintroduce --center-model and --center-model-geometry 2024-11-29 13:03:56 +01:00
Thomas Krijnen 8edbb37121 Fix latebound entity inheritance hierarchy wrt id() #5822 - not ideal, because BaseEntity.declation now returns declaration 2024-11-28 12:57:08 +01:00
Andrej730 c9847caa6a ifccsv - support importing enum values #4608 2024-11-27 18:30:37 +05:00
Andrej730 b7db3da017 ifctester - save results to temp directory
the way it was intended to originally but absolute paths of ifc and ids got in the way
Replaced TemporaryDirectory with mkdtemp as sometimes .html report doesn't open fast enough and directory gets deleted. Also need to keep the directory to make sure .ods is not removed.
2024-11-27 18:30:37 +05:00
Andrej730 eca71032bf black . 2024-11-27 18:30:37 +05:00
Andrej730 ab069f431a typing 2024-11-27 18:30:37 +05:00
Andrej730 25eecded4e ifcopenshell.validate to validate guids #5808 2024-11-27 15:42:03 +05:00
Andrej730 cc014bb7ec ifcopenshell.write check if file was saved successfully #5809
will help only for the cases if file didn't existed before
2024-11-27 12:59:06 +05:00
Ryan Schultz ba7b0d5c4f When using queries in an IfcAnnotation tag surround with backticks 2024-11-26 21:48:46 -06:00
Bruno Perdigão 4f6e2586e1 Fix #5727 2024-11-26 10:42:26 -03:00
Andrej730 dea3722ca5 bim.select_failed_entities - add info message 2024-11-26 18:12:05 +05:00
Andrej730 268cbe9a69 remove debug print 2024-11-26 18:12:05 +05:00
Andrej730 85b7249a77 Fix error using cwd for titleblock path #5769
The titleblock is ifc relative, not .blend/cwd relative.

e.g. if you open Blender in C:\ and then would open .ifc from c:\path\to\project.ifc, it would try to create layouts folder in C:\layouts instead of c:\path\to\layouts
2024-11-26 18:12:05 +05:00
Andrej730 12c08b0697 typing 2024-11-26 18:12:05 +05:00
Andrej730 fb70374876 black . 2024-11-26 18:12:04 +05:00
Andrej730 a4145ecec2 Fix errors using shared path for drawing underlay #5803 2024-11-26 17:06:00 +05:00
Andrej730 4da9f12960 BIMMeshProperties.obj - document 2024-11-26 16:16:29 +05:00
Andrej730 04d3903ee2 bim.hide_boolean to apply changes to booleans transforms #5800
Example - https://imgchest.com/p/ljyq8zvwey2
2024-11-26 16:16:29 +05:00
Andrej730 c8e5b8f028 bim.show_booleans - not to load same booleans multiple twice #5800
Now it's checking whether they were reloaded before and removing previous instances.
2024-11-26 16:16:29 +05:00
Andrej730 b8468cb19c Mesh.subshape_type - replace with enum 2024-11-26 16:16:28 +05:00
Andrej730 e6f0f54c93 Mesh.ifc_definition - remove unused property
Introduced in 6cc4ce4, seems to be gone for a while now.
2024-11-26 16:16:28 +05:00
Andrej730 2ff7401803 ifc join to reuse poly curve points if possible 2024-11-26 12:39:19 +05:00
Andrej730 22009973a8 Support ifc joining curve sets of poly curves #5793
Will resolve 'Unsupported representation item type for joining: IfcGeometricCurveSet' kind of errors on IFC join.
2024-11-26 12:39:19 +05:00
Andrej730 c228866f51 Add error message on representation type mismatch #5793
Instead of failing silently
2024-11-26 12:39:19 +05:00
Andrej730 3856b281ea Fix sheets related poll errors 2024-11-26 12:39:19 +05:00
Ryan Schultz 6f7565f6f9 select objects within a certain tolerance--which is set in the preferences. 2024-11-25 22:12:27 -06:00
Ryan Schultz 65a8ae1093 Fix #5802, Thanks @sboddy! 2024-11-25 18:49:50 -06:00
Jesse Roodhorst e6f8ef992e tooltips for the drawing module added (#5798) 2024-11-25 18:21:41 +05:00
Andrej730 dd0355c539 Fix drawing activation if drawing properties are using temp window #5791 2024-11-25 18:07:45 +05:00
Andrej730 7475a8f989 add_slab_representation - add api description #5792 2024-11-25 17:30:31 +05:00
Andrej730 4d44ec7174 Fix creating arbitrary profile without object after e74adcb
Error: Python: Traceback (most recent call last):
  File "\bonsai\bim\ifc.py", line 443, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\bonsai\bim\module\profile\operator.py", line 172, in _execute
    if not indices:
           ^^^^^^^
UnboundLocalError: cannot access local variable 'indices' where it is not associated with a value
2024-11-25 16:52:57 +05:00
Andrej730 29f9f04d92 Change profile object UI #5796
example - https://imgchest.com/p/qb4zwj6ad4j
1) moved profile object selection to the same row as the profile type selection, so it will more noticable that they're related
2) added object requirements in the description
3) filtered only mesh objects to appear in the dropdown
2024-11-25 16:45:55 +05:00
Ryan Schultz fc736f725c tweaks to 812e3dc6df 2024-11-24 09:58:44 -06:00
Thomas Krijnen ba92e3140c Fix installation of some header files 2024-11-24 15:12:44 +01:00
Bruno Perdigão 99ad9ac305 Fix snap system (#5782) by changing the priorities.
The priority now follows this order:
1. Polyline
2. Measure
3. Faceless objects
4. Objects
5. Axis
6. Viewport plane
2024-11-23 12:53:44 -03:00
Bruno Perdigão dc6078a416 Small fix in model decorator 2024-11-23 10:52:39 -03:00
Bruno Perdigão 0267e2b5e0 Add option to change the size of the georeference decorator. 2024-11-22 14:48:57 -03:00
Thomas Krijnen 352a2e2eb8 Quotes 2024-11-22 14:00:30 +01:00
Andrej730 091ed3bb8d Fix possible crash removing resource after 1f21e96 2024-11-22 17:13:05 +05:00
Andrej730 69eca15195 resources import/export - support resource quantities 2024-11-22 17:13:05 +05:00
Andrej730 a551ea36df related_object_type - use enum instead of stringproperty 2024-11-22 17:13:05 +05:00
Andrej730 1116bcc296 bim.assign_cost_item_quantity - add dynamic description
Example:
- https://i.imgur.com/J3LFiYu.png
- https://i.imgur.com/ufC2LzD.png
2024-11-22 17:13:05 +05:00
Andrej730 4ef1afa8bb resources - support importing/exporting ScheduleUsage 2024-11-22 16:57:54 +05:00
Andrej730 164e5c69ca bim.export_resources #5760
Simple export for resources to csv file, supports just the same fields that import currently does.
Location - https://i.imgur.com/Ssz7BwZ.png
2024-11-22 16:57:26 +05:00
Thomas Krijnen 8420823342 Only package exes for one entry in matrix 2024-11-22 12:18:55 +01:00
Andrej730 71637f120a Fix "Restart Blender" button for Microsoft Store Blender #5582 2024-11-22 14:32:01 +05:00
Thomas Krijnen 1d6cbc4b76 Add --with-filesystem to boost build (for voxelization toolkit) 2024-11-22 09:31:23 +01:00
Thomas Krijnen faf5c0ab30 Submodule 2024-11-22 09:21:16 +01:00
Thomas Krijnen e86b419414 Empty 2024-11-21 19:57:20 +01:00
Thomas Krijnen c3154b3755 Transfer build output repo 2024-11-21 15:40:34 +01:00
Thomas Krijnen a37b5c5b62 Github Action build scripts! 2024-11-21 15:40:34 +01:00
Thomas Krijnen f91fedf69c Win build script - check for installed deps 2024-11-21 15:26:14 +01:00
Thomas Krijnen 7028d67e00 nix boost 1.86, diskcleanup option 2024-11-21 15:25:47 +01:00
Thomas Krijnen 957369219c More verbosity on invalid enumeration literals 2024-11-21 15:16:56 +01:00
Stephen Boddy 04e84f7aed Fix #5770 so sheet subitems can be opened using svg command too, not just the main sheet. I was a little overzealous adding poll methods in 099703f 2024-11-21 18:18:36 +05:00
Andrej730 4bde423c50 Date picker UI for IfcDate type attributes
Example - https://imgchest.com/p/5xy2bekl3yl

set_prop_from_path method got from https://blenderartists.org/t/set-property-using-path-from-path-from-id-prop-path-resolve/1559166
2024-11-21 18:11:59 +05:00
Andrej730 4891e4ffed Fix not applying transforms in case if there's only parent or only constraints 2024-11-21 18:11:58 +05:00
Andrej730 8a31e8d149 Auto update cost item rates when enabling editing non-sor cost schedule
There was an issue that it wouldn't load until you manually select it in the "Cost Item Rates" enum - otherwise items didn't appear the first time cost schedule opened and didn't not update when you makes changes to the active schedule of rates.
2024-11-21 18:11:58 +05:00
Andrej730 6e56fe8f9b bim.load_schedule_of_rates_tree - remove dead code
This operator is unused anymore since d3b176e and it's using non-existent core method.
2024-11-21 18:11:58 +05:00
Andrej730 15354d2e06 bim.assign_cost_value - add description 2024-11-21 18:11:58 +05:00
Andrej730 37141c89ac bim.assign_cost_item_quantity - to show error if no related objects were found
Just to make UI more responsive - e.g. if some objects are selected but they are not products.
2024-11-21 18:11:58 +05:00
Andrej730 610665d732 Fix bug with TEXT annotations types showing up in TEXT_LEADER annotation types list 2024-11-21 18:11:38 +05:00
Andrej730 2381e9e4e6 bim.import_resources - add info message about imported resources
Example - https://i.imgur.com/NlZRIzw.png
2024-11-21 18:11:38 +05:00
Andrej730 670a85fd8c Hide class assignment panel for handles from linked models 2024-11-21 18:11:37 +05:00
Andrej730 b2e3a4dd82 typing 2024-11-21 18:11:37 +05:00
Andrej730 ec521916da black . 2024-11-21 18:11:37 +05:00
Thomas Krijnen 2f7412d0c1 install serializer libs 2024-11-21 09:15:04 +01:00
Andrej730 3b6128b2df bim.assign_class to apply transform from parents and constraints
To avoid confusing situations when user would assign a class, move object around and save ifc file, then to realize that it was saved using just local transforms which can be completely different.
2024-11-20 15:47:41 +05:00
Andrej730 857dd3aa60 Fix linking ifc using relative paths #5768 2024-11-20 14:48:23 +05:00
Andrej730 1a72089b3b Blender 4.3 - fix not hidden Blender scene panels #5767
No idea what happened but in Blender <4.3 `type(bpy.types.SCENE_PT_rigid_body_world_settings.bl_rna)` is `<class 'bl_ui.properties_scene.SCENE_PT_rigid_body_world_settings'>` which is `bpy.types.Panel` but in Blender 4.3 it's now is `bpy.types.Struct`. Using `.base` seems to work for both versions.
2024-11-20 12:02:04 +05:00
Andrej730 361e0419cf Bump Blender to 4.3 in tests 2024-11-20 12:02:04 +05:00
Andrej730 351bc3f364 Bump dev_environment Blender version to 4.3 2024-11-20 12:02:04 +05:00
Ryan Schultz bf717622a0 Assign the render engine via shading_styles.json instead of hardcoding it. 2024-11-19 14:39:49 -06:00
Andrej730 6cc75c1164 Fix error assigning product to non-text annotations (e.g. dimension)
Error: Python: Traceback (most recent call last):
  File "\bonsai\bim\ifc.py", line 443, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\bonsai\bim\module\drawing\operator.py", line 2960, in _execute
    core.edit_assigned_product(tool.Ifc, tool.Drawing, obj=context.active_object, product=product)
  File "\bonsai\core\drawing.py", line 66, in edit_assigned_product
    drawing.update_text_value(obj)
  File "\bonsai\tool\drawing.py", line 983, in update_text_value
    cls.import_text_attributes(obj)
  File "\bonsai\tool\drawing.py", line 904, in import_text_attributes
    props.font_size = str(text_data["FontSize"])
2024-11-19 20:15:44 +05:00
Andrej730 d032f75e61 Fix error updating decorations removing active drawing
should_draw_decorations is updated as part of regular refresh_ui_data.
'removed_drawings' line was a dead code

Traceback (most recent call last):
  File \bonsai\bim\module\drawing\prop.py", line 252, in update_should_draw_decorations
    collection = context.scene.camera.BIMObjectProperties.collection
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'BIMObjectProperties'
File \bonsai\bim\module\drawing\prop.py", line 249, in update_should_draw_decorations
2024-11-19 20:15:44 +05:00
Thomas Krijnen 9bbf345fd7 https://github.com/IfcOpenShell/svgfill/pull/8 2024-11-19 15:50:31 +01:00
Thomas Krijnen 75d7fcdc4b Submodule 2024-11-19 15:34:23 +01:00
Thomas Krijnen 2b3af4cddb Move issue content to test case #5752 2024-11-19 12:51:11 +01:00
Thomas Krijnen 96d6d5bfbe Fix validation false positive on Number #5752 2024-11-19 12:49:10 +01:00
sboddy c7e7031ee5 Fix #5725: Remember DPI and drawing modes (#5762) 2024-11-19 15:32:08 +05:00
Thomas Krijnen 1c54be84ba Fix #5763 use OuterWire 2024-11-19 11:05:20 +01:00
Andrej730 213b6ed3c3 Fix errors reregistering Bonsai
Items generators were exhausted at the first register leading to errors like 'TypeError: EnumProperty(..., default='-'): not found in enum members' preventing reregistration.
2024-11-19 12:53:56 +05:00
Ryan Schultz 837f9e82e2 whoops 2024-11-19 00:42:21 -06:00
Ryan Schultz 1f9e3ffe50 have move_elements_to_top work with Freestyle as well.
Also assign ordering preference.
2024-11-19 00:27:16 -06:00
Ryan Schultz 6201ea7144 small tweak to previous 2024-11-18 23:15:43 -06:00
Ryan Schultz 06d947f869 Some fixes for 812e3dc6df 2024-11-18 22:55:31 -06:00
Andrej730 362c5a17a7 Fix bonsai build
fonttols is now using universal build for the arm64 instead of x86_64
2024-11-18 15:15:53 +05:00
Andrej730 5a4326eb0f Fix calculating cost item resource value ignoring resource inheritance
Mentioned in #5744
2024-11-18 15:01:49 +05:00
Andrej730 68208d88ea Migrate - convert IfcQuantityCounts using float values to IfcQuantityNumber in ifc4x3 #5752
Traceback:
Traceback (most recent call last):
File "\bonsai\bim\module\patch\operator.py", line 187, in execute
core.run_migrate_patch(tool.Patch, infile=self.infile, outfile=self.outfile, schema=self.schema)
File "\bonsai\core\patch.py", line 30, in run_migrate_patch
patch.run_migrate_patch(infile, outfile, schema)
File "\bonsai\tool\patch.py", line 28, in run_migrate_patch
output = ifcpatch.execute(
^^^^^^^^^^^^^^^^^
File "\ifcpatch\__init__.py", line 85, in execute
patcher.patch()
File "\ifcpatch\recipes\Migrate.py", line 58, in patch
new_element = migrator.migrate(element, self.file_patched)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\ifcopenshell\util\schema.py", line 363, in migrate
new_element = self.migrate_attributes(element, new_file, new_element, new_element_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\ifcopenshell\util\schema.py", line 393, in migrate_attributes
self.migrate_attribute(attribute, element, new_file, new_element, new_element_schema)
File "\ifcopenshell\util\schema.py", line 494, in migrate_attribute
new_value.append(self.migrate(item, new_file))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\ifcopenshell\util\schema.py", line 363, in migrate
new_element = self.migrate_attributes(element, new_file, new_element, new_element_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\ifcopenshell\util\schema.py", line 393, in migrate_attributes
self.migrate_attribute(attribute, element, new_file, new_element, new_element_schema)
File "\ifcopenshell\util\schema.py", line 497, in migrate_attribute
setattr(new_element, attribute.name(), value)
File "\ifcopenshell\entity_instance.py", line 325, in __setattr__
self[index] = value
~~~~^^^^^^^
File "\ifcopenshell\entity_instance.py", line 363, in __setitem__
raise TypeError(
TypeError: attribute 'CountValue' for entity 'IFC4X3_ADD2.IfcQuantityCount' is expecting value of type 'INT', got 'float'.
Error: Python: Traceback (most recent call last):
File "\ifcopenshell\entity_instance.py", line 361, in __setitem__
self.method_list[idx](self.wrapped_data, idx, entity_instance.unwrap_value(value))
File "\ifcopenshell\ifcopenshell_wrapper.py", line 9271, in setArgumentAsInt
return _ifcopenshell_wrapper.entity_instance_setArgumentAsInt(self, i, v)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: in method 'entity_instance_setArgumentAsInt', argument 3 of type 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "\ifcopenshell\entity_instance.py", line 325, in __setattr__
self[index] = value
~~~~^^^^^^^
File "\ifcopenshell\entity_instance.py", line 363, in __setitem__
raise TypeError(
TypeError: attribute 'CountValue' for entity 'IFC4X3_ADD2.IfcQuantityCount' is expecting value of type 'INT', got 'float'.
2024-11-18 15:01:49 +05:00
Andrej730 818c2714e8 Migrate - convert IfcCountMeasures using float values to IfcNumericMeasure in ifc4x3 #5752
Traceback:

Traceback (most recent call last):
  File "\bonsai\bim\module\patch\operator.py", line 187, in execute
    core.run_migrate_patch(tool.Patch, infile=self.infile, outfile=self.outfile, schema=self.schema)
  File "\bonsai\core\patch.py", line 30, in run_migrate_patch
    patch.run_migrate_patch(infile, outfile, schema)
  File "\bonsai\tool\patch.py", line 28, in run_migrate_patch
    output = ifcpatch.execute(
             ^^^^^^^^^^^^^^^^^
  File "\ifcpatch\__init__.py", line 85, in execute
    patcher.patch()
  File "\ifcpatch\recipes\Migrate.py", line 58, in patch
    new_element = migrator.migrate(element, self.file_patched)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\util\schema.py", line 358, in migrate
    new_element = self.migrate_attributes(element, new_file, new_element, new_element_schema)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\util\schema.py", line 388, in migrate_attributes
    self.migrate_attribute(attribute, element, new_file, new_element, new_element_schema)
  File "\ifcopenshell\util\schema.py", line 489, in migrate_attribute
    new_value.append(self.migrate(item, new_file))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\util\schema.py", line 358, in migrate
    new_element = self.migrate_attributes(element, new_file, new_element, new_element_schema)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\util\schema.py", line 388, in migrate_attributes
    self.migrate_attribute(attribute, element, new_file, new_element, new_element_schema)
  File "\ifcopenshell\util\schema.py", line 484, in migrate_attribute
    value = self.migrate(value, new_file)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\util\schema.py", line 346, in migrate
    return new_file.create_entity(element.is_a(), element.wrappedValue)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\file.py", line 400, in create_entity
    e[idx] = arg
    ~^^^^^
  File "\ifcopenshell\entity_instance.py", line 363, in __setitem__
    raise TypeError(
TypeError: attribute 'wrappedValue' for entity 'IFC4X3_ADD2.IfcCountMeasure' is expecting value of type 'INT', got 'float'.
Error: Python: Traceback (most recent call last):
  File "\ifcopenshell\entity_instance.py", line 361, in __setitem__
    self.method_list[idx](self.wrapped_data, idx, entity_instance.unwrap_value(value))
  File "\ifcopenshell\ifcopenshell_wrapper.py", line 9271, in setArgumentAsInt
    return _ifcopenshell_wrapper.entity_instance_setArgumentAsInt(self, i, v)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: in method 'entity_instance_setArgumentAsInt', argument 3 of type 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "\ifcopenshell\file.py", line 400, in create_entity
    e[idx] = arg
    ~^^^^^
  File "\ifcopenshell\entity_instance.py", line 363, in __setitem__
    raise TypeError(
TypeError: attribute 'wrappedValue' for entity 'IFC4X3_ADD2.IfcCountMeasure' is expecting value of type 'INT', got 'float'.
2024-11-18 15:01:48 +05:00
Andrej730 545431d95d shapebuilder - fix issue creating profiles on ifc2x3
Position argument was only required for IfcParameterizedProfileDef, not for IfcArbitraryClosedProfileDef
2024-11-18 15:01:48 +05:00
Andrej730 7d087064ab Fix for e0f4fc075
Traceback
2024-11-18:11:09:15,441 ERROR   [log.py:69] Uncaught exception
Traceback (most recent call last):
  File "\bonsai\bim\module\pset_template\ui.py", line 66, in draw
    self.draw_pset_template()
  File "\bonsai\bim\module\pset_template\ui.py", line 110, in draw_pset_template
    value_name = self.props.active_prop_template.get_value_name()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\bonsai\bim\module\pset_template\prop.py", line 175, in get_value_name
    ifc_data_type = IfcStore.get_schema().declaration_by_name(self.primary_measure_type)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\ifcopenshell_wrapper.py", line 10119, in declaration_by_name
    return _ifcopenshell_wrapper.schema_definition_declaration_by_name(self, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Entity with name '-' not found in schema 'IFC4'
2024-11-18 15:01:48 +05:00
Andrej730 3c320960c8 pset templates UI - hide primary measure type for quantitiy props.
As they're used only for psets.
2024-11-18 15:01:48 +05:00
Ryan Schultz 812e3dc6df Automatically introducing \n (newlines) after some designated character count.
as discussed: https://community.osarch.org/discussion/2485/automatically-introducing-n-newlines-after-some-designated-character-count
2024-11-17 17:08:10 -06:00
Ryan Schultz bc2f6b61e0 small UI change for consistency, and misspelling. 2024-11-17 10:08:47 -06:00
Andrej730 e0f4fc0759 Fix error editing prop templates with None PrimaryMeasureType
E.g. all qto props have it's None

Error traceback:
Error: Python: Traceback (most recent call last):
  File "\bonsai\bim\module\pset_template\operator.py", line 135, in execute
    props.active_prop_template.primary_measure_type = template.PrimaryMeasureType
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: bpy_struct: item.attr = val: expected a string enum, not NoneType
2024-11-15 18:25:48 +05:00
Andrej730 934869af98 add_prop_template - consider pset template type for prop/measure types 2024-11-15 18:25:48 +05:00
Andrej730 dad89cfabd Narrow down pset prop template enum items
Depending on whether we're currently editing pset or qto.
Before - https://i.imgur.com/w95q7UC.png
Now - https://i.imgur.com/0uyHPVC.png
2024-11-15 18:25:48 +05:00
Andrej730 3b4cd4eab5 Fix error editing IfcQuantityCounts in IFC4X3
Full error traceback:
Error: Python: Traceback (most recent call last):
  File "\ifcopenshell\entity_instance.py", line 361, in __setitem__
    self.method_list[idx](self.wrapped_data, idx, entity_instance.unwrap_value(value))
  File "\ifcopenshell\ifcopenshell_wrapper.py", line 9271, in setArgumentAsInt
    return _ifcopenshell_wrapper.entity_instance_setArgumentAsInt(self, i, v)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: in method 'entity_instance_setArgumentAsInt', argument 3 of type 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "\bonsai\bim\ifc.py", line 443, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\bonsai\bim\module\pset\operator.py", line 142, in _execute
    ifcopenshell.api.run(
  File "\ifcopenshell\api\__init__.py", line 92, in run
    return usecase_function(ifc_file, should_run_listeners=should_run_listeners, **settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\api\__init__.py", line 258, in wrapper
    raise e
  File "\ifcopenshell\api\__init__.py", line 252, in wrapper
    result = usecase(*args, **settings)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\api\pset\edit_qto.py", line 135, in edit_qto
    return usecase.execute()
           ^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\api\pset\edit_qto.py", line 149, in execute
    self.update_existing_properties()
  File "\ifcopenshell\api\pset\edit_qto.py", line 166, in update_existing_properties
    self.update_existing_property(prop)
  File "\ifcopenshell\api\pset\edit_qto.py", line 180, in update_existing_property
    prop[3] = float(value)
    ~~~~^^^
  File "\ifcopenshell\entity_instance.py", line 363, in __setitem__
    raise TypeError(
TypeError: attribute 'CountValue' for entity 'IFC4X3_ADD2.IfcQuantityCount' is expecting value of type 'INT', got 'float'.
2024-11-15 18:25:47 +05:00
Andrej730 43aa6c971a pset.edit_qto - document editing complex quantities 2024-11-15 18:25:47 +05:00
Andrej730 9f372017bc Bonsai - document qset prop type inference from prop name
In "add new prop" operator description - https://i.imgur.com/ODeMDL8.png
2024-11-15 18:25:47 +05:00
Andrej730 de17736002 Bonsai to detect Blender types for added qset props
Example - https://imgchest.com/p/bp452xxbx45

cc @steverugi @DimitriosThe maybe you'll find useful too if you use custom quantity sets for products in 4d/5d
2024-11-15 18:25:47 +05:00
Andrej730 a29b1072e4 Add error trying to add non-numeric custom quantity set value
Example - https://i.imgur.com/NUFN1sR.png
2024-11-15 18:25:47 +05:00
Andrej730 8e4e12ba21 active_pset_type - replace with EnumProperty 2024-11-15 18:25:47 +05:00
Andrej730 ff86bba562 Bonsai to detect Blender types for custom psets/qsets
Previously it was detecting types only if pset/qset had a template, now it will detect length/area/volume props for non-templated psets/qsets too.

Before - https://i.imgur.com/hacuYfx.png
Now - https://i.imgur.com/baA0KBT.png
2024-11-15 18:25:47 +05:00
Andrej730 da70c46c48 editing quantity set to guess type based on name if template is not found
E.g. all props with "Area" in it's name will automatically get IfcQuantityArea type, "Volume" - IfcQuantityVolume, see edit_qto documentation.
2024-11-15 18:25:47 +05:00
Andrej730 b860a8eaad edit_qto - remove dead code from edit_pset 2024-11-15 18:25:46 +05:00
Andrej730 dd0d0ed1af typing 2024-11-15 18:25:46 +05:00
Andrej730 7f40491e41 black . 2024-11-15 18:25:46 +05:00
Thomas Krijnen fd9485e7ea C++ file_open_status not handled in python 2024-11-14 22:00:11 +01:00
Thomas Krijnen dbdc2add81 Parsing file with trailing comment fails 2024-11-14 21:57:27 +01:00
Thomas Krijnen 229e2daa42 submodule 2024-11-14 17:00:18 +01:00
Thomas Krijnen 2a853ee8aa Only install header files, not .cpp 2024-11-14 15:34:48 +01:00
Andrej730 d0b3ecad42 csv2ifc - add header validation 2024-11-14 18:30:47 +05:00
Andrej730 2c9c3e6c7f ConvertPropertiesToQuantities - add test 2024-11-14 18:30:47 +05:00
Andrej730 3c32c9b6ed ConvertPropertiesToQuantities - ifc4x3 support 2024-11-14 18:30:47 +05:00
Andrej730 02621305c9 ConvertPropertiesToQuantities - small fix
Prevent calling add_qto if quantity set was already found in 'qtos'.
2024-11-14 18:30:47 +05:00
Andrej730 3911f51d89 Fix broken ConvertPropertiesToQuantities #5747
Name and Properties arguments were renamed and lowercased.
2024-11-14 18:30:47 +05:00
Andrej730 dfb0f1e828 typing 2024-11-14 18:30:47 +05:00
Andrej730 3270006d8e black . 2024-11-14 18:30:47 +05:00
Thomas Krijnen 54eb83f080 CGAL 6 compatibility regarding aabb_traits_3 and stdlib usage 2024-11-14 13:30:19 +01:00
Thomas Krijnen e7d88ba851 cityjson submodule 2024-11-14 13:29:47 +01:00
Thomas Krijnen e31d164ab2 Merge branch 'v0.8.0' of https://github.com/IfcOpenShell/IfcOpenShell into v0.8.0 2024-11-14 13:28:39 +01:00
Thomas Krijnen 63796aef3b cityjson submodule 2024-11-14 13:28:36 +01:00
Andrej730 ceb49bac0e Note in UI derived schedule work explicitly
There is "*" mark but since we don't have a documentation for this UI section it may be hard for new users to guess what it means.
2024-11-14 16:38:01 +05:00
Andrej730 9f49cbe0c9 bim.calculate_resource_quantity #5744
Added operator to calculate resource quantity based on the output products and the quantity Name.
See video demo - https://imgchest.com/p/9rydjlbmnyk
2024-11-14 16:38:01 +05:00
Andrej730 6c26403b9c resource.remove_resource - fix bug removing IfcRelAssignsToResource
tuple(resource) was resulting in (GlobalId, OwnerHistory, Name, ...) instead of (resource,), so the check never passed and orphaned IfcRelAssignsToResource was never removed.
2024-11-14 16:38:01 +05:00
Andrej730 1f21e96887 resource.remove_resource - fix bug not removing orphaned ifcrelnests 2024-11-14 16:38:01 +05:00
Andrej730 77bc704563 assign/unassign process - add descriptions 2024-11-14 16:38:00 +05:00
Andrej730 2be6afa411 Productivity data operators - remove confusing descriptions 2024-11-14 16:38:00 +05:00
Andrej730 a8d8600087 calculate resource usage/work - add poll messages 2024-11-14 16:38:00 +05:00
Andrej730 6a20ecb2a0 Fix #5746 2024-11-14 11:35:02 +05:00
Bruno Perdigão e74adcbba3 Improve f4cbd13 and add option for profile with voids.
Fix rebase conflict
2024-11-13 11:58:50 -03:00
sboddy 099703fda7 UI drawing improvements (#5677)
* Fix Shift-clicking SVG-DXF conversion

* Fix Schedules and References not incrementing the ID number properly

* Remove the superfluous Create and Open buttons from the Active Drawing pane

* Add active camera indicator to the Drawing list

* Improved enable/disabled icon behaviour

As many operators as possible now use polling method to set enabled/disabled state.
Icons set their enabled/disabled state intelligently depending on what is selected.
When an operator is disabled it says why it is disabled in the tooltip.

* Rename core open_sheet, operator OpenSheet/bim.open_sheet to better reflect what it actually does, i.e. open_layout

* Added selection checkmarks to Sheets, and operator to select all/none, to do batch ops on sheets

* Missed adding the renamed operator to __init__ in commit 4cfc0bd9f3

* Decouple creating and viewing drawings/sheets to avoid focus stealing popups polluting display on long batch runs

* Improve drawing selections in OpenDrawing operator

* Add the Shift+click power move to Create Sheet

* Add the Open Sheet + Shift+click power move

* Improve drawing selections in RemoveDrawing operator

* All operators are now documented with standardised language and terms.

* Add status bar Info messages for feedback on create tasks that now don't have visual feedback

* Fix enable/disable for ActivateDrawing operator icons.

This was a strange one. They have common invoke and execute methods,
but the polling has different conditions.
I tried subclassing the original ActivateDrawing for the Sheets version,
but something about Blenders operators breaks the classmethod decorated
poll. This was the cleanest solution I found, but maybe there's a better
one.

* Placeholder operator for DuplicateSheet function.

Does nothing but report Not Implemented. Could be omitted if this
kind of thing is frowned upon.

* Change icons to be more consistent

* Final changes to toolbars

Change button order and spacing for better usability.
Add a checkmark all/none button, to do batch ops on sheets.
Moved Bonsai Web UI button up to sheets toolbar.
Some general cleanup of unnecessary clutter in the toolbar code.

* Sheet/Drawing checkmarks remember their state properly

* Adjust sheet/drawing operators to view after singular create, but not when batch creating more than one.

* By special request, add back the opening windows when creating, but requiring Ctrl to be pressed.

* black the files

* Second attempt at blacking ui.py because I used an old black

* Change method of getting active drawing to use one in tool import as requested

* Fix for incorrect d1fc5158d - actually checked it this time
2024-11-13 18:38:26 +05:00
Andrej730 6fb7445610 Set blender materials for imported IfcSweptDiskSolids #5687 2024-11-13 18:20:31 +05:00
Andrej730 a7caee14b0 Remove fallback from ca96815 since bonsai build is already updated 2024-11-13 18:20:31 +05:00
Andrej730 2845071621 Fix error switching from different type of representations
E.g. from curve representation to mesh representation and vice versa. Mentioned in #5687.
2024-11-13 18:20:31 +05:00
Andrej730 5913fe881e Fix missing BIM tool UI when just spatial element is active
Noticed by "select decomposition" button missing, spatial elements are unselectable by default - they're just active.

cc @trhyder
2024-11-13 18:20:31 +05:00
Andrej730 659c3295bc Remove unnecessary IFC operators 2024-11-13 18:20:31 +05:00
Andrej730 3bbbfd2351 Show errors if failing to parse false origin / project north 2024-11-13 18:20:30 +05:00
Andrej730 0004689841 typing 2024-11-13 18:20:30 +05:00
Andrej730 e2bf611c17 black . 2024-11-13 18:20:30 +05:00
Andrej730 77fc2a89d0 Oops, fix broken #4771 by mistake 2024-11-13 16:18:56 +05:00
Andrej730 5b63b00e98 Workaround for Blender 4.3 #5743 2024-11-13 15:28:01 +05:00
Thomas Krijnen a522c9a5c9 Submodule 2024-11-13 11:15:15 +01:00
Andrej730 d3333fed96 select decomposition to work on unselectable elements #5739
E.g. ifcspaces or other spatial elements are unselectable by default.
2024-11-13 11:11:34 +05:00
Ryan Schultz a8efc5b1d9 small fix to f4cbd13748 2024-11-12 15:05:28 -06:00
Bruno Perdigão b51a417065 Fix #5726 2024-11-12 17:21:47 -03:00
Bruno Perdigão f4cbd13748 Add the option to create IfcArbitraryClosedProfileDef from an object.
Reference: https://imgur.com/a/E5YhgqV
2024-11-12 16:52:30 -03:00
Andrej730 cba0b79dc0 Cost schedule UI - optimize selecting cost items
On large projects selecting cost items is very slow due to all data that needs to be loaded. On the project I was testing, it was taking about 0.8sec, now this time is reduced to 0.17sec.
2024-11-12 18:40:43 +05:00
Andrej730 26e63c8427 Fix edit_pset for enum props without reference #5707
Similar to fb081e3cf but now we cover case when IfcPropertyEnumeratedValue is passed to properties argument.
2024-11-12 15:38:41 +05:00
Andrej730 ecff7980b3 PsetQto - interpret IFC4X3 as IFC4X3_ADD2 #5732 2024-11-12 14:52:47 +05:00
Andrej730 be6e9200b6 calculate_cost_item_resource_value - remove rounding to preserve the original quantities #5706
Removed 'quantity is None' check since it's never none after c409258ff.
2024-11-12 14:52:47 +05:00
Bruno Perdigão 204a1b1dc6 Measure tool - Add UI button to clear measurement from the screen 2024-11-11 21:15:06 -03:00
Andrej730 d74a0d05fd calculate_cost_item_resource_value - fix bug when 0 resource cost value would be misinterpreted as parent's cost value 2024-11-11 18:30:57 +05:00
Andrej730 70e75f5ed2 calculate_cost_item_resource_value not to skip 0 costs/quantities
That way all assigned resources will be added as cost values to cost items and it will be more apparent what resources were used for the last calculation and what costs/quantities they had at the time.
2024-11-11 18:30:56 +05:00
Andrej730 8ffa208ca7 Increase rounding precision for updating cost item resource values #5706
Co-Authored-By: DimitriosThe <169245599+DimitriosThe@users.noreply.github.com>
2024-11-11 18:30:55 +05:00
Andrej730 c409258ff3 calculate_cost_item_resource_value not to skip resources without quantities
Noticed the discrepancies for total cost value for resources in Resource UI and in Cost Schedule UI when the same resources assigned to the item. In Resource UI it was considering omitted quantity as 1.0 (https://github.com/IfcOpenShell/IfcOpenShell/blob/c61e3670a8cf248aa5a229bae2dc29eef041fe47/src/ifcopenshell-python/ifcopenshell/util/cost.py#L53-L55) and in Cost Schedule UI it was skipping those resources completely.

For cost items it is documented in ifc that if quantity is omitted then costs are considered to be total. Perhaps it's just not documented for the resources? Anyway, not sure if this way is completly correct but making sure resource quantity to be treated similarly in different parts of the codebase.

Related to - https://github.com/buildingSMART/IFC4.3.x-development/issues/910
cc @myoualid
2024-11-11 18:30:55 +05:00
Andrej730 de414313d3 Fix cost values for resources not updating properly 2024-11-11 18:30:55 +05:00
Andrej730 0f421da6e3 Multifile properties to show selected paths
Before - https://i.imgur.com/AkPvTy3.png
After - https://i.imgur.com/znxLqb7.png
2024-11-11 18:30:55 +05:00
Andrej730 478dcb8d78 Fix UI errors selecting empty ifcpatch ("-") 2024-11-11 18:30:55 +05:00
Andrej730 37d9cade92 black . 2024-11-11 18:30:55 +05:00
Andrej730 004488533f typing 2024-11-11 18:30:55 +05:00
Thomas Krijnen 088bc207ab Don't fail on untyped enumerations 2024-11-11 13:57:36 +01:00
Andrej730 c61e3670a8 fix test_removing_existing_element_representations_and_mapping_type_representations
Started failing after 8061e22. Test was instantiating abstract IfcProductRepresentation
2024-11-11 16:31:14 +05:00
Andrej730 c5aad82e3d typing - add missing settings 2024-11-11 16:31:14 +05:00
Andrej730 acd93ead4d Fix crash during test_remove_fill_area_with_fill_area_style_hatching 2024-11-11 16:31:14 +05:00
Andrej730 8070338087 fix test_remove_non_surface_styles
.FillStyles is not optional for IfcFillAreaStyles
2024-11-11 16:31:14 +05:00
Andrej730 05542ca6ec Fix failing ifcopenshell ci tests due missing ifcpatch (56de208) 2024-11-11 16:31:13 +05:00
Thomas Krijnen 8932d8758e validate.py distinguish internal errors from invalid files 2024-11-11 11:09:26 +01:00
Thomas Krijnen 130afac752 Revert back to github occt uri due to persistent 500 2024-11-11 08:58:01 +01:00
Andrej730 67f8c74c70 Fix processing ifcpatch docs after fe8c396e1
bim.update_ifc_patch_arguments in Bonsai wasn't ready for list[xxx] generic and was throwing errors and not showing browse file button.
2024-11-11 12:48:43 +05:00
Thomas Krijnen 6ece1648ab Update entity_instance.py after 8ae951d
cc @Andrej730 we need this for validate.buildingsmart.org because for express rule evaluation we depend on include_id=False and entity_instance.__eq__ has been changed to get_info_2.
2024-11-10 15:06:41 +01:00
Bruno Perdigão 2165dbb3fa Minor fix after 10aad5a531 2024-11-08 17:04:07 -03:00
Bruno Perdigão 10aad5a531 Change hotkey for angle lock in polyline tool, from "L" to "A". 2024-11-08 17:00:47 -03:00
Bruno Perdigão 23c30e7642 Implement #3083 2024-11-08 16:25:21 -03:00
Bruno Perdigão f08959aaa9 Fix - Measure tool plane method now works with object snap. 2024-11-08 16:06:28 -03:00
Bruno Perdigão b416df538a Add AuthoringData.data["relating_type_id_current"] to model data. 2024-11-08 11:20:17 -03:00
Bruno Perdigão 084c2aa25a Add AuthoringData.data["ifc_class_current"] to model data. 2024-11-08 11:20:17 -03:00
Bruno Perdigão 66ded3fc41 Partially fix an issue with BIMModelProperties ifc_class enum. 2024-11-08 11:20:17 -03:00
Bruno Perdigão 4b558604cc Remove mathutils dependency from add_slab_representation.py 2024-11-08 10:34:11 -03:00
Bruno Perdigão 024566887d Minor fix 2024-11-08 10:34:11 -03:00
Andrej730 916c6a94f1 bim.remove_cost_value - fix misleading label 2024-11-08 18:32:20 +05:00
Andrej730 af1f3cad34 bim.calculate_cost_item_resource_value - tooltip 2024-11-08 18:32:20 +05:00
Andrej730 534355cd33 Fix for 1acf8f1 2024-11-08 18:32:20 +05:00
Andrej730 a0226eb0a1 document double tags for fill-bg #5719
It seems we lost this comment at some point.
2024-11-08 18:32:20 +05:00
Andrej730 1fa3478a9d bim.execute_ifc_tester - remove unnecessary ifc operator 2024-11-08 18:32:20 +05:00
Andrej730 f7a7626575 ifctester to fail more gracefully meeting invalid .ids file
Previously Bonsai would show a wall of errors, now it's show a simple error message and redirecting to system console for the details.

Example error - https://i.imgur.com/uJJfjUW.png
Example validation error details in console - https://i.imgur.com/3mcVBUh.png

Same details but in text:
Validation error details:

failed validating {'dataType': 'IFCBOOLEAN', 'ursi': 'https://google.com', 'cardinality': 'required', 'instructions': "Make sure it's true"} with XsdAttributeGroup(['dataType', 'uri', 'cardinality', 'instructions']):

Reason: 'ursi' attribute not allowed for element

Schema component:

  <xs:extension xmlns:xs="http://www.w3.org/2001/XMLSchema" base="ids:propertyType">
      <xs:attribute name="uri" type="xs:anyURI" use="optional" />
      <xs:attribute name="cardinality" type="ids:conditionalCardinality" use="optional" default="required" />
      <xs:attribute name="instructions" type="xs:string" use="optional">
          <xs:annotation>
              <xs:documentation>Author of the IDS can leave instructions for the authors of the IFC. This text could/should be displayed in the BIM/IFC authoring tool.</xs:documentation>
          </xs:annotation>
      </xs:attribute>
  </xs:extension>

Instance type: <class 'xml.etree.ElementTree.Element'>

Instance:

  <ids:property xmlns:ids="http://standards.buildingsmart.org/IDS" dataType="IFCBOOLEAN" ursi="https://google.com" cardinality="required" instructions="Make sure it's true">
    <ids:propertySet>
      <ids:simpleValue>Pset_WallCommon</ids:simpleValue>
    </ids:propertySet>
    <ids:baseName>
      <ids:simpleValue>Combustible</ids:simpleValue>
    </ids:baseName>
    <ids:value>
      <ids:simpleValue>false</ids:simpleValue>
    </ids:value>
  </ids:property>

Path: /ids:ids/ids:specifications/ids:specification/ids:requirements/ids:property[1]
2024-11-08 18:32:20 +05:00
Andrej730 0a7ee4e360 ifctester.main - fail more gracefully for invalid files 2024-11-08 18:32:20 +05:00
Andrej730 466ba6c159 get_components - add test 2024-11-08 18:32:20 +05:00
Andrej730 1a19864e82 get_contained - add test 2024-11-08 18:32:20 +05:00
Andrej730 36f12b5145 Fix get_pset tests after 832ad6d31 2024-11-08 18:32:20 +05:00
Andrej730 eed4985957 get_parts - add test 2024-11-08 18:32:20 +05:00
Andrej730 5597095198 util.element - check schema version explicitly 2024-11-08 18:32:19 +05:00
Andrej730 1b2508f8de Fix util.element for cases with multiple rels #5713
Got report that there was an issue with get_parts not returning all parts if there are multiple IfcRelAggregates involved though it is valid ifc. Fixed the same possible issue for ContainsElements, IsNestedBy
2024-11-08 18:32:19 +05:00
Andrej730 77e6ab3b8b MergeProjects - temporary handle old way of passing files to merge 2024-11-08 18:32:19 +05:00
Andrej730 fe8c396e12 typing 2024-11-08 18:32:19 +05:00
Blender Defender 1d3ca475d9 fix: Rename the "MergeProject" recipe to "MergeProjects" (#5187)
* fix: Rename the "MergeProject" recipe to "MergeProjects"

This rename, alongside renaming "filepath" to "filepaths" and adjusting the docstring has been done to clarify, that this patch can be used to merge multiple IFC files into one (and not just two)

* fix: Fix `test_Merge_Project.py`, which was broken due to renaming the patch recipe
2024-11-08 10:51:47 +05:00
Andrej730 09fcd32b7a Fix error duplicating array item after c415767 #5705
error traceback
```
Traceback (most recent call last):
  File "bonsai\bim\module\geometry\operator.py", line 909, in execute
    return OverrideDuplicateMove.execute_duplicate_operator(self, context, linked=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "bonsai\bim\module\geometry\operator.py", line 918, in execute_duplicate_operator
    IfcStore.execute_ifc_operator(self, context)
  File "bonsai\bim\ifc.py", line 443, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "bonsai\bim\module\geometry\operator.py", line 912, in _execute
    return OverrideDuplicateMove.execute_ifc_duplicate_operator(self, context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "bonsai\bim\module\geometry\operator.py", line 1021, in execute_ifc_duplicate_operator
    tool.Model.handle_array_on_copied_element(new, array_data)
  File "bonsai\tool\model.py", line 673, in handle_array_on_copied_element
    array_pset_data = array_pset["Data"]
                      ~~~~~~~~~~^^^^^^^^
KeyError: 'Data'
```
2024-11-07 17:38:39 +05:00
Andrej730 fb081e3cf2 pset.edit_pset - fix issue editing enum props without EnumerationReference #5707
Traceback
```
Error: Python: Traceback (most recent call last):
  File "\bonsai\bim\ifc.py", line 443, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\bonsai\bim\module\pset\operator.py", line 126, in _execute
    ifcopenshell.api.run(
  File "\ifcopenshell\api\__init__.py", line 92, in run
    return usecase_function(ifc_file, should_run_listeners=should_run_listeners, **settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\api\__init__.py", line 252, in wrapper
    result = usecase(*args, **settings)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\api\pset\edit_pset.py", line 166, in edit_pset
    return usecase.execute()
           ^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\api\pset\edit_pset.py", line 176, in execute
    existing_props = self.update_existing_properties()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\api\pset\edit_pset.py", line 225, in update_existing_properties
    prop = self.update_existing_prop_enum(prop)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\ifcopenshell\api\pset\edit_pset.py", line 251, in update_existing_prop_enum
    primary_measure_type = prop.EnumerationReference.EnumerationValues[
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'EnumerationValues'
```
2024-11-07 17:09:57 +05:00
Andrej730 b0cc2e30a9 Fix error starting to edit pset without enum reference/enum values #5707
Traceback
Error: Python: Traceback (most recent call last):
  File "\bonsai\bim\module\pset\operator.py", line 62, in execute
    core.enable_pset_editing(tool.Pset, pset, self.pset_name, self.pset_type, self.obj, self.obj_type)
  File "\bonsai\core\pset.py", line 86, in enable_pset_editing
    pset_tool.import_pset_from_existing(pset, props)
  File "\bonsai\tool\pset.py", line 121, in import_pset_from_existing
    metadata.set_value(prop.EnumerationReference.EnumerationValues[0].wrappedValue)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'EnumerationValues'
2024-11-07 17:09:56 +05:00
Andrej730 d9186bce11 Bonsai to show different error for Python 3.12 users #5704 2024-11-07 17:09:56 +05:00
Andrej730 cc15e6b3c1 typing 2024-11-07 17:09:56 +05:00
Andrej730 832ad6d318 Prioritize existing data types for templates props for safety
Noticed working on #5596 and #5708 a few issue when pset template is changing the prop types.

E.g. prop had string data type and now template suggests that it should be a float.
Previously, it might error trying to cast a string to a float. Now it will show a float until user will set it to null, then next time it will be loaded from the template data type.

Another example - prop was a string and now it's a boolean. Previously, it would be cast to boolean implicitly. E.g. "test" -> bool("test") -> True. And if user wouldn't be paying attention then enabling pset editing and saving it would make them lose "test" value.

Now - https://imgchest.com/p/na7ke99wb78
Before - https://imgchest.com/p/5xy23rr3z4l
2024-11-07 16:21:12 +05:00
Andrej730 3ad713d5c6 Patch Ifc4 psets that missing IfcThermalTransmittanceMeasure type in ThermalTransmittance props
Similar to #5708
Affected psets: Pset_RampCommon, Pset_StairCommon.
2024-11-07 16:21:12 +05:00
Andrej730 822107a6ed Patch Ifc4 psets that missing IfcBoolean type in LoadBearing props #5708
Affected psets: Pset_RoofCommon, Pset_RampCommon, Pset_StairCommon.
Also fixed the missing description for that prop.
2024-11-07 16:21:12 +05:00
Andrej730 90d5509046 Add min 0 value to IFC props in UI
Basically it won't allow setting values below 0 by accident (especially important for representation item props as it may lead to a crash).

1) IfcPositiveLengthMeasure will affect bunch of props like Depth in IfcExtrudedAreaSolid.
2) IfcNonNegativeLengthMeasure will affect MaterialLayer and some profiles attributes.
2024-11-07 16:21:11 +05:00
Andrej730 f0a6906d73 Use helper.import_attributes for representation item attributes 2024-11-07 16:21:11 +05:00
Andrej730 bbca07d535 Edit other representation item attributes besides IfcSweptSolid depth
Examples:
- https://imgchest.com/p/qb4zjgbklyj
- https://imgchest.com/p/lqye68r2k4d

Added this feature in a very experiment way, I'm sure it will break very soon and we'll be able to refine it.
2024-11-06 18:26:57 +05:00
Andrej730 9a77222017 Option to add IfcEllipse as representation item
Example - https://i.imgur.com/PADKlAq.png
2024-11-06 18:06:51 +05:00
Andrej730 19cbf6d140 ifcfm - move preset searching logic from ifcm to bonsai
So anyone using 'python -m ifcfm' will get more readable error for invalid presets.
2024-11-06 18:06:51 +05:00
Andrej730 9821c343ca Keep bim.select_container available for IfcProjects too
As it's the quicker way to select it than searching it in outliner - https://i.imgur.com/p2NVcdR.png
Couldn't find a simpler a way to do it in UI and had to create bunch of columns. Tried to use splits but they end up readjusting the buttons.
2024-11-06 18:06:50 +05:00
Andrej730 a3845c2b5c Reload decorator after item attributes are updated and it's representation is reloaded 2024-11-06 18:06:50 +05:00
Andrej730 5c33a66548 Hide assign class panel for representation items 2024-11-06 18:06:50 +05:00
Andrej730 ecdbcff1aa ifcfm operators - add info message when it's finished 2024-11-06 17:51:04 +05:00
Andrej730 47853bc551 Prevent user from selecting unavailable tabs from dropdown if ifc project is not loaded 2024-11-06 17:51:04 +05:00
Andrej730 41fc0cf8c1 BIMTabProperties fixes
1) Fixed non-existent tool.Blender.get_screen
2) ui.py - remove try/except for the case when tabs are not loaded yet as it's covered by BIMTabProperties
3) removed previous_tab, alt_tab props never used in ui
4) general method for getting area properties that includes BIMTabProperties automatically
2024-11-06 17:51:04 +05:00
Andrej730 e3de9c3ea4 bim.set_tab / bim.switch_tab not to create undo steps
To avoid unnecessary steps in undo history like on the screenshot - https://i.imgur.com/vEpsYa5.png
2024-11-06 17:51:04 +05:00
Andrej730 c594bc2c1a bim.execute_ifcfm_federate - small fixes 2024-11-06 17:51:03 +05:00
Andrej730 d89be97bcd ifcclash docs - small fix 2024-11-06 17:51:03 +05:00
Andrej730 c63469f85e ifcm - fix missing ifcopenshell import 2024-11-06 17:51:03 +05:00
Andrej730 cf68c5755b ifcfm - add example 2024-11-06 17:51:03 +05:00
Andrej730 3d79ae53ad ifcfm - fix bug exporting csvs to folder that didn't yet existed 2024-11-06 17:51:03 +05:00
Andrej730 681b89d95c Bonsai - improve error message if ifc file fails to open #5694 2024-11-06 17:51:03 +05:00
Andrej730 4fdb313449 typing 2024-11-06 17:50:47 +05:00
Andrej730 4e070545ae black . 2024-11-06 16:04:03 +05:00
Andrej730 36bd89bb40 ifcopenshell.util.element.get_type to be less strict again after d443c5e
I guess by accident in d443c5e I've made this method too strict and it broke get_references using it for IfcPropertySets. Maybe it's a good idea to make it more strict in the future, for now just restoring the previous behaviour.
2024-11-06 16:04:02 +05:00
Thomas Krijnen e70bc04915 Update draw.py with provisionary access to arrange_spaces 2024-11-06 09:17:32 +01:00
Thomas Krijnen 585821d763 Update wrapper for svgfill::arrange_polygons() 2024-11-06 09:15:59 +01:00
Andrej730 262fca95e3 Bump IOS build #5661 2024-11-06 10:52:43 +05:00
Thomas Krijnen a2538fdd35 Update ci.yml 2024-11-05 16:13:47 +01:00
Thomas Krijnen 3c174e3dc9 svgfill submodule with arrange_polygons API 2024-11-05 15:43:37 +01:00
Richard Brice 3672ce90d0 Minor tweak for cant with IfcCosineSpiral and IfcSineSpiral 2024-11-04 15:00:27 -08:00
Bruno Perdigão 6729739ee8 Fix a bug where the product decorator displays the incorrect position when type origin is not at world origin. 2024-11-04 10:48:11 -03:00
Bruno Perdigão 4a8710efd8 Fix product decorator to be uninstalled after mouse right click. 2024-11-04 10:27:49 -03:00
Ryan Schultz f2c96b65e0 If perspective, don't add scale to the view title 2024-11-03 09:29:11 -06:00
Richard Brice bf8c3530a1 Fixes piecewise function evaluation in alignment api 2024-11-02 14:42:44 -07:00
Andrej730 caeabe2cd5 Optimize enums by moving them to data.py 2024-11-01 16:13:16 +05:00
Andrej730 9c0256165e Use static enum items instead of dynamic 2024-11-01 16:13:16 +05:00
Andrej730 1acf8f1ed8 deprecate some prop.purge 2024-11-01 16:13:16 +05:00
Andrej730 0944f8a7cb Fix unsafe enum items #5673 2024-11-01 16:13:15 +05:00
Andrej730 3debf62ca6 Mark unsafe enums #5673 2024-11-01 16:13:15 +05:00
Andrej730 f3019e4d7a Store enum items strings references to be safe #5673 2024-11-01 16:13:15 +05:00
Andrej730 33b7c0a76f small optimizations for enum props 2024-11-01 16:13:15 +05:00
Andrej730 ae18590893 typing 2024-11-01 16:13:15 +05:00
Dawid Huczyński 7517414552 add favicon to ifcopenshell-python and bonsaibim docs 2024-11-01 15:19:08 +05:00
Thomas Krijnen 63e98e69e9 Test whether polygonal boundary is simple #5665 2024-11-01 11:15:09 +01:00
Bruno Perdigão 4c08eaf953 Add a proposal to #3692 2024-10-31 17:43:30 -03:00
Bruno Perdigão 05b32b3c32 Fix #4298 2024-10-31 15:38:57 -03:00
Richard Brice f3ce57480a Fixes unit conversion problem in IfcCurveSegment 2024-10-31 08:55:01 -07:00
Andrej730 08e38c65f5 Display Ifc length attributes as Blender length properties
Basically now all length ifc attributes should be displayed in UI as Blender length properties - they display the units and allow math, typing different units, etc.

Example - https://imgchest.com/p/dl7p93gz64o
2024-10-31 18:40:14 +05:00
Andrej730 3e44f0f37b Quick way to select profile in profiles UI
Example - https://imgchest.com/p/9rydakllwyk
2024-10-31 18:40:14 +05:00
Andrej730 bd7ca78a37 bonsai - print number of voids for elements that hit void_limit 2024-10-31 18:40:13 +05:00
Andrej730 c53885f642 bonsai ifcclash - add separate property for export path
Example - https://i.imgur.com/bCRHx9q.png
Needed so it will be easier to rerun ifc clash without providing the same filepath each time.
2024-10-31 18:40:13 +05:00
Andrej730 e56589d544 ifcclash - fix broken list 2024-10-31 18:40:13 +05:00
Andrej730 380e791c59 ifcpatch - add pip installation to readme 2024-10-31 18:40:13 +05:00
Andrej730 904eb9fae8 Fix undo bugs with edited_objs
Now it's stored as a collection property in the project properties, so in the most cases we delegate to Blender to ensure it's handled properly on undo and redo.
2024-10-31 18:40:13 +05:00
Andrej730 09df81ab15 typing 2024-10-31 18:40:13 +05:00
Andrej730 b35ef2f101 black . 2024-10-31 18:40:13 +05:00
Andrej730 fb5d37b04b Fix support for python 3.10 #5662 2024-10-31 18:28:24 +05:00
Andrej730 06a6c2d79b Option to apply openings to the geometry #5666
Button location - https://i.imgur.com/6zSv8vV.png
Now it's possible to "bake" openings to the geometry, The openings representation will be marked as "Reference".
2024-10-31 17:00:43 +05:00
Andrej730 b39f96e2ee Fix bug duplicating edited object
It was losing original object representation on project save as it wasn't marked as edited.
2024-10-31 15:50:21 +05:00
Andrej730 64b3101cef Skip applying scale to geometry on duplicate #5663 2024-10-31 15:50:21 +05:00
Thomas Krijnen 4cd8428d1d Update unit.py 2024-10-31 11:00:02 +01:00
Thomas Krijnen 0446befefa More permissive interval overlap test for 2d opening evaluation #5661 2024-10-31 10:35:30 +01:00
Andrej730 037b5d1bc1 Spatial container drop down to show only spatial objects
Example - https://i.imgur.com/v8p4D57.png (it's ignoring walls).
Since we now filter valid elements in poll_container_obj, then there is no need to check it twice in update_container_obj.
2024-10-30 18:45:50 +05:00
Andrej730 e463407de7 void_limit - document 2024-10-30 18:07:34 +05:00
Andrej730 28f81496dd Small refactor for sync_edited_objects
1) remove materials if-branch as they're never edited
2) validate object explicitly
2024-10-30 18:07:34 +05:00
Andrej730 ccb223be94 Remove unnecessary ifc.finish_edits
Unused since we do not use fc.edit anymore for parametric geometry
2024-10-30 18:07:34 +05:00
Andrej730 33ed7e5234 typing 2024-10-30 18:07:34 +05:00
Andrej730 0662b0c5b6 Optimize updating representations adding/removing openings
No need to update all possible elements from decomposition because openings affect only related objects from IfcRelAggregate. For example, see #5639.
2024-10-30 18:07:34 +05:00
Andrej730 59e0dbae2c Fix 8ac9612 for IfcMaterials 2024-10-30 15:32:45 +05:00
Andrej730 e757c42204 Quick way to select style in Styles UI
Example - https://imgchest.com/p/ej7mkxp9ayd
2024-10-30 15:32:45 +05:00
Andrej730 b6da13c504 Fix hiding by accident object class asignment section in 86d0139f4 2024-10-30 15:32:45 +05:00
Andrej730 a66cffddb8 ifcopenshell-python - note about supported glibc versions 2024-10-30 15:32:45 +05:00
Andrej730 4dfb3cac51 bump ios build in bonsai
e8eb397 fixes #5658
2024-10-30 11:42:34 +05:00
Thomas Krijnen 3d4988349a Remove self-intersecting faces #5650 2024-10-29 15:43:02 +01:00
Andrej730 fa07f184c3 ifctester - indicate optionality in report message
Previously for both cardinality optional/required ifctester would show same results.

E.g.
<ids:property dataType="IFCBOOLEAN" cardinality="required">
<ids:property dataType="IFCBOOLEAN" cardinality="optional">

Were resulting in something like
LoadBearing data shall be true and in the dataset Pset_WallCommon
LoadBearing data shall be true and in the dataset Pset_WallCommon

Now it will result in
LoadBearing data shall be true and in the dataset Pset_WallCommon
LoadBearing data may be true and in the dataset Pset_WallCommon
2024-10-29 18:16:54 +05:00
Andrej730 067203cb9a ifctester webapp - add some tooltips 2024-10-29 18:16:06 +05:00
Andrej730 e9731f3047 ifctester webapp - fix issue with launching audit 2024-10-29 18:16:05 +05:00
Andrej730 fa0805fe29 ifctester webapp - fix for latest ids version 2024-10-29 18:16:05 +05:00
Andrej730 14bac88aca ifctester.webapp - add to readme 2024-10-29 18:16:05 +05:00
Andrej730 edafb722e4 Fix ifctester readme 2024-10-29 18:16:05 +05:00
Andrej730 8ac96124c9 Fix UI errors opening non-IfcMaterials in Materials UI
There was UI errors because ui data wasn't updated, now ui data update is tied to load_materials
2024-10-29 18:16:05 +05:00
Andrej730 bb23d74ce3 Fix bug in 4c93270ad for IfcMaterialLayers 2024-10-29 18:16:05 +05:00
Andrej730 ff0fe0db06 Small optimization for materials UI 2024-10-29 18:16:05 +05:00
Andrej730 834be2d6a8 geometry.add_wall_representation - document 2024-10-29 18:16:05 +05:00
Andrej730 af01f6b6c7 geometry.create_2p_wall - document 2024-10-29 18:16:05 +05:00
Andrej730 87d185fef1 Lock scale for aggregate parts too if aggregate has openings 2024-10-29 18:16:05 +05:00
Andrej730 bfa2852ca9 typing 2024-10-29 18:16:04 +05:00
Cristian Ritter cf0a4e2bde Handle with lowercase hexadecimals #5620 2024-10-28 19:58:43 +01:00
Andrej730 fd6a541689 bonsai bcf v3 - fix issue activating camera in some cases 2024-10-28 20:10:39 +05:00
Andrej730 4c3bb54f98 bim.update_representation to detect openings from it's aggregate and show an error
Previously it would apply scale and geometry with opening to the representation, basically corrupting it.
2024-10-28 18:22:11 +05:00
Andrej730 6a4167e234 bim.add_opening to sync representations before adding an opening
E.g. if object was scaled or edited. Previously geometry changes were either lost or applied in a weird way (to the object without scale).
2024-10-28 18:21:43 +05:00
Andrej730 147f0bfc9a Sync parts positions before applying the opening
To avoid issues like this - https://imgchest.com/p/bp45zlzen45
2024-10-28 18:21:43 +05:00
Andrej730 a4979a74b2 Fix bug object position wouldn't be synced on project save
If project had scale and openings then bim.update_representation wouldn't apply it's position leading to unsynced position.
2024-10-28 18:21:42 +05:00
Andrej730 850c16c745 Fix bug when object scale wouldn't be applied on project save if object wasn't moved 2024-10-28 18:21:42 +05:00
Andrej730 b96e275251 Fix bim.update_representation not apply scales if object wasn't moved
Was also creating same issue when project was saved
2024-10-28 18:21:42 +05:00
Andrej730 48a7af76ad Bump Blender build and simplify sun_position installation 2024-10-28 18:21:42 +05:00
Andrej730 3f4a0128c7 ifcsverchok - fix poll error opening operator search 2024-10-28 18:21:42 +05:00
Andrej730 bdbe91f043 typing 2024-10-28 18:21:42 +05:00
Andrej730 86d0139f41 Hide object related panels when there is no object active 2024-10-28 16:23:35 +05:00
Andrej730 f2e9f2beb9 Fix error adding custom pset to material set item when no item currently edited
Error traceback posted in #5647
2024-10-28 16:23:35 +05:00
Andrej730 4c93270adc Select material in materials UI #5647
Example - https://imgchest.com/p/6eyr8j8ag7p
2024-10-28 16:07:23 +05:00
Andrej730 320142f8e2 Hide material sets panels if there is no material set #5647 2024-10-28 16:07:23 +05:00
Andrej730 88d133b4cc Fix ifc calls on every draw call for material set pset names enum 2024-10-28 16:07:23 +05:00
Andrej730 7fef81c0b9 black . 2024-10-28 16:06:27 +05:00
Thomas Krijnen 92b63a0ef2 Update build-all.py - add 3.13.0 2024-10-27 06:55:38 +01:00
Ryan Schultz fc57a7bbf4 Fix #5078: A way to quickly sum up a qto value of multiple selected objects 2024-10-26 14:26:25 -05:00
Thomas Krijnen 68062f54d8 Gracefully handle missing aggregate header fields #5626 2024-10-26 17:21:15 +02:00
Thomas Krijnen d6ed28e504 Update build-all.py - add rhel-related comment 2024-10-26 17:11:23 +02:00
civilx64 8ff4cef7ec lint with black 2024-10-26 17:06:24 +02:00
civilx64 8d001d0120 cleanup from original python alignment prototyping
`transition_curve.py` is now obsolete and has been removed.
A python port of IfcAlignmentHelper.cpp has also been started.
It needs further development to accommodate vertical alignment.
2024-10-26 17:06:24 +02:00
Thomas Krijnen ea48996f0d Double check for relationship subtype when processing openings on aggregate parent #5639 2024-10-26 14:53:36 +02:00
Andrej730 6b55e5e6ee Fix find_openings for ifc2x3 #5639 2024-10-25 17:43:41 +05:00
Richard Brice e270583451 Fixes unit conversion on clothoid constant 2024-10-24 08:43:47 -07:00
Andrej730 99dc4795c7 Reset not applied objects scales during project save
We try to apply scales using bim.update_representation and if didn't worked (presumably because object has openings) we reset the scales.
It was confusing for users that they scaled an object, saved IFC and they would know that scaling didn't worked only after they reopen the IFC project.
2024-10-24 18:38:17 +05:00
Andrej730 1642f231fb typing 2024-10-24 18:38:17 +05:00
Andrej730 9998442eb4 Use common method for checking if object is scaled 2024-10-24 18:38:16 +05:00
Andrej730 4040c31583 Lock scale for objects with openings
Currently there is an UX problem that it's not clear for users when it's possible to use scale or not. We definitely won't be able to safely apply scales for objects with openings, so will try to lock them from the start.
2024-10-24 18:38:16 +05:00
Andrej730 6614245fc1 Fix unnamed button for editing openings 2024-10-24 18:38:16 +05:00
Andrej730 c7a41b46fd More complete fix for breaking styles ui e85043ae3
Now it also doesn't break if user will undo style rename.
2024-10-24 18:38:16 +05:00
Andrej730 dfd11fb723 black . 2024-10-24 18:38:16 +05:00
Manu Varkey 8d3aa98b58 Implement rounding of elevation (#5532)
* Implement rounding of elevation

Implement rounding of elevation based on precision stored in IfcGeometricRepresentationContext

* Move formating function to tool
2024-10-24 15:17:47 +05:00
Andrej730 b08acd1625 Fix incorrect error message for bim.link_ifc when linking using 'files' argument
self.filepath is empty if bim.link_ifc was executed using 'files' argument
2024-10-24 14:25:26 +05:00
Andrej730 181b0cefc3 Fix linking ifc from shared folder on Windows #5386
The problem was that shared folders names are starting with `\\`, e.g. `\\SERVERNAME\shared_folder`. When we pass path strings we usually sanitize them and save them as posix, so it's saved as `//SERVERNAME/shared_folder` and Blender has a convention that paths starting with `//` it interprets as filepaths relative to the current .blend file, therefore it was giving some weird error that `C:\Users\xxxx\SERVERNAME\shared_folder\test.blend` is missing instead of `\\SERVERNAME\shared_folder`.

So need to be careful passing strings to Blender operators and use str instead of as_posix for those operators, so  \\` wouldn't be misinterpreted.
2024-10-24 14:25:25 +05:00
Andrej730 e85043ae31 Fix styles UI breaking on undo
Turn out storing bpy.types.PropetyGroups was not very reliable idea as they get invalidated, just as Objects.
It's still breaking if you'd try to rename the style and then undo.
2024-10-23 18:34:03 +05:00
Andrej730 ca0e4f9cd6 Fix error duplicating type when current tool doesn't match the type #5591 2024-10-23 18:34:03 +05:00
Andrej730 3ff0ff66a4 Try to ensure undo will still work in case of an error
Previously transaction was never finished and therefore is_top_level_operator would never be triggered (without restarting project) making any IFC undo useless.
Previously it wsan't finishing transaction therefore:
- it was possible to undo ifc changes in the last step that had an error

- since transaction was never finished, IfcStore.current_transaction was never cleared and therefore is_top_level_operator will be never be triggered for the next operators, so new transactions are never created breaking undo for any further ifc changes.

Now user can try to undo the last action to save the file.
2024-10-23 18:34:02 +05:00
Andrej730 0ea71b0795 Ifc.Operator - remove second refresh_ui_data
Seems to be already covered by refresh_ui_data in IfcStore.execute_ifc_operator.
2024-10-23 18:34:02 +05:00
Andrej730 932a718d2d limit active_material_index handler callback 2024-10-23 18:34:02 +05:00
Andrej730 106b6f74e1 Handle listeners on unlink commit/rollback 2024-10-23 18:34:02 +05:00
Andrej730 88de650660 Simplify IfcStore.relink_object 2024-10-23 18:34:02 +05:00
Andrej730 72ea93bc0f Prevent adding None to guid_map
OperationData was always including guid key, so guid_map[None] was pointing to some object (typically a style). Also covered by rebuild_element_maps in the most cases.
2024-10-23 18:34:02 +05:00
Andrej730 6f347bcb81 Undo to clear listeners for linked objects
Typically it's already covered by rebuild_element_maps after undo but just to be consistent with commit_link_element.
2024-10-23 18:34:01 +05:00
Andrej730 fa29c42887 common method for setting up Blender listeners for objects 2024-10-23 18:34:01 +05:00
Andrej730 86edd52894 Unlinking elements to clear Blender listeners
to prevent unnecessary callbacks
2024-10-23 18:34:01 +05:00
Andrej730 db0a72c794 Add min/max values for roof angle/percentage
That way those props should be easier to edit, previously dragging "percentage" would go to infinity very quickly.
2024-10-23 18:34:01 +05:00
Andrej730 d68dee148b Fix infinite recursion with angle/percentage roof properties in 2597827
Probably was harmless, it was just flooding the console with errors such as:

object address  : 000002485A776380
object refcount : 2
object type     : 00007FFBD1249050
object type name: RecursionError
object repr     :
lost sys.stderr
File "\bonsai\bim\module\model\prop.py", line 707, in <lambda>
object address  : 000002485A774520
object refcount : 2
object type     : 00007FFBD1249050
object type name: RecursionError
object repr     :
lost sys.stderr
File "\bonsai\bim\module\model\prop.py", line 713, in <lambda>
2024-10-23 18:34:01 +05:00
Andrej730 a1134e83a4 Fix test after 8372e12f8 2024-10-23 18:34:00 +05:00
Andrej730 b61927b460 deprecate Style.get_style
In favor of Ifc.get_entity
2024-10-23 18:34:00 +05:00
Andrej730 863633f2dc Prevent adding name callback to non-ifc blender materials
Also removing one more artifact from #4843
2024-10-23 18:34:00 +05:00
Andrej730 b7dfeaee37 typing 2024-10-23 18:34:00 +05:00
Andrej730 2771465996 black . 2024-10-23 18:34:00 +05:00
Ryan Schultz f62b1ed326 Have svg tags with IfcColumn/IfcBeam classes always on top.
discussion: https://community.osarch.org/discussion/2572/a-clever-way-to-get-a-column-buried-in-a-wall-to-still-read-when-you-print-a-drawing
2024-10-22 18:45:19 -05:00
Bruno Perdigão 0c0225543b Add polyline tool for slabs.
No preview yet.
2024-10-22 17:39:19 -03:00
Bruno Perdigão ffe8d4fad2 Make wall preview decorator work only with IfcWallType. 2024-10-22 17:32:48 -03:00
Andrej730 c18d2e8c17 ifcopenshell.file - store default history_size in class instead of instance 2024-10-22 18:20:29 +05:00
Andrej730 70521b1020 IfcStore.edited_objs - document issues 2024-10-22 18:20:29 +05:00
Andrej730 a777d67252 bim.generate_space - add a test 2024-10-22 18:20:29 +05:00
Andrej730 7544053f0b bim.generate_space not to fail silently 2024-10-22 18:20:29 +05:00
Andrej730 7bebd2f7ce bim.generate_space - fix missing undo step 2024-10-22 18:20:29 +05:00
Andrej730 64fe2240e6 bim.generate_space - not to produce orphaned ifc mesh
Orphaned mesh was also linked to IFC which could have lead to some hard to debug issues.
2024-10-22 18:20:28 +05:00
Andrej730 54b104b822 fix not working bim.generate_space because of the units mismatch
Not sure when this occurred but get_bmesh_from_polygon was expecting Polygon in project units but it was SI. Since it's probably better to move everything to SI, added an option to specify whether polygon is in SI or not.
2024-10-22 18:20:28 +05:00
Andrej730 abd7c93c35 bim.generate_space - document 2024-10-22 18:20:28 +05:00
Andrej730 5c56ea6343 spatial tool ui - sync shift-a hotkey UI with hotkey_S_A
Previously it was always showing two S_A operators
2024-10-22 18:20:28 +05:00
Andrej730 e8a2f3aed2 remove recalculate_dumb_wall_origin and don't mark aligned walls as edited
Since 5677768 recalculate_dumb_wall_origin is never used and bim.align_wall is either just changing the location (align_centerline) or might change object's representation but it's already saved to ifc (exterior/interior).
2024-10-22 18:20:27 +05:00
Andrej730 931e945044 Fix broken centerline alignment hotkey after e8f66ab
Ping @trhyder just in case
2024-10-22 18:20:27 +05:00
Andrej730 5eeea23774 bim.align_product - document 2024-10-22 18:20:27 +05:00
Andrej730 2a44af57d2 bim.align_product.align_type to use enum
to make it less error prone
2024-10-22 18:20:27 +05:00
Andrej730 035b6d00c5 bim.align_wall.align_type - use enum 2024-10-22 18:20:27 +05:00
Andrej730 8372e12f88 deprecate geometry.is_edited
in favor of ifc.is_edited
2024-10-22 18:20:26 +05:00
Andrej730 76869b0b02 deprecate misc.mark_object_as_edited
in favor of ifc.edit
2024-10-22 18:20:26 +05:00
Andrej730 5c08b8f22d bim.resize_to_storey - document 2024-10-22 18:20:26 +05:00
Andrej730 bcf54b643d Hide scale warning for non ifc objects 2024-10-22 18:20:26 +05:00
Andrej730 71c5e83fa0 typing 2024-10-22 18:20:25 +05:00
Andrej730 9eaecdb0a4 black . 2024-10-22 18:20:25 +05:00
Bruno Perdigão 3077687c59 Move product preview logic to its own decorator. 2024-10-22 10:01:50 -03:00
Bruno Perdigão 71997d37c0 Add support for cardinal point in beam and column preview. 2024-10-21 21:51:27 -03:00
Bruno Perdigão acc9e7f706 Adds beam and columns to insertion point product preview. 2024-10-21 16:29:23 -03:00
Bruno Perdigão 5fa5b28484 Allow AddOccurence to use default container elevation value. 2024-10-21 11:10:10 -03:00
Bruno Perdigão 745c8e173a Small fix after 14917d2c3 2024-10-21 10:46:26 -03:00
Bruno Perdigão 14917d2c31 Windows and Doors preview now get the wall rotation. 2024-10-21 10:34:42 -03:00
Bruno Perdigão 340916a5a4 Refactor snapping point selection to add the object name. 2024-10-21 10:34:42 -03:00
Bruno Perdigão 734ac2ba70 Fix issue with using shift + mousewheel while polyline is active. 2024-10-21 10:34:42 -03:00
Andrej730 dbfe3ea3c4 bim.update_representation - error message for objects with openings 2024-10-21 18:05:27 +05:00
Andrej730 c581946fa8 railing, roof - save representation to ifc instead of marking it as edited #5610 2024-10-21 18:05:27 +05:00
Andrej730 492df2310d parametric stair - don't mark object as edited
As representation already saved to IFC and edited_objs seems to be getting less reliable because of the openings.
2024-10-21 18:05:27 +05:00
Andrej730 e8eb3972a1 Support styles without shading styles after 189bcd5
Noticed that after 189bcd5 some representations were missing styles - the ones that are using IfcSurfaceStyle with just IfcExternallyDefinedSurfaceStyle.

Ping @aothms just in case
2024-10-21 16:45:50 +05:00
Andrej730 45b3008b99 bim.edit_style to update representations if Side was edited
Mentioned in #5604. Since IfcSurfaceStyle.Side is used during representation generation, we need to regenerate them if the value was changed. Previously it would require manual update / project reload.
2024-10-21 16:45:50 +05:00
Andrej730 ce6c56cab4 model.workspace - cache is_representation_item
To avoid accessing IFC on every draw call
2024-10-21 14:40:39 +05:00
Andrej730 1d90665c3a split_by_loose_parts to preserve the objects selection
Noticed that bim.assign_class started to loose the objects selection after 29d6d2b
2024-10-21 14:40:39 +05:00
Andrej730 6bfbcb8f92 typing 2024-10-21 14:40:38 +05:00
Andrej730 4acdd7c960 Fix assigning cost item to resource after 97393eb #5601
fyi @myoualid
2024-10-21 11:26:09 +05:00
Richard Brice 647e379c69 Fixes problem with evaluating point on vertical alignment
Fixes evaluation of IfcLine parent curve for IfcGradientCurve. See https://github.com/IfcOpenShell/IfcOpenShell/discussions/5587
2024-10-20 08:19:49 -07:00
Thomas Krijnen 18d5957424 Defensiveness against invalid syntax #5608 2024-10-20 14:17:13 +02:00
Chris Mayo 65ecb92c03 python: Fix ifcopenshell.guid.new()
pyException:

<class 'AttributeError'>: module 'ifcopenshell' has no attribute 'guid'
2024-10-20 14:01:34 +02:00
Bruno Perdigão b8d98b7512 Black format 2024-10-19 11:15:30 -03:00
Bruno Perdigão 97ed3bb0d5 Add product preview for mesh type objects when insertion point is active.
Currently works with doors, windows and furnitures.
2024-10-19 10:57:06 -03:00
Bruno Perdigão 217ada0993 Refactor wall preview for polyline tool. 2024-10-19 10:25:03 -03:00
Chris Mayo dcd6acb1f4 Install cityjson_converter lib and exe
Fixes:

$ IfcConvert
IfcConvert: error while loading shared libraries: libcityjson_converter.so: cannot open shared object file: No such file or directory
2024-10-19 13:48:17 +02:00
Andrej730 122ec6fb0a Use clever Blender length props for editing representation item extrusion depth
Example - https://imgchest.com/p/ljyqzpmwoy2
2024-10-18 18:12:00 +05:00
Andrej730 60837b9512 Operator to save pset as a template
Mentioned in #5596

Example - https://imgchest.com/p/5xy235xvj4l

Adds 2 things:
1) UI indicator whether pset is based on template or not
2) When pset is not based on a template, indicator becomes clickable and works as a shortcut for creating pset template based on the current pset.
2024-10-18 18:11:59 +05:00
Andrej730 ada4a8884b tool.PsetTemplate 2024-10-18 18:11:59 +05:00
Andrej730 a27bdc4e3e Add description to pset template props
As name doesn't seem to be displayed in the enum tooltip
2024-10-18 18:11:59 +05:00
Andrej730 43cecf6c5e Hide 'remove pset template/file' operator when there are no templates/files 2024-10-18 18:11:59 +05:00
Andrej730 4666589fcd bim.add_pset_template to add psets with unique names for convenience 2024-10-18 18:11:59 +05:00
Andrej730 e3ef64d0b3 Fix UI error switching between pset template files 2024-10-18 18:11:59 +05:00
Andrej730 828160c1b1 Fix UI errors if there are no pset template files 2024-10-18 18:11:59 +05:00
Andrej730 832ccff139 fix broken enum after removing pset template/file 2024-10-18 18:11:59 +05:00
Andrej730 17e67fbdaa bim.remove_pset_template_file - note 2024-10-18 18:11:58 +05:00
Andrej730 01b28fde6f remove BIMPsetTemplateProperties.new_template_filename
- as it was only used inside bim.add_pset_template_file operator
- also remove second unnecessary ":" in the prop label (":" is automatically added by Blender)
2024-10-18 18:11:58 +05:00
Andrej730 9130659f71 ifcopenshell.open - readable error if file doesn't exist
Previously it would show obscure error like:

RuntimeError: Type held at index 0 is class Blank and not class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >
2024-10-18 18:11:58 +05:00
Andrej730 e073f11e25 typing 2024-10-18 18:11:58 +05:00
Andrej730 dbd64ebb0e black . 2024-10-18 18:11:58 +05:00
Thomas Krijnen ecba1c3e7b Fix for UVs in python binding #5592 2024-10-18 10:37:53 +02:00
Andrej730 5837a143da bump IOS #5583 2024-10-18 11:55:38 +05:00
Bruno Perdigão 01c67eea48 Fix issue with joining walls with negative direction sense. 2024-10-18 07:49:46 +11:00
Andrej730 0e5008d21e Bonsai daily build tag to include hours and minutes
The problem is index.json is using urls pointing to zip files from the releases and it's possible that installation from unstable repo will be broken (user will get error message like '"Archive size mismatch "bonsai", expected 87417726, was 87418259"') in 2 cases:

1) during 5 minutes after commit while builds are still uploaded to the releases but index.json is not yet updated
2) if some builds were uploaded and some builds failed to upload, then for platforms that were uploaded successfully unstable installation will be broken until we fix the builds

When we add hours and minutes to the tag, that should be enough to make urls unique for each build avoiding this problem. If needed we can came up with some mechanism to clean up all builds besides the last one.
2024-10-17 18:25:08 +05:00
Andrej730 b17eacfa6a typing 2024-10-17 18:25:08 +05:00
Thomas Krijnen a04912e174 Assure edges are emitted in some topological order 2024-10-17 14:35:17 +02:00
Andrej730 ee7fd0cadf Fix issues with unsanitized cache names #5589
Underlay filename wasn't sanitized when saved to 'cache' and when added to .svg but later when it's moved from 'cache' to 'drawings' folder the filename was regenerated using sanitized main .svg filename leading to issues.
2024-10-17 15:10:29 +05:00
Andrej730 5ae75d32bd fix bug in a0e660583 #5585 2024-10-16 21:23:56 +05:00
Andrej730 a0e6605834 support adding parametric roof to object without representations 2024-10-16 18:00:43 +05:00
Andrej730 903e673984 Fix adding parametric geometry operators missing undo step
This also seems to by accident resolve #5565 🤨🤨🤨
2024-10-16 18:00:43 +05:00
Andrej730 a7efdb0bff support adding parametric stair to object without representations 2024-10-16 18:00:43 +05:00
Andrej730 695ab0bfab bump ifc sverchok #5546 #5178 2024-10-16 18:00:43 +05:00
Andrej730 e9e89c1280 remove unnecessary second style reload when disabling style editing 2024-10-16 18:00:43 +05:00
Andrej730 e29f8ce18a clear collections properties for styles when not editing 2024-10-16 18:00:43 +05:00
Andrej730 ee892f63bf Fix bug loading wrong external style #5576
By mistake it was always using currently edited external style, even if external style was not edited anymore and even if it was different style currently edited.
2024-10-16 18:00:43 +05:00
Andrej730 bb8e1866b0 Subscribe to viewport shading changes for appended BIM workspace too 2024-10-16 18:00:42 +05:00
Andrej730 3a5856511d bim.update_current_style - optimization for updating styles for multiple objects 2024-10-16 18:00:42 +05:00
Andrej730 725df97ac0 bim.save_project to preserve relative ifc path #5407 2024-10-16 18:00:42 +05:00
Andrej730 98888d5096 bim.load_project - use_relative_path to override should_start_fresh_session 2024-10-16 18:00:42 +05:00
Andrej730 14d44dcd3e remove ExportIFCBase as it's unused 2024-10-16 18:00:42 +05:00
Andrej730 7f1f249759 typing 2024-10-16 18:00:42 +05:00
Andrej730 3113d62c85 black . 2024-10-16 18:00:35 +05:00
Gorgious56 58b46da04d Fix SHIFT+D shortcut for duplication not working for vanilla non-meshlike objects (eg lights) 2024-10-16 11:56:04 +02:00
Bruno Perdigão db77d06a8a Fix error introduced by b9c6508aa 2024-10-15 23:21:38 -03:00
Dion Moult 4684aa4a55 Fix bug where you couldn't add conditional material psets 2024-10-16 12:26:33 +11:00
Bruno Perdigão b9c6508aa7 Polyline wall ability to switch axis while drawing.
While drawing the polyline the user can press:
- F to flip the wall. Changes the direction sense.
- O to change the offset type between Exterior, Center and Interior. This will change the offset from reference line.

Those attributes can be verified in the Object Materials panels of each wall after they are created.
2024-10-15 21:58:34 -03:00
Bruno Perdigão d7bf8eba02 Fix small issue with the area decorator for the measure tool. 2024-10-15 21:47:42 -03:00
Bruno Perdigão e7a725dca3 Fix #5562 2024-10-15 21:25:16 -03:00
Bruno Perdigão f763e4b0a7 Remove increment snap from the measure tool. 2024-10-15 10:01:25 -03:00
Andrej730 12742bd08c bim.load_project to support relative paths #5407 2024-10-15 17:57:00 +05:00
Andrej730 8940ec7b80 hide non-ifc objects from relating product dropdown 2024-10-15 17:57:00 +05:00
Andrej730 cb2895cc41 util.shape for materials and material_ids 2024-10-15 17:57:00 +05:00
Andrej730 1facba797d aggregate data - small optimization
check for first BBIM_Linked_Aggregate instead of iterating over all rels
2024-10-15 14:30:49 +05:00
Andrej730 a76e802ab4 aggregate module - remove unnecessary ifc operators 2024-10-15 14:30:49 +05:00
Andrej730 afeec29261 Document bim.aggregate_assign_object 2024-10-15 12:34:07 +05:00
Andrej730 6c573445dd More clever object selection for assigning aggregates #5560
Basically those two properties (Relating Whole and Related Part) are now showing only objects that are valid for the assigning an aggregate - https://i.imgur.com/bqQsXhG.png
2024-10-15 12:34:07 +05:00
Andrej730 f17c2eb80e bim.query_linked_element - close db connection manually
otherwise it seems it was never closed (even if you open some other ifc project in current blender session) and .sqlite file is locked from being deleted (at least on Windows)
2024-10-15 11:28:37 +05:00
Andrej730 0888cbb675 small fix 2aeb87b5f 2024-10-14 17:53:12 +05:00
Andrej730 2aeb87b5fe reuse ifcopenshell.util.shape 2024-10-14 17:37:34 +05:00
Andrej730 79c09ae225 Error appending inspected linked element for detailed meshes #5415
Was resulting in error below for meshes with > 1000 face indices (>~333 tris)

last_error: Traceback (most recent call last):
  File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\ifc.py", line 408, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\.local\lib\python3.11\site-packages\bonsai\bim\module\project\operator.py", line 1858, in _execute
    ifc_file = ifcopenshell.open(queried_obj["ifc_filepath"])
                                 ~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'bpy_struct[key]: key "ifc_filepath" not found'
2024-10-14 17:37:29 +05:00
Andrej730 686514b88a fix toggling link visibility after be68a8f #5524 2024-10-14 17:37:29 +05:00
Andrej730 a014cd58e3 fix toggling link selectibility after be68a8f #5524 2024-10-14 17:37:29 +05:00
Andrej730 090c670f04 avoid reimport representation meshes having .001 suffixes 2024-10-14 17:37:29 +05:00
Andrej730 d1b9d9697e document.operator - remove unnecessary ifc operators 2024-10-14 17:37:28 +05:00
Andrej730 fe316e2741 documents ui - hide Name attribute from editing for document references #5542
To avoid invalid ifc.
2024-10-14 17:37:28 +05:00
Andrej730 16553417c1 document.import_references - note about not using Name #5542 2024-10-14 17:37:28 +05:00
Andrej730 fac9444cfd ifc5d - use utf-8 encoding for reading csv files #5561
Same encoding as we use in Ifc5DCsvWriter.
2024-10-14 17:37:28 +05:00
Andrej730 cd8f6e2c78 typing 2024-10-14 17:37:28 +05:00
Andrej730 9e2189fea4 prop_with_search for external styles enum #5569
Ping @Gorgious56 as perhaps you might be interested in this weird case - it seems passing Operator with context_pointer_set makes it OperatorProperties which doesn't have original __annotations__.
2024-10-14 12:23:31 +05:00
Andrej730 5ffef568f7 black . 2024-10-14 12:23:31 +05:00
tim 9ccbd332cf Type Manager fixes
- Corrected the alignment of the Type Manager preview in tool header
- Improved click-ability of the thumbnail icon in the Type Manger preview in the side bar
2024-10-14 11:47:23 +11:00
Ryan Schultz a1fb4d6b81 fix #4051: filter to only show IfcProfileDefs that are attached to IfcMaterialProfiles 2024-10-13 11:24:41 -05:00
Ryan Schultz 2f0500a14b have dimensions like 0 7/8" read like 7/8" 2024-10-13 08:48:21 -05:00
Bruno Perdigão 6f6700db06 Fix bug with mixed snap. 2024-10-11 10:38:15 -03:00
Bruno Perdigão 0235d84f25 Fix small issue with area and length measurement text in polyline tool. 2024-10-11 09:43:23 -03:00
Bruno Perdigão 1225073bef Remove debug print statement 2024-10-11 08:47:39 -03:00
Dion Moult fb714e8fd8 Fix #5482. Reimplement handling of arc detection to allow consecutive arcs. 2024-10-11 21:33:10 +11:00
Dion Moult a0aa5396c9 Purge option for native meshes 2024-10-11 20:18:47 +11:00
Bruno Perdigão 017de3bd59 Fix measurement area text showing in wall polyline 2024-10-10 22:08:19 -03:00
Bruno Perdigão fe5dada256 Fix measurement area text position. 2024-10-10 21:48:11 -03:00
Bruno Perdigão fe0aa4b5b7 Change angle increment for axis snap. 2024-10-10 20:59:57 -03:00
Bruno Perdigão 3a2f29aefc Fix bug in measurement area decorator.
Make input validation accept "m²" and "mm²"
2024-10-10 20:59:57 -03:00
Bruno Perdigão cdaa782c18 Poyline tool - Adds more layers to increment snap base on viewport zoom. 2024-10-10 20:59:57 -03:00
Bruno Perdigão b4d652d12e Fix small issue with snap axis when using measure tool with different planes 2024-10-10 20:59:57 -03:00
Bruno Perdigão 014edcdadc Fix X, Y and Z axis snapping after e673226ea1249a2432ff7b00a7581d750825b544 2024-10-10 20:59:57 -03:00
Bruno Perdigão 3f2efcc846 Fix small issue with increment snap 2024-10-10 20:59:57 -03:00
Bruno Perdigão 095c854d41 Improves angle snapping 2024-10-10 20:59:57 -03:00
Bruno Perdigão dd646d2763 Increment snap now works only for plane and axis snapping. 2024-10-10 20:59:57 -03:00
Dion Moult a32c4ae694 CGAL-Hybrid is now the default. Let's see what happens! 2024-10-11 08:49:42 +11:00
Dion Moult 2e21ec749b Fix #5538. Purge native mesh handling in Blender. This is now obsolete with CGAL-Hybrid. 2024-10-11 08:40:22 +11:00
Thomas Krijnen 189bcd5ad6 Maintain identity and cache styles based on surface-style-shading not styled-item #5486 2024-10-10 16:48:30 +02:00
Dion Moult dc1842dbe8 Fix #5520. Incorrect double calculation of daylight savings and UTC zone. 2024-10-10 22:02:50 +11:00
Dion Moult c75e2e3fc0 Fix failing core tests 2024-10-10 21:36:48 +11:00
Dion Moult 10e76a09de Fix failing MacOS builds 2024-10-10 21:12:35 +11:00
Thomas Krijnen 766f8adce7 nix/build-all propagate BUILD_SHARED_LIBS for -shared build 2024-10-10 09:16:28 +00:00
Dion Moult 47f013fc18 Add support for adding curvelike items 2024-10-10 18:34:20 +11:00
Dion Moult bd42fc9cef Add support for editing curves 2024-10-10 14:45:05 +11:00
Bruno Perdigão 0eb713a7ff Fix #5545 2024-10-09 14:37:04 -03:00
Bruno Perdigão 50c6cbcb2d Polyline tool now shows dimensions for meters and centimeters. 2024-10-09 12:04:45 -03:00
Bruno Perdigão 304db50692 Improved snap hierarchy to allow better face snapping. 2024-10-09 10:41:53 -03:00
Bruno Perdigão 1a55212099 Revert snap stickiness value after changes in increment snap. 2024-10-09 10:28:40 -03:00
Bruno Perdigão ddd17d519e Fix error that was preventing 3d panning while polyline tool is active.
This error was introduced by 48784ba
2024-10-09 10:19:51 -03:00
Bruno Perdigão 481e6b8a8d New implementation for increment snap.
The first implementation was based directly on Blender increment snap.
The new one works just by rounding distance and angle to a better number.
The rounding is still contextual to the window zoom.
2024-10-09 10:14:07 -03:00
Thomas Krijnen d01438e7f1 Retain transform when doing unification in kernel 2024-10-09 13:16:58 +02:00
Thomas Krijnen da0d383666 Distinction between general exception / not supported / not implemented #5484 2024-10-09 13:14:49 +02:00
Thomas Krijnen a38a3ad2fb Fix funky mep geometry #5255 2024-10-09 09:34:52 +02:00
Dion Moult bba862e3ae Fix #5544. Assign / add of objects with styles are now supported. 2024-10-09 18:27:36 +11:00
Dion Moult 11eb1c26f0 Fix #3120. You can now assign styles to individual items. 2024-10-09 18:17:12 +11:00
Dion Moult d09ab54869 Allow reloading of camera geometric representations 2024-10-09 12:26:03 +11:00
Dion Moult aeb00e518b Run black 2024-10-09 12:25:34 +11:00
Dion Moult 844be6bd1c Fix #5231. Remove workaround for missing model-offset in v0.8. 2024-10-09 12:24:25 +11:00
Dion Moult 4f6ca68195 Bump IOS 2024-10-09 11:24:30 +11:00
Bruno Perdigão c33c0b7780 Fix snap to exclude objects that are in a hidden collection. 2024-10-08 18:37:36 -03:00
Bruno Perdigão 7137d95c63 Fix - Mixed snap now gives two snapping points options.
The function was only passing the closest option, but this is not always
the best option. It still defaults to the shortest, but now the user can
select the other option by cycling through snapping points with the "M"
key.
2024-10-08 18:13:24 -03:00
Bruno Perdigão 48784ba834 Polyline tool - user can now change the angle of the snap axis.
- Press "L" while the tool is active to lock axis to the current angle.
- Press "Shift" + "Mouse Wheel" up or down to adjust the angle.

If using with the measure tool it will only work if you have a plane method selected.
2024-10-08 18:13:24 -03:00
Bruno Perdigão fa642e6203 Lower snap axis stickiness. 2024-10-08 18:13:24 -03:00
Bruno Perdigão ee54b3a6f4 Increment snap now works with x, y, z axis snap. 2024-10-08 18:13:24 -03:00
Thomas Krijnen e3223db059 More includes to make gcc happy 2024-10-08 21:04:11 +02:00
Thomas Krijnen b34157e257 Allow returning nativeelement in create_shape() 2024-10-08 20:58:02 +02:00
Thomas Krijnen bfe3601fd1 wkt-use-section option for svg-like occt section cuts instead of polyhedral topology 2024-10-08 20:57:27 +02:00
Kristoffer Andersen cc6249d6cc Add bcf conda-forge badge 2024-10-08 18:26:28 +02:00
Thomas Krijnen 4c2fc55cfe Bring back some v0.7 logic for sweeps over continuous wires #5473 2024-10-08 15:44:51 +02:00
Thomas Krijnen 36a0a0f2dd Work-around for tiny radii sweeps #5474 2024-10-08 14:53:56 +02:00
Dion Moult 89b1f9c2d7 Fix #5527. Unlinking an object should never share its mesh data with IFC elements. 2024-10-08 22:47:22 +11:00
Dion Moult 3c51c6325c Fix #5515. Spaces are now special and have their own collection. Elements in a space don't go inside a space collection anymore.
There can be hundreds of spaces in a building, and generally we use collections for bulk selections (i.e. at the floor level) not for spaces.
2024-10-08 22:35:21 +11:00
Thomas Krijnen fdf4749dd7 Missing include for OSX build 2024-10-08 09:19:29 +02:00
krande 742b3ca120 add ifdef for cgal 6 2024-10-08 09:12:04 +02:00
Dion Moult c85eb79c50 Remove deprecated copy class operator 2024-10-08 17:48:53 +11:00
Dion Moult 1d6b0f781b Fix #5533. Duplicating objects now updates item ids for new item editing workflow. 2024-10-08 17:48:42 +11:00
Dion Moult 32899ebffb Fix #5543. Updating a representation reloads the representation. 2024-10-08 15:45:03 +11:00
Dion Moult 1b321f0747 Fix #5512. Minor fix of console errors in workspace. 2024-10-08 14:32:48 +11:00
Bruno Perdigão 774791cf97 Polyline tool - increment snap now works for imperial units. 2024-10-07 22:28:03 -03:00
Bruno Perdigão c5f27e908a Polyline tool - increment snap implementation. 2024-10-07 22:28:03 -03:00
tim 0f4e4730e2 Progress on Selected Type Preview (#5535)
* Remove length from wall tool

No longer relevant with the new draw method

* Selected Type Preview and Launch Type Manager

Redesign of thumbnail preview

* Update to Type Manager

Moved Create new type to end of paginated loop
Added Predefined type label under thumbnail

* No Types Found

Modified to match Types Manager tiles
Quick Default icon added

* No Types Found

Modified to match Types Manager tiles
Quick Default icon added

* Description in thumbnail linked to value

---------

Co-authored-by: tim <tjrhyder@gmail.com>
2024-10-08 12:24:56 +11:00
Dion Moult 6fb4ce202e Loading shapes now uses the selected geometry library 2024-10-08 12:16:56 +11:00
Dion Moult f66d1bed73 Conveniently preselect object representation template if an object is selected 2024-10-08 12:16:32 +11:00
Dion Moult af3fb78e1b Fix #5526. Fix bug where reloading a representation used by filtered / unloaded elements would fail. 2024-10-08 11:59:04 +11:00
Dion Moult 29d6d2ba97 Fix #5541. Creating an object from a mesh now separates by loose parts to prevent unwanted vertex fusing. 2024-10-08 11:30:40 +11:00
Thomas Krijnen a4226369bd Update type literal 2024-10-07 20:48:58 +02:00
Thomas Krijnen 250fad696e --unify-shapes setting 2024-10-07 20:47:01 +02:00
Thomas Krijnen 461e3d478a Store lowest_z in WKT footprint generation 2024-10-07 20:45:52 +02:00
Thomas Krijnen f3df7b8475 Rerun codegen 2024-10-07 20:43:19 +02:00
Thomas Krijnen aa9b2d7428 populate_derived() upon instance creation, don't only rely on serialization 'hack' #5364 2024-10-07 20:41:34 +02:00
Bruno Perdigão 8e8136ffb6 Fix issue when using "C" to close polyline. 2024-10-07 14:15:42 -03:00
Bruno Perdigão b595eb043e Reverting a change in insert_polyline_point. 2024-10-07 14:07:34 -03:00
Bruno Perdigão 2e6ea4fffb Small fix in polyline input ui decorator. 2024-10-07 14:07:34 -03:00
Bruno Perdigão eef0eb5d43 Bug fix on polyline model decorator when there is no polyline yet. 2024-10-07 14:07:34 -03:00
Bruno Perdigão 9cad7269fd Measure tool - allow for pan, orbit and zoom while tool is active. 2024-10-07 14:07:34 -03:00
Bruno Perdigão 0979c37ba8 Measure tool - center area text horizontally 2024-10-07 14:07:34 -03:00
Bruno Perdigão f9fc563de9 Bug fixes for measure tool in area type with imperial units. 2024-10-07 14:07:34 -03:00
Bruno Perdigão ad74d02165 Measure tool - Removed "Area" from the input UI.
Area is now shows as text decorator since be3354ece063c2c2abcb6f6904df7cd6865dee47
2024-10-07 14:07:34 -03:00
Bruno Perdigão 93457051da Measure tool - show text decorator for polyline area and length. 2024-10-07 14:07:34 -03:00
Bruno Perdigão ce1f1bc394 Bug fix in polyline wall after 95202364a86c8c56f54dde2873b703ac0cc548b4 2024-10-07 14:07:34 -03:00
Bruno Perdigão 0068023c6f Refactor - moved tool/Snap functions that should be in tool/Polyline 2024-10-07 14:07:34 -03:00
Bruno Perdigão 2ea4fc6491 Polyline tool - properties refactor.
Better separation of insertion polyline and measurement polyline
2024-10-07 14:07:34 -03:00
Bruno Perdigão b057f89459 Measure tool - single and area measurement now persist on screen.
Also, the measure polyline properties now stores the area and the total length that will be used by the decorator in later development.
2024-10-07 14:07:33 -03:00
Bruno Perdigão 1a8c11c715 Measure tool - added measurement type to each measurement properties. 2024-10-07 14:07:33 -03:00
Bruno Perdigão cf2a156872 Small refactor. Variable renaming. 2024-10-07 14:07:33 -03:00
Bruno Perdigão 79a8fb1f7f Single measure tool now show x,y and z formatted values. 2024-10-07 14:07:33 -03:00
Bruno Perdigão d4848f26f6 Small refactor 2024-10-07 14:07:33 -03:00
Bruno Perdigão 9b5f20e1dc Initial implementation of measure tool modes: single, polyline and area.
- Single: draws a single measurement that shows the lines and dimensions for x, y and z.
- Polyline: it's how it was already working
- Area: show the area value in the input panel and creates the polygon shape that represents the area. Only works for coplanar points.

The mode can be chosen by clicking the option icon in the workspace menu.
2024-10-07 14:07:33 -03:00
Dion Moult 864cc10b24 Fix #5529. Escape now switches back from item mode to object mode. 2024-10-06 17:34:59 +11:00
Dion Moult 2e7e2d24e4 Fix #5536. Trigger advanced mode by default on large models. Default to unlimited loading, but show warning.
This is a very common complaint: missing elements on large models. It seems as better default is to warn the user that the model is large, but give them the option to filter prior to loading the model.
2024-10-06 17:16:23 +11:00
Dion Moult c10056611b Bump IOS. 2024-10-06 16:13:26 +11:00
Thomas Krijnen 89a078bc50 Test case #5485 2024-10-04 19:12:18 +02:00
Thomas Krijnen 07fda60794 Return edges as planar-component boundaries in CGAL #5485 2024-10-04 19:11:02 +02:00
Andrej730 0935159c42 Restore IFC element menu removed in 23db38d
Example - https://i.imgur.com/1FRgYiQ.png
Restored it until we find some other place for it.
2024-10-04 18:45:40 +05:00
Andrej730 ca9681568c Fix error editing curves based representations #5499
KeyError: 'bpy_struct[key]: key "ios_edges_item_ids" not found'

It's still not possible to edit curve representations, just fixing an error trying to import representation items.
2024-10-04 18:45:40 +05:00
Andrej730 13a6d5b64a Materials UI - suggest MODEL_VIEW context for assigning material style by default
Probably makes more sense than just "Model".
2024-10-04 18:45:39 +05:00
Andrej730 8aa1b68d3e Bonsai - fix issues with default ifcpatch recipe is not loading properly #5540 2024-10-04 18:45:39 +05:00
Andrej730 dc63e989d6 remove try except for ifcpatch import as it's not optional 2024-10-04 18:45:39 +05:00
Andrej730 0cef788a09 Fix console errors after c96c661 (failed to register selection_mode)
Apparently Blender is strict that items should be tuples, not lists. Interestingly enough, though it did failed to register, operator still was working fine.

Example error:
TypeError: EnumProperty(...): expected a tuple containing (identifier, name, description) and optionally an icon name and unique number
ValueError: bpy_struct "BIM_OT_select_container" registration error: 'selection_mode' EnumProperty could not register (see previous error)
2024-10-04 18:45:39 +05:00
Andrej730 38d450e111 Show templates based on selected IFC schema #5530 2024-10-04 18:45:39 +05:00
Andrej730 e5c83b1538 same as 3b71d0050 #5537 2024-10-04 18:45:39 +05:00
Andrej730 9177e19efa Reset proposed property fields after adding custom property #5539 2024-10-04 18:45:38 +05:00
Andrej730 bf9d84e738 typing 2024-10-04 18:45:38 +05:00
Andrej730 2994f5c170 Add a warning if not all project elements were loaded #5536
Example - https://i.imgur.com/Tu3OOIm.png
2024-10-04 18:45:38 +05:00
Andrej730 3107fd91ee Fix issues adding roof and railing representation #5534
Apparently after recent changes with how types are added, it's now required to add a representation for them explicitly instead of just marking them as edited
2024-10-04 18:45:38 +05:00
Andrej730 69781daa6b Materials UI - update material styles data on expanding categories
otherwise style data was missing for materials that were previously hidden
2024-10-04 18:45:38 +05:00
Andrej730 e810dc76e0 Materials UI - support showing styles assigned with IfcPresentationStyleAssignment 2024-10-04 18:45:37 +05:00
Andrej730 cab3fd266d Materials UI - display other styles assigned to material besides IfcSurfaceStyle 2024-10-04 18:45:37 +05:00
Andrej730 62aef09bc7 Fix UI issue when material styles were not reflecting active material #5447
It was reflecting active material but it was only updated when ifc UI data was refreshed (usually after some IFC operators), now it should be always up to date.
2024-10-04 18:45:37 +05:00
Andrej730 2626968a05 materials ui - reuse Material.get_active_material_item 2024-10-04 18:45:37 +05:00
Andrej730 0e6479b090 Show all available styles editing material styles #5525
Previously it would fail e.g. if IfcFillAreaStyle was already assigned to the material but UI was showing errors because enum items contained only surface styles.
2024-10-04 18:45:37 +05:00
Andrej730 7b0a792ff7 bim.merge_identical_objects to support merging IfcMaterials 2024-10-04 18:45:36 +05:00
Andrej730 944e9c45ac black . 2024-10-04 18:45:36 +05:00
tim 99b1f5ec45 Tool header and side panel improvements (#5500)
* Conditions added to show Edit vs Create for each Tool

* Void conditions revised

Apply Voids now only show when number of selected objects ==2, and one of them is a void

* Conditions added to show create vs edit for each tool

example: to edit a wall -> the wall tool must be the active tool and a wall must be selected, to add a wall -> the wall tool must be the active tool and a wall must not be selected

* Extend wall to slab icons added

dark and light mode versions added

* Reset vertex icons added

dark and light mode version added

* Type Manager Preview added

---------

Co-authored-by: tim <tjrhyder@gmail.com>
Co-authored-by: Dion Moult <dion@thinkmoult.com>
2024-10-04 11:02:39 +10:00
Andrej730 3b71d00508 merge_identical_objects - temporarily replace get_info_2 with get_info 2024-10-03 18:37:56 +05:00
Andrej730 c3e4ebd996 bim.merge_identical_objects for merging identical styles
Button location - https://i.imgur.com/3O8gHUn.png

Could also be used as a temporary workaround for #5446
2024-10-03 17:15:34 +05:00
Andrej730 be9c9b2caa fix missing assert statements 2024-10-03 17:15:34 +05:00
Andrej730 306a269061 bim.unlink_style - make it more safe
Even if user decide not to delete style during unlinking, we will create a material copy and relink style to it, so it will be safe to assume that each surface style is always linked to blender material.
2024-10-03 17:15:34 +05:00
Andrej730 392b458563 ifcopenshell.util.element.replace_element 2024-10-03 17:15:34 +05:00
Andrej730 8ae951d27a get_info_2 to support excluding identifier 2024-10-03 17:15:33 +05:00
Andrej730 770e25dbc2 typing 2024-10-03 17:15:33 +05:00
Thomas Krijnen 2c08cff67b Make sure $ chars in TTL are only enclosed in <IRI> not shortened postfixes" 2024-10-03 10:30:53 +02:00
Thomas Krijnen 83c40c7fb4 Don't try to install directories as files (some change in recent cmake?) 2024-10-03 10:30:53 +02:00
Thomas Krijnen 3b9c1d88c8 Handle missing placement location gracefully #5528 2024-10-03 10:30:53 +02:00
Tyler Kvochick 040aec3e52 Derive docker tags from git refs 2024-10-02 17:28:12 +02:00
Thomas Krijnen 8f443a79f3 Merge pull request #5184 from csritter/v0.8.0
Adding --surface-colour in conversion settings to force the use of surface color instead of diffuse color. Issue #5075
2024-10-02 17:24:34 +02:00
Andrej730 3a9598a9d9 bonsai - bim.append_library_element option to skip reusing materials by name
Example - https://imgur.com/PsAPugJ
2024-10-02 18:33:31 +05:00
Andrej730 104b6f5564 append_asset option to avoid assuming unique names for assets #5391 2024-10-02 18:33:31 +05:00
smr02 d5fddd5f1b https://github.com/IfcOpenShell/IfcOpenShell/issues/5511#issuecomment-2388073735 2024-10-02 15:28:58 +02:00
Thomas Krijnen 99ae69f1e4 Don't estimate normal from collinear edges in TTL serializer 2024-10-02 11:12:23 +02:00
Thomas Krijnen b700c5e448 Don't escape $ in TTL output 2024-10-02 11:12:23 +02:00
Andrej730 2a9301ead2 project.append_asset - slight optimization for existing elements search 2024-10-01 18:08:03 +05:00
Andrej730 315d3c6437 ifcopenshell.file.to_string 2024-10-01 18:08:03 +05:00
Andrej730 35f53232b6 typing 2024-10-01 18:08:03 +05:00
Gorgious56 3978226b65 #5514 : Add information as to where to unlock elements in the error tooltip when trying to edit, delelete or move a locked object. Also fix active object / selection discrepancies 2024-10-01 14:14:48 +02:00
Andrej730 c3a6d28927 avoid writing to ifc loading ui elements 2024-10-01 16:50:17 +05:00
Andrej730 0ca3837fc2 update object name changing name from spatial manager #5449 2024-10-01 16:50:13 +05:00
Gorgious56 c96c661394 By default the "Select container" button in the spatial decomposition panel clears current selection before selecting the container. Shift + Click adds the container to selection, ALT + Click removes the container from selection. Added tooltip to the button for keypresses. 2024-10-01 13:38:20 +02:00
Andrej730 a4ac71f9f7 Replace freestyle extension warning with poll message #5472 2024-10-01 16:23:13 +05:00
Andrej730 f63a7d420e style.remove_style to handle IfcFillAreaStyles 2024-10-01 15:38:46 +05:00
Andrej730 19f1c87437 style.remove_style to handle IfcFillAreaStyleHatching 2024-10-01 15:38:46 +05:00
Andrej730 4b39631b98 get_element_by_style to support IfcFillAreaStyleTiles 2024-10-01 15:38:46 +05:00
Andrej730 e040dc4562 get_elements_by_style to support curve styles used in IfcFillAreaStyleHatching 2024-10-01 15:38:45 +05:00
Andrej730 55726b3d50 bonsai - fix breaking ui after style is removed
not sure when this one occurred but ui was breaking since ui blender items were still referring to the deleted ids
2024-10-01 15:38:45 +05:00
Andrej730 f4165d4149 bonsai - fix error removing non-linked styles
including non-ifcsurfacestyle ifcpresentationstyles
2024-10-01 15:38:45 +05:00
Andrej730 b7c390585b ios - fix error removing other IfcPresentationStyles
besides IfcSurfaceStyle
2024-10-01 15:38:45 +05:00
Andrej730 7133b01b76 Count styles based on the current stype type #5462
Previously it was showing number of all IfcPresentationStyles
2024-10-01 15:38:45 +05:00
Andrej730 616a8882d9 bim.load_style - avoid writing to ifc every time 2024-10-01 15:38:45 +05:00
Andrej730 e6e6bd841c project.operator - use pathlib 2024-10-01 15:38:45 +05:00
Andrej730 45ae7634a8 select linked model object when it's loaded 2024-10-01 15:38:45 +05:00
Andrej730 b67be01590 Operator to select link handle
Example - https://imgchest.com/p/md7oxbze97p
2024-10-01 15:38:44 +05:00
Andrej730 06a2c5bf0b Fix linked model decorator not moving for moved linked models (be68a8fdde) 2024-10-01 15:38:44 +05:00
Dion Moult 79b1388e44 Remove Shift-P hotkey 2024-10-01 19:11:40 +10:00
Dion Moult 53765222d6 See #4915. Experimental code for polyhedron without holes 2024-10-01 19:11:08 +10:00
Bruno Perdigão 665afc0375 Wall preview decorator now show tris. 2024-09-30 18:25:09 -03:00
Bruno Perdigão 5129d2016e Fix rebase conflicts 2024-09-30 13:15:19 -03:00
Andrej730 5d83c49fe0 fix saving clash results to bcf #5377 2024-09-30 16:02:52 +05:00
Andrej730 3ad58aba7a ifcclash typing 2024-09-30 16:02:52 +05:00
Andrej730 9131804e4e black . 2024-09-30 16:02:52 +05:00
Thomas Krijnen 6e2e01b460 Fix incomplete swept surface mapping #5484 2024-09-30 12:30:34 +02:00
Thomas Krijnen 5d1dee4480 Apply transformation to swept surfaces in occt advanced brep impl #5484 2024-09-30 12:29:14 +02:00
Thomas Krijnen 62f696da51 Don't handle bspline-edges on planar faces in cgal-kernel #5484 2024-09-30 12:28:28 +02:00
Dion Moult af7bdf6b9f Deprecate type_class in favour of new simpler type manager workflow 2024-09-30 14:04:03 +10:00
Thomas Krijnen 2c22421889 Don't consume token on invalid entity typename #5504 2024-09-29 19:15:29 +02:00
Dion Moult 8a0e87b8f8 Start cleaning up type manager to serve its new purpose as a fancy dropdown 2024-09-29 22:39:21 +10:00
Dion Moult 1bcc7199f6 Redesign BIM tool to have mutually exclusive add/edit modes. 2024-09-29 21:20:17 +10:00
Dion Moult 275d615d42 Shift-A now triggers the wall polyline tool for all LAYER2 elements 2024-09-29 18:11:08 +10:00
Dion Moult 905044f0d7 Shift-A in BIM tools now lets you pick a point interactively. No more 3D cursor requirement.
Still incomplete, but the goal is to not require a "huh?" moment for new users who have no idea what a 3D cursor is.
2024-09-29 17:11:32 +10:00
Thomas Krijnen e2ae2a4a89 Fix negative modelo #5509 2024-09-28 19:44:19 +02:00
Richard Brice abe3d7e5db Fixes problem normalizing IfcDirection direction ratios 2024-09-28 06:19:41 -07:00
Thomas Krijnen dd01cb0e51 BaseUri setting for TTL+WKT 2024-09-28 14:47:08 +02:00
Daniel Bo Olesen 2eecda17e4 Minor updates
Added a debug and run script to the documentation section.  Added a tip and clarifies how to roll back to a previous version, when running unstable release.
2024-09-28 21:48:56 +10:00
Daniel Bo Olesen c45b4372a8 Update writing_docs.rst
Some additions on how to get the local server up and running
2024-09-28 21:48:56 +10:00
Dion Moult 5bb40111c1 Pop up add menu in item mode 2024-09-28 21:22:57 +10:00
Dion Moult faa94eb636 Fix #5466. Support duplicating representation items 2024-09-28 19:39:29 +10:00
Dion Moult 2a6616707c Remove random debug print statements 2024-09-28 17:45:32 +10:00
Dion Moult d1c430cd4d Show clipping plane in front to make it easy to select 2024-09-28 17:35:06 +10:00
Dion Moult a5e6539ddf Support joining representation items 2024-09-28 17:35:06 +10:00
Dion Moult 7bc4b5100b Support separating representation items 2024-09-28 17:35:06 +10:00
Bruno Perdigão 8d08d358af Measure tool persists on screen and can be snapped.
The user has an option to clean previous measurements polylines by pressing "E" while using the measure tool.
2024-09-27 16:48:28 -03:00
Thomas Krijnen 314534436d Add .ttl + Well Known Text geometry serializer 2024-09-27 16:32:47 +02:00
Andrej730 be68a8fdde Support for moving/rotating/scaling for linked models
Example - https://imgchest.com/p/lqye6da2z4d
2024-09-27 19:06:31 +05:00
Andrej730 400ebf2efb bim.append_inspected_linked_element to ensure linked file schema is compatible 2024-09-27 19:06:31 +05:00
Andrej730 0dff19ba6a Project library dropdown - show only libraries compatible with the current schema
To prevent errors trying to append elements from the wrong schema library
2024-09-27 19:06:31 +05:00
Andrej730 24a6ed0e5c Show an error if library file schema is not compatible with the current file
Example - https://i.imgur.com/t1gxBJ4.png ("Schema of library file (IFC4X3_ADD2) is not compatible with the current IFC file (IFC4).")
2024-09-27 19:06:31 +05:00
Andrej730 63ffa1aadb Add upgrade to ifc4/ifc4x3 button to libraries file browser
Example - https://i.imgur.com/cTdwCvt.png
2024-09-27 19:06:31 +05:00
Andrej730 f7bf440848 AbstractKernel::dispatch_curve_creation - use static cast
Similar to 93c4749
2024-09-27 19:06:31 +05:00
Dion Moult 82fd49e4c4 Fix bug when tabbing into empties 2024-09-27 23:14:22 +10:00
Dion Moult 4261fdbed6 Rewrite coordinate offset to use np.array not Vector() for precision 2024-09-27 23:09:00 +10:00
Andrej730 9f02737a2e Fix segfault trying to create IfcSweptDiskSolid with invalid curve #5474
In my case it was IfcIndexedPolyCurve with just 1 vertex. Though kernel->convert does return a boolean value to indicate if conversion was successful, we never used it - so it failed silently leading to segfault later on.
Now we also stop processing those polycurves during mapping stage but checking kernel->convert result still might be useful in some other cases.
2024-09-27 17:00:33 +05:00
Andrej730 fe3b66c044 Stop processing IfcIndexedPolyCurve with < 2 verts at mapping stage #5474
as they're invalid and would't be able to create a curve
2024-09-27 17:00:33 +05:00
Andrej730 14cea7453b Skip failed to load IfcSweptDiskSolid shapes
Noticed in the file attached in #5474 (note that it's not the issue that's causing the segfault), it was failing due IFCSWEPTDISKSOLID's IFCINDEXEDPOLYCURVE having just 1 point, resulting in something like '[Error] [ 14:07:00]  No segment successfully converted: 80=IfcIndexedPolyCurve(79,$)'.

Not sure if this kind of polyline is considered valid in IFC but it doesn't trigger any validation errors, so I guess it shouldn't stop IFC project from loading in BBIM.
2024-09-27 17:00:33 +05:00
Andrej730 cfa2dc5d97 Contexts UI - import Precision as string due problems with Blender UI
Btw this is where you can edit model geometry precision - https://i.imgur.com/CLln0oK.png
Related Blender issue - https://projects.blender.org/blender/blender/issues/128238
2024-09-27 17:00:33 +05:00
Andrej730 123d023bb3 context.operator - remove unnecessary ifc operators 2024-09-27 17:00:33 +05:00
Andrej730 8ff94d3f61 context.data - skip passing unnecessary attributes 2024-09-27 17:00:33 +05:00
Andrej730 3b64350a3f bim.create_shape_from_step_id to include ifc class and id to object name 2024-09-27 17:00:33 +05:00
Andrej730 78302d1583 typing 2024-09-27 17:00:33 +05:00
Dion Moult d93ffb1fe6 See #5491. Clean up orphaned meshes when editing. 2024-09-27 21:59:42 +10:00
Bruno Postle ceeba53c18 Fix linux Associate Bonsai with *.ifc files #5494
The package configuration only included files with extensions, so the
`bonsai` wrapper script was not packaged in the wheel
2024-09-26 22:23:38 +01:00
Andrej730 ecd147675e Ooops, revert wip commit c80c52c248 commited by accident 2024-09-26 22:02:42 +05:00
Andrej730 1cf7f65902 Hide non-simple property types to avoid breaking UI #5496
Property types that are now skipped (at least in IFC4):
<type IfcArcIndex: <list [3:3] of <type IfcPositiveInteger: <type IfcInteger: <integer>>>>> ('list', 'integer')
<type IfcBinary: <binary>> binary
<type IfcComplexNumber: <array [1:2] of <real>>> ('array', 'float')
<type IfcCompoundPlaneAngleMeasure: <list [3:4] of <integer>>> ('list', 'integer')
<type IfcLineIndex: <list [2:?] of <type IfcPositiveInteger: <type IfcInteger: <integer>>>>> ('list', 'integer')
<type IfcPropertySetDefinitionSet: <set [1:?] of <entity IfcPropertySetDefinition>>> ('set', 'entity')
2024-09-26 18:40:52 +05:00
Andrej730 7d8ef3ffd0 Fix invalid IfcRevolvedAreaSolid representations with angle <360 deg
It was always assuming angle is 360 deg
2024-09-26 18:40:52 +05:00
Andrej730 ca5f083481 Fix error trying to tab into IfcRevolvedAreaSolid
by temporary not recognizing reprs with IfcRevolvedAreaSolid as a profile usage
2024-09-26 18:40:52 +05:00
Andrej730 a35304f1d5 lock_object to also lock scales and additional rotations
to indicate that they won't have an effect (or might break things)
2024-09-26 18:40:52 +05:00
Andrej730 c80c52c248 Allow editing poly curve representation items 2024-09-26 18:40:52 +05:00
Andrej730 dd516fb873 Support moving IfcConic representation items
Example - https://imgur.com/a/UDWxXWX
2024-09-26 18:40:52 +05:00
Andrej730 f8680503ef Add default values for IfcEllipseProfileDef 2024-09-26 18:40:51 +05:00
Andrej730 23389dcac0 Update ellipse profile just for consistency with 11deb95 2024-09-26 18:40:51 +05:00
Andrej730 8814d3a22b Lock all representation items that are not movable
Otherwise it was confusing that user can move item but when they exit item mode position was lost
2024-09-26 18:40:51 +05:00
Andrej730 340e8515f5 Fix error switching mode for multiple objects 2024-09-26 18:40:51 +05:00
Andrej730 22b9a8804d notes for loading indexed maps 2024-09-26 18:40:51 +05:00
Andrej730 341b97bce2 typing 2024-09-26 18:40:51 +05:00
Andrej730 24f66bbcb4 black . 2024-09-26 18:40:51 +05:00
Dion Moult a273c87e41 Fix #5416. Optimise item decorator and make decoration more subtle to make it easier to see the mesh. 2024-09-26 23:30:12 +10:00
Dion Moult b01471aa55 See #5491. Don't show items in front. 2024-09-26 23:28:47 +10:00
Dion Moult ebb7f0c8a9 Less in-your-face grid decorations that are easily selectable due to show in front 2024-09-26 23:21:44 +10:00
Ryan Schultz d581174513 Fix #5493: Bonsai, error when using , in drawing names and clicking on the drawing in the sheet part of UI. 2024-09-25 18:36:39 -05:00
Bruno Perdigão 41d5c391e1 Polyline wall - added top and bottom division lines to product preview. 2024-09-25 16:38:33 -03:00
csritter a8157e7dd6 Merge branch 'v0.8.0' into v0.8.0 2024-09-25 11:20:47 -03:00
Andrej730 4e33569851 ifc join to support joining 3d polyline curves 2024-09-25 19:09:15 +05:00
Andrej730 761795ccbf ifc join to show error message if joining is not supported
Example - https://i.imgur.com/5vsmJN8.png
2024-09-25 19:09:15 +05:00
Andrej730 95e9b8aeef Import representation items for curve representations too
https://i.imgur.com/TeITxa0.png
2024-09-25 19:09:14 +05:00
Andrej730 dd9de98290 Store edges representation item ids in Triangulation 2024-09-25 19:09:14 +05:00
Andrej730 aad66f94a3 rename addEdge overload to registerEdgeCount
So it won't be confused with addEdge that actually does add an edge to edges_.
2024-09-25 19:09:14 +05:00
Andrej730 6ac40b4ab3 typing 2024-09-25 19:09:14 +05:00
Dion Moult fce7b4416e Forgot to handle cases where no object is selected when adding a new element 2024-09-25 23:56:18 +10:00
Dion Moult 42f32e3418 Fix #5460. Assigning a class now uses the new add element mode internally. 2024-09-25 23:48:44 +10:00
Dion Moult 47581f2316 Hooray! New add element means we no longer do this silly "add cube" and delete when adding occurrences. 2024-09-25 23:47:18 +10:00
Dion Moult c68c621400 Loading and saving extrusion items now take into account georef cartesian point offsets 2024-09-25 23:03:06 +10:00
Andrej730 61151442cf Merge branch 'bonsai-bump-macos' into v0.8.0 2024-09-25 14:00:17 +05:00
Andrej730 7b36f93973 remove debug logging 2024-09-25 13:59:55 +05:00
Andrej730 5952ce8ed3 disable_item_mode - to set previously edited object as active
It seems very natural that after exiting item mode the edited item should become active (similar to how it works in edit mode).
2024-09-25 13:59:55 +05:00
Andrej730 3c309bbac8 load_indexed_colour_map - to support loading colors for rep items
Enter item mode for simple faceset cube was failing because this wasn't supported.
2024-09-25 13:59:55 +05:00
Andrej730 3e3b133c7b black . 2024-09-25 13:59:55 +05:00
Andrej730 0af2ab53a0 bonsai makefile update regex to keep track of x86_64 version automatically 2024-09-25 13:45:37 +05:00
Andrej730 700a453501 fix breaking bonsai builds - bump macos to 10.13 for python 3.12
Recently released Python 3.12.6 dropped support for Mac OS 10.9-10.12 - https://www.python.org/downloads/release/python-3126/

And Python 3.12.6 is the one that's used by compiled builds from now - in our case it was fonttools (used by ezdxf) that compiled binaries and it's using cibuildwheel which is also started using Python 3.12.6 as it's released.
2024-09-25 13:45:32 +05:00
Jason Hilton e45b41c04b fix: compile errors qt app
I was able to hardcode load an ifc file, by uncommenting the hard
coded parse ifcfile, but I was unable to open and load files with the
qt menu.
2024-09-25 10:22:14 +02:00
Dion Moult 86367e9c1f Loading and saving meshlike items now take into account georef cartesian point offsets 2024-09-25 17:46:59 +10:00
Dion Moult 9af9120dff Fix bug where switching representations didn't take into account georef cartesian point offsets 2024-09-25 17:46:15 +10:00
Dion Moult dc5e3d86b4 Lazy optimisation to prioritise styledbyitem instead of indexed maps. Allow blank data_index in case we have multiple rep items. 2024-09-25 13:00:14 +10:00
Daniel Bo Olesen 4472578915 Changed tools tips for commands. 2024-09-25 11:59:01 +10:00
Dion Moult 9ede6a693d See #5475. Fix quoting in dev script and default to Github repo. 2024-09-25 11:26:43 +10:00
Dion Moult 7584a40219 Fix #5483. Units is optional when loading. 2024-09-25 11:13:09 +10:00
Dion Moult 1d4f5de4a0 Fix #5475. Quote paths to accommodate spaces in dev setup. 2024-09-25 10:39:12 +10:00
dylcos fa92d3bd59 Update code_examples.rst
Replaced "product=wall" with "products=[wall]" in:
# Place our wall in the ground floor
ifcopenshell.api.spatial.assign_container(model, relating_structure=storey, products=[wall])
As code example fails otherwise
2024-09-25 09:36:25 +10:00
Bruno Perdigão d868eeb77d Updates on polyline decorator to match standard colors. 2024-09-24 17:30:34 -03:00
Bruno Perdigão 083a1e4074 Small fix in polyline decorator. 2024-09-24 13:55:14 -03:00
Bruno Perdigão ef5dc58b91 Fix some cases where wall joining were not working after they were created by polyline tool. 2024-09-24 13:47:21 -03:00
Bruno Perdigão c4232e7407 small fix on 36b4225b1 2024-09-24 11:40:47 -03:00
Andrej730 209c0fef57 restore lost code after a1d99b5 2024-09-24 19:30:17 +05:00
Andrej730 d4bc34dea7 ifc2sql - remove debug print statements 2024-09-24 19:30:08 +05:00
Andrej730 0ce92587bf ifc2sql - add test 2024-09-24 19:30:08 +05:00
Andrej730 56de208470 ifcopenshell.sql - add simple test 2024-09-24 19:30:08 +05:00
Andrej730 266416226b ifcopenshell.sql - repr for entities 2024-09-24 19:30:08 +05:00
Andrej730 810f42ea24 ifc2sql - clarify how output works in docs, add a suffix to temp file 2024-09-24 19:30:08 +05:00
Andrej730 21dd5054e6 ifcopenshell.sql - fix error in by_id method
it was fetching some random row from id_map instead of using ifc_id filter
2024-09-24 19:30:07 +05:00
Andrej730 08e221fe93 ifcopenshell.sql - garbage collection errors (same as fe1dff0191) 2024-09-24 19:30:07 +05:00
Andrej730 c7e97d06bd ifcopenshell.sql - fix error opening files similar to #5457 2024-09-24 19:30:07 +05:00
Andrej730 46cc3a449a ifcopenshell.sql - handle non existing files
previously it would create an empty database and give a confusing error "AssertionError: SQLite schema not supported."
2024-09-24 19:30:07 +05:00
Andrej730 9e86d83616 ifcopenshell.sql - typing 2024-09-24 19:30:07 +05:00
Andrej730 2829b7daf6 ifcopenshell.stream - remove unrelated code from ifcopenshell.sql 2024-09-24 19:30:07 +05:00
Andrej730 86ec618327 ifcopenshell.stream - add simple test 2024-09-24 19:30:07 +05:00
Andrej730 9a23daf7b3 stream - add support of crlf files 2024-09-24 19:30:07 +05:00
Andrej730 4e3d6f1773 typing 2024-09-24 19:30:07 +05:00
Andrej730 7045fba9c0 black . 2024-09-24 19:30:00 +05:00
Bruno Perdigão 36b4225b18 Warning messages for prohibit cases when inserting polyline points 2024-09-24 10:55:59 -03:00
Bruno Perdigão b05e6cf71a Small fix 2024-09-24 10:55:54 -03:00
myoualid 7692b910f4 loading multiple cost schedules in the web ui is now more responsive, clean up and organise css code #5369 2024-09-24 12:13:18 +01:00
Thomas Krijnen 0c70d4c828 Manually detect facet boundary intersections before triangulation #5470 2024-09-24 13:09:30 +02:00
Thomas Krijnen 11deb955f8 Fix ellipse major < minor workaround #5470 2024-09-24 13:09:30 +02:00
Dion Moult 036754ea20 Bump IOS to OCC 7.8.1 2024-09-24 18:50:07 +10:00
Thomas Krijnen 2557fcf628 Do let cgal handle planar adv brep #4915 2024-09-24 08:54:52 +02:00
Dion Moult 4bee80edc5 Optimise array setup during load 2024-09-24 15:31:55 +10:00
Dion Moult d1c4a0a415 Check walls first for false origin guessing for speed, checking one object seems to be enough 2024-09-24 15:31:37 +10:00
Dion Moult f92a02cfcb Fix regression in speed in collection assignment
As hinted in the TODO note for linking collections safely, try-catch is actually much faster. This brings it to 10% faster than 0.7 speeds. Previously the regression made it 10x slower.
2024-09-24 14:54:25 +10:00
Dion Moult ff5c402750 Optimisation for not iterating through things with no representations
Iterator initialise can take a few seconds on large models even though you're just doing a few elements which have no representations.
2024-09-24 14:54:25 +10:00
Bruno Perdigão 2151035afd Small fix in Raycast function ray_cast_by_proximity. 2024-09-23 22:46:36 -03:00
Bruno Perdigão cc11c43240 Fix raycast to detect objects with partial visibility in the scene. 2024-09-23 22:37:37 -03:00
Bruno Perdigão 7339325cc9 Fix #5464 2024-09-23 22:25:28 -03:00
Bruno Perdigão 3c2a0c9bf3 Fixed issue with polyline inserting point at world origin (0, 0, 0). 2024-09-23 17:13:57 -03:00
Bruno Perdigão 98d767988e Added support to snap on empty objects. 2024-09-23 17:04:42 -03:00
myoualid 7b2a30e5b7 web-ui: fix classifications file navigation 2024-09-23 20:41:26 +01:00
myoualid 455012de4c cost web ui:
- add "Linked rate" column,
- assign a cost rate to multiple cost items by selecting linked rate cells & clicking the "assign" button on the chosen cost rate
#5369
2024-09-23 20:19:06 +01:00
Andrej730 ab8a6b80e4 debug module - remove unnecessary ifc operators 2024-09-23 19:33:36 +05:00
Andrej730 acd1b165f8 bim.create_shape_from_step_id to support different geometric libraries 2024-09-23 19:33:29 +05:00
Andrej730 fe1dff0191 ifcopenshell.stream - fix garbage collection errors
Mentioined in #5457

Errors such as:
Exception ignored in: <function file.__del__ at 0x7f4cfcc9f920>
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/ifcopenshell/file.py", line 284, in __del__
    del file_dict[self.file_pointer()]
                  ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/ifcopenshell/file.py", line 444, in __getattr__
    return getattr(self.wrapped_data, attr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'file_pointer'
2024-09-23 19:33:28 +05:00
Andrej730 08bba92b2e fix opening ifc files with streaming #5457 2024-09-23 19:33:28 +05:00
Andrej730 7e6be53237 Improve error messages for shapes failed to process
Example error messages now:

RuntimeError: Failed to process shape. Product: #3855=IfcSite('3ZGD7y6S5209$mGLi_sPll',#20,'Surface:411452',$,$,#3854,#3850,$,.ELEMENT.,(42,12,46,799999),(-71,-2,0,-599999),0.,$,$), representation: #3849=IfcShapeRepresentation(#93,'FootPrint','Curve2D',(#3841,#31427,#31471,#45600,#45628))

RuntimeError: Failed to process shape. Instance: #3841=IfcPolyline((#3800,#3801,#3802,#3803,#3804,#3805,#3806,#3807,#3808,#3809,#3810,#3811,#3812,#3813,#3814,#3815,#3816,#3817,#3818,#3819,#3820,#3821,#3822,#3823,#3824,#3825,#3826,#3827,#3828,#3829,#3830,#3831,#3832,#3833,#3834,#3835,#3836,#3837,#3838,#3839,#3840,#3800))
2024-09-23 19:33:28 +05:00
Andrej730 c6c9f400d3 BBIM Parametric psets - show warning when user edits them manually
as they are not intended to be edited manually but through the special ui

example - https://i.imgur.com/nsuy0I0.png
2024-09-23 19:33:28 +05:00
Andrej730 2b35e5fb91 Make parametric doors/windows available for ifc2x3 2024-09-23 19:33:28 +05:00
Andrej730 e7dd186349 Fix roof tooltip in templates 2024-09-23 19:33:27 +05:00
Andrej730 0091f5c09b Simplify spatial elements sorting 2024-09-23 19:33:27 +05:00
Andrej730 c33e2fc689 Fix #5320 2024-09-23 19:33:27 +05:00
Andrej730 df055cefd4 typing 2024-09-23 19:33:27 +05:00
Andrej730 65f9a745a3 black . 2024-09-23 19:33:27 +05:00
Thomas Krijnen a51ed6e6b3 Fixes for using hybrid kernel on non-products #5443 2024-09-23 16:18:00 +02:00
Gorgious56 aaf5fde92e Fix error when the "Add Parametric Window" button is drawn 2024-09-23 16:03:34 +02:00
Thomas Krijnen 0389f1e984 Make cgal implementation a little bit less confident #5453 2024-09-23 16:03:10 +02:00
Dion Moult 84ceb11584 Minor fix 2024-09-23 23:55:15 +10:00
Dion Moult 0426c8e115 Adding an occurrence of a non-geometric type now lets you choose the type of geometry to add 2024-09-23 23:49:34 +10:00
Thomas Krijnen a9ca4e7366 Mark status when parsing is terminated 2024-09-23 15:24:28 +02:00
Thomas Krijnen e4d1118124 Manually write out if-statements instead of visit with if-constexpr #5444 2024-09-23 15:10:37 +02:00
Gorgious56 f2efa53fdf Fix #5456 : Unbound variable error when no snap decorator is drawn 2024-09-23 11:34:35 +02:00
Dion Moult 23db38d0e9 Finally, a way to actually add an IFC element directly
Previously, the way to add an IFC element would be to 1) create a blender element then assign or 2) activate bim tool, launch type manager, click create type, fill out field, or 3) using various menus for parametric stuff like stairs. This is now the new proposed way to do things and everything will consolidate to here - and it allows you to directly create non-mesh geometry immediately too!
2024-09-23 18:21:44 +10:00
Dion Moult 194acb078c See #3707. See #5445. Type now launches type manager, and type manager icons are clickable.
Previously you could either use the dropdown, or launch the type manager, but now they are one and the same, and more inuitive to click icons.
2024-09-23 18:18:44 +10:00
Dion Moult c30ac2d061 Slightly more accurate loading time to include initialisation time 2024-09-23 18:14:52 +10:00
tim 621393e67a Toggle openings typo 2024-09-23 18:13:24 +10:00
tim 2386b935aa Toggle openings icons
renamed png files to match operator name
2024-09-23 18:13:24 +10:00
tim 0071fa515a Apply void icons
This is a temporary fix
2024-09-23 18:13:24 +10:00
Thomas Krijnen 154059126c Update build-all.py - reset --hard before checkout 2024-09-23 09:16:24 +02:00
Thomas Krijnen 4c048e4695 Update face.cpp - snail artefact on 7.8 as well #4924 2024-09-23 09:12:10 +02:00
Thomas Krijnen 4ce3413cdf Update build-all.py - fetch before checkout 2024-09-23 06:52:49 +02:00
myoualid 33d8ecdc8b smart copy paste option for cost schedules in web ui - #5369 2024-09-23 03:21:15 +01:00
myoualid 193daff617 web-ui: enable assigning parametric quantities from queries #5369 2024-09-23 02:21:15 +01:00
myoualid 9f542c30b3 cost module web ui:
- add setting options to hide/show columns
- Cost classification column
- New Cost Classification Form to display active classification library, add/delete classification references
2024-09-22 20:00:09 +01:00
Manu Varkey a053472558 Fixes #5320 2024-09-22 22:19:49 +10:00
Dion Moult 14fe3e6150 Rewrite mode switching from object to item to edit modes 2024-09-22 22:17:07 +10:00
mrfcoelho df494a3def Update create_model.rst
Fix minor typo
2024-09-22 08:32:20 +10:00
mrfcoelho ff7c7932e1 Update installation.rst
Fix broken link
2024-09-22 08:32:06 +10:00
Dion Moult 9ea44f0a89 You can now add new swept area solid items 2024-09-21 21:27:17 +10:00
Dion Moult ce010f1e56 You can now add new mesh representation items 2024-09-21 16:34:41 +10:00
Dion Moult 2a8d43c42c Basic editing of item attributes implemented 2024-09-21 14:27:17 +10:00
tim ef412c36c6 Cancel and Apply buttons (#5435)
* Cancel button added back in, Green apply replaced with CHECKMARK

* 2-point arc icon added

---------

Co-authored-by: tim <tjrhyder@gmail.com>
2024-09-21 13:48:33 +10:00
myoualid 8c4ab5bf03 enable displaying schedule of rates - web ui ref #5369 2024-09-21 00:16:11 +01:00
Thomas Krijnen e0095cd446 occt 7.8.1 #4924 2024-09-20 20:49:22 +02:00
Gorgious56 ea3f5cea1f Fix parametric stairs not appearing in the type manager templates 2024-09-20 20:26:03 +02:00
Andrej730 a3c0523fbd Fix #5432 2024-09-20 22:56:59 +05:00
Andrej730 c819368445 code_style.rst - some notes on black formatting 2024-09-20 22:11:15 +05:00
Andrej730 287f08dc7b bim.print_unused_elements_stats to ignore IfcIndexedTextureMap 2024-09-20 22:03:20 +05:00
Andrej730 5ce9d21dff Purging styles to also purge associated blender materials #3914 2024-09-20 22:03:19 +05:00
Andrej730 d4df21c4be ifcopenshell.util.shape.get_normals 2024-09-20 22:03:19 +05:00
Andrej730 95e76c3ab9 bsdd classes - typing for not required attributes 2024-09-20 22:03:19 +05:00
Andrej730 18476ec7f3 bsdd - update classes according to the latest API
Also added yml_to_classes.py script that can extract the classes automatically
2024-09-20 22:03:19 +05:00
Andrej730 aeeae7365f load bsdd classes recursively if query fetches more than 100 items
previously it would just hit the limit 100 and stop
2024-09-20 22:03:19 +05:00
Andrej730 9953ce1b39 typing 2024-09-20 22:03:19 +05:00
Andrej730 d7adec3d54 black . 2024-09-20 22:03:19 +05:00
myoualid e0e9892ff0 cost module web-ui:
- remove Blender operators in favor of ifc.api functions
- replace BonsaiBIM Data class dependency with new ifc5D2json script
- enable viewing multiple cost schedules
- add Identifaction column
ref #5369
2024-09-20 16:26:40 +01:00
tim e8f66abf17 New and updated icons for CAD and BIM workspace
* Updates to some icons, new icons added for CAD tools, and new layout for CAD tools

* updates to icons

* WIP changes to BIM Tool UI

* Separated BimToolUI,  added Draw wall icon

Separated BimToolUI into AddElementUI and ModifySelectedUI classes, added Draw wall icon

* Voids back in UI

* WIP UI tools and icons

partial support for draw wall tool added

* 40d95c294 WIP UI tools and icons

Minor tweaks

* WIP on profile-axis-ui

* WIP on profile-axis-ui

* Added Merge, Split, Rotate, and Flip back into wall edit tools

* Separators added

* Restore commented out code in CAD workspace.py

---------

Co-authored-by: tim <tjrhyder@gmail.com>
Co-authored-by: Dion Moult <dion@thinkmoult.com>
2024-09-20 22:16:40 +10:00
mrfcoelho 560983c6b8 Update interface.rst
Add minor tip to be able to see all the workspaces when the screen size is small.
2024-09-20 21:55:06 +10:00
Gorgious56 07291022b4 Fix purging types in the type manager not working. The purge button is now in a menu for a cleaner interface and avoiding accidentally clicking on it when opening the type manager. 2024-09-20 12:09:55 +02:00
Andrej730 6d94871683 Attribute.data_type -> EnumProperty (+typing) 2024-09-20 13:17:41 +05:00
Andrej730 774db8e997 sort wheel files list in manifest 2024-09-20 13:17:27 +05:00
Manu Varkey 31d49a7bbc Update drawing shadow settings for consistentency 2024-09-20 18:10:26 +10:00
Dion Moult 542ae6b44a Basic support for editing swept profiles and positions 2024-09-20 18:08:16 +10:00
Gorgious56 c1a92bf1f3 Fix #5398 : Only show relevant parametric templates in the type manager. Also fix forgotten line in previous commit. 2024-09-20 09:58:26 +02:00
Gorgious56 a8abc8e379 Fix #5333 : Searching for the class name using the looking glass button doesn't close the type manager anymore. 2024-09-20 09:53:00 +02:00
Andrej730 4f64d044ac Option to assign non-ifc bsdd properties #5404
Example - https://imgur.com/a/cPtEkX2

Also Attribute now has additional field "metadata" for storing some case specific data
2024-09-20 12:34:27 +05:00
Andrej730 1f4d973a79 black . 2024-09-20 12:34:26 +05:00
Dion Moult bfd5b3c1c7 Increase websocket server limit from 1MB to 10MB to allow for larger datasets like large work schedules. 2024-09-20 17:03:46 +10:00
Dion Moult 8866a34f22 Fix #5408. Use an angular tolerance of 0.1 degrees to determine if something has moved and need resyncing. 2024-09-20 17:03:00 +10:00
Andrej730 669d88fbb1 sequence - fix all import operators missing Ifc operator #5423 2024-09-20 11:14:34 +05:00
Andrej730 7470fb0786 sequence - remove unnecessary Ifc operators 2024-09-20 11:14:34 +05:00
Andrej730 b6fca3916e assigning process to control - add an error message 2024-09-20 11:14:34 +05:00
Andrej730 5373c7ee9e sequence import/export - add info message when operator finished 2024-09-20 11:14:34 +05:00
Manu Varkey f708d9cb4d Support natural sorting of types closes #5050 2024-09-20 09:20:03 +10:00
Andrej730 f1f055d19d Restore missing dev docs after 53d7624 2024-09-19 18:56:45 +05:00
Andrej730 e175de5365 Fix misleading docs urls after 53d7624 2024-09-19 18:56:45 +05:00
Andrej730 31befd424b Fix documentation missing dev env scripts
Mentioned in #5398
2024-09-19 18:56:45 +05:00
Andrej730 394b24ddfe More realistic test for ca8577a8dd 2024-09-19 18:24:37 +05:00
Andrej730 f184ce5386 Support de08d3726e for ifc2x3 #5420 2024-09-19 18:13:14 +05:00
Andrej730 b7d725254d Temporarily revert 51211dc527 to fix broken bonsai builds #4924
Need to not to forget to revert a revert later...
2024-09-19 17:30:10 +05:00
Andrej730 c9f9cf89e8 file -> import/export - add poll messages in case ifc is not loaded 2024-09-19 17:21:51 +05:00
Andrej730 fb6d2b8de2 pp2ifc - preserve original ids
Now we're going to use bar ids instead their detalization ids (e.g. expanded task ids, task ids, milestone ids) because it is the way how it works in the software pp file originates from.
2024-09-19 17:21:51 +05:00
Andrej730 ddca950f65 pp2ifc - save calendar identification for pp file to ifc 2024-09-19 17:21:51 +05:00
Andrej730 96756d63d4 pp2ifc refactor and add support for more languages #5417 2024-09-19 17:21:50 +05:00
Andrej730 a5b3c9beb4 black . 2024-09-19 17:21:50 +05:00
Gorgious56 1974974071 Fix #5410 : bim.enable_adding_presentation_style no longer throws an error in a file with no ifc project when launching the search operator (F3) 2024-09-19 14:03:56 +02:00
Manu Varkey 4225643bc0 Disable blf shadow setting after use. Fixes #5387 2024-09-19 21:49:58 +10:00
Dion Moult 4b7bb1533e Fix #5394. Fix bug when switching fillings where the current representation was not the body representation. 2024-09-19 16:25:33 +10:00
Dion Moult d3fdbf4dae (Un)Bump IOS - downgrade due to critical bugs with OCC 7.7 2024-09-19 11:12:11 +10:00
Dion Moult 5d0fb18ea1 Fix #5395. Apparently wheels exclude directories with no files in them, so the cache folder wasn't shipped. 2024-09-19 10:59:32 +10:00
myoualid 45708ee287 Cost module web UI:
- quick button to add a SUM cost value
- style improvements
2024-09-18 20:34:31 +01:00
Thomas Krijnen 116a0f1a02 Add test 2024-09-18 19:28:55 +02:00
Thomas Krijnen 2554280e50 triangulation-type setting for non-triangulated polyhedral from iterator 2024-09-18 19:28:07 +02:00
Andrej730 748fcce3f5 Adding classification reference tests 2024-09-18 18:44:34 +05:00
Andrej730 5b2733bb3c add classification reference from bsdd - support ObjectType
it seems in bsdd some ObjectType is also provided using "undefined_set" pset
example - https://identifier.buildingsmart.org/uri/ifcairport/ifcairport/1.0/class/ifcairport0000000004
2024-09-18 18:44:34 +05:00
Andrej730 115a48fc1a bsdd - fix bug when loading pset would set properties in incorrect way
It was using name instead of propertyCode which was leading to assigning incorrect properties...
2024-09-18 18:44:34 +05:00
Andrej730 06d927f8bb bsdd operators descriptions and naming 2024-09-18 18:44:34 +05:00
Andrej730 de08d3726e Bonsai - set active bsdd when loading project
When loading an ifc project it will search it for bsdd ifcclassifications and will set one as active if finds it, so now it will be a bit more convenient working with bsdd classification assignment as it active bsdd previously was always getting reset when you reload ifc file.

Example - https://imgur.com/a/stlJqwm
2024-09-18 18:44:34 +05:00
Andrej730 4dbfeefe53 Fix UI errors getting elements using qset in IFC2X3
In IFC2X3 IfcQuantitySet didn't existed yet
Mentioned in #5404
2024-09-18 18:44:33 +05:00
Andrej730 eb823a5ecd bsdd search to check whether query is long enough
It's an API requirement and using shorter queries was giving confusing results.
https://github.com/buildingSMART/bSDD/blob/master/Documentation/bSDD%20OpenAPI.yaml
2024-09-18 18:44:33 +05:00
Andrej730 8f7949808a Move id to IfcGeom::Representation::Representation and document it
as it's a common attribute for all 3 Representation subclasses we have
2024-09-18 18:44:33 +05:00
Andrej730 5860c3fe50 black . 2024-09-18 18:44:33 +05:00
Dion Moult dbfa4ecf65 Fix minor regression in fe0be0c 2024-09-18 22:58:22 +10:00
Dion Moult 1320eac800 Switch representation now cleans up orphaned meshes itself so callers don't need that responsibility 2024-09-18 22:58:22 +10:00
ArturTomczak 81e4ad2ce2 handle numeric simpleValue (#5376)
The input value can be a string or number, but 1.0 schema only accepts strings. The processing of int and float was missing. The casting to string might no longer be needed in IDS 1.1. https://github.com/buildingSMART/IDS/issues/342
2024-09-18 21:42:31 +10:00
Dion Moult 736d91f38e Shape builder now supportes meshy things and faceted breps 2024-09-18 21:35:40 +10:00
Dion Moult a1d99b544a Basic support for deleting items, and editing meshlike items 2024-09-18 21:35:40 +10:00
Dion Moult ed530f737c Remove deprecated code for fixed bug #2002. 2024-09-18 21:35:40 +10:00
Dion Moult 0899a2a87b Fix bug where switching geometry may not correctly share representations 2024-09-18 21:35:40 +10:00
Thomas Krijnen 3bdbb3d513 Don't import cwd ifcopenshell folder when running tests 2024-09-18 11:35:24 +02:00
Andrej730 e22ec57e16 Fix #5409 2024-09-18 13:56:06 +05:00
Dion Moult 9b06797efa Fix crash when removing representation item with removed inverses 2024-09-18 17:35:51 +10:00
Dion Moult 96ba8e8e29 Fix bug where dissolving edges created corrupted geometry for advanced breps with curved surfaces 2024-09-18 17:34:41 +10:00
Bruno Postle 6e9e270683 IfcGit don't switch colouring so much closes #5402
Viewing changes necessarily sets object colours and switches the
viewport to object colouring.  Previously most other operations switched
the viewport 'back' to material colouring. This was an annoyance for
users whose workflow makes use of manual object colouring.

Now only operators that reload the model (revert, switch and merge), the
refresh button, and attempting to view changes with the current revision
switch to material colouring.
2024-09-17 23:34:04 +01:00
Andrej730 53a6192858 Skip loading mappings if representation has openings #5405
To avoid errors
2024-09-17 18:25:59 +05:00
Andrej730 2a2efefac3 IfcSchema declaration_by_name to be safe
Couldn't find if we actually use it anywhere in the code but better to keep it safe, especially because it's exposed to Python and by accident user might provide some too bit integer instead of a string.
2024-09-17 16:28:02 +05:00
Andrej730 a7cac5c77b IfcWrap cmake - regenerate .py and .cxx on changes in ifcopenshell libs
Previously they wouldn't be regenerated unless you edit .i files or manually remove .py/.cxx.
2024-09-17 16:28:01 +05:00
Andrej730 1575696a8b ifcwrap cmake - use default CMP0078 policy
Something weird happened during merge in 7d90c31 and changes from 0055a5d were not applied
2024-09-17 16:28:01 +05:00
Thomas Krijnen 555eb44f00 Add IfcAlignmentSegments to XML output 2024-09-17 13:07:33 +02:00
Thomas Krijnen 0b555b30d2 Add IfcAlignmentSegments to XML output 2024-09-17 13:03:25 +02:00
Andrej730 06f14774f7 Avoid more unnecessary calls to docs api
Noticed that prop_value could be other types besides str (e.g. int when using context menu on UIList item) and we can skip them to avoid redundant api calls.
2024-09-16 18:54:13 +05:00
Andrej730 11ddcb0256 IfcSchema declaration_by_name to use size_t instead of int
By accident noticed that `declaration_by_name(-1)` crashes python. If we use size_t it will just throw an error like below

NotImplementedError: Wrong number or type of arguments for overloaded function 'schema_definition_declaration_by_name'.
  Possible C/C++ prototypes are:
    IfcParse::schema_definition::declaration_by_name(std::string const &) const
    IfcParse::schema_definition::declaration_by_name(size_t) const
2024-09-16 18:54:13 +05:00
Andrej730 0d77ff5270 remove debug code 2024-09-16 18:54:13 +05:00
Andrej730 c75fa70d23 Support for loading face colors from ifc (IfcIndexedColourMap)
example - https://imgur.com/a/l8Yn4Rr
2024-09-16 18:54:13 +05:00
Andrej730 6d8ffc27cc ifcopenshell.util.shape.get_material_colors 2024-09-16 18:54:13 +05:00
Andrej730 531327578f bim.print_unused_elements_stats - to skip colour map 2024-09-16 18:54:12 +05:00
Andrej730 6a47e68b78 fix typo 2024-09-16 18:54:12 +05:00
Andrej730 5ec10018d9 bim.purge_unused_elements_by_class - skip IfcRepresentationContext 2024-09-16 18:54:12 +05:00
Andrej730 ec0094ef33 bim.purge_unused_elements_by_class - keep list sorted 2024-09-16 18:54:12 +05:00
Andrej730 a2c2cf65a1 bim.purge_unused_elements_by_class - make filepath argument optional 2024-09-16 18:54:12 +05:00
Andrej730 cfd63392e7 Add to recent projects when project is saved 2024-09-16 18:54:12 +05:00
Andrej730 0891df5d6c typing 2024-09-16 18:54:12 +05:00
Bruno Postle cf95c9151c black formatting after 71de39e 2024-09-15 17:34:44 +01:00
Bruno Postle 71de39ea7c Recover external git repo changes, fixes #5311
IfcGit didn't cope gracefully when commits and/or repositories vanished
unexpectedly
2024-09-15 17:24:36 +01:00
Andrej730 c487643d76 ifcgit - fix errors if paths are mixing up slashes and backslashes
`repo.path` is always setup using current platform type of slashes since it's normalized by get_path_dir but when we pass a path to index.add it's not normalized leading to errors
2024-09-14 11:41:58 +05:00
Andrej730 6dbfb3afb3 black format 2024-09-14 11:41:58 +05:00
Bruno Perdigão aa3a362391 Fixed issue in polyline tools where orbit and pan where not updating the ray cast. 2024-09-13 17:35:08 -03:00
Bruno Perdigão a2cf95038a Custom snap symbols #5325. 2024-09-13 17:34:08 -03:00
Bruno Perdigão 96f3ee2f3a Added text background to polyline measurements. 2024-09-13 15:38:05 -03:00
Bruno Perdigão 1659498c88 Fix 'C' to trigger wall preview 2024-09-13 14:08:18 -03:00
Bruno Perdigão a992844e93 Fix enter to trigger wall preview 2024-09-13 13:50:27 -03:00
Bruno Perdigão 59b665758d Colors update in polyline decorators. 2024-09-13 12:38:35 -03:00
Bruno Perdigão 4dc8a27e82 Fix on polyline wall preview when dealing with closed loops. 2024-09-13 12:38:35 -03:00
Bruno Perdigão e83bdcc820 Polyline tool - Wall preview is now working for angled walls. 2024-09-13 12:38:35 -03:00
Bruno Perdigão 7ea3d63aa0 Small fix to clear wall preview when deleting all polyline points. 2024-09-13 12:38:35 -03:00
Bruno Perdigão bd51363532 Small fix related to trying to use polyline wall without wall type. 2024-09-13 12:38:35 -03:00
Bruno Perdigão d4ccc0dff9 More fixes related to d5b20397a 2024-09-13 12:38:35 -03:00
Bruno Perdigão 66fe2331ef fix rebase conflict 2024-09-13 12:38:31 -03:00
Bruno Perdigão b7c4f1a1f0 Minor fix in polyline decorator variables initialization. 2024-09-13 12:37:45 -03:00
Bruno Perdigão c2cf8cd7dd Fix bug in polyline tool when "=" were pressed before "TAB". 2024-09-13 12:37:45 -03:00
Bruno Perdigão efcaf14fbb fix rebase conflict 2024-09-13 12:37:39 -03:00
Bruno Perdigão bc884c9dc4 fix rebase conflict 2024-09-13 12:35:50 -03:00
Andrej730 c340f496f2 swizzle material and style purging operators
purging material should come first as it may unlock purging more styles
2024-09-13 18:50:54 +05:00
Andrej730 b8aefe7df0 geometry.unassign_representation - fix missing ifc2x3 tests 2024-09-13 18:50:54 +05:00
Andrej730 8061e22480 geometry.unassign_representation to remove shape aspects
previously it was leaving unused shape aspects unconnected to any other elements, now it will purge them
2024-09-13 18:50:54 +05:00
Andrej730 aa289fd796 purge unused materials to consider IfcMaterialLists #3914
and IFC2X3 material sets and layers
2024-09-13 18:50:54 +05:00
Andrej730 b911b68aec typing 2024-09-13 18:50:54 +05:00
Andrej730 80af847f99 purge unused material to try to purge materials recursively #3914
As on first iteration it may remove only unused material sets and on the next iteration it will be able to remove IfcMaterials that were not used anywhere else besides those material sets.
2024-09-13 15:15:51 +05:00
Andrej730 4d149e8a78 Purge unused materials to consider materials with styles and psets #3914
If material has a style or a pset it creates an inverse that shouldn't prevent material from being purged.
2024-09-13 15:15:51 +05:00
Andrej730 c41a4607d1 Fix missing return values in e5a59d0bea 2024-09-13 15:15:50 +05:00
Andrej730 148f8361be make bump - show an error for incorrect use 2024-09-13 15:15:50 +05:00
Thomas Krijnen d879bf9f89 Reintroduce --model-offset/-rotation MODEL_OFFSET/_ROTATION setting #5231 2024-09-13 11:38:24 +02:00
Andrej730 81399ffd19 Support loading project without clearing Blender session
It wasn't working anymore after 27a2c94. Importing IFC file as just geometry should be a separate option from 'should_start_fresh_session' and I've added it as 'import_without_ifc_data' property during project load (now both options are also available for users in project load dialog - https://i.imgur.com/Fvbv4Dy.png)
2024-09-13 11:47:49 +05:00
Thomas Krijnen 21cfd03301 Merge pull request #5362 from IfcOpenShell/fix-ifccircle-ifcellipse-processing
Fix error processing IfcCircle/IfcEllipse #5352
2024-09-12 20:19:17 +02:00
Thomas Krijnen 1697e49e65 Merge branch 'v0.8.0' into fix-ifccircle-ifcellipse-processing 2024-09-12 20:18:57 +02:00
Andrej730 51211dc527 ifcopenshell makefile - use VERSION 2024-09-12 19:19:11 +05:00
Andrej730 806975c4b9 bump ifcopenshell build for bonsai 2024-09-12 19:07:20 +05:00
Andrej730 e3c23072a5 Hide edit mode for locked elements #5371 2024-09-12 18:40:22 +05:00
Andrej730 d34d3312ba Add messages for operations with locked elements
Otherwise they just silently failing leaving user confused
2024-09-12 18:40:21 +05:00
Andrej730 845402ea9c Replace grids/space elements visibility two toggles with one
See - https://i.imgur.com/5GssIDp.png (same for grids)
2024-09-12 18:40:21 +05:00
Andrej730 e5a59d0bea remove unnecessary ifc operators 2024-09-12 18:40:21 +05:00
Andrej730 3bb4243850 Purge unused styles and materials #3914
Example - https://imgur.com/a/JXEofa1
2024-09-12 18:40:21 +05:00
Andrej730 094bbe6913 bim.override_origin_set to reuse descriptions from blender operator 2024-09-12 18:40:20 +05:00
Andrej730 0f6cc7326c bim.add_proposed_prop - document possible property types 2024-09-12 18:40:20 +05:00
Andrej730 cc90c92dec bim.add_proposed_prop to show error message if property already exists 2024-09-12 18:40:20 +05:00
Andrej730 e81fe60218 CMakeLists - fix issue on msvc >= 14.40 #5158 2024-09-12 18:40:20 +05:00
Andrej730 aa97ff7f16 typing 2024-09-12 18:40:20 +05:00
Andrej730 2168b3b7bd black format 2024-09-12 18:40:20 +05:00
Andrej730 cb21f9bc07 taxonomy::cast - order upgrades in the same order as in taxonomy::dcast for consistency 2024-09-12 16:30:06 +05:00
Andrej730 f930897240 taxonomy::dcast - add missing curve_to_loop_upgrade 2024-09-12 16:30:05 +05:00
Andrej730 93c47498ef AbstractKernel::dispatch_conversion - use static cast
Previously it was using taxonomy::cast that was also trying to upgrade current item - due to the strictness of dispatch_conversion (it works only if type matches exactly because of `N == item_kind`) upgrades will never succeed so we may just skip them.
2024-09-12 16:30:05 +05:00
Thomas Krijnen 2545769f67 Add support for IfcSectionedSurface 2024-09-12 11:20:48 +02:00
Ryan Schultz 35a4d87a65 give schedules a css style called 'schedule' to help with styling 2024-09-11 23:06:43 -05:00
Thomas Krijnen c7183a58ea aggregate of int/real compatibility in parsing #5302 2024-09-11 20:15:14 +02:00
Thomas Krijnen 5a44a8e325 Defensiveness against invalid data 2024-09-11 20:13:50 +02:00
myoualid f5e02d1413 Merge branch 'v0.8.0' of https://github.com/IfcOpenShell/IfcOpenShell into v0.8.0 2024-09-11 19:00:27 +01:00
myoualid 1964def3ca web ui cost module features:
- improve UI for editing cost quantites
- add, edit, delete manual quantities
2024-09-11 19:00:15 +01:00
Thomas Krijnen cc2017518b Update build-all.py : _ifcopenshell_wrapper now called ifcopenshell_wrapper? 2024-09-11 19:58:52 +02:00
myoualid 97393eb173 prevent spatial elements selection from being assigned to cost control 2024-09-11 18:48:59 +01:00
Andrej730 4c04bc7cb5 fix test_create_IfcBSplineCurve 2024-09-11 19:42:47 +05:00
Andrej730 005c17084b dispatch_with_upgrade to use only upgrade types for optimization 2024-09-11 19:42:47 +05:00
Andrej730 858e57351e AbstractKernel::convert - more generic approach 2024-09-11 19:42:47 +05:00
Andrej730 9be392e2f1 test TesselateElements #5199 2024-09-11 16:02:48 +05:00
Andrej730 f4c3ceb693 black format 2024-09-11 16:02:48 +05:00
Andrej730 32c6ea9363 shapebuilder.profile - fix bug in ifc2x3 assigning non existing Position attr
confused arbitrary profiles with parametric profiles in 640320f
2024-09-11 16:02:48 +05:00
Andrej730 ad8131114d IfcLine, IfcBSplineCurve geometry tests 2024-09-11 15:53:04 +05:00
Andrej730 fe0be0cdae shape_builder.create_axis2_placement_2d 2024-09-11 15:53:04 +05:00
Andrej730 35221ed772 AbstractKernel::convert to use upgrade to edge as a fallback 2024-09-11 15:53:04 +05:00
Andrej730 37315e941a taxonomy.h - move upgrades code to cpp 2024-09-11 15:53:04 +05:00
Andrej730 11f017e715 revert manual upgrade to edges for ellipses and circles 2024-09-11 15:53:04 +05:00
Thomas Krijnen c63f1cfa88 Iterator: Don't crash on calling get() before initialize() 2024-09-11 11:18:09 +02:00
Dion Moult 5fe85e71bb Work in progress example to import multiple representation items as an object-based breakdown 2024-09-11 18:04:03 +10:00
Dion Moult f8f3519a68 Minor bugfix to allow unaggregation of hidden elements 2024-09-11 13:45:11 +10:00
Dion Moult bad6931a84 Fix bug in tessellate elements 2024-09-11 12:26:39 +10:00
myoualid 158f11d58c Cost web ui improvements:
- hovering cost item row displays quick actions
- clicking the quantity cells and cost cells prompts form to edit values
- further style improvements & refactoring
2024-09-10 22:48:22 +01:00
Bruno Perdigão 794154f6f5 Instructions in polyline tools were moved to the status bar.
Previously the instructions were shown on screen with decorators. Now it is handled by the modal function of the polyline tools.
2024-09-10 15:41:02 -03:00
Bruno Perdigão c06929e1c7 Major refactor in polyline tool to use a base class for other operators.
Polyline Wall and Measure tool now share most of the logic by inheriting from a base class PolylineOperator.
This should facilitate the implementation of other tools that use polyline.
2024-09-10 15:37:57 -03:00
Bruno Perdigão 1a587dea7d Minor refactor of tool/polyline 2024-09-10 15:37:57 -03:00
Bruno Perdigão 55df9a42e6 WIP - More refactor 2024-09-10 15:37:57 -03:00
Bruno Perdigão be8b325a83 WIP - Polyline tool refactor 2024-09-10 15:37:57 -03:00
Bruno Perdigão 2e192034f8 Small tweak in 8032e4851 2024-09-10 15:37:57 -03:00
Bruno Perdigão ce8e104b0b Change snap axis to 15 angles increments. 2024-09-10 15:37:57 -03:00
Bruno Perdigão e48050af4b Fix #5336 2024-09-10 15:37:57 -03:00
Bruno Perdigão d63961d840 Small fix on previous commit 2024-09-10 15:37:57 -03:00
Bruno Perdigão edf0804b0e Small fix on how the input UI rounds numbers 2024-09-10 15:37:57 -03:00
Bruno Perdigão aaa3d5c443 Small fix on previos commit 2024-09-10 15:37:57 -03:00
Bruno Perdigão 2008081d9a Implementation of #5317.
The number in the input UI will be replaced if the user presses a number.
This behavior will be different if the user press "=" or backspace.
2024-09-10 15:37:57 -03:00
Bruno Perdigão e546971ada Changed input validation to tool/polyline.py 2024-09-10 15:37:57 -03:00
Bruno Perdigão 8dc77735a5 fix rebase conflict 2024-09-10 15:37:57 -03:00
Richard Brice cc7171060f Decouples evaluation of a piecewise_function from the function itself (#5344) 2024-09-10 10:11:17 -07:00
myoualid 67a7e713b2 fix util.get_elements_by_pset to account for quantity sets 2024-09-10 17:17:42 +01:00
myoualid 3abe5edd21 Fix generating 3D view drawing when IFC elements don't exist in the Blender scene ( such as IfcDistributionPort) 2024-09-10 17:16:09 +01:00
Andrej730 34aed93b7b Fix 2 segfaults creating IfcEllipseProfileDef
1) taxonomy::ellipse was missing matrix so create_shape was segfaulting either was if Position was set or was not (segfaulting on line - https://github.com/IfcOpenShell/IfcOpenShell/blob/5616367a03ea397885e93523e55788da82238742/src/ifcgeom/kernels/opencascade/loop.cpp#L92)
2) was segfaulting when there was no default matrix

Removed fc->matrix assignment as matrix is already assigned to the curve.
2024-09-10 18:28:18 +05:00
Andrej730 6fd4d8b1ba Fix sequence.get_related_products bug after 845d772 2024-09-10 18:28:18 +05:00
Andrej730 2d0b262351 get_nested_tasks to discard non-ifctask elements #4911 2024-09-10 18:28:18 +05:00
Andrej730 a4f669e549 ifc5d.qto - some clarifications for arguments 2024-09-10 18:28:18 +05:00
Andrej730 dc92a8fd27 Bonsai - setup default values for new patametric profiles
So there will be less invalid IFC and user will get a preview right away after creating a new profile.
Example - https://imgur.com/a/GjkCql4
2024-09-10 18:28:18 +05:00
Andrej730 3bb0901e3e Profiles UI - better handling for invalid profiles
Previously it would be just console errors possibly breaking UI, now there will be UI error message - https://imgur.com/1o9teJ0
2024-09-10 18:28:17 +05:00
Andrej730 2d68d344bd Profiles UI - update displayed psets when user is changing active profile
previously it would get stuck until some other operator would refresh ui
2024-09-10 18:28:17 +05:00
Andrej730 ddf92ab8fb typing 2024-09-10 18:28:02 +05:00
Andrej730 9a6fc58949 Fix typo 2024-09-10 18:28:02 +05:00
Andrej730 765b5c2f5c black format 2024-09-10 18:28:01 +05:00
Andrej730 5616367a03 don't deep copy psets for optimization
Related to #5291

pset.edit_pset should cover it since it does support unsharing shared properties
2024-09-10 14:21:14 +05:00
Andrej730 6cf9875472 Fix error processing IfcCircle/IfcEllipse #5352 2024-09-10 12:54:44 +05:00
Dion Moult 5f8fdf233f Fix #5358. Easy way to toggle visibility of spatial elements and grids. 2024-09-10 14:29:55 +10:00
Manu Varkey be090a3a81 Fixes #5353 (#5354)
* Fixes #5353

* Change logic to use natsorted
2024-09-10 14:14:27 +10:00
Takayuki Kato 1da47d9271 Add support for editing IfcPhysicalComplexQuantity in edit_qto (#5335) (#5356)
* Add support for editing IfcPhysicalComplexQuantity in edit_qto (#5335)

* Fix lint-formatting issues
2024-09-10 14:13:57 +10:00
Ryan Schultz 4917cd19a2 addresses https://github.com/IfcOpenShell/IfcOpenShell/commit/3ceeaa739fb20125b7195dbd69e5e8606a3d5ed8#r146061329 2024-09-09 20:01:32 -05:00
Andrej730 e7ad71b51d black format 2024-09-09 18:01:23 +05:00
Andrej730 e87faa167c typing
also small optimization in MaterialCreator.create to address ifc a couple times less
2024-09-09 17:28:24 +05:00
Andrej730 13ed4d3a6c ifcopenshell to support styles assigned to IfcFaces #4038 2024-09-09 17:28:23 +05:00
Andrej730 27b9709b78 style.assign_representation_styles to support topology reprensentations #4038 2024-09-09 17:28:23 +05:00
Andrej730 2d988ac445 Representation UI - show IfcTopologyRepresentation #4038
Now it will show representation items count and will load representation items for IfcTopologyRepresentations.
2024-09-09 17:28:23 +05:00
Andrej730 6da7e18f50 Fix error adding typed text annotations #5300
Apparently it's part of #4832, previously creating a shape for IfcTypeProduct with literals would error, we ignored the error and type product end up being an empty. After 0.8.0 create_shape for literals creates an empty shape (0 verts) and we need to skip it, otherwise there would be an empty mesh representaiton.
2024-09-09 17:28:23 +05:00
Andrej730 a3c5c334f1 Show info message using annotation tool hotkeys without drawing loaded 2024-09-09 17:28:23 +05:00
Manu Varkey 09b8c4482f Update tooltips for UI elements (#5348)
* Update documentation

* Add further documentation

* Update tooltip after discussion

1. Change void to opening
2. Add blank bl_label fields

* Make missed out correction
2024-09-09 19:38:10 +10:00
Thomas Krijnen 680c73f15b Less noisy faceset helper messages 2024-09-09 09:58:02 +02:00
Thomas Krijnen 89e3650d77 No need to check for manifoldness when processing boolean ops in 2d 2024-09-09 09:57:43 +02:00
Thomas Krijnen bcc3b43dc1 --element-hierarchy matrix transpose #5191 2024-09-09 09:57:09 +02:00
Dion Moult 5cfcba5272 Fix #3333. Fix #5290. Fix bugs where Shift-Click or Alt-Click drawing activation modes didn't quite do what was advertised. 2024-09-09 17:43:40 +10:00
Andrej730 2416d91748 black format 2024-09-09 10:37:44 +05:00
Andrej730 7d90c319f0 Merge branch 'test-cmake-policy-fix' into v0.8.0 2024-09-09 10:34:15 +05:00
Dion Moult b71034765c Black 2024-09-09 12:43:22 +10:00
Dion Moult f82b97e97b Fix #5329. Fix #5267. Add support for composite profile definitions and nested closed profiles. 2024-09-09 12:43:13 +10:00
Dion Moult ba5b27d03c Support getting 2D coordinates in util.shape.get_vertices 2024-09-09 12:41:40 +10:00
myoualid 98ab5399f2 web ui cost module:
- double click cost cell to enable editing cost values.
- fix tables' height / scrollbar behaviour
2024-09-09 01:08:29 +01:00
myoualid 2d7614622f fix table styles for cost schedule module 2024-09-08 20:37:46 +01:00
Bruno Perdigão 1c7b36f233 Polyline tool - changed decorator order to show Input UI in front. 2024-09-08 12:04:38 -03:00
Bruno Perdigão d42890f214 Fix bug when trying to calculate the angle from vectors too close to each other. 2024-09-08 12:01:04 -03:00
myoualid c607cbc9d7 cost module web ui improvements:
-add ribbon bar,
- improve settings menu with ability to change font size for tables.
- Improve cost schedule spreadsheet layout
2024-09-08 15:29:46 +01:00
myoualid 83be26e196 fix loading cost schedule webui from blender operator 2024-09-08 15:25:56 +01:00
Dion Moult 2f026218ff Purge deprecated dumb wall / slab qto listener in favour of Ifc5D 2024-09-08 17:31:33 +10:00
Dion Moult 7615173924 Minor fix to sync IFC mode and Blender mode when editing profiles 2024-09-08 17:31:33 +10:00
myoualid 171c3083da Cost module web-ui can now:
- assign cost item products from Blender selection
- display list of selected products ( with available quantities, subtotals, and highlighting already assigned products)
- display and refresh assigned products
- highlight loaded cost schedule
2024-09-08 01:16:48 +01:00
Ryan Schultz fe317f9231 fix #3959 - drawing boundary changes are reflected on bim.create_sheets as well.
and only updates drawings that have been changed
2024-09-07 15:35:05 -05:00
Ryan Schultz 5363c33888 fix #5290: to fix error after shift and click bim.activate_drawing 2024-09-07 13:01:09 -05:00
Dion Moult 795d2c371e Fix #5340. Fix cosmetic console bug when adding a spatial subelement and selecting it. 2024-09-07 22:12:54 +10:00
Manu Varkey 1dfa3f8d79 Implement sorting of spacial containers by elevation and name 2024-09-07 21:46:35 +10:00
Dion Moult 2626165629 Fix #5334. Bug where the wrong type would be added if you added a new type then switched tool. 2024-09-07 21:13:56 +10:00
Dion Moult 0a17588db8 Fix #5346. 2024-09-07 17:05:19 +10:00
Andrej730 33001e6c6d profile.copy_profile
Fixes issue duplicated profile missing it's psets.
2024-09-07 11:22:43 +05:00
Andrej730 e224bfd19f Fix error showing material/profile psets in bbim after 691815fd41 2024-09-07 11:22:43 +05:00
Andrej730 c1d5c18724 fix black format 2024-09-07 11:22:43 +05:00
Dion Moult 557a120178 Fix #5341. Editing elevations in spatial decomposition panel is now a string and has an immediate effect. 2024-09-07 15:37:01 +10:00
Dion Moult cea4c0c01d Fix #5345. Bug when adding a new representation using "full representation". No temp data is used, so deletion not required. 2024-09-07 14:50:09 +10:00
Dion Moult 8b1d3a0c5d Fix #4769. Bug where editing grids didn't work with non-SI units.
I really don't know how this mistake lasted this long.
2024-09-07 13:48:42 +10:00
Dion Moult c5fc86d148 Fix #5337. You can now delete grids, which recursively delete all axes. Edit mode now also respects locking. 2024-09-07 13:18:36 +10:00
Ryan Schultz 8cec717315 fix #5304: Have demo project have Plan/Annotation/REFLECTED_PLAN_VIEW context 2024-09-06 19:49:38 -05:00
Dion Moult 7905cd8bd3 See #5337. Grid decorators now turn off when editing an axis. 2024-09-07 10:01:57 +10:00
Dion Moult 0337034d28 Fix #4881. Fix bug where editing grid axes didn't work. 2024-09-07 10:01:57 +10:00
myoualid 88a40e0052 improve cost table responsiveness and highlight currently loaded cost schedule 2024-09-06 20:51:46 +01:00
Richard Brice c9d2390d9a Implements cant geometry 2024-09-06 10:02:08 -07:00
Andrej730 0055a5dd82 ifcwrap cmake - use default CMP0078 policy 2024-09-06 19:58:52 +05:00
Andrej730 4ff0893a8b ifcwrap cmake - fix CMP0078 warning 2024-09-06 18:28:50 +05:00
Andrej730 791d098800 ifcwrap cmake - fix CMP0078 warning 2024-09-06 18:12:00 +05:00
Andrej730 8e87d0e303 typing 2024-09-06 18:11:25 +05:00
Andrej730 eaaa18468a Reuse tool.Ifc.Operator 2024-09-06 18:11:25 +05:00
Andrej730 871cd45f53 selector.set_element_value to support 'predefined_type' keyword
See more details in https://community.osarch.org/discussion/comment/22134/#Comment_22134
2024-09-06 18:11:24 +05:00
Andrej730 39fd9ce462 attribute.edit_attributes - small optimizations
remove settings dictionary and remove some ifc calls
2024-09-06 18:11:24 +05:00
Dion Moult 4c68ec6f82 Fix bug where editing AxisTag didn't change the grid axis name 2024-09-06 23:10:43 +10:00
myoualid be71eb274b display cost schedule predefined type in web ui 2024-09-06 12:08:45 +01:00
Andrej730 008e2c01c3 selector.set_element_value - temporarily skip 'predefined_type'
to avoid issues importing csvs that used it to extract correct predefined type

Example warning:
WARNING. Assigning 'predefined_type' is not yet supported. Skipping value 'ELECTRICACTUATOR' for element: '#89=IfcActuator('1RjCen6XL6WAdhz7HumLFU',$,'Actuator.002',$,$,#179,$,$,.ELECTRICACTUATOR.)'.
2024-09-06 15:18:15 +05:00
Andrej730 a1e51757b1 attribute.edit_attributes - document behaviour for PredefinedType 2024-09-06 15:18:15 +05:00
Andrej730 d5169e85fa bim.import_ifccsv to support undo (missing Ifc Operator)
Previously it wasn't possible to undo changes in the currently loaded IFC model after bim.import_ifccsv
2024-09-06 15:18:15 +05:00
Andrej730 cfc243949d Fix error unassigning type from element without representation
Traceback
Traceback (most recent call last):
  File "\bonsai\bim\module\type\operator.py", line 63, in execute
    return IfcStore.execute_ifc_operator(self, context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\bonsai\bim\ifc.py", line 408, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\bonsai\bim\module\type\operator.py", line 78, in _execute
    active_context = active_representation.ContextOfItems
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ContextOfItems'
Error: Python: Traceback (most recent call last):
  File "\bonsai\bim\ifc.py", line 408, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\bonsai\bim\module\type\operator.py", line 78, in _execute
    active_context = active_representation.ContextOfItems
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ContextOfItems'
2024-09-06 15:18:15 +05:00
Andrej730 a3ff0a61a6 ifccsv to web - fix Tabulator dropping columns with non-unique names 2024-09-06 15:18:15 +05:00
`myoualid` 456ad2af8e remove annoying console logs 2024-09-06 10:14:21 +01:00
Dion Moult 7b8e234683 Remove add grid in add menu, and run black 2024-09-06 18:18:32 +10:00
Dion Moult 95b7a79c64 Locked elements are now blocked from being duplicated too 2024-09-06 18:07:09 +10:00
Dion Moult 4a5e180479 You can now lock and unlock spatial / grid elements, which affects your ability to delete or move them 2024-09-06 17:58:52 +10:00
`myoualid` d6098a0b6d - web ui features to add a new cost schedules, and root cost items
- improved ui for cost schedules
- sharing more css across files
- refactor get_predefined_types(cost_schedule)
2024-09-06 08:55:10 +01:00
Dion Moult 541a6e18e6 Fix broken ifcconvert table in docs 2024-09-06 16:55:56 +10:00
Dion Moult 11497f9b37 Add decorator for grids outside drawing view 2024-09-06 16:40:56 +10:00
Dion Moult 6b14111b24 More grid panel to spatial subpanel 2024-09-06 16:40:56 +10:00
Andrej730 f27bb6effe black format 2024-09-06 11:13:09 +05:00
Andrej730 6ebec7e0e5 pset.unshare_pset - fix bug where it would leaving an orphaned pset
It was leaving an orphaned pset if 'products' was a list of all elements pset is assigned to. Then it would create a new pset for each element leaving original pset orphaned.
2024-09-06 11:04:05 +05:00
Andrej730 ffb2ea2be3 bim.unshare_pset - move implementation to core 2024-09-06 11:04:04 +05:00
Andrej730 89bb7c76de bim.unshare_pset - to work for all selected objects #5291 2024-09-06 11:04:04 +05:00
Andrej730 a867e72fd3 rename get_elements_using_pset -> get_elements_by_pset for consistency
To be consistent with other get_elements_by_xxx methods.
2024-09-06 11:04:04 +05:00
Andrej730 a03c55d15f fix poll breaking with no active object 2024-09-06 11:04:04 +05:00
Richard Brice 1a75d95d47 Updates dependencies for boost 1.86.0 2024-09-05 20:34:49 -07:00
Dion Moult fe5f48c655 Positional elements, project, and spatial elements are now locked. Remove user option to change behaviour. 2024-09-06 12:09:06 +10:00
Dion Moult a4396ee766 See #5318. Prevent deletion of project or spatial structures. 2024-09-06 11:44:30 +10:00
Dion Moult 977f3c7dcc Fix #5243. Remove usage of types_with_super which is no longer available. 2024-09-06 10:38:19 +10:00
Bruno Perdigão 8ba52a2b1c Scale the text for polyline tool decorators. 2024-09-05 14:18:12 -03:00
Bruno Perdigão 214c278fc5 Added a function to scale the font size according to preferences.
The scale will be calculated in relation to the system dpi and Blender's interface resolution scale.
2024-09-05 14:18:12 -03:00
Ryan Schultz f521945766 Have bim.select_assigned_product make selected object active, so it's easier to change its Object Information 2024-09-05 10:09:35 -05:00
Thomas Krijnen 12318fbfc2 Handle storage of nullptr as a proper Blank type in variant #5308 2024-09-05 14:38:57 +02:00
Andrej730 56428eb605 Ooops, fix black formatter ignoring bonsai folder #5178 2024-09-05 17:19:15 +05:00
Andrej730 88319bfa57 Fix missing ifc2x3 tests for pset.edit_pset 2024-09-05 17:13:41 +05:00
Andrej730 cce4e426c3 util.get_pset to support ifc2x3 material props 2024-09-05 17:13:41 +05:00
Andrej730 7782ab5479 should_load_from_memory related poll messages 2024-09-05 15:38:32 +05:00
Andrej730 7e5bd0ca83 ifcwrap cmake - rebuild if .i files changed 2024-09-05 15:08:36 +05:00
Andrej730 051d5479fb Strip redundant newline in repr() for taxonomy items
E.g.
print([m.diffuse for m in shape.geometry.materials])

would print
[colour 0.7 0.7 0.7
]

Instead of:
[colour 0.7 0.7 0.7]
2024-09-05 15:08:36 +05:00
Andrej730 deb41d2158 Geometry settings documentation fixes #5312 2024-09-05 15:08:35 +05:00
Andrej730 ea6df7f617 Use latest syntax for setting geometry settings #5299
Also fixed:
- old include_curves use
- missing use of 'include_curves' in ifcopenshell.draw
2024-09-05 15:08:35 +05:00
Andrej730 fcf41bf00c fix typing issue
Overloads were breaking because type checker is confused what default value should it use for the argument.
Made it keyword-only to resolve the issue.
2024-09-05 15:04:17 +05:00
tim 7c3fbda01e Updated icons
- new master svg file for storing icons bonsai_icons.svg
script for exporting png files and generating light mode versions
support for light mode
2024-09-05 09:21:15 +10:00
`myoualid` d0712c7186 1/ WEB UI Cost Schedule features to :
- delete cost items
- duplicate cost items
- delete individual cost values
- update cost values on the fly
- Shitf + LMB to recursively hide or show nested rows

2/ Improved UI for cost schedules
3/ Reuse css styles across pages with import statements
4/ Remove console/print statements
2024-09-04 23:39:46 +01:00
Andrej730 e1a5e73106 black format 2024-09-04 18:52:09 +05:00
Andrej730 1282f5c308 geom.Iterate - fix incorrect typing, document some arguments #5299 2024-09-04 18:51:07 +05:00
Andrej730 b0eaf23d2c Fix missing serializer_settings argument #5299 2024-09-04 18:51:07 +05:00
Andrej730 0ab70827e5 pset.assign_pset, pset.unassign_pset 2024-09-04 18:51:07 +05:00
Andrej730 691815fd41 Tools for handling shared psets #5291
In IFC it's possible for a property set to be assigned to multiple elements and which may lead to confusing behaviour when you edit a pset on one element and other element seems to get edited too.

Which makes it worse is that that it is possible that some software is might be doing this unintentionally when exporting IFC (as some sort of optimization as storing 1 is more optimal than n copies of it).

So now there are some tools in Bonsai and in IfcOpenShell to handle the shared psest:

1) Indication that property is shared - https://imgur.com/a/9dd3jST (similar to how Blender indicates ID data-block users). You can click on it to "unshare" the pset - a new copy for the pset will be created and it's going to be linked only to the active object.

2) api pset.unshare_pset method that does the same. And util.element.get_elements_using_pset method that encapsulates schema differences and different approaches for occurrences/types.

3) ifcpatch recipe 'UnsharePsets' that's making all property sets in the IFC file to have just 1 element that's using them. You can limit the affected elements by providing query.

ifcpatch recipe is also available in Bonsai - https://i.imgur.com/aOCx7HI.png
2024-09-04 18:51:06 +05:00
dependabot[bot] 3c3b56d1ae Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-04 10:43:04 +10:00
htlcnn 116192befd fix last point coincides with first point 2024-09-03 16:36:45 -03:00
Bruno Perdigão b6a96828ec Fix #5277 2024-09-03 16:23:32 -03:00
Ryan Schultz c4c611d778 whoops 2024-09-03 13:21:48 -05:00
Ryan Schultz 290c08d6d5 updated links in docs 2024-09-03 13:18:55 -05:00
Thomas Krijnen eb7411b310 ifcopenshell.file.assign_header_from() to copy header 2024-09-03 18:49:05 +02:00
Andrej730 bea837299e root.reassign_class to handle switching occurrence class <-> type class #5260
Kind of experimental. The idea is that it will reassign class e.g. from IfcWindow to IfcWindowType (or vice versa) and will keep the IFC representations and property sets.

Example - https://imgur.com/a/X7MHR0s
2024-09-03 18:53:25 +05:00
Andrej730 acbdc0ed4c typing 2024-09-03 18:53:25 +05:00
Andrej730 bec1d913c5 util.representation.get_representations_iter 2024-09-03 18:38:22 +05:00
Andrej730 b957505bfc bim.add_xxxx descriptions 2024-09-03 18:38:22 +05:00
Andrej730 3c69fffb19 ifcopenshell.validate fix missing space in indentation 😅 2024-09-03 18:38:22 +05:00
Andrej730 1c7e7c5269 prohibit user from removing a profile that still has inverses #5101
To avoid creating invalid material profile sets, representation items. Currently the only inverse that is allowed before removal is profile properties.

Example - https://i.imgur.com/UobI4pL.png
2024-09-03 18:38:21 +05:00
Andrej730 92525db14f profile.remove_profile - tests 2024-09-03 18:38:21 +05:00
Andrej730 01d965fe25 profile.remove_profile - clean up removing profile psets 2024-09-03 18:38:21 +05:00
Andrej730 d2bc6f9509 pset.add_pset - support ifc2x3 material/profile psets
1) For psets there was an issue - it was instantiating abstract IfcProfileProperties
2) For materials it was only able to instantiate IfcExtendedMaterialProperties though there are other pset types too in ifc2x3.
2024-09-03 18:38:21 +05:00
krande 88b861737c if boost >= 1.86 append newline to json logger 2024-09-03 11:56:15 +02:00
Kristoffer Andersen 0f87bd8206 use a macro to change for boost > 1.86 2024-09-03 11:09:22 +02:00
Kristoffer Andersen 1fe168d331 Update IfcGlobalId.cpp to support boost 1.86
It looks like mt19937 is no longer a member of boost in boost 1.86. I propose we use to std::mt19937 (which is already how it is used by svgfill.cpp)

see failure log from conda forge libboost 1.86 test here:
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=1008654&view=logs&j=4f922444-fdfe-5dcf-b824-02f86439ef14&t=b2a8456a-fb11-5506-ca32-5ccd32538dc0&l=880
2024-09-03 11:09:22 +02:00
Thomas Krijnen a7925622ed Handle nix patches for V7_7_2 #5285 2024-09-03 08:52:39 +00:00
Dion Moult 3675429385 Fix #2437. You can now see the spatial hierarchy decomposed by classification. 2024-09-03 18:42:52 +10:00
Thomas Krijnen 44ab38cb24 Add V7_7_2.patch #5285 2024-09-03 10:01:44 +02:00
Thomas Krijnen 1a146ada48 Add V7_7_2.patch #5285 2024-09-03 09:57:02 +02:00
Dion Moult 2ed2b4fe71 Fix #5230. Reimplement spatial decomposition hierarchy. 2024-09-03 14:36:01 +10:00
Dion Moult 4ce30b3153 See #5269. Minor tweak to show warning if object scaling detected. 2024-09-03 12:52:57 +10:00
Dion Moult 4ce2251717 See #5269. Minor tweak to show warning if manual mode changes detected. 2024-09-03 10:19:35 +10:00
Andrej730 c6e8d2a585 bim.add_material_set to ensure adding valid material sets 2024-09-02 18:41:15 +05:00
Andrej730 90e9c21320 material.add_profile note 2024-09-02 18:40:12 +05:00
Andrej730 236fbc7864 remove unused add_empty_type_button ui function 2024-09-02 17:25:04 +05:00
Andrej730 ae75acb0b9 Fix test after 521b0ab58d 2024-09-02 17:24:59 +05:00
Andrej730 11068fe338 bim.add_drawing_to_sheet - poll message 2024-09-02 17:24:59 +05:00
Andrej730 3c333c6b59 typing 2024-09-02 17:24:58 +05:00
Andrej730 ccbb253d2c Fix new sheets having non-unique identification
It was checking for the wrong scope "DOCUMENTATION".
Scope "DOCUMENTATION" was left from the old times, now we use scope "SHEET".
2024-09-02 17:04:55 +05:00
Andrej730 7c542418e6 fix create sheet test failing if bonsai and tests are on different disks
It was failing on Windows with something like "ValueError: path is on mount 'L:', start on mount 'C:'".
I guess it doesn't really occur in bonsai as sheets are typically stored next to the titleblocks (we used to use absolute paths awhile ago and now everything is relative to the ifc project)
2024-09-02 17:04:55 +05:00
Andrej730 d77f57c68e ifc.resolve_uri - remove redundant second check
os.path.isabs(uri) is already checked at the beginning of the function
2024-09-02 17:04:55 +05:00
Andrej730 151244ae79 ifcopenshell.file() to create valid ifc header by default #5246
Valid type for author and organization is 'LIST [ 1 : ? ] OF STRING (256)'
2024-09-02 17:04:55 +05:00
Andrej730 e50a90cc9f ifcopenshell.validate return code 1 in case of some file is invalid 2024-09-02 17:04:54 +05:00
Andrej730 5f5ab10b35 ifcopenshell.validate to validate ifc header #4119 2024-09-02 17:04:54 +05:00
Andrej730 0e791c7dfd Fix ifcopenshell.validate missing output in some cases after 07a0b4f
Apparently adding LogDetectionHandler disabled default handler that prints the output.
2024-09-02 17:04:54 +05:00
Dion Moult 07be50b365 See #5261. Fix bug when editing parametric stairs (not stair flights) which sets an inapplicable predefined type 2024-09-02 21:23:06 +10:00
Dion Moult fb422692c8 You can now make the selected element in the spatial decomposition panel active 2024-09-02 20:37:04 +10:00
Dion Moult 1a8be005cf Fix bug where toggled openings didn't properly appear in the dedicated opening collection 2024-09-02 20:14:43 +10:00
Dion Moult 9dcb5b103c Fix #5237. Fix bug where flipping or splitting walls didn't take into account project units and voids were misplaced. 2024-09-02 20:14:30 +10:00
Dion Moult 091824910b Increase debug log limit to 20 2024-09-02 19:42:26 +10:00
Dion Moult ea6d5918ba Fix bug where openings were invalidly contained in a container 2024-09-02 19:42:26 +10:00
Manu Varkey a452d29bab Fix bug: Add type instance button duplicated (#5281) 2024-09-02 19:37:08 +10:00
Dion Moult fb803ac35d Fix #5256. Use layer collection visibility, not collection visibility to hide types. 2024-09-02 18:48:09 +10:00
Dion Moult eec4b37827 See #5256. Fix bug where old "Types" collection was still being created and unused. 2024-09-02 18:47:09 +10:00
Dion Moult d1565ec1e6 Fix #5273. Bug where Shift-E allowed you to edit non-roof/railing elements if you also had them selected. 2024-09-02 17:46:44 +10:00
Dion Moult 521b0ab58d Fix #5271. Prevent duplicate entries when getting a decomposition. 2024-09-02 17:35:49 +10:00
Thomas Krijnen 04bbfc04ad Try 7.7.2 for HLR poly/edge behaviour 2024-09-02 09:20:38 +02:00
Thomas Krijnen f0167b812a Try 7.7.2 for HLR poly/edge behaviour 2024-09-02 09:19:46 +02:00
Dion Moult 0b8a701423 Fix #5275. Fix bug where orthographic sections would appear over freestyle linework in perspective views. 2024-09-02 16:51:25 +10:00
Dion Moult aa7e80fc8c Fix #5276. Fix inaccurate tooltip for assign container operator. 2024-09-02 16:40:51 +10:00
Bruno Perdigão f48c7d6af5 Fix polytool issue with distance input while snapping above the xy plane. 2024-09-01 11:20:14 -03:00
Bruno Perdigão 977014b86a Fix #5274 2024-09-01 10:48:16 -03:00
Bruno Perdigão 43e13ef8f3 Fix polytool issue when backspacing the whole input. 2024-09-01 10:38:03 -03:00
Thomas Krijnen daba504981 Update draw.py - test for --drawing-guid existance 2024-09-01 15:33:52 +02:00
Thomas Krijnen f8a2cce202 Use polygon_from_points() and handle Position for CSG Pyramid #5241 2024-09-01 15:14:22 +02:00
Thomas Krijnen b786e129bd Fix faceset helper stats 2024-09-01 15:12:43 +02:00
sukanka b82073dd57 fix-py-syntax-warning 2024-09-01 14:02:24 +02:00
Thomas Krijnen d4d9fdff1a Fix and augment v0.8 taxonomy wrapper 2024-09-01 10:40:23 +02:00
Dion Moult b3b14e87ec Next release cycle! 2024-09-01 18:00:31 +10:00
Andrej730 6bc31105bf Mention common error in troubleshooting docs 2024-09-01 11:10:13 +05:00
Dion Moult 73e3ebd1f0 Update README.md with new doc links 2024-09-01 16:08:45 +10:00
Dion Moult 32f216a594 Minor fix to bonsai-stable build 2024-09-01 14:23:29 +10:00
Dion Moult 296ebf5253 Fix failing tests in Bonsai 2024-09-01 14:08:52 +10:00
Cristian Ritter a450c24739 Merge branch 'v0.8.0' of https://github.com/csritter/IfcOpenShell into v0.8.0 2024-08-26 15:34:55 -03:00
Cristian Ritter 56d19039e3 always apply in diffuse color, if doens't have surface color
Signed-off-by: Cristian Ritter <cristian_ritter@hotmail.com>
2024-08-26 15:34:50 -03:00
csritter 2b8124071a Merge branch 'v0.8.0' into v0.8.0 2024-08-26 10:26:10 -03:00
Cristian Ritter 9fceec35cc add diffuse on surface, if has no surface color
Signed-off-by: Cristian Ritter <cristian_ritter@hotmail.com>
2024-08-26 10:17:50 -03:00
csritter ae2933eea5 prevent a copy
Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>
2024-08-26 01:08:06 -03:00
Cristian Ritter 7d50491a99 checking if diffuse has value, if not, use surface
Signed-off-by: Cristian Ritter <cristian_ritter@hotmail.com>
2024-08-20 12:16:19 -03:00
Cristian Ritter 371b4b6079 removing unnecessary use_surface_color on calc_hash 2024-08-20 11:45:29 -03:00
Cristian Ritter d714eca4ee replacing diffuse to get_color method 2024-08-20 11:44:20 -03:00
Cristian Ritter cd3df94a4b add surface and use_surface_color on style class 2024-08-19 18:44:43 -03:00
Cristian Ritter 0efafada1d fixed missing SurfaceColour on SettingsContainer 2024-08-19 18:41:45 -03:00
Cristian Ritter 876f059459 remove surface white if doesn't have surface colour
Signed-off-by: Cristian Ritter <cristian_ritter@hotmail.com>
2024-08-15 14:18:13 -03:00
Cristian Ritter b5a61753a5 Adding --surface-color in conversion settings to force the use of surface color instead of diffuse color. Issue #5075 2024-08-15 13:56:31 -03:00
1212 changed files with 77357 additions and 40153 deletions
+20
View File
@@ -0,0 +1,20 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
Replace this text describing what problem occurred and what you expected to happen instead.
1. To reproduce this, open file '...'
2. Click on '....'
3. See error
**Attachments**
If applicable, add screenshots to help explain your problem. Please also drag-drop any files necessary to show the error (rename the file extension from .ifc to .txt to upload). Private files can be uploaded to https://ifcopenshell.org/upload.html - only viewed by core developers and will be deleted afterwards.
**Debug information**
If this is in Bonsai, paste the output from the Copy Debug Information option in Bonsai. It can be found under Quality and Coordination -> Quality Control -> Debug. If this is a general software issue, if relevant include details about IfcOpenShell version, operating system, Python version, etc.
+10
View File
@@ -0,0 +1,10 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
Replace this text and describe a feature you'd like us to add. If it's not obvious, explain why this feature is awesome. Note that feature requests must be specific and measurable.
+21
View File
@@ -0,0 +1,21 @@
name: Dispatch Build IfcOpenShell
on:
workflow_dispatch:
jobs:
trigger-workflows:
runs-on: ubuntu-latest
strategy:
matrix:
workflow:
- 'Build IfcOpenShell Linux'
- 'Build IfcOpenShell Linux ARM'
- 'Build IfcOpenShell OSX'
- 'Build IfcOpenShell WASM / Pyodide'
- 'Build IfcOpenShell Windows'
steps:
- name: Trigger binary build workflows
uses: benc-uk/workflow-dispatch@v1
with:
workflow: ${{ matrix.workflow }}
+136
View File
@@ -0,0 +1,136 @@
name: Build IfcOpenShell OSX
on:
workflow_dispatch:
jobs:
build_ifcopenshell:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- os: macos
runner: macos-13
arch: x64
oldarch:
- os: macos
runner: macos-14
arch: arm64
oldarch: m1
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Checkout Build Repository
uses: actions/checkout@v3
with:
repository: IfcOpenShell/build-outputs
path: ./build
ref: ${{ matrix.os }}-${{ matrix.arch }}
lfs: true
token: ${{ secrets.BUILD_REPO_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Dependencies
run: |
brew update
brew install git bison autoconf automake libffi cmake findutils
echo "$(brew --prefix findutils)/libexec/gnubin" >> $GITHUB_PATH
- name: Unpack Dependencies
run: |
install_root=$(find ./build -maxdepth 4 -name install)
find "$install_root" -type f -name 'cache-*.tar.gz' -maxdepth 1 -exec tar -xzf {} -C "$install_root" \;
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${GITHUB_WORKFLOW}-${{ matrix.os }}
- name: Run Build Script
run: |
if [ "${{ matrix.os }}" == "macos" ]; then
DARWIN_C_SOURCE=-D_DARWIN_C_SOURCE
fi
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release python3 ./nix/build-all.py --diskcleanup
- name: Pack Dependencies
run: |
cd build
for install_dir in $(find $(find . -maxdepth 4 -name install) -mindepth 1 -maxdepth 1 -type d); do
test -f $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz || tar -czf $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz -C $(dirname "$install_dir") $(basename "$install_dir");
done
- name: Commit and Push Changes to Build Repository
run: |
cd build
git config user.name "IfcOpenBot"
git config user.email "ifcopenbot@ifcopenshell.org"
git add "$(find . -maxdepth 4 -name install)/*.tar.gz"
git commit -m "Update build artifacts [skip ci]" || echo "No changes to commit"
git push || true
- name: Package .zip archives
run: |
VERSION=v`cat VERSION`
cd ./build/`uname`/*/10.9/install/ifcopenshell
mkdir ~/output
ls -d python-* | while read py_version; do
postfix=`echo ${py_version: -1} | sed s/[0-9]//`
numbers=`echo $py_version | grep -oE '[0-9]+\.[0-9]+' | tr -d '.'`
py_version_major=python-${numbers}$postfix
pushd . > /dev/null
cd $py_version
if [ ! -d ifcopenshell ]; then
mkdir ../ifcopenshell_
mv * ../ifcopenshell_
mv ../ifcopenshell_ ifcopenshell
fi
[ -d ifcopenshell/__pycache__ ] && rm -rf ifcopenshell/__pycache__
find ifcopenshell -name "*.pyc" -delete
zip -r -qq ifcopenshell-${py_version_major}-${VERSION}-${GITHUB_SHA:0:7}-macos${{ matrix.oldarch }}64.zip ifcopenshell/*
mv *.zip ~/output
popd > /dev/null
done
cd bin
rm *.zip || true
ls | while read exe; do
zip -qq -r ${exe}-${VERSION}-${GITHUB_SHA:0:7}-macos${{ matrix.oldarch }}64.zip $exe
done
mv *.zip ~/output
cd ..
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Overwrite aws cli
run: |
# Error: The `brew link` step did not complete successfully
# The formula built, but is not symlinked into /usr/local
# Could not symlink bin/idle3
# Target /usr/local/bin/idle3
# already exists. You may want to remove it:
# rm '/usr/local/bin/idle3'
#
# To force the link and overwrite all conflicting files:
# brew link --overwrite python@3.13
# https://github.com/rust-lang/rustup/pull/3989/files
brew install --overwrite awscli | true
- name: Upload .zip archives to S3
run: |
aws s3 cp ~/output s3://ifcopenshell-builds/ --recursive
+54
View File
@@ -0,0 +1,54 @@
name: Build IfcOpenShell WASM / Pyodide
on:
workflow_dispatch:
jobs:
build_ifcopenshell:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
path: IfcOpenShell
- name: Checkout Pyodide
uses: actions/checkout@v3
with:
submodules: recursive
repository: pyodide/pyodide
ref: '0.26.4'
token: ${{ secrets.BUILD_REPO_TOKEN }}
path: pyodide
- name: Build
run: |
VERSION=`cat IfcOpenShell/VERSION`
sed -i s/0.8.0/$VERSION/g IfcOpenShell/pyodide/meta.yaml
sed -i s/0.8.0/$VERSION/g IfcOpenShell/pyodide/setup.py
echo '#!/usr/bin/bash' > script.sh
echo 'cd pyodide' > script.sh
echo 'make && pip install ./pyodide-build' >> script.sh
echo 'cd ..' >> script.sh
echo 'mkdir -p packages/ifcopenshell' >> script.sh
echo 'cp IfcOpenShell/pyodide/meta.yaml packages/ifcopenshell' >> script.sh
echo 'PYODIDE_ROOT=/src/pyodide \' >> script.sh
echo 'PATH=/src/pyodide/emsdk/emsdk:/src/pyodide/emsdk/emsdk/node/20.18.0_64bit/bin:/src/pyodide/emsdk/emsdk/upstream/emscripten:$PATH \' >> script.sh
echo 'pyodide build-recipes ifcopenshell --install' >> script.sh
chmod +x script.sh
sed -i s/--tty// pyodide/run_docker
pyodide/run_docker ./script.sh
mv dist/ifcopenshell-$VERSION-py3-none-any.whl dist/ifcopenshell-$VERSION+${GITHUB_SHA:0:7}-cp312-cp312-emscripten_3_1_58_wasm32.whl
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload .zip archives to S3
run: |
aws s3 cp dist s3://ifcopenshell-builds/ --recursive --exclude "*" --include "*.whl"
+116
View File
@@ -0,0 +1,116 @@
name: Build IfcOpenShell Linux
on:
workflow_dispatch:
jobs:
build_ifcopenshell:
runs-on: ubuntu-22.04
container: rockylinux:8
steps:
- name: Install Dependencies
run: |
yum update -y
yum install -y gcc gcc-c++ git autoconf automake bison make zip cmake python3 \
bzip2 patch mesa-libGL-devel libffi-devel fontconfig-devel \
sqlite-devel bzip2-devel zlib-devel openssl-devel xz-devel \
readline-devel ncurses-devel libffi-devel libuuid-devel git-lfs \
findutils
git config --global --add safe.directory '*'
- name: Install aws cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
rm -rf awscliv2.zip aws
aws --version
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Checkout Build Repository
uses: actions/checkout@v3
with:
repository: IfcOpenShell/build-outputs
path: ./build
ref: rockylinux8-x64
lfs: true
token: ${{ secrets.BUILD_REPO_TOKEN }}
- name: Unpack Dependencies
run: |
install_root=$(find ./build -maxdepth 4 -name install)
find "$install_root" -type f -name 'cache-*.tar.gz' -maxdepth 1 -exec tar -xzf {} -C "$install_root" \;
# Not supported on docker
# - name: ccache
# uses: hendrikmuhs/ccache-action@v1
# with:
# key: ${GITHUB_WORKFLOW}-rockylinux8-x64
- name: Run Build Script
run: |
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release python3 ./nix/build-all.py --diskcleanup
- name: Pack Dependencies
run: |
cd build
for install_dir in $(find $(find . -maxdepth 4 -name install) -mindepth 1 -maxdepth 1 -type d); do
test -f $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz || tar -czf $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz -C $(dirname "$install_dir") $(basename "$install_dir");
done
- name: Commit and Push Changes to Build Repository
run: |
cd build
git config user.name "IfcOpenBot"
git config user.email "ifcopenbot@ifcopenshell.org"
git add "$(find . -maxdepth 4 -name install)/*.tar.gz"
git commit -m "Update build artifacts [skip ci]" || echo "No changes to commit"
git push || true
- name: Package .zip archives
run: |
VERSION=v`cat VERSION`
cd ./build/`uname`/*/install/ifcopenshell
mkdir ~/output
ls -d python-* | while read py_version; do
postfix=`echo ${py_version: -1} | sed s/[0-9]//`
numbers=`echo $py_version | grep -oE '[0-9]+\.[0-9]+' | tr -d '.'`
py_version_major=python-${numbers}$postfix
pushd . > /dev/null
cd $py_version
if [ ! -d ifcopenshell ]; then
mkdir ../ifcopenshell_
mv * ../ifcopenshell_
mv ../ifcopenshell_ ifcopenshell
fi
[ -d ifcopenshell/__pycache__ ] && rm -rf ifcopenshell/__pycache__
find ifcopenshell -name "*.pyc" -delete
zip -r -qq ifcopenshell-${py_version_major}-${VERSION}-${GITHUB_SHA:0:7}-linux64.zip ifcopenshell/*
mv *.zip ~/output
popd > /dev/null
done
cd bin
rm *.zip || true
ls | while read exe; do
zip -qq -r ${exe}-${VERSION}-${GITHUB_SHA:0:7}-linux64.zip $exe
done
mv *.zip ~/output
cd ..
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload .zip archives to S3
run: |
aws s3 cp ~/output s3://ifcopenshell-builds/ --recursive
+116
View File
@@ -0,0 +1,116 @@
name: Build IfcOpenShell Linux ARM
on:
workflow_dispatch:
jobs:
build_ifcopenshell:
runs-on: ubuntu-22.04-arm
container: arm64v8/rockylinux:8
steps:
- name: Install Dependencies
run: |
yum update -y
yum install -y gcc gcc-c++ git autoconf automake bison make zip cmake python3 \
bzip2 patch mesa-libGL-devel libffi-devel fontconfig-devel \
sqlite-devel bzip2-devel zlib-devel openssl-devel xz-devel \
readline-devel ncurses-devel libffi-devel libuuid-devel git-lfs \
findutils
git config --global --add safe.directory '*'
- name: Install aws cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
rm -rf awscliv2.zip aws
aws --version
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Checkout Build Repository
uses: actions/checkout@v3
with:
repository: IfcOpenShell/build-outputs
path: ./build
ref: rockylinux8-arm64
lfs: true
token: ${{ secrets.BUILD_REPO_TOKEN }}
- name: Unpack Dependencies
run: |
install_root=$(find ./build -maxdepth 4 -name install)
[ -n "$install_root" ] && find "$install_root" -type f -name 'cache-*.tar.gz' -maxdepth 1 -exec tar -xzf {} -C "$install_root" \; || true
# Not supported on docker
# - name: ccache
# uses: hendrikmuhs/ccache-action@v1
# with:
# key: ${GITHUB_WORKFLOW}-rockylinux8-x64
- name: Run Build Script
run: |
CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release python3 ./nix/build-all.py --diskcleanup
- name: Pack Dependencies
run: |
cd build
for install_dir in $(find $(find . -maxdepth 4 -name install) -mindepth 1 -maxdepth 1 -type d); do
test -f $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz || tar -czf $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz -C $(dirname "$install_dir") $(basename "$install_dir");
done
- name: Commit and Push Changes to Build Repository
run: |
cd build
git config user.name "IfcOpenBot"
git config user.email "ifcopenbot@ifcopenshell.org"
git add "$(find . -maxdepth 4 -name install)/*.tar.gz"
git commit -m "Update build artifacts [skip ci]" || echo "No changes to commit"
git push || true
- name: Package .zip archives
run: |
VERSION=v`cat VERSION`
cd ./build/`uname`/*/install/ifcopenshell
mkdir ~/output
ls -d python-* | while read py_version; do
postfix=`echo ${py_version: -1} | sed s/[0-9]//`
numbers=`echo $py_version | grep -oE '[0-9]+\.[0-9]+' | tr -d '.'`
py_version_major=python-${numbers}$postfix
pushd . > /dev/null
cd $py_version
if [ ! -d ifcopenshell ]; then
mkdir ../ifcopenshell_
mv * ../ifcopenshell_
mv ../ifcopenshell_ ifcopenshell
fi
[ -d ifcopenshell/__pycache__ ] && rm -rf ifcopenshell/__pycache__
find ifcopenshell -name "*.pyc" -delete
zip -r -qq ifcopenshell-${py_version_major}-${VERSION}-${GITHUB_SHA:0:7}-linuxarm64.zip ifcopenshell/*
mv *.zip ~/output
popd > /dev/null
done
cd bin
rm *.zip || true
ls | while read exe; do
zip -qq -r ${exe}-${VERSION}-${GITHUB_SHA:0:7}-linuxarm64.zip $exe
done
mv *.zip ~/output
cd ..
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload .zip archives to S3
run: |
aws s3 cp ~/output s3://ifcopenshell-builds/ --recursive
+122
View File
@@ -0,0 +1,122 @@
name: Build IfcOpenShell Windows
on:
workflow_dispatch:
jobs:
build_ifcopenshell:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
python: ['3.9.11', '3.10.3', '3.11.8', '3.12.1', '3.13.0']
arch: ['x64']
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Checkout Build Repository
uses: actions/checkout@v3
with:
repository: IfcOpenShell/build-outputs
path: _deps-vs2019-x64-installed
ref: windows-${{ matrix.arch }}
lfs: true
token: ${{ secrets.BUILD_REPO_TOKEN }}
- name: Install Dependencies
run: |
choco install -y sed 7zip.install awscli
- name: Install Python
run: |
$installer = "python-${{ matrix.python }}-amd64.exe"
$url = "https://www.python.org/ftp/python/${{ matrix.python }}/$installer"
Invoke-WebRequest -Uri $url -OutFile $installer
Start-Process -Wait -FilePath .\$installer -ArgumentList '/quiet InstallAllUsers=0 PrependPath=0 Include_test=0 TargetDir=C:\Python\${{ matrix.python }}'
Remove-Item .\$installer
- name: Unpack Dependencies
run: |
cd _deps-vs2019-x64-installed
Get-ChildItem -Path . -Filter 'cache-*.zip' | ForEach-Object {
7z x $_.FullName
}
- name: Run Build Script
shell: cmd
run: |
setlocal EnableDelayedExpansion
SET PYTHON_VERSION=${{ matrix.python }}
for /f "tokens=1,2,3 delims=." %%a in ("%PYTHON_VERSION%") do (
set PY_VER_MAJOR_MINOR=%%a%%b
)
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
SET IFCOS_INSTALL_PYTHON=FALSE
cd win
echo y | call build-deps.cmd vs2019-x64 Release
SET PYTHONHOME=C:\Python\${{ matrix.python }}
call run-cmake.bat vs2019-x64 -DENABLE_BUILD_OPTIMIZATIONS=On -DGLTF_SUPPORT=ON -DADD_COMMIT_SHA=ON -DVERSION_OVERRIDE=ON
call install-ifcopenshell.bat vs2019-x64 Release
- name: Pack Dependencies
run: |
cd _deps-vs2019-x64-installed
Get-ChildItem -Path . -Directory | ForEach-Object {
$cacheFile = "cache-$($_.Name).zip"
echo $cacheFile
if (!(Test-Path $cacheFile)) {
7z a $cacheFile $_.FullName
}
}
- name: Commit and Push Changes to Build Repository
run: |
cd _deps-vs2019-x64-installed
git config user.name "IfcOpenBot"
git config user.email "ifcopenbot@ifcopenshell.org"
git add *.zip
git commit -m "Update build artifacts [skip ci]" || echo "No changes to commit"
git push || echo "Push failed"
- name: Package .zip Archives
run: |
$VERSION = 'v' + ((Get-Content VERSION).Trim())
$SHA = ${env:GITHUB_SHA}.Substring(0, 7)
$OUTPUT_DIR = "$env:USERPROFILE\output"
New-Item -ItemType Directory -Force -Path $OUTPUT_DIR
if ("${{ matrix.python }}" -eq "3.9.11") {
# only for the first python version the executables are assembled for upload
cd _installed-vs2019-x64/bin
Get-ChildItem -Path . | ForEach-Object {
echo $_
$exe = $_.Name
$baseName = $exe.Substring(0, $exe.Length - 4)
$zipName = "${baseName}-$VERSION-$SHA-win64.zip"
7z a $zipName $exe
}
mv *.zip $OUTPUT_DIR
}
$pyVersion = "${{ matrix.python }}"
$pyVersionMajor = ($pyVersion -split '\.')[0..1] -join ''
cd C:\Python\${{ matrix.python }}\Lib\site-packages
Remove-Item -Recurse -Force ifcopenshell\__pycache__ -ErrorAction SilentlyContinue
Get-ChildItem -Path ifcopenshell -Filter "*.pyc" -Recurse | Remove-Item -Force
$zipName = "ifcopenshell-python-$pyVersionMajor-$VERSION-$SHA-win64.zip"
7z a $zipName ifcopenshell
mv $zipName $OUTPUT_DIR
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload .zip Archives to S3
run: |
aws s3 cp $env:USERPROFILE\output s3://ifcopenshell-builds/ --recursive
@@ -0,0 +1,73 @@
name: ci-black-formatting
on:
push:
pull_request:
env:
PYTHON_VERSION: "3.12"
jobs:
lint-formatting:
runs-on: ubuntu-latest
steps:
- name: Action - checkout repository
uses: actions/checkout@v4.2.2
- name: Action - install python
uses: actions/setup-python@v5.3.0
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Step 1 - install dependencies
shell: bash
run: |
python3 -m pip install --upgrade pip
python3 -m pip install 'black>=24.10.0'
# NOTE: This would suffice, however it is less informative in terms of the 3 possible outcomes
# - name: QA Step - check linting
# shell: bash
# id: linting
# run: |
# python3 -m black .
# QA STEP
- name: QA Step - check linting
shell: bash
id: linting
run: |
python3 -m black --check . \
&& exit 0 \
|| (echo "exit_code=$?" >> "$GITHUB_OUTPUT" && exit 1);
continue-on-error: true
# OUTCOME 1 of QA STEP
- name: QA Step - no linting errors
if: steps.linting.outcome == 'success'
shell: bash
run: |-
echo "::notice::QA step linting succeeded"
exit 0;
# OUTCOME 2i of QA STEP
- name: QA Step - unprettified code with no syntax errors
if: steps.linting.outputs.exit_code == 1
shell: bash
run: |-
echo "::group::QA step succeeded with warnings"
echo "::warning::one or more files contains unformatted code but no syntax errors";
echo "::notice::please run the linter before pushing!";
echo "::endgroup::"
exit 0;
# OUTCOME 2ii of QA STEP
- name: QA Step - code contains syntax errors
if: steps.linting.outputs.exit_code == 123
shell: bash
run: |-
echo "::group::QA step failed"
echo "::error::one or more files contains syntax errors";
echo "::notice::please run the linter and fix syntax errors before pushing!";
echo "::endgroup::"
exit 1;
-12
View File
@@ -1,12 +0,0 @@
name: ci-black-formatting
on:
push:
pull_request:
jobs:
lint-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
+46 -21
View File
@@ -64,7 +64,10 @@ jobs:
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Get current date
id: date
run: echo "date=$(date +'%y%m%d')" >> $GITHUB_OUTPUT
# Include hours and minutes to release tag
# to avoid possibility of unstable repo's index.json
# pointing to the new file when index.json itself wasn't yet updated.
run: echo "date=$(date +'%y%m%d%H%M')" >> $GITHUB_OUTPUT
- name: Compile
run: |
cd src/bonsai && make dist PLATFORM=${{ matrix.config.short_name }} PYVERSION=${{ matrix.pyver }}
@@ -96,12 +99,12 @@ jobs:
token: ${{ secrets.IOS_TO_BLENDER_REPO }}
path: bonsai_unstable_repo
- name: Update index.json on extensions repo
- name: Download Blender and run critical tests
run: |
set -x -e
# Ensure Bonsai and ifcsverchok enable/disable works before uploading to extensions repo.
# Download Blender.
wget -q -O blender.tar.xz https://ftp.nluug.nl/pub/graphics/blender/release/Blender4.2/blender-4.2.0-linux-x64.tar.xz
wget -q -O blender.tar.xz https://ftp.nluug.nl/pub/graphics/blender/release/Blender4.3/blender-4.3.0-linux-x64.tar.xz
tar -xf blender.tar.xz
# Setup Blender.
@@ -109,25 +112,25 @@ jobs:
export PATH="$PATH:$BLENDER_PATH"
blender --version
# Setup unstable repo to get Bonsai build.
cd bonsai_unstable_repo
pip install -r requirements.txt
python setup_extensions_repo.py --last-tag
git config --global user.name 'IfcOpenBot'
git config --global user.email 'IfcOpenBot@users.noreply.github.com'
git add index.json
git add readme.md
git commit -m "Update index.json"
git push
- name: Run bonsai tests
run: |
set -x -e
BLENDER_PATH=$(find blender-*/ -maxdepth 0 -exec readlink -f {} \;)
export PATH="$PATH:$BLENDER_PATH"
cd ..
bonsai_zip="$(pwd)/$(ls bonsai_unstable_repo/bonsai_py311*-linux-x64.zip)"
blender --version
# Install Bonsai.
blender --command extension install-file -r user_default -e $bonsai_zip
blender --command extension list
git clone https://github.com/IfcOpenShell/IfcOpenShell.git IfcOpenShell
# Reregister Bonsai.
# Note that running it in background might miss some errors
# (e.g. tools are not registered in background mode).
blender --background --python IfcOpenShell/src/bonsai/scripts/reregister_bonsai.py
# Install sverchok.
wget -q -O sverchok.zip https://github.com/nortikin/sverchok/archive/refs/heads/master.zip
# ifcsverchok expecting sverchok to be named "sverchok" and not "sverchok-master".
unzip -q sverchok.zip
@@ -136,19 +139,41 @@ jobs:
rm -r sverchok
blender --command extension install-file -r user_default sverchok.zip
git clone https://github.com/IfcOpenShell/IfcOpenShell.git IfcOpenShell
# Install ifcsverchok.
cd IfcOpenShell/src/ifcsverchok
make dist
sverchok_zip="$(pwd)/dist/$(ls dist)"
blender --command extension install-file -r user_default $sverchok_zip
- name: Update index.json on extensions repo
run: |
set -x -e
# Setup Blender.
BLENDER_PATH=$(find blender-*/ -maxdepth 0 -exec readlink -f {} \;)
export PATH="$PATH:$BLENDER_PATH"
blender --version
cd bonsai_unstable_repo
git config --global user.name 'IfcOpenBot'
git config --global user.email 'IfcOpenBot@users.noreply.github.com'
git add index.json
git add readme.md
git commit -m "Update index.json"
git push
- name: Run bonsai tests
run: |
set -x -e
BLENDER_PATH=$(find blender-*/ -maxdepth 0 -exec readlink -f {} \;)
export PATH="$PATH:$BLENDER_PATH"
blender --version
# Install Sun Position extension.
blender --online-mode --command extension sync
blender --online-mode --background --python-expr "import bpy; \
bpy.ops.extensions.package_install(repo_index=0, pkg_id='sun_position'); \
bpy.ops.preferences.addon_enable(module='bl_ext.blender_org.sun_position'); bpy.ops.wm.save_userpref()"
blender --online-mode --command extension install --enable --sync sun_position
cd ../bonsai
cd IfcOpenShell/src/bonsai
pip install pytest-blender
blender --background --python scripts/setup_pytest.py
blender --python-expr "import bonsai; print(bonsai.bbim_semver); import ifcopenshell; print(ifcopenshell.version)" --background
+5 -6
View File
@@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pyver: [py310, py311, py312]
pyver: [py311, py312]
config:
- {
name: "Windows Build",
@@ -32,15 +32,15 @@ jobs:
}
- {
name: "Linux Build",
short_name: linux
short_name: linux,
}
- {
name: "MacOS Build",
short_name: macos
short_name: macos,
}
- {
name: "MacOS ARM Build",
short_name: macosm1
short_name: macosm1,
}
steps:
- uses: actions/checkout@v2
@@ -53,8 +53,7 @@ jobs:
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Compile
run: |
cd src/bonsai &&
make dist PLATFORM=${{ matrix.config.short_name }} PYVERSION=${{ matrix.pyver }} IS_STABLE=TRUE
cd src/bonsai && make dist PLATFORM=${{ matrix.config.short_name }} PYVERSION=${{ matrix.pyver }} IS_STABLE=TRUE
- name: Find zip file name
id: find_zip
run: |
-4
View File
@@ -24,10 +24,6 @@ jobs:
name: "Windows 64bit",
short_name: win64,
}
- {
name: "Windows 32bit",
short_name: win32,
}
- {
name: "Linux 64bit",
short_name: linux64
+4 -2
View File
@@ -93,7 +93,7 @@ jobs:
lfs: true
- name: Download
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4.1.7
with:
# Artifact name
name: ifcos-artifacts
@@ -116,6 +116,8 @@ jobs:
with:
context: artifacts
repository: aecgeeks/ifcopenshell
tags: aecgeeks/ifcopenshell:latest
# Since the dispatch is set to `tag`, `github.ref_name` should evaluate to the pushed tag
# On a workflow dispatch, `ref_name` will take on the value from the dispatch payload
tags: aecgeeks/ifcopenshell:${{ github.ref_name }}${{ github.ref_name == github.event.repository.default_branch && ',aecgeeks/ifcopenshell:latest' }}
file: ./Dockerfile
push: true
@@ -25,10 +25,6 @@ jobs:
name: "Windows 64bit",
short_name: win64,
}
- {
name: "Windows 32bit",
short_name: win32,
}
- {
name: "Linux 64bit",
short_name: linux64
+6 -4
View File
@@ -15,6 +15,7 @@ on:
- 'src/ifcparse/**'
- 'src/ifcwrap/**'
- 'src/qtviewer/**'
- 'src/svgfill/**'
- 'src/serializers/**'
- 'conda/**'
- 'cmake/**'
@@ -23,15 +24,15 @@ on:
jobs:
activate:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: |
github.repository == 'IfcOpenShell/IfcOpenShell' &&
!contains(github.event.head_commit.message, 'skip ci')
steps:
- run: echo ok go
build:
runs-on: ubuntu-latest
compile-and-test:
runs-on: ubuntu-22.04
needs: activate
steps:
- uses: actions/checkout@v4
@@ -47,7 +48,6 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install xmlschema xsdata numpy lxml pytest isodate lark networkx tabulate python-dateutil shapely
pip install mathutils
pip install src/bcf --no-deps
pip install https://github.com/Andrej730/aud/archive/refs/heads/master-reduced-size.zip
@@ -126,6 +126,7 @@ jobs:
python tests.py
cd ../src/ifcopenshell-python
mv ifcopenshell ifcopenshell-local # Force testing on installed module
pip install -e ../ifcpatch --no-deps # Needed for sql.py tests.
make test
cd ../bcf && make test
pip install requests
@@ -133,4 +134,5 @@ jobs:
pip install deepdiff
cd ../ifcdiff && make test
cd ../ifcpatch && make test
pip install -e ../ifctester --no-deps
cd ../ifctester && make test
@@ -0,0 +1,38 @@
name: Build and Deploy Unstable Documentation
on:
push:
branches:
- v0.8.0 # Trigger the workflow on pushes to the default branch which is currently v0.8.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
cd src/bonsai/docs # Navigate to the docs directory
pip install -r requirements.txt # Install dependencies from requirements.txt
- name: Build documentation
run: |
cd src/bonsai/docs # Navigate to the docs directory
make html # Build the documentation
- name: Deploy to GitHub Pages (Unstable)
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} # SSH key for deployment
external_repository: IfcOpenShell/bonsaibim_org_docs_unstable # Target repository
publish_branch: main # Branch to deploy to
cname: docs-unstable.bonsaibim.org # Custom domain for unstable docs
publish_dir: src/bonsai/docs/_build/html # Directory containing built docs
+36
View File
@@ -0,0 +1,36 @@
name: Build and Deploy Stable Documentation
on:
workflow_dispatch: # Manual trigger
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
cd src/bonsai/docs
pip install -r requirements.txt # Run pip install from the docs directory
- name: Build documentation
run: |
cd src/bonsai/docs
make html
- name: Deploy to GitHub Pages (Stable)
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: IfcOpenShell/bonsaibim_org_docs
publish_branch: main
cname: docs.bonsaibim.org
publish_dir: src/bonsai/docs/_build/html
@@ -0,0 +1,48 @@
name: Deploy Pyodide Demo App to GitHub Pages
permissions:
id-token: write
pages: write
on:
push:
paths:
- 'src/pyodide/**'
- '.github/workflows/publish-pyodide-demo-app.yml'
jobs:
activate:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell'
steps:
- name: Set env
run: echo ok go
build:
needs: activate
runs-on: ubuntu-latest
steps:
- name: Checkout (recursive)
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: src/pyodide/demo-app/
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
+9
View File
@@ -81,6 +81,12 @@ src/bonsai/test/files/temp
src/bonsai/test/files/basic.ifc.cache.blend
src/bonsai/test/files/basic.ifc.cache.sqlite
# bonsai data
src/bonsai/bonsai/bim/data/build/
src/bonsai/bonsai/bim/data/gantt/index.html
src/bonsai/bonsai/bim/data/gantt/jsgantt.js
src/bonsai/bonsai/bim/data/gantt/jsgantt.css
src/bonsai/drawings
src/bonsai/layouts
@@ -98,3 +104,6 @@ src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.py
# Brickschema
src/bonsai/bonsai/bim/schema/Brick.ttl
bonsaiDecoratorForLoads.code-workspace
dev_environment.bat
+6
View File
@@ -17,3 +17,9 @@
[submodule "docs/cpp-api/assets/doxygen-awesome-css"]
path = docs/cpp-api/assets/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
[submodule "src/ifcopenshell-python/ifcopenshell/simple_spf"]
path = src/ifcopenshell-python/ifcopenshell/simple_spf
url = https://github.com/IfcOpenShell/step-file-parser
[submodule "src/pyodide/demo-app/wheels"]
path = src/pyodide/demo-app/wheels
url = https://github.com/IfcOpenShell/wasm-wheels
+4 -3
View File
@@ -6,6 +6,7 @@ IfcOpenShell
<img src="https://github.com/IfcOpenShell/IfcOpenShell/assets/88302/34901387-e2dd-4a0c-8e38-9ffc32a66cde">
</p>
IfcOpenShell is an open source ([LGPL]) software library for working with Industry Foundation Classes ([IFC]). Complete
parsing support is provided for [IFC2x3 TC1], [IFC4 Add2 TC1], IFC4x1, IFC4x2, and [IFC4x3 Add2]. Extensive geometric support
is implemented for the IFC releases [IFC2x3 TC1] and [IFC4 Add2 TC1]. Extending with support for arbitrary IFC schemas
@@ -24,8 +25,8 @@ For more information, see:
* [IfcOpenShell Python Hello World Tutorial](https://docs.ifcopenshell.org/ifcopenshell-python/hello_world.html)
* [Bonsai Website](https://bonsaibim.org)
* [Bonsai Documentation](https://docs.bonsaibim.org/index.html)
* [Add-on Installation](https://docs.bonsaibim.org/users/installation.html)
* [Exploring an IFC model](https://docs.bonsaibim.org/users/exploring_an_ifc_model.html)
* [Add-on Installation](https://docs.bonsaibim.org/quickstart/installation.html)
* [Exploring an IFC model](https://docs.bonsaibim.org/quickstart/explore_model.html)
Development is sponsored through your generous donations!
@@ -36,7 +37,7 @@ Contents
| Name | Description | License | Service |
| ------------------------- | --------------------------------------------------------------------- | ------------------- | ------- |
| bcf | Library to read and write BCF-XML and query OpenCDE BCF-API modules | LGPL-3.0-or-later | [![PyPI](https://img.shields.io/pypi/v/bcf-client?label=PyPI&color=006dad)](https://pypi.org/project/bcf-client/) |
| bcf | Library to read and write BCF-XML and query OpenCDE BCF-API modules | LGPL-3.0-or-later | [![PyPI](https://img.shields.io/pypi/v/bcf-client?label=PyPI&color=006dad)](https://pypi.org/project/bcf-client/) [![Anaconda-Server Badge](https://anaconda.org/conda-forge/bcf-client/badges/version.svg)](https://anaconda.org/conda-forge/bcf-client) |
| bonsai | Add-on to Blender providing a graphical native IFC authoring platform | GPL-3.0-or-later | [![Official](https://img.shields.io/badge/BonsaiBIM.org-Download-70ba35)](https://bonsaibim.org/download.html) [![GitHub Unstable](https://img.shields.io/github/v/release/ifcopenshell/ifcopenshell?filter=bonsai-*&label=GitHub-Unstable&color=f6f8fa)](https://github.com/IfcOpenShell/IfcOpenShell/releases?q=bonsai&expanded=true) [![Chocolatey](https://img.shields.io/chocolatey/v/blenderbim-nightly?label=Chocolatey&color=5c9fd8)](https://community.chocolatey.org/packages/blenderbim-nightly/) |
| bsdd | Library to query the bSDD API | LGPL-3.0-or-later | [![PyPI](https://img.shields.io/pypi/v/bsdd?label=PyPI&color=006dad)](https://pypi.org/project/bsdd/) |
| ifc2ca | Utility to convert IFC structural analysis models to Code_Aster | LGPL-3.0-or-later |
+1 -1
View File
@@ -1 +1 @@
0.8.0
0.8.2
+71 -14
View File
@@ -27,9 +27,11 @@ if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif()
add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
cmake_policy(SET CMP0048 NEW)
cmake_policy(SET CMP0074 NEW)
cmake_policy(SET CMP0078 OLD)
cmake_policy(SET CMP0078 NEW)
cmake_policy(SET CMP0086 NEW)
if (POLICY CMP0144)
cmake_policy(SET CMP0144 NEW) # find_package() uses upper-case <PACKAGENAME>_ROOT variables.
@@ -75,7 +77,7 @@ option(HDF5_SUPPORT "Enable HDF5 support (requires HDF5, zlib)" ON)
option(WITH_PROJ "Enable output of Earth-Centered Earth-Fixed glTF output using the PROJ library" OFF)
option(IFCXML_SUPPORT "Build IfcParse with ifcXML support (requires libxml2)." ON)
option(USD_SUPPORT "Build IfcConvert with USD support (requires pixar's USD library)." OFF)
option(CITYJSON_SUPPORT "Build IfcConvert with CityJSON support (requires CityJSON library)." ON)
option(CITYJSON_SUPPORT "Build IfcConvert with CityJSON support (requires CityJSON library)." OFF)
option(WITH_RELATIONSHIP_VALIDATION "Build IfcConvert with option to validate geometrical relationships." OFF)
option(USERSPACE_PYTHON_PREFIX "Installs IfcPython for the current user only instead of system-wide." OFF)
@@ -194,13 +196,25 @@ foreach(option_flag IN LISTS option_flags)
convert_env_var_to_bool("${option_flag}")
endforeach()
set(CMAKE_FIND_ROOT_PATH_BACKUP "${CMAKE_FIND_ROOT_PATH}")
macro(clear_wasm_sysroot)
if(WASM_BUILD)
# when using the nix/build-all.py build script we should not
# look into the sysroot for most of the dependencies but rather
# in the designated build/ folder created by the script.
set(CMAKE_FIND_ROOT_PATH_BACKUP "${CMAKE_FIND_ROOT_PATH}")
set(CMAKE_FIND_ROOT_PATH "")
endif()
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
endmacro()
macro(restore_wasm_sysroot)
if(WASM_BUILD)
# reset to use sysroot
set(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH_BACKUP}")
endif()
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
endmacro()
if(WITH_CGAL)
add_definitions(-DIFOPSH_WITH_CGAL)
@@ -221,7 +235,9 @@ endif()
if(GLTF_SUPPORT OR CITYJSON_SUPPORT)
UNIFY_ENVVARS_AND_CACHE(JSON_INCLUDE_DIR)
clear_wasm_sysroot()
find_path(json_header_path "nlohmann/json.hpp" HINTS ${JSON_INCLUDE_DIR})
restore_wasm_sysroot()
set(JSON_INCLUDE_DIR ${json_header_path})
if(json_header_path)
@@ -328,13 +344,17 @@ if(USE_MMAP)
add_definitions(-DUSE_MMAP)
endif()
clear_wasm_sysroot()
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
restore_wasm_sysroot()
message(STATUS "Boost include files found in ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost libraries found in ${Boost_LIBRARY_DIRS}")
if(NOT MINIMAL_BUILD)
# libxml2 is required for IFCXML (optional) and SVGFILL (mandatory)
clear_wasm_sysroot()
find_package(LibXml2 REQUIRED)
restore_wasm_sysroot()
endif()
if(IFCXML_SUPPORT)
@@ -350,6 +370,7 @@ if(BUILD_IFCGEOM)
# Open CASCADE
if(WITH_OPENCASCADE)
if("${OCC_INCLUDE_DIR}" STREQUAL "")
clear_wasm_sysroot()
find_path(OCC_INCLUDE_DIR Standard_Version.hxx
PATHS
/usr/include/occt
@@ -357,6 +378,7 @@ if(BUILD_IFCGEOM)
/usr/include/opencascade
REQUIRED
)
restore_wasm_sysroot()
if(OCC_INCLUDE_DIR)
message(STATUS "Found Open CASCADE include files in: ${OCC_INCLUDE_DIR}")
@@ -416,7 +438,9 @@ if(BUILD_IFCGEOM)
message(STATUS "Looking for Open CASCADE library files in: ${OCC_LIBRARY_DIR}")
endif()
clear_wasm_sysroot()
find_library(libTKernel NAMES TKernel TKerneld PATHS ${OCC_LIBRARY_DIR} NO_DEFAULT_PATH)
restore_wasm_sysroot()
if(libTKernel)
message(STATUS "Required Open Cascade Library files found")
@@ -639,11 +663,6 @@ if(HDF5_SUPPORT)
set(SWIG_DEFINES ${SWIG_DEFINES} -DWITH_HDF5)
endif(HDF5_SUPPORT)
if(WASM_BUILD)
# reset to use sysroot
set(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH_BACKUP}")
endif()
if(ENABLE_BUILD_OPTIMIZATIONS)
if(MSVC)
# NOTE: RelWithDebInfo and Release use O2 (= /Ox /Gl /Gy/ = Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy) by default,
@@ -730,6 +749,10 @@ if(MSVC)
# endif()
add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)
# See #5158.
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.40)
add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
endif()
else()
add_definitions(-Wall -Wextra)
@@ -919,8 +942,10 @@ endif()
if(BUILD_IFCGEOM)
if(WITH_CGAL)
clear_wasm_sysroot()
find_library(libGMP NAMES gmp mpir PATHS ${GMP_LIBRARY_DIR} NO_DEFAULT_PATH)
find_library(libMPFR NAMES mpfr PATHS ${MPFR_LIBRARY_DIR} NO_DEFAULT_PATH)
restore_wasm_sysroot()
if(NOT libGMP)
message(FATAL_ERROR "Unable to find GMP library files, aborting")
endif()
@@ -1045,10 +1070,19 @@ if(BUILD_CONVERT)
target_include_directories(cityjson_converter PRIVATE ../src)
set(IFCOPENSHELL_LIBRARIES ${IFCOPENSHELL_LIBRARIES} cityjson_converter)
install(TARGETS cityjson_converter
ARCHIVE DESTINATION ${LIBDIR}
LIBRARY DESTINATION ${LIBDIR}
)
add_executable(cityjson_converter_exe ${CITYJSON_CONVERT_FILES})
set_target_properties(cityjson_converter_exe PROPERTIES COMPILE_FLAGS "-DCITYJSON_EXECUTABLE")
target_include_directories(cityjson_converter_exe PRIVATE ../src)
target_link_libraries(cityjson_converter_exe ${IFCOPENSHELL_LIBRARIES} ${OPENCASCADE_LIBRARIES} ${Boost_LIBRARIES} ${HDF5_LIBRARIES} ${USD_LIBRARIES})
install(TARGETS cityjson_converter_exe
RUNTIME DESTINATION ${BINDIR}
)
endif()
# IfcConvert
@@ -1114,6 +1148,7 @@ if(ADD_COMMIT_SHA)
message("git found: ${GIT_EXECUTABLE} with version ${GIT_VERSION_STRING}")
execute_process(
COMMAND ${GIT_EXECUTABLE} branch -a --contains HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE git_branches
OUTPUT_STRIP_TRAILING_WHITESPACE
)
@@ -1131,11 +1166,18 @@ if(ADD_COMMIT_SHA)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE git_sha
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message(STATUS "IfcOpenShell branch: \"${git_branch}\"")
message(STATUS "IfcOpenShell commit: \"${git_sha}\"")
if ("${git_branch}" STREQUAL "" OR "${git_sha}" STREQUAL "")
message(FATAL_ERROR "Unable to determine commit sha and/or branch")
endif()
add_definitions(-DIFCOPENSHELL_BRANCH=${git_branch})
add_definitions(-DIFCOPENSHELL_COMMIT=${git_sha})
endif()
@@ -1186,13 +1228,20 @@ install(TARGETS IfcParse
)
if(BUILD_IFCGEOM)
install(FILES ${IFCGEOM_H_FILES}
# install(FILES ${IFCGEOM_H_FILES}
# DESTINATION ${INCLUDEDIR}/ifcgeom
# )
install(FILES ${SCHEMA_AGNOSTIC_H_FILES}
DESTINATION ${INCLUDEDIR}/ifcgeom
)
install(FILES ${SCHEMA_AGNOSTIC_H_FILES}
DESTINATION ${INCLUDEDIR}/ifcgeom_schema_agnostic
)
foreach(kernel ${GEOMETRY_KERNELS})
file(GLOB IFCGEOM_H_FILES ../src/ifcgeom/kernels/${kernel}/*.h)
install(FILES ${IFCGEOM_H_FILES}
DESTINATION ${INCLUDEDIR}/ifcgeom/kernels/${kernel}
)
endforeach()
install(TARGETS ${IFCGEOM_SCHEMA_LIBRARIES} ${kernel_libraries} IfcGeom
ARCHIVE DESTINATION ${LIBDIR}
@@ -1208,15 +1257,23 @@ if(BUILD_CONVERT)
RUNTIME DESTINATION ${BINDIR}
)
install(FILES ${SERIALIZERS_FILES}
install(FILES ${SERIALIZERS_H_FILES}
DESTINATION ${INCLUDEDIR}/serializers/
)
install(FILES ${SERIALIZERS_S_FILES}
install(FILES ${SERIALIZERS_S_H_FILES}
DESTINATION ${INCLUDEDIR}/serializers/schema_dependent
)
endif(BUILD_CONVERT)
if(BUILD_CONVERT OR BUILD_IFCPYTHON)
install(TARGETS geometry_serializer ${geometry_serializer_libraries}
ARCHIVE DESTINATION ${LIBDIR}
LIBRARY DESTINATION ${LIBDIR}
RUNTIME DESTINATION ${BINDIR}
)
endif(BUILD_CONVERT OR BUILD_IFCPYTHON)
# Cmake uninstall target
if(NOT TARGET uninstall)
configure_file(
+35 -13
View File
@@ -48,6 +48,10 @@
# on OS X El Capitan with homebrew: #
# $ brew install git bison autoconf automake libffi cmake #
# #
# on RHEL-related distros: #
# $ yum install git gcc gcc-c++ autoconf bison make cmake #
# mesa-libGL-devel libffi-devel fontconfig-devel bzip2 #
# automake patch #
###############################################################################
import logging
import os
@@ -78,11 +82,11 @@ PROJECT_NAME = "IfcOpenShell"
USE_CURRENT_PYTHON_VERSION = os.getenv("USE_CURRENT_PYTHON_VERSION")
ADD_COMMIT_SHA = os.getenv("ADD_COMMIT_SHA")
PYTHON_VERSIONS = ["3.9.11", "3.10.3", "3.11.8", "3.12.1"]
PYTHON_VERSIONS = ["3.9.11", "3.10.3", "3.11.8", "3.12.1", "3.13.0"]
JSON_VERSION = "v3.6.1"
OCE_VERSION = "0.18.3"
OCCT_VERSION = "7.5.3"
BOOST_VERSION = "1.80.0"
OCCT_VERSION = "7.8.1"
BOOST_VERSION = "1.86.0"
PCRE_VERSION = "8.41"
LIBXML2_VERSION = "2.9.11"
SWIG_VERSION = "4.0.2"
@@ -220,6 +224,7 @@ if "v" in flags:
else:
logger.setLevel(logging.INFO)
OFF_ON = ["OFF", "ON"]
BUILD_STATIC = "shared" not in flags
ENABLE_FLAG = "--enable-static" if BUILD_STATIC else "--enable-shared"
DISABLE_FLAG = "--disable-shared" if BUILD_STATIC else "--disable-static"
@@ -302,7 +307,7 @@ if platform.system() == "Darwin":
BOOST_VERSION_UNDERSCORE = BOOST_VERSION.replace(".", "_")
OCE_LOCATION = f"https://github.com/tpaviot/oce/archive/OCE-{OCE_VERSION}.tar.gz"
BOOST_LOCATION = f"https://boostorg.jfrog.io/artifactory/main/release/{BOOST_VERSION}/source/"
BOOST_LOCATION = f"https://github.com/boostorg/boost/releases/download/boost-{BOOST_VERSION}/"
# Helper functions
@@ -331,7 +336,7 @@ def run_cmake(arg1, cmake_args, cmake_dir=None, cwd=None):
if "wasm" in flags:
wasm.append("emcmake")
run([*wasm, "cmake", P, *cmake_args, f"-DCMAKE_BUILD_TYPE={BUILD_CFG}"], cwd=cwd)
run([*wasm, "cmake", P, *cmake_args, f"-DCMAKE_BUILD_TYPE={BUILD_CFG}", f"-DBUILD_SHARED_LIBS={OFF_ON[not BUILD_STATIC]}"], cwd=cwd)
def git_clone_or_pull_repository(clone_url, target_dir, revision=None):
@@ -345,12 +350,15 @@ def git_clone_or_pull_repository(clone_url, target_dir, revision=None):
run([git, "clone", "--recursive", clone_url, target_dir])
else:
logger.info(f"directory '{target_dir}' already cloned. Pulling latest changes.")
run([git, "-C", target_dir, "fetch", "--all", "--tags", "--force"])
# detect whether we are on a branch and pull
if run([git, "rev-parse", "--abbrev-ref", "HEAD"], cwd=target_dir) != "HEAD":
run([git, "pull", clone_url], cwd=target_dir)
if revision != None:
run([git, "reset", "--hard"], cwd=target_dir)
run([git, "fetch", "--all"], cwd=target_dir)
run([git, "checkout", revision], cwd=target_dir)
@@ -457,6 +465,9 @@ def build_dependency(name, mode, build_tool_args, download_url, download_name, d
shutil.copytree(os.path.join(extract_dir, "boost"), os.path.join(DEPS_DIR, "install", f"boost-{BOOST_VERSION}", "boost"))
logger.info(f"\rInstalled {name} \n")
if "diskcleanup" in flags:
shutil.rmtree(build_dir, ignore_errors=True)
cecho("Collecting dependencies:", GREEN)
# Set compiler flags for 32bit builds on 64bit system
@@ -468,7 +479,7 @@ if platform.system() == "Darwin":
ADDITIONAL_ARGS = [f"-mmacosx-version-min={TOOLSET}"] + ADDITIONAL_ARGS
if "wasm" in flags:
ADDITIONAL_ARGS.extend(("-sWASM_BIGINT", "-fexceptions"))
ADDITIONAL_ARGS.extend(("-sWASM_BIGINT", "-fwasm-exceptions"))
# If the linker supports GC sections, set it up to reduce binary file size
# -fPIC is required for the shared libraries to work
@@ -517,7 +528,7 @@ if 'hdf5' in targets:
# not supported
orig = [os.environ[f] for f in compiler_flags]
for f in compiler_flags:
os.environ[f] = re.sub("-flto(=\w+)?", "", os.environ[f])
os.environ[f] = re.sub(r"-flto(=\w+)?", "", os.environ[f])
HDF5_MAJOR = ".".join(HDF5_VERSION.split(".")[:-1])
build_dependency(
@@ -588,6 +599,12 @@ if USE_OCCT and "occ" in targets:
if OCCT_VERSION == "7.7.1":
patches.append("./patches/occt/no_ExpToCasExe.patch")
if OCCT_VERSION == "7.7.2":
patches.append("./patches/occt/no_ExpToCasExe_7_7_2.patch")
if OCCT_VERSION == "7.8.1":
patches.append("./patches/occt/no_ExpToCasExe_7_8_1.patch")
if "wasm" in flags:
patches.append("./patches/occt/no_em_js.patch")
@@ -601,7 +618,7 @@ if USE_OCCT and "occ" in targets:
"-DBUILD_RELEASE_DISABLE_EXCEPTIONS=Off",
f"-D3RDPARTY_FREETYPE_DIR={DEPS_DIR}/install/freetype"
],
download_url = "https://git.dev.opencascade.org/repos/occt.git",
download_url = "https://github.com/Open-Cascade-SAS/OCCT",
download_name = "occt",
download_tool=download_tool_git,
patch=patches,
@@ -721,14 +738,16 @@ if "boost" in targets:
"--with-thread",
"--with-date_time",
"--with-iostreams",
"--with-filesystem",
f"link={LINK_TYPE}",
*toolset,
*map(str_concat("cxxflags"), CXXFLAGS.strip().split(' ')),
*map(str_concat("linkflags"), LDFLAGS.strip().split(' ')),
"stage", "-s", "NO_BZIP2=1"],
download_url=BOOST_LOCATION,
patch="./patches/boost/boostorg_regex_62.patch",
download_name=f"boost_{BOOST_VERSION_UNDERSCORE}.tar.bz2"
# don't remember what this is, but fail on 1.86
# patch="./patches/boost/boostorg_regex_62.patch",
download_name=f"boost-{BOOST_VERSION}-b2-nodocs.tar.gz"
)
if "wasm" in flags:
# only supported on nix for now
@@ -821,7 +840,6 @@ os.makedirs(IFCOS_DIR, exist_ok=True)
executables_dir = os.path.join(IFCOS_DIR, "executables")
os.makedirs(executables_dir, exist_ok=True)
OFF_ON = ["OFF", "ON"]
cmake_args = [
"-DUSE_MMAP=" "OFF",
@@ -963,7 +981,7 @@ if "IfcOpenShell-Python" in targets:
logger.info(f"\rBuilding python {python_version} wrapper... ")
run([make, f"-j{IFCOS_NUM_BUILD_PROCS}", "_ifcopenshell_wrapper"], cwd=python_dir)
run([make, f"-j{IFCOS_NUM_BUILD_PROCS}", "ifcopenshell_wrapper"], cwd=python_dir)
run([make, "install/local"], cwd=os.path.join(python_dir, "ifcwrap"))
if python_executable:
@@ -972,7 +990,11 @@ if "IfcOpenShell-Python" in targets:
if platform.system() != "Darwin":
if BUILD_CFG == "Release":
# TODO: This symbol name depends on the Python version?
run([strip, "-s", "-K", "PyInit__ifcopenshell_wrapper", glob.glob(os.path.join(module_dir, "_ifcopenshell_wrapper*.so"))[0]], cwd=module_dir)
so = glob.glob(os.path.join(module_dir, "_ifcopenshell_wrapper*.so"))[0]
if "wasm" in flags:
run(['wasm-strip', so, '-k', "dylink.0"])
else:
run([strip, "-s", "-K", "PyInit__ifcopenshell_wrapper", so], cwd=module_dir)
return module_dir
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1bacca1a48..11f931ad39 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -820,6 +820,8 @@ else()
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
endif()
+list (REMOVE_ITEM BUILD_TOOLKITS ExpToCasExe)
+
# bison
if (BUILD_YACCLEX)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86905287dc..9d0bce984c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -828,6 +828,8 @@ else()
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
endif()
+list (REMOVE_ITEM BUILD_TOOLKITS ExpToCasExe)
+
# bison
if (BUILD_YACCLEX)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
+3 -2
View File
@@ -3,11 +3,12 @@ package:
version: 0.8.0
source:
path: IfcOpenShell
path: ../../IfcOpenShell
build:
script: |
python nix/build-all.py --without-hdf5 --without-opencollada --without-swig --without-pcre -v --wasm --py310 IfcOpenShell-Python
BUILD_CFG=Release python nix/build-all.py --without-hdf5 --without-opencollada --without-swig --without-pcre -v --wasm --py312 IfcOpenShell-Python
mv package/ifcopenshell .
cp pyodide/setup.py .
about:
+2 -2
View File
@@ -1,11 +1,11 @@
from setuptools import setup, find_packages
setup(name='IfcOpenShell',
setup(name='ifcopenshell',
version='0.8.0',
description='IfcOpenShell is an open source (LGPL) software library for working with the Industry Foundation Classes (IFC) file format.',
author='Thomas Krijnen',
author_email='thomas@aecgeeks.com',
url='http://ifcopenshell.org',
packages=find_packages(),
package_data={'': ['*.so']},
package_data={'': ['*.so', '*.json']},
)
+3 -1
View File
@@ -4,7 +4,7 @@ include = '''
src/(
bcf
|bcfserver
|blenderbim
|bonsai
|bsdd
|foundationserver
|ifc2ca
@@ -27,7 +27,9 @@ include = '''
extend-exclude = '''
src/ifcopenshell-python/ifcopenshell/express/*
|src/ifcopenshell-python/ifcopenshell/mvd/*
|src/ifcopenshell-python/ifcopenshell/simple_spf/*
|src/ifc2ca/templates/*
|src/ifcconvert/cityjson/*
'''
[tool.pyright]
+32 -51
View File
@@ -66,7 +66,11 @@ BLENDER_PLATFORM:=linux-x64
endif
ifeq ($(PLATFORM), macos)
ifeq ($(PYVERSION), py311)
PYPI_PLATFORM:=--platform macosx_10_10_x86_64
else
PYPI_PLATFORM:=--platform macosx_10_13_x86_64
endif
BLENDER_PLATFORM:=macos-x64
endif
@@ -81,9 +85,12 @@ BLENDER_PLATFORM:=windows-x64
endif
# Current build commit hash.
OLD:=03935a9
OLD:=c49ca69
.PHONY: bump
bump:
ifndef NEW
$(error ERROR: 'NEW' variable is not set (should be set with new commmit hash). Example use for 'bump' command: 'make bump NEW=0123456'.)
endif
cd . && $(SED) -b "s/$(OLD)/$(NEW)/" Makefile
cd ../ifcopenshell-python/ && $(SED) -b "s/$(OLD)/$(NEW)/" Makefile
@@ -170,6 +177,8 @@ endif
# Is not platform specific but has platform specific dependencies.
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download python-socketio[asyncio_client] $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download aiohttp $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
# Required to access platform specific paths
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download platformdirs --dest=./wheels
# Required by light module
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pytz --dest=./wheels
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download tzfpy $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
@@ -205,7 +214,7 @@ endif
# Brickschema requires pkg_resources which is provided by Blender.
# Provides Brickschema functionality
# For now lets bundle the latest nightly schema
cd build/bonsai/bim/schema && wget https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl
cd build/bonsai/bim/data/brick/ && wget https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl
# Required for hipped roof generation
cd build && wget https://github.com/prochitecture/bpypolyskel/archive/refs/heads/master.zip
@@ -219,8 +228,16 @@ endif
)" bdist_wheel
cp -r build/bpypolyskel-master/dist/*.whl build/wheels/
# Required for Desktop icon and file association
cp -r bonsai/libs/desktop build/bonsai/libs/
# folder for executable files
mkdir -p build/bonsai/libs/bin
# required for three-way git merging
ifeq ($(PLATFORM), win)
cd build/bonsai/libs/bin && wget https://github.com/brunopostle/ifcmerge/releases/download/2025-01-26/ifcmerge.zip
cd build/bonsai/libs/bin && unzip ifcmerge.zip && rm ifcmerge.zip
else
cd build/bonsai/libs/bin && wget https://raw.githubusercontent.com/brunopostle/ifcmerge/main/ifcmerge && chmod +x ifcmerge
endif
# Generate translations module for Bonsai build
git clone https://github.com/IfcOpenShell/bonsai-translations.git build/working
@@ -261,54 +278,11 @@ endif
fi
mv build/wheels/*.whl build/bonsai/wheels/
# Ugly patch to accomodate MacOS universal builds not being recognized by Blender.
# Blender doesn't look into the wheel contents, it just checks the name.
# So this hack works without working out some way to repack those wheels.
# See: https://projects.blender.org/blender/blender/issues/125091
ifeq ($(PLATFORM), macosm1)
# Has universal and x86_64 builds.
prev_whl_name=$$(find build/bonsai/wheels/MarkupSafe-*.whl); \
whl_name=$$(echo $$prev_whl_name | sed "s/_universal2/_arm64/"); \
mv "$$prev_whl_name" "$$whl_name";
# Has universal and x86_64 builds.
prev_whl_name=$$(find build/bonsai/wheels/lxml-*.whl); \
whl_name=$$(echo $$prev_whl_name | sed "s/_universal2/_arm64/"); \
mv "$$prev_whl_name" "$$whl_name";
# Temporary workaround for Blender not handling non-3.11 wheels #5743.
# Use '-n' as on macos x86-64 doesn't have a binary wheel and it autoincludes 'cp311'.
prev_whl_name=$$(find build/bonsai/wheels/tzfpy-*.whl); \
whl_name=$$(echo $$prev_whl_name | sed "s/macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2/macosx_10_12_arm64/"); \
mv "$$prev_whl_name" "$$whl_name";
# Has only universal build.
prev_whl_name=$$(find build/bonsai/wheels/greenlet-*.whl); \
whl_name=$$(echo $$prev_whl_name | sed "s/_universal2/_arm64/"); \
mv "$$prev_whl_name" "$$whl_name";
endif
ifeq ($(PLATFORM), macos)
prev_whl_name=$$(find build/bonsai/wheels/tzfpy-*.whl); \
whl_name=$$(echo $$prev_whl_name | sed "s/macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2/macosx_10_9_x86_64/"); \
mv "$$prev_whl_name" "$$whl_name";
prev_whl_name=$$(find build/bonsai/wheels/greenlet-*.whl); \
whl_name=$$(echo $$prev_whl_name | sed "s/_universal2/_x86_64/"); \
mv "$$prev_whl_name" "$$whl_name";
# has universal and amr64 builds.
prev_whl_name=$$(find build/bonsai/wheels/fonttools-*.whl); \
whl_name=$$(echo $$prev_whl_name | sed "s/_universal2/_x86_64/"); \
mv "$$prev_whl_name" "$$whl_name";
endif
# Safeguard for unhandled universal files.
wheels=$$(find build/bonsai/wheels/*universal2*.whl); \
if [ -n "$$wheels" ]; then \
echo "Found universal2 wheel files:"; \
echo "$$wheels"; \
echo "Error: universal2 wheel files are not supported by Blender!"; \
exit 1; \
fi
whl_name=$$(echo $$prev_whl_name | sed "s/-cp39-/-cp$(PYNUMBER)-/"); \
mv --update=none "$$prev_whl_name" "$$whl_name";
ifneq ($(PLATFORM), linux)
# Safeguard: in case one of `pip download` will break,
@@ -326,6 +300,7 @@ endif
rm -rf build/bonsai/bim/
rm -rf build/bonsai/core/
rm -rf build/bonsai/tool/
rm -rf build/bonsai/libs/
ifeq ($(IS_STABLE), TRUE)
cd build && zip -r bonsai_$(PYVERSION)-$(VERSION)-$(BLENDER_PLATFORM).zip ./bonsai
@@ -369,6 +344,12 @@ else
pytest test/tool/test_$(MODULE).py
endif
# Reregistering test is not added to the standard test suite because during unregister
# Blender removes all Bonsai dependencies breaking dev-environment symlinks.
.PHONY: test-reregister
test-reregister:
blender --python scripts/reregister_bonsai.py
.PHONY: qa
qa:
black .
Binary file not shown.
+10 -4
View File
@@ -56,7 +56,7 @@ bbim_semver: dict[str, Any] = {}
# Accessed from bonsai dependency:
last_error = None
last_actions: deque = deque(maxlen=10)
last_actions: deque = deque(maxlen=20)
FIRST_INSTALLED_BBIM_VERSION: Union[str, None] = None
REINSTALLED_BBIM_VERSION: Union[str, None] = None
REGISTERED_BBIM_PACKAGE: str
@@ -317,7 +317,7 @@ if IN_BLENDER:
# But Blender currently doesn't support separate builds for different Python version,
# so those issues might still slip in.
box.label(text="Bonsai installed for wrong Python version.")
box.label(text=f"Expected: {py}. Got: {binary_py}.")
box.label(text=f"Expected binary version: {py}. Got: {binary_py}.")
# On reinstallation, dependencies versions doesn't change, so Blender will just ignore new dependencies.
# So, we need to make user will disable an extension (just uninstallation won't remove dependencies).
# Blender restart doesn't seem to be required in that case
@@ -325,11 +325,17 @@ if IN_BLENDER:
box.label(text="Try reinstalling with the correct Python version.")
box.label(text="Before reinstallation make sure to")
box.label(text="DISABLE Bonsai (uninstallation won't help).")
box.label(text="You can download correct version below.")
if py == "3.11":
box.label(text="You can download correct version below.")
else:
box.label(text="Since you're using Python >3.11,")
box.label(text="installation from Blender extensions platform")
box.label(text="is not supported and you need to download")
box.label(text="and install Bonsai from the link below.")
layout.operator("bim.copy_debug_information", text="Copy Error Message To Clipboard")
op = layout.operator("bim.open_uri", text="How Can I Fix This?")
op.uri = "https://docs.bonsaibim.org/users/troubleshooting.html#installation-issues"
op.uri = "https://docs.bonsaibim.org/guides/troubleshooting.html#installation-issues"
layout.label(text="Try Reinstalling:", icon="IMPORT")
op = layout.operator("bim.open_uri", text="Re-download Add-on")
-2
View File
@@ -1,2 +0,0 @@
# addon writes tmp stuff directly to its dir
/data/
+18 -5
View File
@@ -20,8 +20,7 @@ import os
import bpy
import bpy.utils.previews
import importlib
from pathlib import Path
from . import handler, ui, prop, operator, helper
from . import handler, ui, prop, operator
from typing import Callable, Union
try:
@@ -99,23 +98,25 @@ classes = [
operator.BIM_OT_add_section_plane,
operator.BIM_OT_delete_object,
operator.BIM_OT_remove_section_plane,
operator.BIM_OT_select_entity,
operator.BIM_OT_select_object,
operator.BIM_OT_show_description,
operator.BIM_OT_multiple_file_selector,
operator.ClippingPlaneCutWithCappings,
operator.CloseBlendWarning,
operator.CloseError,
operator.CopyTextToClipboard,
operator.EditBlenderCollection,
operator.FileAssociate,
operator.FileUnassociate,
operator.OpenPath,
operator.OpenUpstream,
operator.OpenUri,
operator.ReloadIfcFile,
operator.RemoveIfcFile,
operator.RevertClippingPlaneCut,
operator.SelectDataDir,
operator.SelectDir,
operator.SelectIfcFile,
operator.SelectSchemaDir,
operator.SelectURIAttribute,
operator.SetTab,
operator.SwitchTab,
@@ -135,6 +136,8 @@ classes = [
prop.BIMMeshProperties,
prop.BIMFacet,
prop.BIMFilterGroup,
prop.BIMSnapProperties,
prop.BIMSnapGroups,
ui.BIM_UL_clipping_plane,
ui.BIM_UL_generic,
ui.BIM_UL_topics,
@@ -144,7 +147,7 @@ classes = [
# Project overview
ui.BIM_PT_tab_new_project_wizard,
ui.BIM_PT_tab_project_info,
ui.BIM_PT_tab_spatial_decomposition,
ui.BIM_PT_tab_spatial,
ui.BIM_PT_tab_project_setup,
ui.BIM_PT_tab_geometry,
ui.BIM_PT_tab_stakeholders,
@@ -190,6 +193,8 @@ classes = [
# TODO: move this somewhere else and clean it up
ui.BIM_PT_section_plane,
ui.BIM_PT_section_with_cappings,
ui.BIM_PT_decorators_overlay,
ui.BIM_PT_snappping,
]
for mod in modules.values():
@@ -222,6 +227,8 @@ def register():
bpy.app.handlers.load_post.append(handler.load_post)
bpy.app.handlers.load_post.append(handler.loadIfcStore)
bpy.types.Scene.BIMProperties = bpy.props.PointerProperty(type=prop.BIMProperties)
bpy.types.Scene.BIMSnapProperties = bpy.props.PointerProperty(type=prop.BIMSnapProperties)
bpy.types.Scene.BIMSnapGroups = bpy.props.PointerProperty(type=prop.BIMSnapGroups)
bpy.types.Screen.BIMAreaProperties = bpy.props.CollectionProperty(type=prop.BIMAreaProperties)
bpy.types.Screen.BIMTabProperties = bpy.props.PointerProperty(type=prop.BIMTabProperties)
bpy.types.Collection.BIMCollectionProperties = bpy.props.PointerProperty(type=prop.BIMCollectionProperties)
@@ -256,6 +263,12 @@ def register():
icons = icon_preview
bpy.app.translations.register("bonsai", translations_dict)
import bonsai.tool as tool
tool.Blender.ensure_bin_in_path()
# RestrictedContext doesn't allow accessing scene attribute, postpone it for a bit.
bpy.app.timers.register(tool.Blender.setup_user_data_dir, first_interval=0.1)
def unregister():
global icons
@@ -0,0 +1,3 @@
*
!.gitignore
!README.md
@@ -0,0 +1 @@
This directory stores Brickschema definitions in TTL format.
@@ -0,0 +1,3 @@
*
!.gitignore
!README.md
+1
View File
@@ -0,0 +1 @@
This cache folder contains .h5 files. These files cache IFC geometry for performance only. You may safely clear the contents of this cache folder without losing data.
@@ -0,0 +1,3 @@
*
!.gitignore
!README.md
@@ -0,0 +1 @@
This directory stores generated drawings in SVG format.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

Some files were not shown because too many files have changed in this diff Show More