Compare commits

..

219 Commits

Author SHA1 Message Date
Bruno Postle b709f355ae README and pyproject.toml fixes for ifcquery, ifcedit, ifcmcp 2026-03-23 23:41:17 +00:00
Bruno Postle de2d2c4e3b Remove ifcquery build artifacts and add to .gitignore 2026-03-23 23:17:21 +00:00
Bruno Postle 901306a3fd black and ruff 2026-03-23 23:15:08 +00:00
Bruno Postle b52a23cb93 Add geometry.copy_representation API
Deep-copies the named representation from a source element to a target
element.

Generated with the assistance of an AI coding tool.
2026-03-21 07:50:32 +00:00
Bruno Postle b45cbefdd9 ifcquery info: add geometry_summary for Body representations
When an element has a Body representation, ifc_info now includes a
geometry_summary key with representation type and geometry details.

Generated with the assistance of an AI coding tool.
2026-03-20 22:57:54 +00:00
Bruno Postle a95c9fcaab ifcedit discover: fix param/return doc truncation on RST inline roles
Generated with the assistance of an AI coding tool.
2026-03-20 22:14:52 +00:00
Bruno Postle c078b5f255 geometry_creation.rst: add sections for assemblies, clipping normals, openings 2026-03-20 22:07:11 +00:00
Bruno Postle 7197d79dd9 clip_solid/clip_solid_bounded: add element param to register BBIM_Boolean
Add an optional element parameter to geometry.clip_solid and
geometry.clip_solid_bounded. When provided, the resulting
IfcBooleanClippingResult is registered in the element's BBIM_Boolean
property set so that regenerate_wall_representation preserves it during
regeneration.

Generated with the assistance of an AI coding tool.
2026-03-20 21:30:00 +00:00
Bruno Postle c3ca969e32 Doc clarification for api.geometry.add_wall_representation clippings normal
Generated with the assistance of an AI coding tool.
2026-03-20 21:28:47 +00:00
Bruno Postle 49bda7d8ba Doc clarification for api.feature.remove_feature
Generated with the assistance of an AI coding tool.
2026-03-20 20:51:19 +00:00
Bruno Postle 4c1f79f6ab Doc clarification for api.geometry.edit_object_placement
Generated with the assistance of an AI coding tool.
2026-03-20 20:45:45 +00:00
Bruno Postle 5de76cf5f9 Doc clarification for api.sequence.assign_process
Generated with the assistance of an AI coding tool.
2026-03-20 20:36:37 +00:00
Bruno Postle 76f073d9e7 ifcmcp can now save drawings and renders to files
Generated with the assistance of an AI coding tool.
2026-03-20 00:20:39 +00:00
Bruno Postle c23dfcf82e Add geometry.clip_solid_bounded API
Generated with the assistance of an AI coding tool.
2026-03-18 23:01:57 +00:00
Bruno Postle 80922fcd9a Add geometry.clip_solid API and fix half_space_solid docstring
clip_solid(file, item, location, normal) wraps Clipping.apply() to
clip any solid with a half-space plane. Normal points toward the
removed material — same convention as add_wall_representation clippings.

Clarifies that agreement_flag=False means the normal direction is the
void (removed) side.
2026-03-12 21:54:00 +00:00
Bruno Postle 75cfbd40b1 ifcquery: render types with material profile sets
Generated with the assistance of an AI coding tool.
2026-03-11 20:39:24 +00:00
Bruno Postle cd8199d3c4 ifcquery: diagnose empty drawings and fix test fixture
Generated with the assistance of an AI coding tool.
2026-03-10 07:30:16 +00:00
Bruno Postle ad2dc8c38e ifcquery/ifcmcp: fix plot bugs and add ifc_plot MCP tool
Generated with the assistance of an AI coding tool.
2026-03-10 07:14:09 +00:00
Bruno Postle 4d564f00aa Set _HAS_DRAW correctly 2026-03-09 23:10:07 +00:00
Bruno Postle 5b3960c9e5 Merge branch 'tfk-cli-plot' of github.com:IfcOpenShell/IfcOpenShell into ifc_cli 2026-03-09 23:08:00 +00:00
Bruno Postle 01d7c4dea8 ifcquery: render element types when asked
Generated with the assistance of an AI coding tool.
2026-03-09 21:09:09 +00:00
Bruno Postle 1d56736d75 shape_builder: warn about mixed item types in get_representation
Generated with the assistance of an AI coding tool.
2026-03-06 15:18:55 +00:00
Bruno Postle 06548c5db2 ifcmcp: add ifc_shape_list, ifc_shape_docs, ifc_shape tools
Exposes ShapeBuilder geometry methods via the MCP server: discovery
(list), documentation (docs), and execution (shape) with entity ID
coercion and numpy serialisation.

Generated with the assistance of an AI coding tool.
2026-03-05 00:11:52 +00:00
Bruno Postle b02321e3ed ifcmcp: fix tests to use IfcSession directly
Generated with the assistance of an AI coding tool.
2026-03-04 23:38:52 +00:00
Bruno Postle 3d2104d689 shape_builder: complete docstrings and return type annotations
Generated with the assistance of an AI coding tool.
2026-03-04 23:33:58 +00:00
Bruno Postle 9ecc587cb9 coerce: floatify mixed int/float lists in attribute dicts
JSON parses whole numbers as int, but ifcopenshell's C++ binding
requires Python floats for AGGREGATE OF DOUBLE attributes such as
DirectionRatios and Coordinates. Convert list elements to float when
the list already contains at least one float, leaving pure-integer
lists (face indices etc.) unchanged.

Generated with the assistance of an AI coding tool.
2026-03-01 20:27:38 +00:00
Thomas Krijnen e42acdfa86 ifcquery plot subcommand 2026-03-01 21:01:09 +01:00
Bruno Postle bf5b48d037 Add ifc_contexts and ifc_materials tools
New ifcquery modules list geometric representation contexts (with step
IDs, context type, identifier, target view, parent) and material sets
(IfcMaterial, layer sets, constituent sets, profile sets). Exposed as
CLI subcommands and MCP tools.

Generated with the assistance of an AI coding tool.
2026-03-01 19:49:53 +00:00
Bruno Postle 1cb298fa9c render: skip degenerate geometry instead of crashing
Guard the face array reshape so elements whose triangulation is not
divisible by 3 are silently dropped. Also wrap each _add_shape() call
in a try/except so a broken shape never aborts the whole render.

Generated with the assistance of an AI coding tool.
2026-03-01 19:49:13 +00:00
Bruno Postle 1801a768c1 Fix clipping when generating a wall 2026-03-01 17:07:50 +00:00
Bruno Postle 66f0b71c65 Add ifcmcp ifc_render tool and ifcquery render subcommand
Renders IFC model geometry to a PNG image using pyvista (off_screen).

ifcquery CLI:
  ifcquery <file> render [-o out.png] [--selector QUERY]
                         [--element ID[,ID...]] [--view iso|top|south|north|east|west]

ifcmcp MCP tool:
  ifc_render(selector, element_ids, view) -> list[ImageContent]
  Returns base64-encoded PNG as an MCP ImageContent block so the agent
  can inspect the model geometry inline.

Generated with the assistance of an AI coding tool.
2026-03-01 13:23:00 +00:00
Bruno Postle f4d7fda255 Support file paths in ifcedit project.append_asset
This now works:

  ifcedit run model.ifc project.append_asset --library library.ifc --element 5711

Generated with the assistance of an AI coding tool.
2026-02-28 07:19:51 +00:00
Bruno Postle c112c115ce Update README files
Generated with the assistance of an AI coding tool.
2026-02-23 23:30:07 +00:00
Bruno Postle 2a2ba45676 Add new ifcmcp tools to ifcchat tool schema
Adds ifc_validate, ifc_schedule, ifc_cost, ifc_schema, and ifc_quantify
to the hardcoded tool list in app.js to match the extended ifcmcp session.

Generated with the assistance of an AI coding tool.
2026-02-23 23:19:06 +00:00
Bruno Postle fd69c0534b Add validate, schedule, cost, schema, quantify to ifcquery/ifcedit/ifcmcp
ifcquery: validate [--rules], schedule [--depth N], cost [--depth N],
schema <EntityType>. ifcedit: quantify list/run subcommands using ifc5d
QTO rules. schedule and cost support max_depth to limit tree expansion,
replacing truncated levels with {truncated, count}. ifcmcp gains matching
session methods, @server.tool() decorators, and OpenAI tool schemas.

Generated with the assistance of an AI coding tool.
2026-02-23 23:11:35 +00:00
Thomas Krijnen 1226370b9e re-add AI generation disclosure 2026-02-21 09:37:29 +01:00
Thomas Krijnen 6e3eaa9b39 mv chat/ ifcchat 2026-02-21 09:34:42 +01:00
Bruno Postle 3ed2da23be Create missing CLI tools
Actually create the ifcquery, ifcedit and ifcmcp executables on pip
install instead of relying on `python3 -m ifcquery` style usage
2026-02-20 22:22:29 +00:00
Bruno Postle 249c498112 Add AGENTS.md contributor guide
Guidelines for external contributors using AI coding tools,
covering licensing, AI disclosure requirements, PR scope,
commit style, code formatting, and testing expectations.

Generated with the assistance of an AI coding tool.
2026-02-20 21:43:22 +00:00
Thomas Krijnen 2dde62803d Package ifcmcp as a HTML client-side chat app (#7697) 2026-02-20 20:54:16 +00:00
Bruno Postle d4ac3c36ce Add AI generation disclosure 2026-02-14 08:10:55 +00:00
Bruno Postle fecd4a810a black and ruff 2026-02-11 18:22:45 +00:00
Bruno Postle 060afb94b5 MCP wrapper for ifcquery and ifcedit
Model Context Protocol server implementation for AI agent access to IFC
projects
2026-02-10 22:32:43 +00:00
Bruno Postle b1f1de954d Rename ifcapi to ifcedit, README and black 2026-02-09 22:59:11 +00:00
Bruno Postle 12ed2d1ec3 Add ifcquery clash subcommand for geometric clash detection
Uses ifcopenshell.geom.tree API directly to check an element for
intersections and clearance violations against sibling elements
(--scope storey) or the entire model (--scope all).
2026-02-09 18:20:41 +00:00
Bruno Postle c77983ffe5 Add ifcquery relations subcommand for IFC relationship traversal
New subcommand: ifcquery <file> relations <element_id>
Returns all relationships for an element organised by category:
hierarchy (parent, container, aggregate, nest), children (contained,
parts, components, openings), type relationships, groups, systems,
zones, material, referenced structures, and connections/ports.
Empty categories are omitted from output.

Optional --traverse up flag walks the hierarchy from the element
up to IfcProject, returning the chain as a list.
2026-02-09 07:20:37 +00:00
Bruno Postle 78f26c2432 Add ifcapi CLI wrapper for ifcopenshell.api editor functions
Runtime introspection auto-discovers all API functions. Subcommands:
list (modules/functions), docs (parameter documentation), run (execute
with type-coerced CLI arguments). Output is JSON to stdout, supports
--dry-run validation and -o alternate output path.
2026-02-09 06:27:00 +00:00
Bruno Postle 39161e7256 Add ifcquery CLI tool for IFC model interrogation
Provides four subcommands for querying IFC models with JSON output:
- summary: schema, entity counts, project info
- tree: spatial hierarchy (Project > Site > Building > Storey > elements)
- info: deep element inspection (attributes, psets, type, material, container)
- select: filter elements using selector syntax
2026-02-08 23:24:48 +00:00
dependabot[bot] 17b88fff22 Bump aws-actions/configure-aws-credentials from 5 to 6
Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 5 to 6.
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/v5...v6)

---
updated-dependencies:
- dependency-name: aws-actions/configure-aws-credentials
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-08 19:17:56 +11:00
dependabot[bot] 3fe9980aa4 Bump ruff from 0.14.14 to 0.15.0
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.14 to 0.15.0.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.14...0.15.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-08 19:17:45 +11:00
Dion Moult dffa3515c0 Reimplement sort / reverse / join function to format language, simplify text annotation variables, add tests
Previously, sort, reverse list, and join functionality was implemented
as special cases in Bonsai itself. Given that it has usecases
(especially in material lists, but any sort of list applies) I've moved
this function into the IOS formatting language.

The IOS formatting language previously wasn't capable of this, but the
awesome addition by @falken10vdl made the formatting language accept
queries inline, so that means it can handle lists. I also added tests
for all the new functions and expression syntax (+-*/ operators).

I simplified the code that gets the evaluated text literal - previously
it seems to call format() multiple times.
2026-02-08 19:17:12 +11:00
Bruno Postle 1d5108f934 Fix linking for builds with -Wl,--as-needed 2026-02-06 16:51:41 +00:00
Dion Moult 02fab6eee2 Fix #7634. Support formatting signed numbers. 2026-02-06 16:35:04 +11:00
Dion Moult 5e9f97a0c7 Fix #5220. See #7629. See #7505. Reimplement text bulk copying using established copy attribute paradigm.
Previously, copy attribution was coupled with text editing. This meant
that you couldn't just do something like change the font or alignment
without also affecting literals. Now like most apps you can just select
bunch of text and change font size etc, using the same UI look and feel
that copying attribute has when editing attributes.

This refactor also removes the need for explicit props tracking each
possible attribute to copy, and the settings collection group. Bulk
applying is now done in core with no calls to UI.
2026-02-06 16:12:14 +11:00
Richard Brice 2692341d3a Fixes typo 2026-02-05 15:10:33 -08:00
Richard Brice a54b21b838 Fixes documentation and adds test for expected type 2026-02-05 04:37:58 -08:00
Andrej730 79ef6eb55c validate_object_selection - fix missing check for active object not present in a view layer 2026-02-04 19:58:26 +05:00
Andrej730 7e1843b962 dev_environment - support Blender 5.1 with Python 3.13 2026-02-04 19:58:25 +05:00
Andrej730 7411da2ae8 bim.search - fix error when unselectable objects get in the way #7635 2026-02-04 19:58:25 +05:00
Andrej730 2f586d6b9e bonsai prefs - shorten some description strings for readibility 2026-02-04 19:58:25 +05:00
Andrej730 f10d4602fc typing 2026-02-04 19:58:25 +05:00
Andrej730 50d00eba20 black . 2026-02-04 19:58:25 +05:00
Andrej730 95480a231c Move handling legacy mathutils buffer types to separate methods 2026-02-04 19:58:24 +05:00
Andrej730 a62b177b19 Bonsai - fix error drag'n'dropping ifc files in Blender 4.5.6
Example error:
```
Error: Couldn't find IFC file: 'L:/OD_Cool_Car_Guys.ifc'.
Traceback (most recent call last):
  File "\Blender Foundation\Blender\4.5\extensions\.local\lib\python3.11\site-packages\bonsai\bim\module\project\operator.py", line 2759, in invoke
    return bpy.ops.bim.load_project(filepath=(filepath / clean_up_path(self.files[0].name)).as_posix())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\blender-4.5.6-lts.a78963ed6435\4.5\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Couldn't find IFC file: 'L:/OD_Cool_Car_Guys.ifc'.
```
2026-02-03 19:20:05 +05:00
Andrej730 d6b636909f bonsai Makefile - revert d745882
Since https://github.com/LBNL-ETA/pyradiance/issues/56 is resolved now.
2026-02-03 14:55:14 +05:00
Andrej730 abf0d6f81a bonsai chaching - save ears for those running the tests 2026-02-03 14:55:14 +05:00
Andrej730 015431fa1f bonsai - drop unrelated pypi aud module
Turned out `aud` module we had in our makefile had nothing to do with Blender built-in `uad` module 🫣
So no need to install anything from PyPI since this module is generally available in Blender
2026-02-03 14:55:14 +05:00
Andrej730 95cc52a6f3 bonsai - revive very important chaching sound
`get_data_dir_path` doesn't have `filename` argument, therefore leading to an error
2026-02-03 14:55:14 +05:00
Dion Moult 9dff1441d7 See #7632. See #5848. Just disable indexed colour map loading for now, it's pretty rare.
Famous last words, at least the KDTree implementation is much faster.
2026-02-03 18:23:39 +11:00
Dion Moult fdf23ece85 Fix #7632. See #2824. Optimise vertex matching trick for IfcIndexedColourMap. 2026-02-03 18:20:49 +11:00
Dion Moult 1445f89f19 See #7629. Partially reimplement bulk text editing.
This isn't complete yet, but it hopefully demonstrates a preferred
implementation:

 * Logic in core, not operator
 * Loop done in core, without needing to call other core functions, so
the overhead of enabling and disabling editing per object is removed. No
more Blender logic, just straight editing in IFC.
 * Reuse existing function to grab text attributes instead of
reimplementing it twice.
 * Remove dead code, there seems to be a function
apply_to_selected_objects which was completely unused and duplicated
code twice.
2026-02-03 18:09:15 +11:00
Dion Moult fe395f9024 Revert "fixes #7629: close editing mode for text objects after batch edit"
This reverts commit 950e147bde.
2026-02-03 09:13:26 +11:00
Ryan Schultz 950e147bde fixes #7629: close editing mode for text objects after batch edit
Fix issue where selected text annotations remained in editing mode after
applying changes. Now properly restores original editing state for each
selected object.
2026-02-02 09:34:28 -06:00
Thomas Krijnen c385b93701 Add option --make-volume to apply BOPAlgo_MakerVolume API to non-manifold first operands in opening subtraction 2026-02-01 21:08:11 +01:00
falken10vdl 2d2e8e51aa Merge pull request #7611 from falken10vdl/connect-ports-for-cable-polyline-operator
connect the ports when creating several conected IfcFlowSegment with polyline
2026-02-01 09:21:27 +01:00
falken10vdl 13f03b7487 Merge pull request #7619 from falken10vdl/MEP-Segment-tool-add-rectangular-hollow-profile
MEP-Segment-tool-add-rectangular-hollow-and-U-shape-profile
2026-02-01 09:00:14 +01:00
Richard Brice c6257a4b3a Fixes errors in ifc_curve_rebar.cpp
M_PI was not defined,. Replaced it with boost::math::constants::pi<double>

Calculation of area was incorrect. Area of a circle = PI*r*r = PI*dia*dia/4
2026-01-31 05:30:36 -08:00
dependabot[bot] 9b8b05a570 Bump gersemi from 0.25.1 to 0.25.4
Bumps [gersemi](https://github.com/BlankSpruce/gersemi) from 0.25.1 to 0.25.4.
- [Release notes](https://github.com/BlankSpruce/gersemi/releases)
- [Changelog](https://github.com/BlankSpruce/gersemi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BlankSpruce/gersemi/compare/0.25.1...0.25.4)

---
updated-dependencies:
- dependency-name: gersemi
  dependency-version: 0.25.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-31 10:04:17 +11:00
Bruno Postle 611a898ada IFC Git close and reopen repo after cloning
Apparently on Windows clone can leave 'stale processes'
2026-01-30 20:07:04 +00:00
Andrej730 6409f41cdf Bonsai Makefile - sort of simplify pyversion check 2026-01-30 16:05:27 +05:00
Andrej730 35dc029898 bonsai - add a dockerfile 2026-01-30 16:05:27 +05:00
Andrej730 2f72346845 bonsai Makefile - fix platform tag to use the latest pyradiance
Apparently `pip download` is matching tag exactly, which was leading to Linux using pyradiance 0.5.3 instead of 1.1.5.
2026-01-30 16:05:27 +05:00
Andrej730 40e4894f8e ci-bonsai-daily - exclude intel mac build for Python 3.13
Since Blender dropped support for it in Blender 5.0 and Python 3.13 is only needed for Blender 5.1.
2026-01-30 16:05:27 +05:00
Andrej730 91ee2b9222 bonsai Makefile - require Blender 5.1 for Python 3.13 2026-01-30 16:05:27 +05:00
Andrej730 ac4ffd91e7 Bonsai Makefile - drop wheel renaming workaround #5743 2026-01-30 16:05:27 +05:00
Andrej730 d74588246a bonsai Makefile - workaround for pyradiance in Python 3.13
Until https://github.com/LBNL-ETA/pyradiance/issues/53 is resolved.
2026-01-30 16:05:26 +05:00
Andrej730 e8a4590d0a Bonsai Makefile - error for missing PYVERSION 2026-01-30 16:05:26 +05:00
Andrej730 38f9f309e7 Bonsai Makefile - enable Python 3.13 build 2026-01-30 16:05:26 +05:00
Andrej730 47ac909a81 ruff - sort imports 2026-01-30 16:05:26 +05:00
Andrej730 6a63c651d3 black . 2026-01-30 16:05:26 +05:00
falken10vdl 2727bec929 Reorder representation_template to improve clarity and organization as per user feedback 2026-01-30 10:24:53 +01:00
dependabot[bot] 22f91e11b3 Bump tar from 7.5.6 to 7.5.7 in /src/ifctester/webapp
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.6 to 7.5.7.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.6...v7.5.7)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-30 17:57:12 +11:00
Dion Moult 398cd7571e Add array feature tests
I'm thinking of moving array into its own module. The "model" module is
getting a bit full and it'll only grow bigger in the future.
2026-01-30 17:32:30 +11:00
Dion Moult 83d97d7e95 Fix #7616. Make regenerate array an operator instead of an array preference
Sync children was a bit odd because it's not actually an "array
parameter" per se, just a way to regenerate. It's now an operator.

There was a deeper issue I encountered where the way arrays work is that
they duplicate the parent element. (first encountered in e51d2d )
However, the duplication code has special array handling too. To avoid
issues with this cyclical coupling the previous solution was to
reimplement object duplication (with all sorts of pitfalls that has).
Now, I've tried to decouple it further by clearing all array psets prior
to any change, and readding the pset after everything has been
regenerated.

This can be improved upon but I don't feel confident until there is more
comprehensive test coverage for the duplicate operator.
2026-01-30 17:18:02 +11:00
falken10vdl e47694458f Add support for FLOW_SEGMENT_U_SHAPE in the AddElement operator 2026-01-29 23:21:14 +01:00
falken10vdl 98a3b2b132 Merge remote-tracking branch 'upstream/v0.8.0' into MEP-Segment-tool-add-rectangular-hollow-profile 2026-01-29 13:17:53 +01:00
falken10vdl d06f5a6cb9 Add thickness dimension to profile name 2026-01-29 13:12:47 +01:00
falken10vdl 966751a928 Add support for FLOW_SEGMENT_RECTANGULAR_HOLLOW in profile creation in the MEP Segment Tool 2026-01-29 13:10:54 +01:00
Dion Moult c1aa1dedba Fix #7615. Forgot a line when refactoring type geometry regeneration. Added test. 2026-01-29 19:33:44 +11:00
Dion Moult cc995db98b Minor fix to 46a6356 to use the collector tool
This has a few advantages:

 - The collection logic is centralised
 - The collection logic is configurable based on the collection mode
 - The name is not hardcoded
2026-01-29 19:12:02 +11:00
Ryan Schultz 0e8c98a7bb Fix: Handle emoji encoding error in dev_environment.py
Prevents UnicodeEncodeError on Windows when displaying success message.
2026-01-28 18:34:14 -06:00
Dion Moult 5ce6d927f3 Revert "fix #7537 - Layer thickness correct when slab is rotated and few other features... "
This reverts commit 7f87f1fb89.
2026-01-28 23:39:45 +11:00
Dion Moult 34303c2cfe Revert "fix to https://github.com/IfcOpenShell/IfcOpenShell/commit/7f87f1fb89fb001320223a4d85e6267f342bf13c: have rotation around the object's origin, not the world origin"
This reverts commit 249e68f163.
2026-01-28 23:28:14 +11:00
Dion Moult 6cfb6d74fe Revert "fix #7559: DirectionSense works again."
This reverts commit d79524b087.
2026-01-28 23:25:35 +11:00
Dion Moult e76c2a70e6 Add tests for aggregate containment changing 2026-01-28 23:18:57 +11:00
Dion Moult 53e5f84730 Fix failing core unit tests 2026-01-28 21:49:25 +11:00
Dion Moult bcff5c7449 Remove unused tool 2026-01-28 21:49:13 +11:00
Dion Moult 6f78d60c9f Minor fix for tests to prevent ambiguous labeling 2026-01-28 21:22:19 +11:00
Dion Moult ff35666ad9 Reimplement feature to reassign inherited containers if you select a child element
This reimplements @theoryshaw 's commit 9adbd4 but has a few upgrades:

 - Considers all parent / child relationships, not just aggregates
 - Puts business logic in core where it belongs and tool code in tool
 - Uses existing utils where possible like get_decomposition
 - Does not use name based collection checking which is fragile
 - Reuses tool.Collector
 - Makes container assignment handle the API's capability to do things
in bulk instead of one by one in a loop, so it's faster
 - Tests
2026-01-28 18:00:04 +11:00
Dion Moult 79fa47fc2f Allow specifying MODULE in make test-core for convenience 2026-01-28 17:49:31 +11:00
Dion Moult 35ae1e927d Fix missing model prophet in core test bootstrap 2026-01-28 17:49:15 +11:00
Dion Moult 24a58cba40 Remove functionality to unlink from non-IFC collections
This is a cool idea, but users have all sorts of Blender collection
strategies and I think it's a good idea for Bonsai code to just touch
Bonsai's stuff and leave everything else. Separate functionality can be
built for non-Bonsai workflows and preferrably in a more discoverable
way than in individual Bonsai features.
2026-01-28 09:14:40 +11:00
falken10vdl 8a32d7bea0 Add EstablishPathDirection operator and update UI to integrate it 2026-01-27 18:05:19 +01:00
Dion Moult bbf8fc2b64 Revert "feat: auto-assign containers to root aggregates and organize parts in outliner"
This reverts commit 9adbd47181.
2026-01-27 19:27:34 +11:00
Dion Moult 2a60f46516 Refactor parse_distance_string into tool classmethod and add tests including e9eca5e behaviour 2026-01-27 19:13:43 +11:00
Dion Moult 6ad9949571 Update tests based on new simpler unit settings code 2026-01-27 19:12:43 +11:00
Dion Moult e41df68124 Reintroduce public API for IfcTester after ruff purge 72f8218fcd 2026-01-27 15:57:47 +11:00
Ryan Schultz de6f6cc8b2 Skip incompatible objects instead of failing IFC join operation
When joining objects with mismatched representation types, deselect and
skip incompatible objects rather than canceling the entire operation.
This allows users to join compatible objects even when the selection
includes incompatible ones.
2026-01-26 19:53:41 -06:00
falken10vdl fed98451d4 connect the ports when creating several conected IfcFlowSegment with polyline 2026-01-27 01:32:06 +01:00
Dion Moult 44a52863a2 Fix #3764. WARNING: Preserve material usage attributes when switching types and refactor type regeneration API listeners
This is a dangerous commit because the effect of refactoring of the listeners is hard to know.
2026-01-26 23:30:39 +11:00
Esteban Dugueperoux f725e05655 Merge pull request #7486 from EstebanDugueperoux2/TestAllExamples
cmake: Try to build and run others examples
2026-01-26 13:20:21 +01:00
Andrej730 953c5fddc6 bonsai - sort imports 2026-01-26 17:13:18 +05:00
Andrej730 1319391a6b ci-bonsai-daily - enable Python 3.13 build
Since it's coming in Blender 5.1 which is soon to go Beta (at 4 Feb).
2026-01-26 17:10:04 +05:00
Andrej730 bc675ef9b2 cmake_uninstall - fix always skipped if-block condition 2026-01-26 17:10:03 +05:00
Andrej730 c6766cefb7 cmake_uninstall - speed up the process and fix cmake warnings 2026-01-26 17:10:03 +05:00
Andrej730 c4c1e2ebf9 cmake_uninstall - simplify by using common variable 2026-01-26 17:10:03 +05:00
Andrej730 dbb4e91d55 apply cmake file formatting 2026-01-26 17:10:03 +05:00
Andrej730 44f0a4a39b pyproject.toml - simplify cmake formatter command
Since the latest gersemi version, it now respects gitignore.
2026-01-26 17:10:03 +05:00
Andrej730 6d4eb06d89 black . 2026-01-26 17:10:03 +05:00
Andrej730 72f8218fcd ruff - check for more unused imports 2026-01-26 17:10:02 +05:00
Andrej730 4edcad13b8 fix ruff 2026-01-26 17:10:02 +05:00
Andrej730 d4d10b2eb5 ifcsverchok - polyline node
Demo - https://files.catbox.moe/azv66e.mp4
2026-01-26 17:10:02 +05:00
Andrej730 523bcf3443 ifcsverchok - node to convert sverchok geometry to ifc
Example - https://files.catbox.moe/wecgw9.mp4
2026-01-26 17:10:02 +05:00
Andrej730 b96a21350c ifcsverchok - document value types in doc-strings 2026-01-26 17:10:02 +05:00
Andrej730 2f5bcccd2c bim.assign_class - don't flip normals for objects with negative scale in Blender 5.1+
The issue was fixed upstream - https://projects.blender.org/blender/blender/issues/102266
2026-01-26 16:10:02 +05:00
Dion Moult d62a6186b5 Demo project preset shouldn't have mass or time by default 2026-01-26 00:01:43 +11:00
Dion Moult a6394d8628 Revert "Closes #3764: When switching an instance to a different beam type, preserve the CardinalPoint."
This reverts commit 4874f7770b.
2026-01-25 20:58:29 +11:00
Dion Moult b4caf3b2dd Fix #7153. Fix regression in purging types in IFC2X3 from 56861b9 2026-01-25 15:27:23 +11:00
Dion Moult 0e4f2fada1 Fix #7519. Do not import parametrically locked item attributes.
The previous fix by @theoryshaw had the correct conclusion but had some
issues:

 1. Don't implement anything that fetches IFC data in the UI draw calls.
This historically has lead to race conditions and crashes. The data
classes are much preferred.
 2. Rather than load the inapplicable attribute then selectively omit it
in the UI, it's preferred to just never load it in the first place.
2026-01-25 14:16:35 +11:00
Dion Moult 12f8863014 Revert "Fix #7519: Hide depth attribute in Item Mode for elements with material layer sets"
This reverts commit 99b162f712.
2026-01-25 14:12:16 +11:00
Dion Moult 884661a454 See #7537. Quick fix for regression in editing slabs. Needs further investigation. 2026-01-25 10:43:27 +11:00
Dion Moult 0d8c4c7795 Fix #7587. See #7550. Bug where you couldn't load or edit arrayed voids.
Reuse tool.Geometry.duplicate_ifc_objects because that's where all
duplication logic should stay instead of half reimplementing it every
time which introduces subtle bugs.
2026-01-24 23:03:18 +11:00
Esteban DUGUEPEROUX 8f3715c0f1 review: Take into account remarks 2026-01-24 12:09:29 +01:00
Dion Moult cf52607528 Fix #7591. Save pset as template now considers all psets in the file, not just the active one. 2026-01-24 14:20:02 +11:00
dependabot[bot] 7636ff3fdb Bump ruff from 0.14.13 to 0.14.14
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.13 to 0.14.14.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.13...0.14.14)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.14
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-24 13:47:32 +11:00
dependabot[bot] 0577dbe865 Bump black from 25.12 to 26.1.0
Bumps [black](https://github.com/psf/black) from 25.12 to 26.1.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/25.12.0...26.1.0)

---
updated-dependencies:
- dependency-name: black
  dependency-version: 26.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-24 13:45:01 +11:00
Esteban DUGUEPEROUX a86c333a99 make: Try to build and run others examples 2026-01-23 20:49:16 +01:00
Thomas Krijnen 3983bfa467 Don't crash on passing indeterminate to instance expecting aggregates #7529 2026-01-23 14:36:06 +01:00
Thomas Krijnen 1137e7b77b Fix rule compilation regarding indeterminate #7529 2026-01-23 14:36:06 +01:00
Dion Moult cc542ad074 See #7503. Add docs about geometry_library 2026-01-23 22:33:20 +11:00
Dion Moult b41d3ae2b7 Bump IfcConvert documentation including .json and .rdb support 2026-01-23 22:32:48 +11:00
Dion Moult 5c31ae4c37 Remove preference to mass/time and make it default with simpler code
I generally like to minimise knobs and dials, so this is now part of the
wizard but now defaults to a "NONE" unit. You also now have the option
to choose "NONE" for area / volume units which makes things consistent.
Enum names also match the IFC lowercase convention for conversion based
units. This also simplifies the core logic and treats all units the same
way instead of special cases for each unit type. (length is still
special and required in Bonsai as we are inherently graphical)
2026-01-23 22:03:32 +11:00
Thomas Krijnen 92ad7d2ba2 Fix #7554 2026-01-23 11:54:04 +01:00
Thomas Krijnen ad0c97a6bb Fix #7561 2026-01-23 11:44:14 +01:00
Thomas Krijnen 3d530b1d39 No occt multi-threading since we have our own 2026-01-23 11:44:14 +01:00
Thomas Krijnen f0308962aa Clash: Increase robustness of processing triangulated elements - fully co-planar element #7467 2026-01-23 11:44:14 +01:00
Thomas Krijnen 9c6a8bdb90 Clash: Increase robustness of processing triangulated elements - skip empty #7467 2026-01-23 11:44:14 +01:00
Thomas Krijnen a6a9f9d0a7 Only enable--fat on x86 in build-all.py #7458 #7556 2026-01-23 11:22:56 +01:00
Thomas Krijnen ab3108ff59 Set GMP --enable-fat during build #7458 #7556 2026-01-23 11:16:06 +01:00
Esteban DUGUEPEROUX 128fdcb62e fix: Add IfcGeom as a dependency of kernels target instead of the inverse 2026-01-23 10:22:16 +01:00
Esteban DUGUEPEROUX a609bc61b9 fix: Define OPENCASCADE_LIBRARIES as expected by generic CMakeLists.txt for ifcgeom kernels 2026-01-23 10:22:16 +01:00
Esteban DUGUEPEROUX c739b93389 fix: Have kernels targets built as library 2026-01-23 10:22:16 +01:00
Thomas Krijnen 6b7b834ac0 Don't try and solve 2d bools in cgal-simple #7503 2026-01-23 10:12:33 +01:00
Dion Moult ac128e3395 Close #7601. Clearer docs that there is a single mesh item. 2026-01-23 15:56:44 +11:00
Dion Moult 5dd771c5e5 Fix #7596. Bug where IFC2X3's workspace didn't use IfcDoorStyle and IfcWindowStyle instead 2026-01-23 15:51:39 +11:00
Dion Moult 247f0c41d9 Increase default deflection tolerance to improve performance
This only results in a lower resolution for things like advanced brep
geometry which isn't a biggie (I'll eat my words later)
2026-01-23 15:32:04 +11:00
falken10vdl bbda8d2aff Merge pull request #7543 from falken10vdl/MEP-ports
Simplified handling of Ports in MEP
Addresses https://community.osarch.org/discussion/comment/27740#Comment_27740
2026-01-22 09:34:52 +01:00
Dion Moult c2cc6f80be IfcTester webapp now shows prohibited more clearly
- is_skipped is calculated upstream instead of reimplementing logic
 - the viewer now shows cardinality (not just in edit mode) to make it
clear what the requirements are
 - prohibited specs are not allowed to have any requirements, so that
section is hidden
 - failed prohibited specs now shows list of failed (applicable)
entities
2026-01-22 14:36:46 +11:00
Dion Moult 4c47eb573a Improve IDS static HTML reporter to report list of prohibited entities (they aren't passes or fails, just prohibited applicability) 2026-01-22 11:18:35 +11:00
falken10vdl 84d55d8969 cleanup 2026-01-21 20:54:20 -03:00
falken10vdl 587fc63843 Refactor PolylineDecorator to simplify label indexing and improve text spacing calculation 2026-01-21 20:54:20 -03:00
falken10vdl 3c3525f205 display angles and area/length values conditionally based on polyline points 2026-01-21 20:54:20 -03:00
falken10vdl 4da0b04162 add adjunt_overlapping_labels 2026-01-21 20:54:20 -03:00
Vincent Cadoret a3801a0ce9 Fix UnboundLocalError in reporter.py cardinality assignment
The report_specification() method in the Json reporter class was raising
an UnboundLocalError when processing IDS specifications with certain
minOccurs/maxOccurs combinations that weren't explicitly handled.

Problem:
The cardinality variable was only assigned for three specific cases:
- minOccurs=1, maxOccurs="unbounded" → "required"
- minOccurs=0, maxOccurs="unbounded" → "optional"
- minOccurs=0, maxOccurs=0 → "prohibited"

However, the IDS schema allows other valid combinations such as:
- minOccurs=0, maxOccurs=1 (commonly used for optional specifications)
- minOccurs=1, maxOccurs=1 (exactly one occurrence required)
- Any other valid XML Schema cardinality values

When processing IDS files with these combinations, the cardinality
variable remained unassigned, causing an UnboundLocalError at line 382
when attempting to use it in ResultsSpecification().

Solution:
Added fallback logic to handle all valid IDS cardinality combinations:
- If minOccurs >= 1: cardinality = "required" (must occur at least once)
- Otherwise (minOccurs == 0): cardinality = "optional" (may occur)

This maintains semantic compatibility with the existing codebase, which
expects cardinality to be one of the semantic strings ("required",
"optional", "prohibited") rather than numeric ranges. This is critical
for:
- HTML template rendering (line 457: .capitalize())
- Conditional logic for skipped specs (line 454)
- UI rendering for prohibited specs (line 456)

Testing:
- Tested with IDS file containing minOccurs=0 without explicit maxOccurs
  (defaults to 1 per XML Schema specification)
- Validation now completes successfully without UnboundLocalError
- HTML report generation works correctly with semantic cardinality labels
- Maintains backward compatibility with existing IDS files

Fixes: Validation failure when using valid IDS cardinality combinations
2026-01-22 10:21:45 +11:00
Christoph Mellüh aafa1b95e8 bSDD Add new class properties and relations API Endpoints (#7502)
* black .

* add typing

* move function

* add get_class_relations

* add test for class relation

---------

Co-authored-by: Dion Moult <dionmoult@gmail.com>
2026-01-22 10:19:09 +11:00
falken10vdl f89cf88bc0 Add use_factory_startup to src/bonsai/test/bim/test_feature.py def an_empty_blender_session()
This addresses https://github.com/IfcOpenShell/IfcOpenShell/issues/7590

Cheers!
2026-01-22 09:36:04 +11:00
dependabot[bot] 0cc3ce8709 Bump tar from 7.5.3 to 7.5.6 in /src/ifctester/webapp
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.3 to 7.5.6.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.3...v7.5.6)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-22 08:40:44 +11:00
Andrej730 421d454ce8 Fix missing Literal import 2026-01-21 17:39:41 +05:00
Andrej730 64865c58a5 remove debug print 2026-01-21 17:39:41 +05:00
Andrej730 784415e464 ifcsverchok bonsai integration - support editing parametric properties from UI
Demo - https://files.catbox.moe/extsxf.mp4

But now it requires ifcsverchok graph to be nested inside a subgroup because we need a way to indicate which graph parameters are important, so user can modify them from Parametric Geometry tab without actually explicitly opening sverchok graph.
2026-01-21 17:39:41 +05:00
Andrej730 c33969d589 ifcsverchok - correct socket type for position 2026-01-21 17:39:40 +05:00
Dion Moult 41c6eba193 IfcTester should not check requirements for prohibited specifications 2026-01-21 19:43:37 +11:00
Dion Moult db52703ce3 Revert "Use hide_set() for IfcSpaces instead of hide_viewport"
This reverts commit 96fe9b5398.

This commit contains a logical error where hide_viewport is checked in
the if statement but hide_set() is used as the effect. This causes a
regression in tests about project visibility. `hide_viewport` is the
correct hiding setting to use, because hide_set is more ephemeral and
affected by Shift-H, Alt-H etc.
2026-01-21 18:52:27 +11:00
Dion Moult e55955b72a See #7566. Fix unusable lag due to dense meshes with product preview
Previously, when the add occurrence modal operator was executed, on
every modal loop (i.e. every mouse movement) it would fetch the mesh
geometry to be previewed, store the verts / edges / faces in mesh
collections, then the decorator would fetch that geometry, the clear the
collections, in a loop.

I've removed the Blender collections. Instead the same strategy is used
as in ItemDecorator i.e. the mesh and verts are fetched once during
decorator installation, then on each draw call only a single vertex loop
to multiply by the transformation matrix for snapping and mouse
position.

You can test with the LOD400 model in #7566. On my machine it would
cause lag on anything with >500 faces. Now it seems to work without lag
on a 26k polygon mesh.
2026-01-21 18:11:20 +11:00
dependabot[bot] 4c1b3221ce Bump gersemi from 0.24 to 0.25.1
Bumps [gersemi](https://github.com/BlankSpruce/gersemi) from 0.24 to 0.25.1.
- [Release notes](https://github.com/BlankSpruce/gersemi/releases)
- [Changelog](https://github.com/BlankSpruce/gersemi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BlankSpruce/gersemi/compare/0.24.0...0.25.1)

---
updated-dependencies:
- dependency-name: gersemi
  dependency-version: 0.25.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-19 12:40:44 +11:00
dependabot[bot] 9e2b7ba7c8 Bump tar from 7.4.3 to 7.5.3 in /src/ifctester/webapp
Bumps [tar](https://github.com/isaacs/node-tar) from 7.4.3 to 7.5.3.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.4.3...v7.5.3)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-19 12:39:38 +11:00
falken10vdl 1576ade147 Merge pull request #7576 from falken10vdl/support-enum-for-search-suggestions
Enhance filter value suggestions to support enumerated properties in search
2026-01-18 00:13:44 +01:00
falken10vdl db8a1b9262 Merge pull request #7575 from falken10vdl/simplify-new-filter-mode-with-just-chained-filters-with-set-operations
Refactor filter mode handling to simplify chained filters with set operations
2026-01-18 00:12:40 +01:00
falken10vdl 09d193045a Enhance filter value suggestions to support enumerated properties in search 2026-01-18 00:05:07 +01:00
falken10vdl f3295e2663 Refactor filter mode handling to simplify chained filters with set operations 2026-01-17 20:02:09 +01:00
Dion Moult 16a90cadb5 Cap product decorator at 500 triangles to prevent unresponsive UI during dense product placement 2026-01-17 17:57:07 +11:00
Dion Moult 2065d4ce78 Minor optimisation to prevent looping through all verts twice in decorator draw 2026-01-17 17:55:11 +11:00
dependabot[bot] 5cadfd693f Bump ruff from 0.14.10 to 0.14.13
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.10 to 0.14.13.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.10...0.14.13)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-17 15:39:57 +11:00
Andrej730 9d1dcf9034 external parametric geometry - integrate with ifcsverchok
Still very experimental, but here's a short demo - https://files.catbox.moe/u6vnhj.mp4
Sverchok graph I've used - https://files.catbox.moe/1x7b7q.png
2026-01-16 17:16:29 +05:00
Andrej730 ed38d2347c ifcsverchok - check for unused imports 2026-01-16 17:16:29 +05:00
Andrej730 47e259ff2f ifcsverchok - operator to apply graph to Bonsai file 2026-01-16 17:16:29 +05:00
Andrej730 413530bb0a ifcsverchok - shape output node 2026-01-16 17:16:29 +05:00
Andrej730 a3bcea008a util.shape - move typing stuff to TYPE_CHECKING block 2026-01-16 17:16:29 +05:00
Andrej730 d93363b9bb ifcsverchok - specify extrusion axis 2026-01-16 17:16:29 +05:00
Andrej730 77a912c756 shape_builder.rectangle - clarify 3d size use 2026-01-16 17:16:28 +05:00
Andrej730 668b63a323 shape_builder - clean up redundant default values from doc-strings 2026-01-16 17:16:28 +05:00
Andrej730 dbc0cca36e ifcsverchok - experimenting with shape builder nodes 2026-01-16 17:16:28 +05:00
Andrej730 009652f97d ifcsverchok - fix by query node 2026-01-16 17:16:28 +05:00
Andrej730 c77c4ce968 model.ui - more specific typing from props 2026-01-16 17:16:28 +05:00
Andrej730 a0b81e333e black . 2026-01-16 17:16:25 +05:00
Andrej730 dfc91e6639 ifcopenshell-python - clean up unused imports 2026-01-16 17:16:24 +05:00
Dion Moult 233ad63bca Remove document menu for UI consistency
Although it is a very cool trick, I feel this essentially duplicates the
UI in two spots, and is an outlier in UX. I'd prefer for all IFC data
and relationships to be in one location only (the panels). I think there
are a better unified solutions (e.g. favourite bookmark panels) for
quick access for things like this.
2026-01-16 20:11:43 +11:00
Dion Moult 242f1aab35 Fix #7563. Regression in normalising document URIs. 2026-01-16 10:26:23 +11:00
falken10vdl 96a0e9f72d Adapt tests for create_port_at_cursor method 2026-01-13 10:07:10 +01:00
falken10vdl 791a41d649 cleanup and black . 2026-01-13 08:49:57 +01:00
falken10vdl 1eb2b65268 Add flow direction handling to port connection logic and UI updates 2026-01-12 12:19:13 +01:00
falken10vdl e5ccd26762 Update port UI to indicate disconnection status more clearly 2026-01-11 14:46:17 +01:00
falken10vdl 0243519a68 Refactor port connection logic and UI integration for improved usability 2026-01-11 14:22:58 +01:00
falken10vdl 7ef11361b0 Update flow direction icons for ports in UI 2026-01-10 10:12:25 +01:00
falken10vdl dfbaa6ac8e Reset related_port_object to None after connecting ports 2026-01-09 17:39:42 +01:00
falken10vdl c41496a9c3 import IfcDistributionPorts with assets when executing append_library_element and for type products, use the type product's collection, not the container 2026-01-09 17:11:02 +01:00
falken10vdl ed7ae0da9c Enhance show_ports (also shows ports of connected objects) and refine UI layout 2026-01-09 13:18:01 +01:00
falken10vdl 4463235728 Remove ShowPortFlowError operator and update flow direction handling for connected ports 2026-01-09 08:43:46 +01:00
falken10vdl 628a76e487 Simplified handling of Ports in MEP 2026-01-09 02:02:43 +01:00
918 changed files with 41585 additions and 29548 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ jobs:
cd ..
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
+1 -1
View File
@@ -77,7 +77,7 @@ jobs:
git push || echo "Push failed"
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
+1 -1
View File
@@ -118,7 +118,7 @@ jobs:
cd ..
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
+1 -1
View File
@@ -118,7 +118,7 @@ jobs:
cd ..
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
+1 -1
View File
@@ -73,7 +73,7 @@ jobs:
git push || echo "Push failed"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v5
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_UPLOAD_SECRET_ACCESS_KEY }}
+6 -1
View File
@@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pyver: [py311, py312]
pyver: [py311, py312, py313]
config:
- {
name: "Windows Build",
@@ -53,6 +53,11 @@ jobs:
name: "MacOS ARM Build",
short_name: macosm1,
}
exclude:
# Python 3.13 is needed for Blender 5.1+ and Blender dropped Intel Mac support in 5.0.
- pyver: py313
config:
short_name: macos
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6 # https://github.com/actions/setup-python
+23 -5
View File
@@ -53,7 +53,6 @@ jobs:
python -m pip install --upgrade pip
pip install xmlschema xsdata numpy lxml pytest isodate lark networkx tabulate python-dateutil shapely
pip install src/bcf --no-deps
pip install git+https://github.com/zdhoward/aud
pip install pytest-xdist==3.8.0
- name: Install C++ dependencies
@@ -209,17 +208,36 @@ jobs:
- name: Build standalone examples to test cmake package
run: |
set -x
cd src/examples
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build .
./arbitrary_open_profile_def && test -f arbitrary_open_profile_def.ifc
./composite_profile_def && test -f composite_profile_def.ifc
./csg_primitive && test -f csg_primitive.ifc
./ellipse_pies && test -f ellipse_pies.ifc
./faces && test -f faces.ifc
./ifc_curve_rebar && test -f ifc_curve_rebar.ifc
./profiles
test -f IfcUShapeProfileDef.ifc
test -f IfcTShapeProfileDef.ifc
test -f IfcZShapeProfileDef.ifc
test -f IfcEllipseProfileDef.ifc
test -f IfcIShapeProfileDef.ifc
test -f IfcLShapeProfileDef.ifc
test -f IfcCShapeProfileDef.ifc
test -f IfcCircleProfileDef.ifc
test -f IfcRectangleProfileDef.ifc
test -f IfcTrapeziumProfileDef.ifc
./IfcParseExamples "../IfcParseExamples_test.ifc"
./IfcOpenHouse
./IfcAdvancedHouse
./IfcAlignment
./IfcSimplifiedAlignment
./IfcOpenHouse && test -f IfcOpenHouse.ifc
./IfcAdvancedHouse && test -f IfcAdvancedHouse.ifc
./IfcAlignment && test -f IfcAlignment.ifc
./IfcSimplifiedAlignment && test -f IfcSimplifiedAlignment.ifc
./triangulated_faceset && test -f triangulated_faceset.ifc
- name: Test ifcopenshell-python
run: |
+1
View File
@@ -113,3 +113,4 @@ dev_environment.bat
src/ifcopenshell-python/ifcopenshell/express/*.exp
src/ifcopenshell-python/ifcopenshell/express/*.exp.cache.dat
src/ifcquery/build/
+153
View File
@@ -0,0 +1,153 @@
<!-- This file was generated with the assistance of an AI coding tool. -->
# AGENTS.md
Guidelines for AI coding agents contributing to IfcOpenShell. This file is
intended to be read by all AI agents regardless of platform (Claude Code,
Copilot, Cursor, etc.) in addition to any tool-specific configuration files.
Human contributors using AI tools should also read this document carefully,
as they are responsible for ensuring their contributions comply with these
guidelines.
## Project Overview
IfcOpenShell is an open source library for working with Industry Foundation
Classes (IFC). It provides C++ and Python APIs, geometry processing, and an
ecosystem of tools including IfcConvert and the Bonsai Blender add-on.
## Licensing
All contributions must be compatible with the project's licensing:
- **Library code** (everything except Bonsai): **LGPL-3.0-or-later**
- **Bonsai** (`src/bonsai/`): **GPL-3.0-or-later**
There is no Contributor License Agreement (CLA). By submitting a pull request,
you agree that your contribution is licensed under the applicable license above.
## Indicating AI-Generated Code
Contributors must clearly indicate when code has been generated or
substantially written by an AI tool.
### Commits
Commits that modify existing code must include a note in the **body** of the
commit message (not the subject line) indicating that the change was
AI-generated. For example:
```
Fix off-by-one error in element iteration
The loop termination condition was incorrect when processing
IfcRelAggregates relationships.
Generated with the assistance of an AI coding tool.
```
### New Files
New files that are AI-generated must include a comment near the top of the
file indicating this. Use the appropriate comment syntax for the language:
```python
# This file was generated with the assistance of an AI coding tool.
```
```cpp
// This file was generated with the assistance of an AI coding tool.
```
### Pull Requests
Pull requests containing AI-generated code must indicate in the PR description
which parts of the contribution are AI-generated. If the entire PR is
AI-generated, state that clearly. If only specific commits or files are
AI-generated, identify them.
## Pull Request Guidelines
### Scope and Size
- Each pull request should address a **single issue or feature**.
- Do not mix unrelated changes (e.g., bug fixes with refactoring or style
changes) in the same PR.
- Large pull requests should be broken down into **multiple small, standalone
commits** that are each easy to review independently. Rewrite commit history
for this purpose if necessary.
- PRs that are minimal, focused solutions to a specific problem are much more
likely to be accepted.
### What to Avoid
- **Over-engineering**: Do not add features, abstractions, or configurability
beyond what is needed to solve the immediate problem.
- **Scope creep**: Do not make changes to files or code that are not directly
related to the task at hand.
- **Unnecessary additions**: Do not add docstrings, comments, type annotations,
or error handling to code you did not otherwise need to change.
- **Cosmetic changes**: Do not reformat, rename, or reorganize code that is
unrelated to your change.
## Commit Messages
- The **subject line** must be **50 characters or less**.
- Use the **imperative mood** (e.g., "Fix crash in geometry kernel", not
"Fixed crash" or "Fixes crash").
- A commit message can be a single line if the purpose is obvious from the
subject alone.
- Otherwise, add a blank line after the subject followed by a short explanation
of a few lines in the body.
## Code Style
### Python
- **Line length**: 120 characters
- **Formatter**: black
- **Linter**: ruff
- Configuration is in `pyproject.toml`
### C++
- **Standard**: C++17 minimum
- **Formatter**: clang-format (configuration in `.clang-format`)
- **Linter**: clang-tidy (configuration in `.clang-tidy`)
Run linters and formatters **before submitting** your pull request. Do not rely
on CI to catch formatting issues.
## Testing
- Pull requests with test coverage are **much more likely to be merged**.
- If tests are appropriate and feasible for your change, they should be
included.
- Tests are not required for every change (e.g., documentation-only changes),
but the expectation is that testable code changes come with tests.
- Python tests use **pytest** and are located in `test/` or `tests/` directories
within each package under `src/`.
- Run the existing test suite for the package you modified before submitting.
## Architecture Quick Reference
### Directory Structure
- `src/ifcparse/` — C++ IFC file parsing
- `src/ifcgeom/` — C++ geometry processing (OpenCASCADE and CGAL kernels)
- `src/serializers/` — Output format serializers (glTF, Collada, SVG, etc.)
- `src/ifcwrap/` — SWIG Python bindings
- `src/ifcconvert/` — CLI conversion tool
- `src/ifcopenshell-python/` — Python API (`ifcopenshell` package)
- `src/bonsai/` — Blender add-on (GPL-3.0-or-later)
- `src/ifctester/` — IDS model auditing
- `src/ifcpatch/` — IFC file manipulation scripts
- `src/ifcdiff/` — IFC model comparison
- `src/ifcclash/` — Clash detection
- `src/ifccsv/` — Schedule import/export
### IFC Schema Versions
The library supports IFC2x3 TC1, IFC4 Add2 TC1, IFC4x1, IFC4x2, and
IFC4x3 Add2. Schema-specific code is compiled conditionally. Be aware of
which schema versions your change affects.
+9 -5
View File
@@ -13,7 +13,14 @@ include(CMakeFindDependencyMacro)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_COMPONENTS system program_options regex thread date_time iostreams)
set(Boost_COMPONENTS
system
program_options
regex
thread
date_time
iostreams
)
find_dependency(Boost CONFIG COMPONENTS ${Boost_COMPONENTS})
find_dependency(Eigen3 CONFIG)
@@ -39,7 +46,6 @@ if(IFCOPENSHELL_IFCXML)
find_dependency(LibXml2 CONFIG)
endif()
if(IFCOPENSHELL_WITH_CGAL)
find_dependency(CGAL CONFIG)
endif()
@@ -48,9 +54,7 @@ if(IFCOPENSHELL_WITH_OPENCASCADE)
find_dependency(OpenCASCADE CONFIG)
if(OpenCASCADE_VERSION VERSION_LESS "7.7.0")
# cmake configs < 7.7.0 were not adding include directories to targets automatically.
set_target_properties(TKernel PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OpenCASCADE_INCLUDE_DIR}"
)
set_target_properties(TKernel PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${OpenCASCADE_INCLUDE_DIR}")
endif()
endif()
+6 -13
View File
@@ -25,19 +25,12 @@ file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
set(filepath "$ENV{DESTDIR}${file}")
message(STATUS "Uninstalling ${filepath}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif()
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
if(IS_SYMLINK "${filepath}" OR EXISTS "${filepath}")
file(REMOVE "${filepath}")
else(NOT EXISTS "${filepath}")
message(STATUS "File ${filepath} does not exist.")
endif()
endforeach()
+19 -24
View File
@@ -1,14 +1,10 @@
#Look for an executable called sphinx-build
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
DOC "Path to sphinx-build executable")
find_program(SPHINX_EXECUTABLE NAMES sphinx-build DOC "Path to sphinx-build executable")
include(FindPackageHandleStandardArgs)
#Handle standard arguments to find_package like REQUIRED and QUIET
find_package_handle_standard_args(Sphinx
"Failed to find sphinx-build executable"
SPHINX_EXECUTABLE)
find_package_handle_standard_args(Sphinx "Failed to find sphinx-build executable" SPHINX_EXECUTABLE)
find_package(Doxygen REQUIRED)
#find_package(Sphinx REQUIRED)
@@ -16,25 +12,24 @@ find_package(Doxygen REQUIRED)
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR})
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/docs/sphinx)
MESSAGE(STATUS "SPHINX BUILD ${CMAKE_CURRENT_BINARY_DIR}")
message(STATUS "SPHINX BUILD ${CMAKE_CURRENT_BINARY_DIR}")
file(MAKE_DIRECTORY ./output/doxygen)
if (DOXYGEN_FOUND)
if(DOXYGEN_FOUND)
add_custom_target(
Sphinx
ALL
COMMAND ${SPHINX_EXECUTABLE} -v -T -b html ${SPHINX_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/output
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/output
COMMENT "Generating documentation with Sphinx"
)
add_custom_target(Sphinx ALL
COMMAND
${SPHINX_EXECUTABLE} -v -T -b html
${SPHINX_SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/output
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/output
COMMENT "Generating documentation with Sphinx")
# add_custom_target(ifcopenshell_python_docs ALL
# COMMAND make html
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../src/ifcblenderexport/docs
# OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/../src/ifcblenderexport/docs
# COMMENT "Generating documentation with Sphinx")
else (DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
# add_custom_target(ifcopenshell_python_docs ALL
# COMMAND make html
# WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../src/ifcblenderexport/docs
# OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/../src/ifcblenderexport/docs
# COMMENT "Generating documentation with Sphinx")
else(DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation")
endif(DOXYGEN_FOUND)
+2
View File
@@ -1177,6 +1177,8 @@ if "cgal" in targets:
# Disable assembly, otherwise `emcc -c conftest.s` will crash due to assembly mismatch.
gmp_args.extend(("--disable-assembly", "--enable-cxx"))
mpfr_args.extend(("--host", "none"))
elif "x86" in arch:
gmp_args.append("--enable-fat") # See issues #7458 #7556
OLD_CC = None
if MAC_CROSS_COMPILE_INTEL:
+4 -4
View File
@@ -2,10 +2,10 @@
name = "IfcOpenShell"
version = "0.0.0"
dependencies = [
"black==25.12",
"ruff==0.14.10",
"black==26.1.0",
"ruff==0.15.0",
"poethepoet",
"gersemi==0.24",
"gersemi==0.25.4",
]
[tool.black]
@@ -82,4 +82,4 @@ black = "black ."
format.sequence = ["black", "ruff-main", "ruff-old"]
cmake-format = "gersemi cmake src --in-place"
cmake-format = "gersemi . --in-place"
+2 -1
View File
@@ -2,6 +2,8 @@ import tempfile
from pathlib import Path
from typing import Optional, Union
from typing_extensions import assert_never
import bcf.agnostic.model as mdl
import bcf.v2.bcfxml
import bcf.v2.model
@@ -9,7 +11,6 @@ import bcf.v2.topic
import bcf.v3.bcfxml
import bcf.v3.model
import bcf.v3.topic
from typing_extensions import assert_never
TopicHandler = Union[bcf.v2.topic.TopicHandler, bcf.v3.topic.TopicHandler]
+1 -1
View File
@@ -14,7 +14,7 @@
# Currently extensions support for v2 is only read-only.
from dataclasses import dataclass, field, fields
from dataclasses import dataclass, field
from typing import Optional
+1 -2
View File
@@ -3,11 +3,10 @@
from __future__ import annotations
import datetime
import tempfile
import uuid
import zipfile
from pathlib import Path
from typing import Any, NoReturn, Optional, Union
from typing import Any, NoReturn, Optional
import numpy as np
from ifcopenshell import entity_instance
+1 -1
View File
@@ -1,7 +1,7 @@
import uuid
import zipfile
from collections.abc import Iterable
from typing import Any, Literal, Optional, Union
from typing import Literal, Optional, Union
import ifcopenshell.util.placement
import ifcopenshell.util.unit
-1
View File
@@ -24,7 +24,6 @@ import time
import urllib.parse
import uuid
import webbrowser
from re import A
from typing import Any, Optional
import requests
+1 -1
View File
@@ -1,7 +1,7 @@
"""BCF XML V3 Documents handler."""
import zipfile
from typing import Any, Optional
from typing import Optional
import bcf.v3.model as mdl
from bcf.inmemory_zipfile import ZipFileInterface
+1 -1
View File
@@ -1,7 +1,7 @@
import uuid
import zipfile
from collections.abc import Iterable
from typing import Any, Literal, Optional, Union
from typing import Literal, Optional, Union
import ifcopenshell.util.placement
import ifcopenshell.util.unit
+6
View File
@@ -140,3 +140,9 @@ max-attributes = 10
[tool.pylint.format]
expected-line-ending-format = "LF"
max-line-length = 120
[tool.ruff]
extend = "../../pyproject.toml"
lint.select = [
"F401", # unused imports
]
+1
View File
@@ -1,4 +1,5 @@
import pytest
from bcf.xml_parser import XmlParserSerializer
+2 -1
View File
@@ -4,8 +4,9 @@ import uuid
from pathlib import Path
from tempfile import TemporaryDirectory
import bcf.v2.model as mdl
import pytest
import bcf.v2.model as mdl
from bcf.v2.bcfxml import BcfXml
from bcf.v2.topic import TopicHandler
from bcf.v2.visinfo import (
+2 -1
View File
@@ -3,10 +3,11 @@ import os
import zipfile
from pathlib import Path
from xsdata.models.datatype import XmlDateTime
import bcf.v2.model as mdl
from bcf.v2.bcfxml import BcfXml
from bcf.v2.topic import TopicHandler
from xsdata.models.datatype import XmlDateTime
def test_maximum_information() -> None:
+1
View File
@@ -1,5 +1,6 @@
import numpy as np
import pytest
from bcf.v2.bcfxml import BcfXml
+2 -1
View File
@@ -4,8 +4,9 @@ import uuid
from pathlib import Path
from tempfile import TemporaryDirectory
import bcf.v3.model as mdl
import pytest
import bcf.v3.model as mdl
from bcf.v3.bcfxml import BcfXml
from bcf.v3.topic import TopicHandler
from bcf.v3.visinfo import (
+2 -3
View File
@@ -1,12 +1,11 @@
import json
import os
import zipfile
from pathlib import Path
from xsdata.models.datatype import XmlDateTime
import bcf.v3.model as mdl
from bcf.v3.bcfxml import BcfXml
from bcf.v3.topic import TopicHandler
from xsdata.models.datatype import XmlDateTime
def test_doc_ref_internal() -> None:
+1
View File
@@ -1,5 +1,6 @@
import numpy as np
import pytest
from bcf.v3.bcfxml import BcfXml
+22
View File
@@ -0,0 +1,22 @@
# Build Bonsai .zip.
# Usage:
# # While in `bonsai` folder.
# docker build -t bonsai-dist .
# # Output zip file will be in `dist` folder.
# # See possible values for variables in `Makefile`'s `dist` target description.
# docker run --rm -v "$PWD/../../:/work" -w /work -e PLATFORM=win -e PYVERSION=py313 bonsai-dist
FROM ubuntu:24.04
RUN apt-get update
RUN apt-get install -y make git wget unzip zip
# Python
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update
RUN apt-get install -y python3.11 python3.11-venv
RUN apt-get install -y npm
WORKDIR /work
CMD cd src/bonsai && make dist PLATFORM=$PLATFORM PYVERSION=$PYVERSION
+40 -20
View File
@@ -48,18 +48,33 @@ VERSION_PATCH:=$(shell cat '../../VERSION' | cut -d '.' -f 3)
VERSION_DATE:=$(shell date '+%y%m%d')
LAST_COMMIT_HASH:=$(shell git rev-parse HEAD)
LAST_COMMIT_DATE:=$(shell git show -s --format=%cI)
PYVERSION:=py310
PYPI_IMP:=cp
ifeq ($(PYVERSION), py311)
PYLIBDIR:=python3.11
PYNUMBER:=311
PYPI_VERSION:=3.11
ifdef PYVERSION
SUPPORTED_PYVERSIONS := py311 py312 py313
ifeq ($(filter $(PYVERSION),$(SUPPORTED_PYVERSIONS)),)
$(error Unsupported PYVERSION=$(PYVERSION). Must be one of $(SUPPORTED_PYVERSIONS))
endif
PYMINOR:=$(subst py3,,$(PYVERSION))
PYLIBDIR:=python3.$(PYMINOR)
PYNUMBER:=3$(PYMINOR)
PYPI_VERSION:=3.$(PYMINOR)
endif # def PYVERSION
ifdef PLATFORM
SUPPORTED_PLATFORMS := linux macos macosm1 win
ifeq ($(filter $(PLATFORM),$(SUPPORTED_PLATFORMS)),)
$(error Unsupported PLATFORM=$(PLATFORM). Must be one of $(SUPPORTED_PLATFORMS))
endif
ifeq ($(PLATFORM),macos)
ifeq ($(PYVERSION),py313)
$(error Blender 5.1 with Python 3.13 doesn't support intel macOS.)
endif
ifeq ($(PYVERSION), py312)
PYLIBDIR:=python3.12
PYNUMBER:=312
PYPI_VERSION:=3.12
endif
ifeq ($(PLATFORM), linux)
@@ -86,6 +101,8 @@ PYPI_PLATFORM:=--platform win_amd64
BLENDER_PLATFORM:=windows-x64
endif
endif # def PLATFORM
# Current build commit hash.
OLD:=e8eb5e4
.PHONY: bump
@@ -99,7 +116,10 @@ endif
.PHONY: dist
dist:
ifndef PLATFORM
$(error PLATFORM is not set)
$(error PLATFORM is not set. Example values: $(SUPPORTED_PLATFORMS).)
endif
ifndef PYVERSION
$(error PYVERSION is not set. Example values: $(SUPPORTED_PYVERSIONS). )
endif
rm -rf build
mkdir -p build
@@ -125,9 +145,6 @@ endif
cd ../ifc5d && make dist && mv dist/*.whl ../bonsai/build/wheels/
cd ../ifccityjson && make dist && mv dist/*.whl ../bonsai/build/wheels/
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download GitPython --dest=./wheels
# Provides audio playback for costing
# This is a REALLY IMPORTANT feature
cd build && . env/$(VENV_ACTIVATE) && $(PIP) wheel git+https://github.com/zdhoward/aud --wheel-dir=./wheels
# IfcOpenShell dependency - support for new typing features
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download typing_extensions --dest=./wheels
# Required by IfcCSV
@@ -189,7 +206,7 @@ endif
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download tzfpy $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
# pyradiance is using different platform versions than defaults in our makefile.
ifeq ($(PLATFORM), linux)
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pyradiance --platform manylinux_2_35_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pyradiance --platform manylinux_2_28_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
else ifeq ($(PLATFORM), macos)
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pyradiance --platform macosx_10_13_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
else
@@ -267,6 +284,11 @@ else
$(SED) 's/version = "0.0.0"/version = "$(VERSION)-alpha$(VERSION_DATE)"/' build/pyproject.toml
endif
# Blender 5.1+ requires Python 3.13.
ifeq ($(PYVERSION), py313)
$(SED) 's/blender_version_min = "4\.2\.0"/blender_version_min = "5.1.0"/' build/bonsai/blender_manifest.toml
endif
$(SED) "s/os-arch/$(BLENDER_PLATFORM)/" build/bonsai/blender_manifest.toml
# Provides bonsai Add-on functionality
@@ -288,12 +310,6 @@ endif
fi
mv build/wheels/*.whl build/bonsai/wheels/
# 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/-cp39-/-cp$(PYNUMBER)-/"); \
mv --update=none "$$prev_whl_name" "$$whl_name";
ifneq ($(PLATFORM), linux)
# Safeguard: in case one of `pip download` will break,
# it will produce a linux wheel for non-linux build (our github action machine is using linux).
@@ -336,7 +352,11 @@ test:
.PHONY: test-core
test-core:
ifndef MODULE
pytest -p no:pytest-blender test/core
else
pytest -p no:pytest-blender test/core/test_${MODULE}.py
endif
.PHONY: test-bim
test-bim:
+6 -7
View File
@@ -32,17 +32,16 @@ if IN_BLENDER:
# and then as a bonsai-package.
IN_PACKAGE = __package__ == "bonsai"
import re
import platform
import traceback
import webbrowser
import uuid
import re
import shutil
import traceback
import uuid
import webbrowser
from collections import deque
from pathlib import Path
from typing import Union, Any
from collections.abc import Generator
from pathlib import Path
from typing import Any, Union
last_commit_hash = "8888888"
last_commit_date = "9999999"
+7 -5
View File
@@ -16,14 +16,16 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import importlib
import os
from collections.abc import Callable
from typing import Union
import bpy
import bpy.utils.previews
import importlib
from bpy_extras.io_utils import ImportHelper, ExportHelper
from . import handler, ui, prop, operator
from typing import Union
from collections.abc import Callable
from bpy_extras.io_utils import ExportHelper, ImportHelper
from . import handler, operator, prop, ui
try:
from bonsai.translations import translations_dict
@@ -1,6 +1,5 @@
import sys
import os
import sys
bonsai_lib_path = os.environ.get("BONSAI_LIB_PATH")
bonsai_version = os.environ.get("BONSAI_VERSION")
@@ -9,13 +8,14 @@ if bonsai_lib_path:
sys.path.insert(0, bonsai_lib_path)
import argparse
from aiohttp import web
import socketio
import pystache
import json
import base64
import json
import xml.etree.ElementTree as ET
import pystache
import socketio
from aiohttp import web
sio_port = 8080 # default port
sio = socketio.AsyncServer(cors_allowed_origins="*", async_mode="aiohttp", max_http_buffer_size=10000000)
+13 -10
View File
@@ -17,27 +17,30 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import os
import bpy
import json
import datetime
import zipfile
import json
import os
import tempfile
import zipfile
from logging import Logger
from math import radians
from typing import Union
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.element
import ifcopenshell.util.placement
import ifcopenshell.util.unit
import bonsai.tool as tool
import bonsai.core.geometry
from mathutils import Vector
import bonsai.core.aggregate
import bonsai.core.geometry
import bonsai.core.spatial
import bonsai.core.style
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
from mathutils import Vector
from typing import Union
from logging import Logger
from math import radians
class IfcExporter:
+16 -11
View File
@@ -17,26 +17,31 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import weakref
from collections.abc import Callable
from math import cos
from typing import Union
import bpy
import ifcopenshell.api.owner.settings
import ifcopenshell.util.element
import ifcopenshell.util.representation
import ifcopenshell.util.unit
import ifcopenshell.api.owner.settings
from bpy.app.handlers import persistent
from mathutils import Vector
import bonsai.bim
import bonsai.tool as tool
import weakref
from bpy.app.handlers import persistent
from bonsai.bim.ifc import IfcStore
from bonsai.bim.module.model.data import AuthoringData
from bonsai.bim.module.aggregate.decorator import AggregateDecorator
from bonsai.bim.module.georeference.decorator import GeoreferenceDecorator
from bonsai.bim.module.model.decorator import WallAxisDecorator, SlabDirectionDecorator, BoundingBoxDecorator
from bonsai.bim.module.model.data import AuthoringData
from bonsai.bim.module.model.decorator import (
BoundingBoxDecorator,
SlabDirectionDecorator,
WallAxisDecorator,
)
from bonsai.bim.module.nest.decorator import NestDecorator
from mathutils import Vector
from math import cos
from typing import Union
from collections.abc import Callable
cwd = os.path.dirname(os.path.realpath(__file__))
global_subscription_owner = object()
@@ -202,8 +207,8 @@ def refresh_ui_data():
Note that calling non-ifc-operators by itself doesn't refresh the UI data
and it need to be refreshed manually if needed.
"""
from bonsai.bim import modules
import bonsai.bim.ui
from bonsai.bim import modules
bonsai.bim.ui.refresh()
+33 -33
View File
@@ -17,24 +17,31 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import importlib
import bpy
import json
from collections.abc import Callable, Iterable, Sequence
from types import EllipsisType
from typing import TYPE_CHECKING, Any, Optional, Union
import bpy
import ifcopenshell
import ifcopenshell.ifcopenshell_wrapper as W
import ifcopenshell.util.attribute
import ifcopenshell.util.element
import ifcopenshell.util.unit
from ifcopenshell.util.doc import get_attribute_doc, get_predefined_type_doc, get_property_doc
from ifcopenshell.util.doc import (
get_attribute_doc,
get_predefined_type_doc,
get_property_doc,
)
import bonsai.tool as tool
from types import EllipsisType
from typing import Optional, Any, Union, TYPE_CHECKING
from collections.abc import Callable, Iterable, Sequence
if TYPE_CHECKING:
import bonsai.bim.prop
from bonsai.bim.prop import Attribute
from bonsai.bim.module.search.prop import BIMFilterGroup
from bonsai.bim.prop import Attribute
# ImportCallback return values:
# - None - property should be imported by default workflow
@@ -511,14 +518,15 @@ def draw_filter(
row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = "EXCLUDE"
row.operator("bim.enable_editing_element_filter", icon="CANCEL", text="").filter_mode = "NONE"
row = layout.row(align=True)
if not tool.Blender.get_addon_preferences().chain_filter_with_set_operations:
preferences = tool.Blender.get_addon_preferences()
if not preferences.chain_filter_with_set_operations:
row.operator("bim.add_filter_group", text="Add Search Group", icon="ADD").module = module
else:
if not filter_groups or not any(fg.filters for fg in filter_groups):
op = row.operator("bim.add_filter", text="Add Filter", icon="ADD")
op.type = "entity"
op.index = 0
op.module = module
row.prop(sprops, "facet", text="")
op = row.operator("bim.add_filter", text="Add Filter", icon="ADD")
op.type = sprops.facet
op.index = 0
op.module = module
op = row.operator("bim.edit_filter_query", text="", icon="FILTER")
if "module" in op.bl_rna.properties:
op.module = module
@@ -526,26 +534,23 @@ def draw_filter(
for i, filter_group in enumerate(filter_groups):
box = layout.box()
row = box.row(align=True)
row.prop(sprops, "facet", text="")
op = row.operator("bim.add_filter", text="Add Filter", icon="ADD")
op.type = sprops.facet
op.index = i
op.module = module
op = row.operator("bim.remove_filter_group", text="", icon="X")
op.index = i
op.module = module
preferences = tool.Blender.get_addon_preferences()
if not preferences.chain_filter_with_set_operations:
row = box.row(align=True)
row.prop(sprops, "facet", text="")
op = row.operator("bim.add_filter", text="Add Filter", icon="ADD")
op.type = sprops.facet
op.index = i
op.module = module
op = row.operator("bim.remove_filter_group", text="", icon="X")
op.index = i
op.module = module
for j, ifc_filter in enumerate(filter_group.filters):
if ifc_filter.type == "entity":
row = box.row(align=True)
preferences = tool.Blender.get_addon_preferences()
if preferences.chain_filter_with_set_operations:
show_mode_toggle = j > 0
else:
show_mode_toggle = (
preferences.default_filter_with_set_operations_for_globalid_and_class and j > 0
) # PR 7315 mode
show_mode_toggle = preferences.chain_filter_with_set_operations and j > 0
if show_mode_toggle:
mode_icons = {"ADD": "ADD", "SUBTRACT": "REMOVE", "FILTER": "FILTER"}
op = row.operator(
@@ -761,12 +766,7 @@ def draw_filter(
elif ifc_filter.type == "instance":
row = box.row(align=True)
preferences = tool.Blender.get_addon_preferences()
if preferences.chain_filter_with_set_operations:
show_mode_toggle = j > 0
else:
show_mode_toggle = (
preferences.default_filter_with_set_operations_for_globalid_and_class and j > 0
) # PR 7315 mode
show_mode_toggle = preferences.chain_filter_with_set_operations and j > 0
if show_mode_toggle:
mode_icons = {"ADD": "ADD", "SUBTRACT": "REMOVE", "FILTER": "FILTER"}
op = row.operator(
+12 -10
View File
@@ -17,26 +17,28 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import os
import bpy
import uuid
import shutil
import hashlib
import zipfile
import os
import shutil
import tempfile
import traceback
import uuid
import zipfile
from collections.abc import Callable
from pathlib import Path
from typing import Literal, NotRequired, Optional, TypedDict, Union
import bpy
import ifcopenshell
import ifcopenshell.geom
import ifcopenshell.ifcopenshell_wrapper
from ifcopenshell.file import UndoSystemError
import bonsai
import bonsai.bim.handler
import bonsai.tool as tool
from ifcopenshell.file import UndoSystemError
from pathlib import Path
from bonsai.tool.brick import BrickStore
from typing import Union, Optional, TypedDict, NotRequired, Literal
from collections.abc import Callable
IFC_CONNECTED_TYPE = Union[bpy.types.Material, bpy.types.Object]
+17 -23
View File
@@ -17,33 +17,36 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import bpy
import time
import json
import ifcpatch
import logging
import traceback
import mathutils
import numpy as np
import numpy.typing as npt
import multiprocessing
import time
import traceback
from collections.abc import Iterable
from typing import Any, Literal, Optional, Union
import bpy
import ifcopenshell
import ifcopenshell.api.pset
import ifcopenshell.geom
import ifcopenshell.ifcopenshell_wrapper as W
import ifcopenshell.util.unit
import ifcopenshell.util.element
import ifcopenshell.util.geolocation
import ifcopenshell.util.placement
import ifcopenshell.util.representation
import ifcopenshell.util.shape
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore, IFC_CONNECTED_TYPE
from bonsai.tool.loader import OBJECT_DATA_TYPE
from typing import Union, Optional, Any, Literal
from collections.abc import Iterable
import ifcopenshell.util.unit
import ifcpatch
import mathutils
import numpy as np
import numpy.typing as npt
from ifcopenshell.util.shape import MatrixType
import bonsai.tool as tool
from bonsai.bim.ifc import IFC_CONNECTED_TYPE, IfcStore
from bonsai.tool.loader import OBJECT_DATA_TYPE
class MaterialCreator:
mesh: bpy.types.Mesh
@@ -290,7 +293,6 @@ class IfcImporter:
self.profile_code("Load linked models")
self.add_project_to_scene()
self.profile_code("Add project to scene")
self.hide_ifc_spaces()
if self.ifc_import_settings.should_clean_mesh and len(self.file.by_type("IfcElement")) < 1000:
self.clean_mesh()
self.profile_code("Mesh cleaning")
@@ -1287,14 +1289,6 @@ class IfcImporter:
properties={"Aggregate_Index": aggregate_index, "Name": name},
)
def hide_ifc_spaces(self):
"""Hide IfcSpace objects after they've been added to the scene."""
for ifc_definition_id, obj in self.added_data.items():
if isinstance(obj, bpy.types.Object):
element = self.file.by_id(ifc_definition_id)
if element.is_a("IfcSpace"):
obj.hide_set(True)
class IfcImportSettings:
"""
@@ -1312,7 +1306,7 @@ class IfcImportSettings:
self.should_load_geometry = True
self.should_clean_mesh = False
self.should_cache = True
self.deflection_tolerance = 0.001
self.deflection_tolerance = 0.05 # Default is 0.001, but I find this to be more practical
self.angular_tolerance = 0.5
self.void_limit = 30
self.style_limit = 300
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
from . import operator, prop, ui
classes = (
operator.BIM_OT_add_aggregate,
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bonsai.tool as tool
import ifcopenshell.util.element
from typing import Union
import bpy
import ifcopenshell.util.element
import bonsai.tool as tool
def refresh():
AggregateData.is_loaded = False
@@ -21,11 +21,12 @@ import bpy
import gpu
import ifcopenshell
import ifcopenshell.util.element
import bonsai.tool as tool
from bpy.types import SpaceView3D
from bpy_extras import view3d_utils
from gpu_extras.batch import batch_for_shader
from mathutils import Vector
import bonsai.tool as tool
from bonsai.bim.module.geometry.decorator import ItemDecorator
@@ -16,6 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING
import bpy
import ifcopenshell
import ifcopenshell.api
@@ -23,10 +25,10 @@ import ifcopenshell.api.group
import ifcopenshell.api.pset
import ifcopenshell.api.root
import ifcopenshell.util.element
import bonsai.tool as tool
import bonsai.core.aggregate as core
import bonsai.core.spatial
from typing import TYPE_CHECKING
import bonsai.tool as tool
class BIM_OT_aggregate_assign_object(bpy.types.Operator, tool.Ifc.Operator):
@@ -222,7 +224,7 @@ class BIM_OT_add_aggregate(bpy.types.Operator, tool.Ifc.Operator):
tool.Collector,
tool.Spatial,
container=current_container,
element_obj=aggregate,
objs=[aggregate],
)
core.assign_object(tool.Ifc, tool.Aggregate, tool.Collector, relating_obj=aggregate, related_obj=obj)
+16 -11
View File
@@ -16,24 +16,29 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING, Union
import bpy
import ifcopenshell.util.element
import bonsai.tool as tool
from bonsai.bim.prop import StrProperty, Attribute
from bonsai.bim.module.spatial.data import SpatialData
from bpy.types import PropertyGroup
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bonsai.bim.module.aggregate.decorator import AggregateDecorator, AggregateModeDecorator
from typing import TYPE_CHECKING, Union
from bpy.types import PropertyGroup
import bonsai.tool as tool
from bonsai.bim.module.aggregate.decorator import (
AggregateDecorator,
AggregateModeDecorator,
)
from bonsai.bim.module.spatial.data import SpatialData
from bonsai.bim.prop import Attribute, StrProperty
def can_aggregate(relating_obj: bpy.types.Object, related_obj: bpy.types.Object) -> bool:
+3 -2
View File
@@ -17,10 +17,11 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from bpy.types import Panel
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
from bonsai.bim.module.aggregate.data import AggregateData
from bonsai.bim.module.group.data import GroupsData, ObjectGroupsData
from bonsai.bim.ifc import IfcStore
import bonsai.tool as tool
class BIM_PT_aggregate(Panel):
@@ -18,25 +18,25 @@
# pyright: reportUnnecessaryTypeIgnoreComment=error
import calendar
import json
import os
import ifcopenshell.api.alignment
import time
from datetime import datetime
import bpy
import json
import time
import calendar
import isodate
import bonsai.core.sequence as core
import bonsai.tool as tool
import bonsai.bim.module.sequence.helper as helper
import ifcopenshell.api.alignment
import ifcopenshell.api.spatial
import ifcopenshell.geom
import ifcopenshell.util.sequence
import ifcopenshell.util.selector
from datetime import datetime
from dateutil import parser, relativedelta
import ifcopenshell.util.sequence
import isodate
from bpy_extras.io_utils import ImportHelper
from dateutil import parser, relativedelta
import bonsai.bim.module.sequence.helper as helper
import bonsai.core.sequence as core
import bonsai.tool as tool
class ImportAlignmentCSV(bpy.types.Operator, tool.Ifc.Operator, ImportHelper):
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
from . import operator, prop, ui
classes = (
operator.EnableEditingAttributes,
@@ -18,6 +18,7 @@
import bpy
import ifcopenshell
import bonsai.tool as tool
@@ -16,22 +16,25 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import json
from typing import TYPE_CHECKING, Any, Literal, Union
import bpy
import ifcopenshell
import ifcopenshell.api.attribute
import ifcopenshell.guid
import ifcopenshell.util.element
import bonsai.bim.helper
import bonsai.tool as tool
import bonsai.core.attribute as core
import bonsai.core.spatial
from typing import TYPE_CHECKING, Any, Union, Literal
import bonsai.tool as tool
if TYPE_CHECKING:
from bonsai.bim.prop import Attribute
import bpy.stub_internal.rna_enums as rna_enums
from bonsai.bim.prop import Attribute
def get_objs_for_operation(
operator_properties: "AttributesOperator", context: bpy.types.Context
+11 -9
View File
@@ -16,21 +16,23 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING, Union
import bpy
import bonsai.tool as tool
from bonsai.bim.prop import StrProperty, Attribute
from bpy.types import PropertyGroup
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from typing import TYPE_CHECKING, Union
from bpy.types import PropertyGroup
import bonsai.tool as tool
from bonsai.bim.prop import Attribute, StrProperty
class BIMAttributeProperties(PropertyGroup):
+6 -3
View File
@@ -17,12 +17,15 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import bonsai.bim.helper
from typing import TYPE_CHECKING
import bpy.types
from bpy.types import Panel
from bonsai.bim.module.attribute.data import AttributesData
import bonsai.bim.helper
import bonsai.tool as tool
from typing import TYPE_CHECKING
from bonsai.bim.module.attribute.data import AttributesData
if TYPE_CHECKING:
from bonsai.bim.module.attribute.prop import BIMExplorerProperties, ExplorerEntity
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
from . import operator, prop, ui
classes = (
prop.AuginProperties,
@@ -16,14 +16,16 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import datetime
import os
import bpy
import string
import random
import shutil
import requests
import string
import tempfile
import datetime
import bpy
import requests
import bonsai.tool as tool
+1
View File
@@ -17,6 +17,7 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy.types
import bonsai.tool as tool
+2 -1
View File
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
from . import operator, prop, ui
classes = (
operator.ActivateBcfViewpoint,
+4 -2
View File
@@ -17,12 +17,14 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
from typing import Union
import bcf
import bcf.bcfxml
import bcf.v2.bcfxml
import bpy
import bonsai.tool as tool
from typing import Union
class BcfStore:
+21 -19
View File
@@ -17,6 +17,20 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import tempfile
import uuid
import webbrowser
from math import atan, cos, degrees, radians, sin, tan
from pathlib import Path
import bcf
import bcf.agnostic.topic
import bcf.agnostic.visinfo
import bcf.bcfxml
import bcf.v2.bcfxml
import bcf.v2.model
import bcf.v2.topic
import bcf.v2.visinfo
import bcf.v3
import bcf.v3.bcfxml
import bcf.v3.document
@@ -24,30 +38,18 @@ import bcf.v3.model
import bcf.v3.topic
import bcf.v3.visinfo
import bpy
import bcf
import bcf.bcfxml
import bcf.v2.bcfxml
import bcf.v2.model
import bcf.v2.topic
import bcf.v2.visinfo
import bcf.agnostic.topic
import bcf.agnostic.visinfo
import uuid
import numpy as np
import tempfile
import webbrowser
import ifcopenshell
import ifcopenshell.util.geolocation
import ifcopenshell.util.unit
import bonsai.tool as tool
import bonsai.bim.module.bcf.prop as bcf_prop
import bonsai.bim.module.bcf.bcfstore as bcfstore
from bpy_extras.io_utils import ImportHelper, ExportHelper
from pathlib import Path
from math import radians, degrees, atan, tan, cos, sin
from mathutils import Vector, Matrix, Euler, geometry
import numpy as np
from bpy_extras.io_utils import ExportHelper, ImportHelper
from mathutils import Euler, Matrix, Vector, geometry
from xsdata.models.datatype import XmlDateTime
import bonsai.bim.module.bcf.bcfstore as bcfstore
import bonsai.bim.module.bcf.prop as bcf_prop
import bonsai.tool as tool
class NewBcfProject(bpy.types.Operator):
bl_idname = "bim.new_bcf_project"
+18 -16
View File
@@ -16,24 +16,26 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bonsai.tool as tool
from . import bcfstore
from bonsai.bim.prop import StrProperty
from bpy.types import PropertyGroup
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
)
from bcf.agnostic.extensions import get_extensions_attributes
from typing import TYPE_CHECKING, Union
import bpy
from bcf.agnostic.extensions import get_extensions_attributes
from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
import bonsai.tool as tool
from bonsai.bim.prop import StrProperty
from . import bcfstore
bcfviewpoints_enum = None
+9 -5
View File
@@ -17,15 +17,19 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import os
import bpy
import bonsai.tool as tool
from . import bcfstore
from bpy.types import Panel
from typing import TYPE_CHECKING
import bpy
from bpy.types import Panel
import bonsai.tool as tool
from . import bcfstore
if TYPE_CHECKING:
from bonsai.bim.module.bcf.prop import BcfTopic, BCFProperties
from bonsai.bim.module.bcf.prop import BCFProperties, BcfTopic
class BIM_PT_bcf(Panel):
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, operator, prop
from . import operator, prop, ui
classes = (
operator.AddBoundary,
@@ -17,6 +17,7 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bonsai.tool as tool
@@ -16,12 +16,13 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import gpu
import bmesh
import bonsai.tool as tool
import gpu
from bpy.types import SpaceView3D
from mathutils import Vector
from gpu_extras.batch import batch_for_shader
from mathutils import Vector
import bonsai.tool as tool
class BoundaryDecorator:
@@ -16,34 +16,36 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bmesh
import logging
import shapely
import shapely.ops
import mathutils
import numpy as np
import multiprocessing
from math import acos, degrees, inf, pi, radians
from typing import Optional, Union
import bmesh
import bpy
import ifcopenshell.api
import ifcopenshell.api.boundary
import ifcopenshell.api.root
import ifcopenshell.geom
import ifcopenshell.util.unit
import ifcopenshell.util.shape
import ifcopenshell.util.element
import ifcopenshell.util.placement
import ifcopenshell.util.representation
import bonsai.tool as tool
import bonsai.bim.import_ifc as import_ifc
from math import pi, inf, degrees, acos, radians
from mathutils import Vector, Matrix
from bonsai.bim.ifc import IfcStore
from bonsai.bim.module.model.decorator import ProfileDecorator
from bonsai.bim.module.boundary.decorator import BoundaryDecorator
import ifcopenshell.util.shape
import ifcopenshell.util.unit
import mathutils
import numpy as np
import shapely
import shapely.ops
from ifcopenshell.util.shape_builder import ShapeBuilder
from mathutils import Matrix, Vector
import bonsai.bim.import_ifc as import_ifc
import bonsai.core
import bonsai.core.geometry
from typing import Union, Optional
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
from bonsai.bim.module.boundary.decorator import BoundaryDecorator
from bonsai.bim.module.model.decorator import ProfileDecorator
def disable_editing_boundary_geometry(context):
+10 -8
View File
@@ -16,21 +16,23 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING, Union
import bpy
from bpy.types import PropertyGroup
from bonsai.bim.prop import ObjProperty
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
import bonsai.tool as tool
from typing import TYPE_CHECKING, Union
from bonsai.bim.prop import ObjProperty
def space_filter(self: "BIMObjectBoundaryProperties", object: bpy.types.Object) -> bool:
@@ -18,6 +18,7 @@
import bpy
from bpy.types import Panel, UIList
import bonsai.tool as tool
from bonsai.bim.module.boundary.data import SpaceBoundariesData
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
from . import operator, prop, ui
classes = (
operator.AddBrick,
+2 -1
View File
@@ -17,11 +17,12 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bonsai.tool as tool
from bonsai.tool.brick import BrickStore
try:
from rdflib import URIRef, BNode
from rdflib import BNode, URIRef
except:
# See #1860
print("Warning: brickschema not available.")
@@ -17,12 +17,14 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import ifcopenshell.api
import bonsai.tool as tool
import bonsai.core.brick as core
from bpy_extras.io_utils import ExportHelper, ImportHelper
import bonsai.bim.handler
from bpy_extras.io_utils import ImportHelper, ExportHelper
import bonsai.core.brick as core
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
from bonsai.tool.brick import BrickStore
+11 -9
View File
@@ -16,24 +16,26 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING
import bpy
from bonsai.bim.module.brick.data import BrickschemaData, BrickschemaReferencesData
from bonsai.bim.prop import StrProperty, Attribute
from bpy.types import PropertyGroup
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
import bonsai.core.brick as core
import bonsai.tool.brick as tool
from bonsai.bim.module.brick.data import BrickschemaData, BrickschemaReferencesData
from bonsai.bim.prop import Attribute, StrProperty
from bonsai.tool.brick import BrickStore
from typing import TYPE_CHECKING
def update_active_brick_index(self, context):
+2 -1
View File
@@ -16,8 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bonsai.tool as tool
from bpy.types import Panel, UIList
import bonsai.tool as tool
from bonsai.bim.helper import prop_with_search
from bonsai.bim.module.brick.data import BrickschemaData, BrickschemaReferencesData
from bonsai.tool.brick import BrickStore
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
from . import operator, prop, ui
classes = (
operator.AddBSDDProperties,
+2 -1
View File
@@ -18,8 +18,9 @@
import bpy
import ifcopenshell
import ifcopenshell.util.date
import ifcopenshell.util.classification
import ifcopenshell.util.date
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
@@ -16,13 +16,15 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import textwrap
from typing import Any
import bpy
import bsdd
import bonsai.tool as tool
import ifcopenshell.api.pset
import ifcopenshell.util.element
import bonsai.tool as tool
from bonsai.core import bsdd as core
from typing import Any
class LoadBSDDDictionaries(bpy.types.Operator):
+14 -12
View File
@@ -16,23 +16,25 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING, Literal, Union
import bpy
import bonsai.tool as tool
from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
import bonsai.tool as tool
from bonsai.bim.module.bsdd.data import BSDDData
from bonsai.bim.module.classification.data import ClassificationsData
from bonsai.bim.prop import Attribute, StrProperty
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
)
from typing import Union, TYPE_CHECKING, Literal
def get_active_dictionary(self: "BIMBSDDProperties", context: object) -> tool.Blender.BLENDER_ENUM_ITEMS:
+13 -5
View File
@@ -17,14 +17,22 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import bpy
import bonsai.tool as tool
from bonsai.bim.module.bsdd.data import BSDDData
from bpy.types import Panel, UIList
from typing import TYPE_CHECKING
import bpy
from bpy.types import Panel, UIList
import bonsai.tool as tool
from bonsai.bim.module.bsdd.data import BSDDData
if TYPE_CHECKING:
from bonsai.bim.module.bsdd.prop import BIMBSDDProperties, BSDDDictionary, BSDDClassification, BSDDProperty
from bonsai.bim.module.bsdd.prop import (
BIMBSDDProperties,
BSDDClassification,
BSDDDictionary,
BSDDProperty,
)
class BIM_PT_bsdd(Panel):
@@ -17,6 +17,7 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import operator, prop, workspace
classes = (
+9 -8
View File
@@ -16,17 +16,18 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import math
import bmesh
import mathutils
import bpy_extras
import bonsai.tool as tool
from mathutils import Vector, Matrix
from math import pi, radians, sin, cos, sqrt
import ifcopenshell.util.unit
from math import cos, pi, radians, sin, sqrt
from typing import Union
import bmesh
import bpy
import bpy_extras
import ifcopenshell.util.unit
import mathutils
from mathutils import Matrix, Vector
import bonsai.tool as tool
messages = {
"SHARED_VERTEX": "Shared Vertex, no intersection possible",
+5 -3
View File
@@ -16,12 +16,14 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from bonsai.bim.module.model.data import AuthoringData
from bpy.types import PropertyGroup
from math import pi
from typing import TYPE_CHECKING
import bpy
from bpy.types import PropertyGroup
from bonsai.bim.module.model.data import AuthoringData
class BIMCadProperties(PropertyGroup):
resolution: bpy.props.IntProperty(name="Arc Resolution", min=1, default=1)
@@ -17,13 +17,15 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
from functools import partial
import bpy
import bonsai.tool as tool
import bonsai.bim.module.type.prop as type_prop
import ifcopenshell.util.unit
from bpy.types import WorkSpaceTool
import bonsai.bim.module.type.prop as type_prop
import bonsai.tool as tool
from bonsai.bim.module.model.data import AuthoringData, RailingData, RoofData
from functools import partial
def load_custom_icons():
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
from . import operator, prop, ui
classes = (
operator.AddClashSet,
+3 -1
View File
@@ -16,9 +16,11 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import json
import bpy
import ifcopenshell.util.element
import bonsai.tool as tool
@@ -17,13 +17,14 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blf
import gpu
import bmesh
import bonsai.tool as tool
import gpu
from bpy.types import SpaceView3D
from mathutils import Vector
from gpu_extras.batch import batch_for_shader
from bpy_extras.view3d_utils import location_3d_to_region_2d
from gpu_extras.batch import batch_for_shader
from mathutils import Vector
import bonsai.tool as tool
class ClashDecorator:
+12 -10
View File
@@ -16,22 +16,24 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import json
import tempfile
import bmesh
import logging
import numpy as np
import ifcopenshell
import bonsai.tool as tool
from pathlib import Path
from bpy_extras.io_utils import ExportHelper, ImportHelper
import os
import tempfile
from math import radians
from pathlib import Path
from typing import TYPE_CHECKING
import bmesh
import bpy
import ifcopenshell
import numpy as np
from bpy_extras.io_utils import ExportHelper, ImportHelper
from mathutils import Matrix, Vector
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
from bonsai.bim.module.clash.decorator import ClashDecorator
from typing import TYPE_CHECKING
class ExportClashSets(bpy.types.Operator, ExportHelper):
+12 -10
View File
@@ -16,23 +16,25 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING, Literal, Union
import bpy
import bonsai.tool as tool
from bonsai.bim.prop import StrProperty, Attribute, BIMFilterGroup
from bpy.types import PropertyGroup
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from ifcopenshell.geom.main import ClashType, CLASH_TYPE_ITEMS
from bpy.types import PropertyGroup
from ifcopenshell.geom.main import CLASH_TYPE_ITEMS, ClashType
from mathutils import Vector
from typing import TYPE_CHECKING, Literal, Union
import bonsai.tool as tool
from bonsai.bim.prop import Attribute, BIMFilterGroup, StrProperty
class ClashSource(PropertyGroup):
+14 -6
View File
@@ -17,15 +17,23 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import bpy
import bonsai.tool as tool
import bonsai.bim.helper
from bpy.types import Panel
from bonsai.bim.module.clash.data import ClashData
from typing import TYPE_CHECKING, assert_never
import bpy
from bpy.types import Panel
import bonsai.bim.helper
import bonsai.tool as tool
from bonsai.bim.module.clash.data import ClashData
if TYPE_CHECKING:
from bonsai.bim.module.clash.prop import BIMClashProperties, ClashSet, SmartClashGroup, Clash
from bonsai.bim.module.clash.prop import (
BIMClashProperties,
Clash,
ClashSet,
SmartClashGroup,
)
class BIM_PT_ifcclash(Panel):
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
from . import operator, prop, ui
classes = (
operator.AddClassification,
@@ -16,12 +16,14 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import Any, Literal, Union
import bpy
import ifcopenshell
import ifcopenshell.util.date
import ifcopenshell.util.classification
import ifcopenshell.util.date
import bonsai.tool as tool
from typing import Any, Literal, Union
from bonsai.bim.ifc import IfcStore
@@ -19,13 +19,14 @@
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.pset
import ifcopenshell.api.classification
import ifcopenshell.api.pset
import ifcopenshell.util.classification
import ifcopenshell.util.element
import bonsai.tool as tool
import bonsai.bim.helper
from bpy_extras.io_utils import ImportHelper
import bonsai.bim.helper
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
@@ -16,22 +16,27 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING
import bpy
import bonsai.tool as tool
from bonsai.bim.prop import Attribute
from bonsai.bim.module.classification.data import ClassificationsData, ObjectClassificationsData
from bpy.types import PropertyGroup
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from typing import TYPE_CHECKING
from bpy.types import PropertyGroup
import bonsai.tool as tool
from bonsai.bim.module.classification.data import (
ClassificationsData,
ObjectClassificationsData,
)
from bonsai.bim.prop import Attribute
def get_available_classifications(
@@ -17,24 +17,29 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import bpy
import bonsai.bim.helper
import bonsai.tool as tool
import bonsai.bim.module.classification.prop as classification_prop
import ifcopenshell.util.classification
from bpy.types import Panel, UIList
from bonsai.bim.module.classification.data import (
ClassificationsData,
ObjectClassificationsData,
MaterialClassificationsData,
CostClassificationsData,
ZoneClassificationsData,
)
from typing import TYPE_CHECKING, Any, Union
import bpy
import ifcopenshell.util.classification
from bpy.types import Panel, UIList
import bonsai.bim.helper
import bonsai.bim.module.classification.prop as classification_prop
import bonsai.tool as tool
from bonsai.bim.module.classification.data import (
ClassificationsData,
CostClassificationsData,
MaterialClassificationsData,
ObjectClassificationsData,
ZoneClassificationsData,
)
if TYPE_CHECKING:
from bonsai.bim.module.classification.prop import BIMClassificationProperties, ClassificationReference
from bonsai.bim.module.classification.prop import (
BIMClassificationProperties,
ClassificationReference,
)
class BIM_PT_classifications(Panel):
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
from . import operator, prop, ui
classes = (
operator.LoadObjectives,
@@ -17,9 +17,10 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bonsai.tool as tool
from ifcopenshell.util.doc import get_entity_doc
import bonsai.tool as tool
def refresh():
ConstraintsData.is_loaded = False
@@ -16,12 +16,14 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING
import bpy
import ifcopenshell.api
import ifcopenshell.api.constraint
import bonsai.bim.helper
import bonsai.tool as tool
from typing import TYPE_CHECKING
def get_active_object(context: bpy.types.Context, obj_name: str) -> bpy.types.Object:
+13 -11
View File
@@ -16,23 +16,25 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING, Literal
import bpy
from ifcopenshell.util.doc import get_entity_doc
import bonsai.tool as tool
from bonsai.bim.prop import Attribute
from bonsai.bim.module.constraint.data import ConstraintsData
from bpy.types import PropertyGroup
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from typing import TYPE_CHECKING, Literal
from bpy.types import PropertyGroup
from ifcopenshell.util.doc import get_entity_doc
import bonsai.tool as tool
from bonsai.bim.module.constraint.data import ConstraintsData
from bonsai.bim.prop import Attribute
def get_available_constraint_types(self, context):
+12 -5
View File
@@ -17,14 +17,21 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import bonsai.tool as tool
from bpy.types import Panel, UIList
from bonsai.bim.helper import draw_attributes
from bonsai.bim.module.constraint.data import ConstraintsData, ObjectConstraintsData
from typing import TYPE_CHECKING
from bpy.types import Panel, UIList
import bonsai.tool as tool
from bonsai.bim.helper import draw_attributes
from bonsai.bim.module.constraint.data import ConstraintsData, ObjectConstraintsData
if TYPE_CHECKING:
from bonsai.bim.module.constraint.prop import BIMConstraintProperties, BIMObjectConstraintProperties, Constraint
from bonsai.bim.module.constraint.prop import (
BIMConstraintProperties,
BIMObjectConstraintProperties,
Constraint,
)
class BIM_PT_constraints(Panel):
@@ -17,7 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
from . import operator, prop, ui
classes = (
operator.AddContext,
+5 -3
View File
@@ -16,11 +16,13 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bonsai.tool as tool
import ifcopenshell
from typing import Any
import bpy
import ifcopenshell
import bonsai.tool as tool
def refresh():
ContextData.is_loaded = False
@@ -17,8 +17,9 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bonsai.tool as tool
import bonsai.core.context as core
import bonsai.tool as tool
class AddContext(bpy.types.Operator, tool.Ifc.Operator):
+11 -9
View File
@@ -16,21 +16,23 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from typing import TYPE_CHECKING
import bpy
from bonsai.bim.prop import StrProperty, Attribute
from bonsai.bim.module.context.data import ContextData
from bpy.types import PropertyGroup
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from typing import TYPE_CHECKING
from bpy.types import PropertyGroup
from bonsai.bim.module.context.data import ContextData
from bonsai.bim.prop import Attribute, StrProperty
class BIMContextProperties(PropertyGroup):
@@ -17,6 +17,7 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bonsai.bim.helper
import bonsai.tool as tool
from bonsai.bim.module.context.data import ContextData

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