Compare commits

...

280 Commits

Author SHA1 Message Date
Ryan Schultz f229ad5fd0 closes #3804: Add S_K split support for profile-based elements
Extends the existing Split hotkey (⇧ K) to work on elements with
IfcMaterialProfileSet usage (beams, columns, members) in addition to
layered walls. Adds DumbProfileJoiner.split(), a new SplitProfile
operator (bim.split_profile), and a Split button in the workspace
panel for PROFILE elements.

Generated with the assistance of an AI coding tool.
2026-03-29 09:41:09 -05:00
dependabot[bot] 0ed96d32dd Bump picomatch from 4.0.2 to 4.0.4 in /src/ifctester/webapp
Bumps [picomatch](https://github.com/micromatch/picomatch) from 4.0.2 to 4.0.4.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/4.0.2...4.0.4)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 16:53:31 +11:00
dependabot[bot] f96526195d Bump actions/deploy-pages from 4 to 5
Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 4 to 5.
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](https://github.com/actions/deploy-pages/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/deploy-pages
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 16:53:12 +11:00
dependabot[bot] fd29481d65 Bump hendrikmuhs/ccache-action from 1.2.21 to 1.2.22
Bumps [hendrikmuhs/ccache-action](https://github.com/hendrikmuhs/ccache-action) from 1.2.21 to 1.2.22.
- [Release notes](https://github.com/hendrikmuhs/ccache-action/releases)
- [Commits](https://github.com/hendrikmuhs/ccache-action/compare/v1.2.21...v1.2.22)

---
updated-dependencies:
- dependency-name: hendrikmuhs/ccache-action
  dependency-version: 1.2.22
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 16:53:03 +11:00
dependabot[bot] 24b48497f0 Bump actions/configure-pages from 5 to 6
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 5 to 6.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 16:52:57 +11:00
dependabot[bot] 2b9822f141 Bump mamba-org/setup-micromamba from 2 to 3
Bumps [mamba-org/setup-micromamba](https://github.com/mamba-org/setup-micromamba) from 2 to 3.
- [Release notes](https://github.com/mamba-org/setup-micromamba/releases)
- [Commits](https://github.com/mamba-org/setup-micromamba/compare/v2...v3)

---
updated-dependencies:
- dependency-name: mamba-org/setup-micromamba
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 16:52:52 +11:00
dependabot[bot] 3d4db13fc1 Bump ruff from 0.15.7 to 0.15.8
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.7 to 0.15.8.
- [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.15.7...0.15.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 16:52:46 +11:00
Bruno Perdigão 31b571322b Snap: improve handling with objects that are partially behind the camera. 2026-03-27 15:05:02 -03:00
Bruno Perdigão cef5d41b54 Snap - Improves logic from previous commit.
Previous commit: Snap - Refactor x-ray mode handling
to prevent double raycasting
2026-03-27 15:05:02 -03:00
Bruno Perdigão d7b2358d58 Snap - Refactor x-ray mode handling to prevent double raycasting 2026-03-27 15:05:02 -03:00
Bruno Perdigão cafe5aa7f7 Rename variable - small refactor 2026-03-27 15:05:01 -03:00
Bruno Perdigão de34e73451 Remove unnecessary comments. 2026-03-27 15:05:01 -03:00
Bruno Perdigão 5721a8b602 Snap: improve performance of wireframe objects intersection.
Enhances the performance of mouse intersection checks for wireframe objects.
Details:
- Calculated the intersection with the mouse in 2D pixels first.
- Converted objects to a BVH Tree to reduce the number of edges checked against the mouse position.
2026-03-27 15:04:48 -03:00
Bruno Postle f820214500 ifcmcp: fail early with clear message when mcp package is not installed
mcp is an optional dependency so that the embedded API (embedded.py) can
be used from Pyodide without pulling in pydantic-core and the rest of the
MCP protocol stack, which may not be available in all WASM environments.
2026-03-27 08:44:52 +00:00
Bruno Postle dae913e06a ifcmcp: sse,streamable-http transports and --help 2026-03-26 07:02:50 +00:00
Dion Moult 1a849395c2 Typo crashing edit tools panel when non-wall with wall selected
Fix #7034

bpy.ops.bim.extend_to_underside doesn't exist - the correct operator
name is bim.extend_walls_to_underside. The AttributeError killed the
entire panel draw, hiding mirror, align, aggregation, and QTO buttons.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 13:38:05 +11:00
Dion Moult 611273a20a Fix add_georeferencing silently failing with orphan CRS or conversion
If a file had an IfcProjectedCRS without an IfcCoordinateOperation (or
vice versa), add_georeferencing would return early without creating the
missing entity. This caused edit_georeferencing to crash with IndexError.
Now detects the inconsistent state, cleans up, and recreates both.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 15:00:32 +11:00
Bruno Postle db68195310 Add ifcmcp: MCP server for IFC model querying and editing (#7847)
ifcmcp is a new Model Context Protocol server that wraps ifcquery and ifcedit, holding an IFC model in memory across tool calls. It is the preferred way to interact with IFC models from AI assistants and MCP-compatible clients.

Setup:

claude mcp add --transport stdio ifc -- python3 -m ifcmcp

Session tools: ifc_load, ifc_save

Query tools: ifc_summary, ifc_tree, ifc_info, ifc_select, ifc_relations, ifc_clash, ifc_validate, ifc_schedule, ifc_cost, ifc_schema, ifc_contexts, ifc_materials, ifc_plot, ifc_render, ifc_shape, ifc_shape_list, ifc_shape_docs

Edit discovery: ifc_list, ifc_docs

Edit execution: ifc_edit, ifc_quantify

The model stays in memory between calls - ifc_edit does not auto-save; call ifc_save explicitly when done.

Depends on both ifcquery and ifcedit

Generated with the assistance of an AI coding tool.
2026-03-23 23:54:17 +00:00
Bruno Postle 29079e8cba ifcquery README: add contexts, materials, plot, render subcommands (#7848) 2026-03-23 23:51:33 +00:00
Bruno Postle 6bf4259298 Add ifcedit: CLI wrapper for ifcopenshell.api mutation functions (#7846)
ifcedit is a new command-line tool for executing ifcopenshell.api mutations from the shell. It wraps the entire API surface — any function callable via ifcopenshell.api can be invoked without writing Python.

Subcommands:

    list [module] — list all API modules, or functions within a module
    docs <module.function> — full documentation (params, types, descriptions)
    run <file> <module.function> [--param value ...] — execute a mutation; overwrites input file by default, or use -o <output> to write elsewhere; --dry-run validates without executing
    quantify list — list available QTO rules
    quantify run <file> <rule> — run quantity take-off, writing IfcElementQuantity psets back to the file

Parameter coercion: entity references can be passed as step IDs (strings); lists, dicts, booleans, and None are handled automatically.

Usage:

python3 -m ifcedit run model.ifc root.remove_product --product 42
python3 -m ifcedit docs geometry.edit_object_placement

Generated with the assistance of an AI coding tool.
2026-03-23 23:45:42 +00:00
Bruno Postle 7cd40bf8cb Add ifcquery CLI tool for IFC model interrogation (#7845)
ifcquery is a new command-line tool for querying and inspecting IFC models. All output is JSON.

Subcommands:

    summary — schema version, entity counts, project metadata
    tree — full spatial hierarchy (Project → Site → Building → Storeys → Spaces → Elements)
    info <id> — deep inspection of any entity by step ID (attributes, psets, placement matrix, type, material)
    select <query> — filter elements using ifcopenshell selector syntax
    relations <id> — relationships for an element; --traverse up walks to IfcProject
    clash <id> — geometric intersection and clearance detection
    validate — schema/constraint validation; --rules adds EXPRESS checks
    schedule — work schedules with nested task trees
    cost — cost schedules with nested cost item trees
    schema <class> — IFC class documentation from the model's schema version
    plot — SVG plan drawing
    render — 3D geometry rendering
    contexts — geometric representation contexts
    materials — material assignments

Usage:

python3 -m ifcquery <file.ifc> <subcommand> [args]

Generated with the assistance of an AI coding tool.
2026-03-23 23:29:32 +00:00
Bruno Postle 8b8f78095d geometry_creation.rst: add sections for assemblies, clipping normals, openings (#7844)
Generated with the assistance of an AI coding tool.
2026-03-23 23:02:15 +00:00
Bruno Postle 23ba9e4db0 Add geometry.clip_solid, clip_solid_bounded, and copy_representation APIs (#7843)
* Add geometry.clip_solid API
* Add geometry.clip_solid_bounded API
* 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-23 23:00:12 +00:00
Bruno Postle 1aec991f08 api: docstring improvements across geometry, sequence, and feature modules (#7842)
* Doc clarification for api.sequence.assign_process
* Doc clarification for api.geometry.edit_object_placement
* Doc clarification for api.feature.remove_feature
* Doc clarification for api.geometry.add_wall_representation clippings normal
* regenerate_wall_representation: document BBIM_Boolean preservation requirement

Generated with the assistance of an AI coding tool.
2026-03-23 22:57:28 +00:00
Bruno Postle bddf9b85f8 shape_builder: complete docstrings and return type annotations (#7841)
* shape_builder: complete docstrings and return type annotations
* shape_builder: warn about mixed item types in get_representation
* shape_builder: fix half_space_solid agreement_flag docstring

Generated with the assistance of an AI coding tool.
2026-03-23 22:54:55 +00:00
Sayan J. Das f679c63a18 Merge pull request #7808 from theseyan/ifctester-improvements-rebased
IfcTester webapp improvements
2026-03-23 15:48:34 +05:30
Thomas Krijnen e6cc0e7813 Initialize ncount_total #7834 2026-03-23 10:54:38 +01:00
Dion Moult cf2acfc649 Add covering feature tests for ceiling and cursor variants
Add tests for all four covering generation operators: flooring/ceiling
from walls and flooring/ceiling from cursor. Previously only flooring
from walls was tested.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 23:25:04 +11:00
Dion Moult 60ebb99fda Fix covering geometry not persisting to IFC, same root cause as #7055
The covering tool used bmesh as an intermediate and relied on
type.assign_type post-listeners (removed in 44a52863a) to generate
the IfcExtrudedAreaSolid body. With those listeners gone, coverings
had no body representation and assign_swept_area_outer_curve crashed.

Build covering representations from scratch using ShapeBuilder, reading
the extrusion depth from the type's IfcMaterialLayerSet. Also replace
bpy.ops.bim.assign_class with bonsai.core.root.assign_class using
should_add_representation=False, consistent with the space fix.

Refactored shared coordinate-conversion and extrusion-building logic
into get_2d_vertices_from_polygon and set_extrusion_representation_from_polygon,
used by both space and covering code paths. Removed all bmesh-dependent
dead code from the spatial tool.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 23:18:59 +11:00
Dion Moult ab96add772 Gitignore all test cache files 2026-03-22 22:26:23 +11:00
Dion Moult d8de623086 Fix space regen not saving geometry to IFC (#7055)
Space regeneration was only updating the Blender mesh and marking the
object as edited, but the IFC representation was never synced on save.
Replace the bmesh-based approach with ShapeBuilder to write geometry
directly to IFC as an IfcExtrudedAreaSolid, then reload via
switch_representation. This applies to both new space creation and
existing space regeneration.

Also changes assign_ifcspace_class_to_obj to call
bonsai.core.root.assign_class directly with
should_add_representation=False instead of bpy.ops.bim.assign_class.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 22:14:02 +11:00
dependabot[bot] a3f2e061fb Bump hendrikmuhs/ccache-action from 1.2.20 to 1.2.21
Bumps [hendrikmuhs/ccache-action](https://github.com/hendrikmuhs/ccache-action) from 1.2.20 to 1.2.21.
- [Release notes](https://github.com/hendrikmuhs/ccache-action/releases)
- [Commits](https://github.com/hendrikmuhs/ccache-action/compare/v1.2.20...v1.2.21)

---
updated-dependencies:
- dependency-name: hendrikmuhs/ccache-action
  dependency-version: 1.2.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-22 21:31:54 +11:00
dependabot[bot] f51a4673db Bump ruff from 0.15.6 to 0.15.7
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.6 to 0.15.7.
- [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.15.6...0.15.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-22 21:31:42 +11:00
Dion Moult 75b8d4f218 Remove spatial containment and aggregation when nesting
The nest assign_object API now removes existing spatial containment and
aggregate relationships before creating the nest, matching the behavior
documented in its docstring and consistent with aggregate.assign_object.

Fix #7248

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:28:47 +11:00
Dion Moult b8136d4762 Prevent cyclic references when assigning nesting or aggregation
Walk up the full hierarchy via get_parent() in can_nest() and
can_aggregate() to reject assignments that would create a cycle.
Also reject self-assignment.

Fix #7248

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 15:28:47 +11:00
Dion Moult ecde429d36 Fix crash after undo of assign_class on macOS (#7419)
After assigning an IFC class and undoing, msgbus subscriptions registered
with the old Python object wrapper survived (PERSISTENT flag) but could
not be cleared because: (1) rollback_link_element looked up objects by
their post-link name which no longer exists after undo, and (2) the
per-object clear_by_owner calls in rebuild_element_maps used new Python
wrappers that didn't match the old subscription owners.

Fix by using a dedicated stable object (object_subscription_owner) as
the msgbus owner for all per-object subscriptions, allowing
rebuild_element_maps to clear all stale subscriptions in one call
regardless of Python wrapper identity changes during undo/redo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:42:55 +11:00
Dion Moult 1771b34449 Fix error when entering edit mode on camera objects
Fixes #7313.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:08:12 +11:00
Dion Moult 41469acbc8 Fix walrus operator precedence in MaterialCreator
The `is not ...` was being captured by the walrus assignment due to
missing parentheses, causing the condition to always evaluate incorrectly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 13:58:17 +11:00
Ryan Schultz 547b22199f Without 'Material.Name' layers merge. (#7700) 2026-03-21 18:02:02 -05:00
Dion Moult 94c15213f6 Guard against emptying IfcShapeRepresentation Items
remove_representation_item now returns early if removing the item would
leave Items empty. edit_text_literals returns early on empty attributes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:10:11 +11:00
Dion Moult fca258fb07 Fix add_boolean removing second operands from unrelated representations
add_boolean was removing second operands from ALL IfcShapeRepresentations
that referenced them, which could corrupt unrelated shapes and leave
representations with empty Items (bug #7803).

The API no longer modifies Items — callers manage this explicitly.
validate_type and Bonsai's AddBoolean operator now handle their own
item removal scoped to the correct representation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:10:11 +11:00
Dion Moult bcfad8d96d Migrate remove_deep to remove_deep2 across API modules
remove_deep is deprecated and can silently delete elements still in use.
remove_deep2 requires zero inverses before removal, making it safer.
Also fixes a double-removal bug in remove_grid_axis and prevents
removing the last prop template from a pset template.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:10:11 +11:00
Parag Debnath c026dd3b6e IsVentilated now defaults to False (#7819)
* IsVantillated now defaults to false

* IsVentilated now defaults to False

---------

Co-authored-by: Parag Debnath <paragforwork@gmail.com>
2026-03-20 23:33:40 +11:00
Dion Moult d0f20371bd Add feature to get parent of a particular IFC class 2026-03-20 23:10:00 +11:00
Dion Moult 7b6e82a9cc Fix stair calculated params test to set custom_tread_lock=False
Tests using custom first/last tread runs were not setting
custom_tread_lock=False, so the custom values were silently ignored
since 8f7cf76d9 introduced the lock gate in the calculation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:09:15 +11:00
Andrej730 286c69429d gitignore bonsai external_dependencies 2026-03-20 15:49:08 +05:00
dependabot[bot] 9c22dc6013 Bump socket.io-parser from 4.2.4 to 4.2.6 in /src/ifctester/webapp
Bumps [socket.io-parser](https://github.com/socketio/socket.io) from 4.2.4 to 4.2.6.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/socket.io-parser@4.2.4...socket.io-parser@4.2.6)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-version: 4.2.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-20 11:47:01 +01:00
Andrej730 0acbd5ffad black . 2026-03-20 15:45:24 +05:00
Andrej730 77f0c43314 ids_doc_generator - fix invalid escape sequence SyntaxWarning
SyntaxWarning: invalid escape sequence '\/' at line 312.
`\/` in a plain string is treated as `/` by accident; replaced with raw string r"..." to be explicit.
2026-03-20 15:43:13 +05:00
Andrej730 c1a9708504 ci.yml - build ifctester docs
to ensure script doesn't break
2026-03-20 15:43:13 +05:00
Andrej730 bcf6f6197d ifctester - move build-ids-docs target to ifctester Makefile
Also added a note why it lives in test folder and added it's output to gitignore.
2026-03-20 15:43:13 +05:00
Andrej730 1778656bd5 ids_doc_generator - fix Property args missed (ed8eb75)
TypeError: Property.__init__() got an unexpected keyword argument 'name'
2026-03-20 15:43:12 +05:00
Andrej730 54f450129c ids_doc_generator - fix failed_entities removed (bd92c043)
AttributeError: 'Attribute' object has no attribute 'failed_entities'
2026-03-20 15:43:12 +05:00
Andrej730 9fad1569c7 ids_doc_generator - fix error due to stale cache (f40281e97)
AssertionError: bool(facet(inst)) is expected
2026-03-20 15:43:12 +05:00
Andrej730 722c374fa6 ids_doc_generator - handle invalid entities coming from a test (1ed770d)
Exception: About to emit invalid example data: IfcMaterial.Name not optional
2026-03-20 15:43:12 +05:00
Andrej730 91b6c3e256 bcf v3 tests - fix wrong args, add dead code TODOs 2026-03-20 15:43:12 +05:00
Andrej730 ea3f71b4e0 rename test files to test_* prefix for pytest discovery and fix missing add_pset name arg 2026-03-20 15:43:12 +05:00
Andrej730 1a8b17e235 ifcfm cobie24 - remove unused ifc_file param from get_unit_name 2026-03-20 15:43:12 +05:00
Andrej730 2bad861122 ifcopenshell_wrapper.pyi - support varargs and kwargs in constructors 2026-03-20 15:43:11 +05:00
Andrej730 6c1fb3b01a Remove stale mass_time_units_in_wizard references (5c31ae4c3) 2026-03-20 15:36:18 +05:00
Andrej730 f5be64af6c Remove redundant __init__ from BaseLinesShader 2026-03-20 15:36:18 +05:00
Andrej730 b043dd4d04 Fix unknown-argument error in BaseLinesShader.__init__ 2026-03-20 15:36:18 +05:00
Andrej730 ffd2466321 Fix missing prop name in bim.mep_add_bend 2026-03-20 15:36:17 +05:00
Andrej730 e9241fd812 Fix error in bim.fit_flow_segments 2026-03-20 15:36:17 +05:00
Andrej730 48d45451ac Remove dead code join_walls_TZ, join_T, join_Z superseded in acdc40fb4 2026-03-20 15:36:17 +05:00
Andrej730 3b7cf6e865 Fix error displaying bsdd description after API update (ed81a0a4b) 2026-03-20 15:36:17 +05:00
Andrej730 6038373ee5 ifcopenshell_wrapper.pyi - sync default values, validate_stub - suggest default values 2026-03-20 15:36:16 +05:00
Andrej730 3d7de87b46 ifcopenshell_wrapper.pyi - add temp MakeVolume stub 2026-03-20 15:36:16 +05:00
Andrej730 cb113ae8da ifcopenshell_wrapper.pyi - support stubs for constructors 2026-03-20 15:36:15 +05:00
Andrej730 26280d24fe Add ty to check for missing symbols and other simple errors 2026-03-20 15:36:14 +05:00
Andrej730 30551cb288 typing 2026-03-20 15:36:14 +05:00
Andrej730 3bf0edeca2 Fix subtle walrus operator bug in align_walls using e before assignment 2026-03-20 15:34:57 +05:00
Andrej730 3590b08e68 search/operator - remove unnecessary Ifc Operators 2026-03-20 15:34:57 +05:00
Ryan Schultz fd902d88fb Update selector_syntax.rst with query examples
Clarified usage of queries in IfcAnnotation tags with examples.
2026-03-18 18:25:03 -05:00
Sayan Jyoti Das aa5f5120e0 delete ifcopenshell wheel 2026-03-18 14:37:24 +05:30
Sayan Jyoti Das 81986bcbfb ifcopenshell wasm wheel should be dynamically fetched, not included in git 2026-03-18 14:35:55 +05:30
Andrej730 ec6c268cdb Fix type assign_type core test (44a52863a) 2026-03-18 13:15:39 +05:00
Andrej730 64003fd5ef Fix drawing update_drawing_name core test (19534e225) 2026-03-18 13:15:38 +05:00
Andrej730 58d07bace4 Fix drawing edit_text core test and tool interface (5e9f97a0c) 2026-03-18 13:15:38 +05:00
Andrej730 3b718bc58d Fix georeference core tests (b246998f6) 2026-03-18 13:15:38 +05:00
tsomanna_QCOM 18c035ea77 Fix Windows ARM64 Python Bindings Issue 2026-03-18 08:44:34 +01:00
Andrej730 f2e2e324b1 Fixing stubs
- `function_item`, `tags` added in df7318973
- MakeVolume added in c385b93, ignore as all other conversion settings
- moved `SeparateZUpNode` ignore to the other geom serializer settings
2026-03-18 12:25:14 +05:00
Andrej730 069dbbd8c2 bonsai docs - add maintenance page 2026-03-18 12:25:14 +05:00
Andrej730 3385872e8b ci-black-formatting - use variables for min Python versions 2026-03-18 12:25:14 +05:00
Andrej730 f0b27a0910 ifcopenshell-python Makefile - simplify pyversion check, similar to 6409f41 2026-03-18 12:25:13 +05:00
Andrej730 888158570a Remove Python 3.9 references 2026-03-18 11:20:22 +05:00
Andrej730 c03156b5cd control.assign_control - remove deprecated related_object argument support 2026-03-18 11:20:22 +05:00
Andrej730 05bf2b82d2 system.disconnect_port - fix missing flow direction reset (bbda8d2) 2026-03-18 11:03:33 +05:00
Andrej730 7bdc1b6a75 cache_dependencies - skip ifcopenshell dir when packing 2026-03-18 11:01:38 +05:00
Sayan Jyoti Das 03de69814a fixes and cleanups from old branch 2026-03-18 11:22:41 +05:30
Sayan Jyoti Das 4dc6a0f2bc update ifcopenshell wheel to ifcopenshell-0.8.5+a51b2c5 2026-03-18 11:18:50 +05:30
Andrej730 c33509364c Fix error generating ifcpatch recipes docs for Bonsai tooltips
Mentioned in https://github.com/IfcOpenShell/IfcOpenShell/issues/7667#issuecomment-4076645173

Traceback:
```
Traceback (most recent call last):
  File "\bonsai\bim\module\patch\prop.py", line 55, in get_ifcpatch_recipes
    docs = ifcpatch.extract_docs(f, "Patcher", "__init__", ("src", "file", "logger", "args"))
  File "\ifcpatch\__init__.py", line 168, in extract_docs
    spec.loader.exec_module(submodule)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "<frozen importlib._bootstrap_external>", line 1027, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "\ifcpatch/recipes/FixRevit2025TINs.py", line 31, in <module>
    class Patcher:
    ...<509 lines>...
            return co / self.unit_scale
  File "\ifcpatch/recipes/FixRevit2025TINs.py", line 168, in Patcher
    def create_edges(self, obj: bpy.types.Object) -> None:
                                ^^^
NameError: name 'bpy' is not defined
File "\bonsai\bim\module\patch\prop.py", line 43, in get_ifcpatch_recipes
```
2026-03-18 10:04:36 +05:00
Sayan Jyoti Das 47f058341b local ifctester wheel build 2026-03-18 10:29:09 +05:30
Thomas Krijnen a51b2c587c Revert "Simplifies IfxAxis2PlacementLinear, assumes default Axis = (0,0,1)"
This reverts commit cf1552e79e.
2026-03-17 20:49:48 +01:00
Sayan Jyoti Das 845a13ba83 some fixes and lint cleanups 2026-03-17 21:16:53 +05:30
Sayan Jyoti Das 530841967e Merge branch 'v0.8.0' into ifctester-improvements 2026-03-17 19:49:09 +05:30
Andrej730 c36e7badae Remove use of deprecated os.popen 2026-03-17 18:14:22 +05:00
Andrej730 515fe8d2ef Remove use of deprecated tempfile.mktemp 2026-03-17 18:14:22 +05:00
Andrej730 b8d3d1d105 pyproject.toml - add ty command to check for deprecated methods 2026-03-17 18:14:22 +05:00
Sayan Jyoti Das e95da857d6 convert codebase to typescript + introduce biome lint 2026-03-16 21:55:10 +05:30
Sayan Jyoti Das d587d1ac11 build step for pyodide 2026-03-16 21:46:46 +05:30
Andrej730 ba36dc82ff bim.clear_measurement - add poll message 2026-03-16 15:27:39 +05:00
Andrej730 025fb769e2 bim.explore_tool - remove additional row to keep hotkey and operators on the same row 2026-03-16 15:27:39 +05:00
Andrej730 bf75a19640 bim.image_scaling_tool - break description to multiple lines for readibility 2026-03-16 15:27:39 +05:00
Andrej730 4473dbd138 bim.generate_uv_map - move to operator.py, fix missing description, add separate row in ui 2026-03-16 15:27:39 +05:00
Sayan Jyoti Das 6117417b89 update webapp + bonsai integration 2026-03-16 15:54:52 +05:30
Thomas Krijnen 0398584c69 empty 2026-03-16 15:45:41 +05:30
Thomas Krijnen 0c69f85d5e Empty 2026-03-16 15:45:40 +05:30
Andrej730 7e987be00f bim.link_ifc - document default query
To make it more discoverable for users.
2026-03-16 15:10:05 +05:00
Andrej730 35e3d9c42e Linked Models - invalidate cache for mismatching query automatically 2026-03-16 15:10:04 +05:00
Andrej730 63a8639353 Linked Models - option to provide custom selector query
Available in file dialog when linking model - https://files.catbox.moe/tdmmbt.png
It's not very robust currently, just something to start with.
2026-03-16 15:10:04 +05:00
Andrej730 bd15ba4aa3 Linked Models - fix removing link operator missing if link is still loaded 2026-03-16 15:10:04 +05:00
Andrej730 f583d1ecc1 typing 2026-03-16 15:10:04 +05:00
Andrej730 5bfab569ba bim.link_ifc - fix prop display in file dialog panel
Fixes this - https://files.catbox.moe/eq10ip.png
2026-03-16 15:10:04 +05:00
Andrej730 fb16e91249 Remove use of deprecated datetime.utcnow()
To fix warnings below:
```
<python-input-1>:1: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
```
2026-03-16 15:10:03 +05:00
Andrej730 1c456c3cb2 Bonsai Makefile - use official bpypolyskel repo instead of fork
Since https://github.com/prochitecture/bpypolyskel/pull/22 got merged.
2026-03-16 15:10:03 +05:00
Andrej730 a8d28fb469 Remove unused import, black . 2026-03-16 15:10:03 +05:00
Dion Moult 62bb6cdf33 Fix failing classification tests because they relied on spaces which are now hidden by default 2026-03-16 19:31:25 +11:00
Dion Moult cf153981ce Feature tests for add/remove literal
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 19:04:35 +11:00
Dion Moult b38316336c Revert "Fix #6392: when duplicating a window/door/etc, the associated IfcOpenElement duplicates as well."
This reverts commit a2a5780d59.
2026-03-16 17:52:02 +11:00
Dion Moult 021e6b9ef5 Simplify get model types to just got all type products. Fixes failing test. 2026-03-16 15:15:12 +11:00
falken10vdl 1999d93f9a Add GenerateUVMap operator and integrate into ExploreTool (#7695)
Co-authored-by: Dion Moult <dionmoult@gmail.com>
2026-03-16 07:30:49 +11:00
Dirk Olbrich 8c9e89ace8 Bonsai - change add_grid operator namespace to bim 2026-03-15 23:50:52 +11:00
Ryan Schultz 868bb5c39e Allow bulk annotation product assignment
Closes #7787: Previously bim.assign_selected_as_product required exactly
2 objects. With multiple annotations referencing the same
product, users had to repeat the operation once per
annotation. Now any number of IfcAnnotations can be selected
alongside a single product object and all are assigned in
one operation and one undo step.

Generated with the assistance of an AI coding tool.
2026-03-15 23:42:07 +11:00
Dion Moult c3a87c8f9c Add basic text editing feature tests 2026-03-15 23:30:10 +11:00
Dion Moult c30d24c4d9 Fix regression where changing logic to occur in filesystem selector caused headless test to fail.
See d4388ec76
2026-03-15 23:29:57 +11:00
Dion Moult 2edd1a5044 Black 2026-03-15 21:39:57 +11:00
Dion Moult 08dfcea47c Fix Python signatures in operator descriptions.
Closes #7797. Closes #7230.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 21:38:20 +11:00
Dion Moult 9c8f25739c Fix failing test. Add reference images should use generated coords, not UV.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 19:27:42 +11:00
Sebastian Schilling 256e4d2191 buildingSMART Data Dictionary module: use pSets from different data dictionary sources (#7764)
* buildingSMART Data Dictionary module: added textfield to change data dictionary url

* moved change of bsdd baseurl change to addon settings

* Receiving Psets from other dictionary sources has been made available by dynamizing the  identifier_url using the client baseurl

* Remove unnecessary blank lines in prop.py

* Remove unused import of bsdd module
2026-03-15 12:56:04 +11:00
Dion Moult b14da14614 Default to assigning material set usages if assigning to an occurrence. See #7794.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 12:26:21 +11:00
Dion Moult 273ecfe8e4 Supersede 3x3 box alignment with more familiar horizontal / vertical UI
* Fix #7712 - global alignment controls now affects all literals
 * Fix #7760 - goodbye 3x3 box alignment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 08:24:38 +11:00
Dion Moult 6e0f24105e Minor fix to regression in 95480a2 where reshaping to a 3x3 matrix was removed 2026-03-15 07:28:38 +11:00
Ryan Schultz 25af50a092 Temp files from ai coding tools 2026-03-15 07:20:15 +11:00
dependabot[bot] 4b5a50a831 Bump actions/download-artifact from 8.0.0 to 8.0.1
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v8.0.0...v8.0.1)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-15 07:19:11 +11:00
dependabot[bot] bd77175c66 Bump ruff from 0.15.5 to 0.15.6
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.5 to 0.15.6.
- [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.15.5...0.15.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-15 07:19:05 +11:00
dependabot[bot] 2b1d99a8b1 Bump gersemi from 0.26.0 to 0.26.1
Bumps [gersemi](https://github.com/BlankSpruce/gersemi) from 0.26.0 to 0.26.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.26.0...0.26.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-15 07:18:58 +11:00
Dion Moult 82adf4d18c Fix #7782: Don't allow assigning styles if no styles available.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 07:03:48 +11:00
Thomas Krijnen cf9df33aa5 Change checkout reference to build branch 2026-03-14 14:51:24 +01:00
Thomas Krijnen 1a6fd2530f Remove dependency on Standard_failure #7788 2026-03-14 14:44:47 +01:00
Dion Moult ea64f1b6b9 Fix #7770, #7747, #7572, #7522, #7416, #7086: Bug when first point in poly tool clicked twice
Previous logic always skipped the first point. Instead, it should only
skip when actually closing a loop (i.e. >= 3 points).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 20:35:59 +11:00
Dion Moult 473d689cf2 Fix #7794: Only slice layerset mesh when material layer set usage exists
Without a usage, orientation is undefined so slicing should be skipped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 13:25:14 +11:00
Richard Brice cf1552e79e Simplifies IfxAxis2PlacementLinear, assumes default Axis = (0,0,1) 2026-03-13 11:16:10 -07:00
Andrej730 90db564b4b ifcclash - add advanced package type that supports smart group clashes 2026-03-13 20:26:23 +05:00
Andrej730 e9fb6b3c1d Bonsai Makefile - upstream bpypolyskel wheel recipe
Sent PR - https://github.com/prochitecture/bpypolyskel/pull/22
2026-03-13 20:26:23 +05:00
Andrej730 a5e0b3f0e5 Bonsai Makefile - upstream ifcjson wheel recipe
Sent PR - https://github.com/IFCJSON-Team/IFC2JSON_python/pull/8
2026-03-13 20:26:23 +05:00
Andrej730 60519e8fed ifcopenshell dev_environment - include all packages 2026-03-13 20:26:23 +05:00
Andrej730 8fb454bb27 Partially disable old Windows workaround for Bonsai uninstallation 2026-03-13 20:26:23 +05:00
Andrej730 9ed8f3e244 Bonsai - fix missing Bonsai Fatal Error UI
Since we added more data to debug info in fcf5614 Fatal Error itself started to fail and was never displayed due some props being inaccessible during load, should be fixed now.

Possible error that were fixed:
```
  File "\Blender\5.1\extensions\raw_githubusercontent_com\bonsai\__init__.py", line 328, in <module>
    print(format_debug_info(get_debug_info()))
                            ~~~~~~~~~~~~~~^^
  File "\Blender\5.1\extensions\raw_githubusercontent_com\bonsai\__init__.py", line 117, in get_debug_info
    if bpy.data.is_saved:
       ^^^^^^^^^^^^^^^^^
AttributeError: '_RestrictData' object has no attribute 'is_saved'

Traceback (most recent call last):
  File "\Blender\5.1\extensions\raw_githubusercontent_com\bonsai\__init__.py", line 366, in draw
    info = get_debug_info()
  File "\Blender\5.1\extensions\raw_githubusercontent_com\bonsai\__init__.py", line 152, in get_debug_info
    bim_props = tool.Blender.get_bim_props()
                ^^^^
NameError: name 'tool' is not defined. Did you mean: 'bool'?

Traceback (most recent call last):
  File "\Blender\5.1\extensions\raw_githubusercontent_com\bonsai\__init__.py", line 366, in draw
    info = get_debug_info()
  File "\Blender\5.1\extensions\raw_githubusercontent_com\bonsai\__init__.py", line 141, in get_debug_info
    import bonsai.tool as tool
  File "\Blender\5.1\extensions\.local\lib\python3.13\site-packages\bonsai\__init__.py", line 355, in <module>
    print(format_debug_info(get_debug_info()))
                            ~~~~~~~~~~~~~~^^
  File "\Blender\5.1\extensions\.local\lib\python3.13\site-packages\bonsai\__init__.py", line 141, in get_debug_info
    import bonsai.tool as tool
  File "\Blender\5.1\extensions\.local\lib\python3.13\site-packages\bonsai\tool\__init__.py", line 23, in <module>
    from bonsai.tool.attribute import Attribute
  File "\Blender\5.1\extensions\.local\lib\python3.13\site-packages\bonsai\tool\attribute.py", line 31, in <module>
    import bonsai.bim.helper as helper
  File "\Blender\5.1\extensions\.local\lib\python3.13\site-packages\bonsai\bim\__init__.py", line 28, in <module>
    from . import handler, operator, prop, ui
  File "\Blender\5.1\extensions\.local\lib\python3.13\site-packages\bonsai\bim\handler.py", line 36, in <module>
    from bonsai.bim.module.aggregate.decorator import AggregateDecorator
  File "\Blender\5.1\extensions\.local\lib\python3.13\site-packages\bonsai\bim\module\aggregate\__init__.py", line 21, in <module>
    from . import operator, prop, ui
  File "\Blender\5.1\extensions\.local\lib\python3.13\site-packages\bonsai\bim\module\aggregate\operator.py", line 32, in <module>
    class BIM_OT_aggregate_assign_object(bpy.types.Operator, tool.Ifc.Operator):
                                                             ^^^^^^^^
AttributeError: partially initialized module 'bonsai.tool' from '\Blender\5.1\extensions\.local\lib\python3.13\site-packages\bonsai\tool\__init__.py' has no attribute 'Ifc' (most likely due to a circular import)
```
2026-03-13 20:26:23 +05:00
Andrej730 298beacef6 Bonsai - remove pyperclip use 2026-03-13 20:26:22 +05:00
Andrej730 eba798c544 typing 2026-03-13 20:26:22 +05:00
dependabot[bot] 1576302caf Bump devalue from 5.6.3 to 5.6.4 in /src/ifctester/webapp
Bumps [devalue](https://github.com/sveltejs/devalue) from 5.6.3 to 5.6.4.
- [Release notes](https://github.com/sveltejs/devalue/releases)
- [Changelog](https://github.com/sveltejs/devalue/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/devalue/compare/v5.6.3...v5.6.4)

---
updated-dependencies:
- dependency-name: devalue
  dependency-version: 5.6.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-13 07:58:26 +01:00
dependabot[bot] d7f29c4494 Bump tar from 7.5.10 to 7.5.11 in /src/ifctester/webapp
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.10 to 7.5.11.
- [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.10...v7.5.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-13 07:58:22 +01:00
dependabot[bot] 4ff6f7c78b Bump black from 26.3.0 to 26.3.1
Bumps [black](https://github.com/psf/black) from 26.3.0 to 26.3.1.
- [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/26.3.0...26.3.1)

---
updated-dependencies:
- dependency-name: black
  dependency-version: 26.3.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-13 07:58:06 +01:00
Andrej730 0b44e146bd Fix error starting Bonsai (77697aeef) 2026-03-13 11:57:17 +05:00
tsomanna_QCOM cf42f986c4 Add Support for IfcOpenShell on Win ARM64 2026-03-12 20:29:10 +01:00
tsomanna_QCOM e84142894e Add Support for IfcOpenShell on Win ARM64 2026-03-12 20:29:10 +01:00
tsomanna_QCOM b38a0dce1f Add Support for IfcOpenShell on Win ARM64 2026-03-12 20:29:10 +01:00
tsomanna_QCOM ae253f5e2a Add Support for IfcOpenShell on Win ARM64 2026-03-12 20:29:10 +01:00
tsomanna_QCOM b25c24a007 Add Support for IfcOpenShell on Win ARM64 2026-03-12 20:29:10 +01:00
Andrej730 8bd3fab608 Linked Models - option to isolate selected object
Quick demo - https://files.catbox.moe/6chdx7.mp4
2026-03-12 20:21:10 +05:00
Andrej730 82951fe702 Pylance - ignore _deps folder
In my case it was adding 3115 Python files and VS Code kept indexing them.
2026-03-12 20:21:10 +05:00
Andrej730 77697aeefc typing 2026-03-12 20:21:10 +05:00
Thomas Krijnen 71442bd4d4 Submodule 2026-03-12 12:34:05 +01:00
Andrej730 f7bee258c6 Linked models - add description for georeferencing indicator
Example - https://files.catbox.moe/bkn9pn.png
2026-03-11 18:38:25 +05:00
Andrej730 0585f8716a Quick Favorites Manager - support enum items 2026-03-11 18:38:25 +05:00
Andrej730 f3fe1a7bf0 ci.yml - BUILD_EXAMPLES=ON to keep testing examples build 2026-03-11 18:38:25 +05:00
Andrej730 61ba6a7989 Add operator to run search generic search queries
So it will be easy to add queries to quick favorites.
2026-03-11 18:38:25 +05:00
Andrej730 97f900e62f Quick Favorites Manager - show operators suggestions 2026-03-11 18:38:25 +05:00
Andrej730 594d72d7e1 Quick Favorites Manager
Blender doesn't have it's own quick favorites manager and working with them can be not very flexible - you can add them in context menu and remove them from Quick Favorites menu. But you can't reorder them, you can't rename them and you can't even add a new button to favorites if it's not added by some addon in the UI.

Have been stumbling upon this for awhile and decided to create an experimental manager UI for this. Things it can do:
- help user create a button with any operator in Blender and properties they prefer to then save it Quick Favorites. Which seems can be very useful in Bonsai, since you can create separate buttons for all kinds of selectors expressions, class assignment or other operators.

- it can import quick favorites from user's actual current quick favorites, so they can just modify them a bit, reorder, rename and then add them again.

- Since quick favorites are not exposed to Python API in Blender, we're using a very hacky way to retrieve them from Blender and don't provide our own buttons for adding and removing quick favorites, as it may be dangerous and even more hacky in implementation. So the workflow for user is to either generate some buttons and add them to quick favorites using Manager or to import it's own quick favorites, then change them how they like, then remove quick favorites using usual quick favorites menu and then add new button one by one.

Small demo - https://files.catbox.moe/vyffp6.mp4
2026-03-11 18:38:24 +05:00
Andrej730 578caaf2cd tool.Blender.update_all_viewports 2026-03-11 18:38:24 +05:00
Andrej730 15ea092ac4 typing 2026-03-11 18:38:23 +05:00
Andrej730 4b12b6dacd bim.hide_queried_linked_element - note known UNDO limitation 2026-03-11 18:38:23 +05:00
Andrej730 584bbe3b83 tool/test_project - remove redundant __init__ 2026-03-11 18:38:22 +05:00
Andrej730 e47b7bca4b ci-black-formatting.yml - note on Python versions used 2026-03-11 18:38:22 +05:00
Andrej730 62b108766b ci-black-formatting.yml - note on Python versions used 2026-03-11 18:38:22 +05:00
HugoBallee 972a1fd309 Update getting_started.rst
IFC_SCHEMA_NAME matching includes
2026-03-10 09:41:09 +01:00
Bruno Postle 6f0bb21a43 Disable building example applications by default, closes #7763
Enable with -DBUILD_EXAMPLES=ON
2026-03-09 22:59:34 +00:00
dependabot[bot] 72f279381f Bump immutable from 5.1.2 to 5.1.5 in /src/ifctester/webapp
Bumps [immutable](https://github.com/immutable-js/immutable-js) from 5.1.2 to 5.1.5.
- [Release notes](https://github.com/immutable-js/immutable-js/releases)
- [Changelog](https://github.com/immutable-js/immutable-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/immutable-js/immutable-js/compare/v5.1.2...v5.1.5)

---
updated-dependencies:
- dependency-name: immutable
  dependency-version: 5.1.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 14:33:44 +01:00
dependabot[bot] 9873e403bc Bump tar from 7.5.9 to 7.5.10 in /src/ifctester/webapp
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.9 to 7.5.10.
- [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.9...v7.5.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 14:33:38 +01:00
dependabot[bot] a48449bc9c Bump docker/setup-buildx-action from 3 to 4
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 14:33:31 +01:00
dependabot[bot] 8cc50b7399 Bump docker/build-push-action from 6 to 7
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 14:33:25 +01:00
dependabot[bot] da027b912e Bump black from 26.1.0 to 26.3.0
Bumps [black](https://github.com/psf/black) from 26.1.0 to 26.3.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/26.1.0...26.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-version: 26.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 14:33:18 +01:00
dependabot[bot] b65a69b9ca Bump docker/login-action from 3 to 4
Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 14:25:36 +01:00
dependabot[bot] 3b3b1f1eab Bump ruff from 0.15.4 to 0.15.5
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.4 to 0.15.5.
- [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.15.4...0.15.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 14:25:11 +01:00
dependabot[bot] ff1b74ef10 Bump docker/setup-qemu-action from 3 to 4
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 14:22:05 +01:00
Richard Brice 610d639c21 Fixes rotation lerp test in make_loft 2026-03-08 10:37:05 -07:00
Richard Brice e282a18474 Fixes crash in taxonomy::loft::print_impl when axis == nullptr 2026-03-08 09:55:47 -07:00
Thomas Krijnen 0469a9528b use basic casts to prevent needless item upgrades #7738 2026-03-06 16:34:12 +01:00
Andrej730 f9486be172 get_linked_element_geom_slice - add tests 2026-03-06 19:07:34 +05:00
Andrej730 3a59425a64 Linked IFC models - hotkey to hide selected geometry
Demo - https://files.catbox.moe/aok74w.mp4
2026-03-06 19:07:34 +05:00
Andrej730 9d0c172a53 bim.select_linked_model_element
Refactored methods for accessing objects in linked models and added a simple operator to select object in linked model by providing guid.

A quick demo - https://files.catbox.moe/sjjw37.mp4
2026-03-06 19:07:34 +05:00
Andrej730 ecc82a52f5 ExtractPropertiesToSQLite - add typing for created columns 2026-03-06 19:07:34 +05:00
Andrej730 adaf33b74f project.operator - reuse ray_cast method 2026-03-06 19:07:33 +05:00
Andrej730 a52a329197 Update note on Blender upstream issue
Fix was included in 4.5.7 (see 141496 bug in https://projects.blender.org/blender/blender/issues/141871)
2026-03-06 19:07:33 +05:00
Andrej730 3a54e808f6 dev_environment python - create user site packages folder if missing
E.g. it might be missing if Python was just installed. Also print paths first before symlinking, making it easier to debug.
2026-03-06 19:07:33 +05:00
Andrej730 f102c7c1b4 ifcopenshell-python makefile - add note about PYNUMBER 2026-03-06 19:07:33 +05:00
Andrej730 9005333f53 ifcpatch MergeProjects - make logger arg optional 2026-03-06 19:07:33 +05:00
Andrej730 a26dbe252a bim.append_inspected_linked_element - fix missing UNDO 2026-03-06 19:07:33 +05:00
Andrej730 8743d5643e typing 2026-03-06 19:07:33 +05:00
Andrej730 619848823c Sort out imports 2026-03-06 19:07:32 +05:00
Richard Brice 951ade4b57 Fix bug introduced in 65d5df78 2026-03-05 14:50:33 -08:00
Richard Brice 1378919709 Fixes IfcLinearPlacement fallback position warning 2026-03-03 13:16:55 -08:00
Ryan Schultz 61cfa48c2c docs: add BonsaiPR bleeding edge installation section (#7721)
* Fix #7718: Fix FallDecorator label calculation for all slope annotation types

- Fix wrong dict key type in decoration.py: DecoratorData.data["fall"] is
  keyed by obj.name (str) but was looked up with obj (Object), causing
  object_type to always be None
- Apply obj.matrix_world transform to spline points before computing rise/run
  in both decoration.py and svgwriter.py; local coordinates have Z=0 for flat
  annotations, world coordinates correctly reflect elevation change
- Use hypotenuse (segment_length) instead of run as the denominator for
  SLOPE_FRACTION label display

Generated with the assistance of an AI coding tool.

* docs: add BonsaiPR bleeding edge installation section

Add new section to installation.rst documenting the BonsaiPR
community build, including why it exists, how the automated
PR-merging system works, installation steps with automated
updates, manual installation, and the PR workflow for
contributors.

Generated with the assistance of an AI coding tool.

* whoops
2026-03-03 18:48:03 +11:00
falken10vdl d6c782aba5 Add newline handling with add_newline_between_words n SvgWriter for text literals 2026-03-03 18:46:14 +11:00
dependabot[bot] d4150e0558 Bump svelte from 5.53.0 to 5.53.6 in /src/ifctester/webapp
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 5.53.0 to 5.53.6.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@5.53.6/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-version: 5.53.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-03 18:44:47 +11:00
dependabot[bot] 4f6051cb0a Bump ruff from 0.15.2 to 0.15.4
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.2 to 0.15.4.
- [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.15.2...0.15.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-03 18:44:40 +11:00
dependabot[bot] 5a27ec9814 Bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-03 18:44:32 +11:00
dependabot[bot] 0ce60f5061 Bump actions/download-artifact from 7.0.0 to 8.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7.0.0...v8.0.0)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-03 18:44:25 +11:00
Thomas Krijnen 43146530b0 arrange polygons: Alternative (unused) perimiter approach; simpler topology handling; projection-based clean-up 2026-03-02 21:49:05 +01:00
Andrej730 db377e2178 Also bump binary version 2026-02-27 15:20:18 +05:00
Thomas Krijnen 5b0511379b IfcAxis1Placement.Axis is optional #7728 2026-02-27 11:06:45 +01:00
Andrej730 f8663b5e2b Bump ifcopenshell build
Just because it didn't happened for a while now and we need to test it.
2026-02-27 14:52:56 +05:00
Andrej730 92c979fbbf black . 2026-02-27 14:52:55 +05:00
Andrej730 8834a51122 format cmake files 2026-02-27 14:52:55 +05:00
Andrej730 1c5b825d8e build-all-win - fix missing compression for Python zip archives
Same as 5ebd425, should resolve https://github.com/ifcopenshell/ifcopenshell/issues/7404
2026-02-27 12:09:34 +05:00
dependabot[bot] 58c69f9d35 Bump ruff from 0.15.1 to 0.15.2
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.1 to 0.15.2.
- [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.15.1...0.15.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-26 13:15:49 +01:00
dependabot[bot] 198e111a92 Bump gersemi from 0.25.4 to 0.26.0
Bumps [gersemi](https://github.com/BlankSpruce/gersemi) from 0.25.4 to 0.26.0.
- [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.4...0.26.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-26 13:15:39 +01:00
dependabot[bot] 35886c9f72 Bump svelte from 5.33.10 to 5.53.0 in /src/ifctester/webapp
Bumps [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) from 5.33.10 to 5.53.0.
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@5.53.0/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-version: 5.53.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-26 13:14:38 +01:00
dependabot[bot] 097c8af7c7 Bump rollup from 4.41.1 to 4.59.0 in /src/ifctester/webapp
Bumps [rollup](https://github.com/rollup/rollup) from 4.41.1 to 4.59.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.41.1...v4.59.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.59.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-26 13:14:21 +01:00
Andrej730 cfea3de552 cmake - fix msvc warning on linking without /ltcg flag
Linking flags were missing for `MODULE` type libraries, example warning: `IfcPythonPYTHON_wrap.obj : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance`
2026-02-26 17:12:55 +05:00
Andrej730 5b86eedb26 cmake - fix ifc geom mapping not linking against IfcGeom library 2026-02-26 17:12:55 +05:00
Andrej730 fc13bcd055 bump ccache-action 2026-02-26 17:12:55 +05:00
Andrej730 be4806471d cache_dependencies - use tar instead of tarfile for archiving 2026-02-26 17:12:55 +05:00
Andrej730 7909997d42 build workflows - reuse cache_dependencies.py 2026-02-26 17:12:54 +05:00
Andrej730 00cd0b76f9 .gersemirc - search src for definitions
To fix errors when parsing custom macro from `src\examples\CMakeLists.txt`, see https://github.com/BlankSpruce/gersemi/issues/105
2026-02-26 17:12:54 +05:00
Andrej730 aa7710dd74 cache_dependencies.py - note expected cwd 2026-02-26 17:12:54 +05:00
Andrej730 fc7d15324f build-all - don't use main repo pyproject.toml for wasm builds 2026-02-26 17:12:54 +05:00
Andrej730 f8f4725054 build-all - remove wasm cxx flags workaround
As issue is now fixed upstream (https://github.com/pyodide/pyodide-build/issues/251)
2026-02-26 17:12:54 +05:00
Andrej730 333b6210a4 black . 2026-02-26 17:12:52 +05:00
Andrej730 ff3933a117 Remove some unused imports 2026-02-26 17:12:46 +05:00
Andrej730 34ffaea2c9 cmake - link serializers against IfcGeom to fix wasm build
jsonserializer is using ifcgeom and also eigen3
2026-02-26 17:12:45 +05:00
Andrej730 526b9537a9 build_pyodide.sh - allow executing multiple times 2026-02-26 17:12:45 +05:00
Andrej730 fb1c9eb7e3 build-all - fix missing f-string 2026-02-26 17:12:45 +05:00
Andrej730 a61d5a12fb build-all - use cmake to build swig
To keep it in sync with Windows build. Also Removed pcre2 dependency as apparently it's not required - we were not using it on Windows.
2026-02-26 17:12:45 +05:00
Andrej730 e54d16ef57 build_osx - ensure we use bison from brew instead of the default one 2026-02-26 17:12:45 +05:00
Andrej730 4591b6d926 cmake - ignore rocksdb shared library
If makes code target it by default if it's available, leading to errors below, since we don't really support using shared rocksdb. See some more details in the code comment.

IfcPythonPYTHON_wrap.cxx.obj : error LNK2001: unresolved external symbol "public: __cdecl rocksdb::Cleanable::~Cleanable(void)" (??1Cleanable@rocksdb@@QEAA@XZ)
IfcPythonPYTHON_wrap.cxx.obj : error LNK2001: unresolved external symbol "public: __cdecl rocksdb::Cleanable::Cleanable(void)" (??0Cleanable@rocksdb@@QEAA@XZ)
IfcPythonPYTHON_wrap.cxx.obj : error LNK2001: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl rocksdb::Slice::ToString(bool)const " (?ToString@Slice@rocksdb@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "const rocksdb::WriteBatch::`vftable'" (??_7WriteBatch@rocksdb@@6B@)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: virtual __cdecl rocksdb::WriteBatch::~WriteBatch(void)" (??1WriteBatch@rocksdb@@UEAA@XZ)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: __cdecl rocksdb::WriteBatch::WriteBatch(unsigned __int64,unsigned __int64,unsigned __int64,unsigned __int64)" (??0WriteBatch@rocksdb@@QEAA@_K000@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: __cdecl rocksdb::ColumnFamilyOptions::ColumnFamilyOptions(void)" (??0ColumnFamilyOptions@rocksdb@@QEAA@XZ)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl rocksdb::Configurable::GetOptionName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?GetOptionName@Configurable@rocksdb@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV34@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl rocksdb::Configurable::SerializeOptions(struct rocksdb::ConfigOptions const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?SerializeOptions@Configurable@rocksdb@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBUConfigOptions@2@AEBV34@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual bool __cdecl rocksdb::Configurable::OptionsAreEqual(struct rocksdb::ConfigOptions const &,class rocksdb::OptionTypeInfo const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,void const * const,void const * const,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (?OptionsAreEqual@Configurable@rocksdb@@MEBA_NAEBUConfigOptions@2@AEBVOptionTypeInfo@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBX3PEAV56@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual class rocksdb::Status __cdecl rocksdb::Configurable::ParseOption(struct rocksdb::ConfigOptions const &,class rocksdb::OptionTypeInfo const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,void *)" (?ParseOption@Configurable@rocksdb@@MEAA?AVStatus@2@AEBUConfigOptions@2@AEBVOptionTypeInfo@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2PEAX@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual class rocksdb::Status __cdecl rocksdb::Configurable::ConfigureOptions(struct rocksdb::ConfigOptions const &,class std::unordered_map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::hash<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,struct std::equal_to<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &,class std::unordered_map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::hash<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,struct std::equal_to<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > *)" (?ConfigureOptions@Configurable@rocksdb@@MEAA?AVStatus@2@AEBUConfigOptions@2@AEBV?$unordered_map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@U?$hash@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@U?$equal_to@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@@std@@@2@@std@@PEAV56@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual class rocksdb::Status __cdecl rocksdb::Configurable::ParseStringOptions(struct rocksdb::ConfigOptions const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?ParseStringOptions@Configurable@rocksdb@@MEAA?AVStatus@2@AEBUConfigOptions@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual void const * __cdecl rocksdb::Configurable::GetOptionsPtr(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?GetOptionsPtr@Configurable@rocksdb@@MEBAPEBXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: virtual class rocksdb::Status __cdecl rocksdb::Configurable::ValidateOptions(struct rocksdb::DBOptions const &,struct rocksdb::ColumnFamilyOptions const &)const " (?ValidateOptions@Configurable@rocksdb@@UEBA?AVStatus@2@AEBUDBOptions@2@AEBUColumnFamilyOptions@2@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: virtual class rocksdb::Status __cdecl rocksdb::Configurable::PrepareOptions(struct rocksdb::ConfigOptions const &)" (?PrepareOptions@Configurable@rocksdb@@UEAA?AVStatus@2@AEBUConfigOptions@2@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: virtual bool __cdecl rocksdb::Configurable::AreEquivalent(struct rocksdb::ConfigOptions const &,class rocksdb::Configurable const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (?AreEquivalent@Configurable@rocksdb@@UEBA_NAEBUConfigOptions@2@PEBV12@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: virtual class rocksdb::Status __cdecl rocksdb::Configurable::GetOption(struct rocksdb::ConfigOptions const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (?GetOption@Configurable@rocksdb@@UEBA?AVStatus@2@AEBUConfigOptions@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAV56@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "class rocksdb::TableFactory * __cdecl rocksdb::NewBlockBasedTableFactory(struct rocksdb::BlockBasedTableOptions const &)" (?NewBlockBasedTableFactory@rocksdb@@YAPEAVTableFactory@1@AEBUBlockBasedTableOptions@1@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: class std::shared_ptr<class rocksdb::Cache> __cdecl rocksdb::LRUCacheOptions::MakeSharedCache(void)const " (?MakeSharedCache@LRUCacheOptions@rocksdb@@QEBA?AV?$shared_ptr@VCache@rocksdb@@@std@@XZ)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: static class rocksdb::Status __cdecl rocksdb::DB::OpenForReadOnly(struct rocksdb::Options const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::unique_ptr<class rocksdb::DB,struct std::default_delete<class rocksdb::DB> > *,bool)" (?OpenForReadOnly@DB@rocksdb@@SA?AVStatus@2@AEBUOptions@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAV?$unique_ptr@VDB@rocksdb@@U?$default_delete@VDB@rocksdb@@@std@@@6@_N@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: static class rocksdb::Status __cdecl rocksdb::DB::Open(struct rocksdb::Options const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::unique_ptr<class rocksdb::DB,struct std::default_delete<class rocksdb::DB> > *)" (?Open@DB@rocksdb@@SA?AVStatus@2@AEBUOptions@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAV?$unique_ptr@VDB@rocksdb@@U?$default_delete@VDB@rocksdb@@@std@@@6@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "class std::vector<enum rocksdb::CompressionType,class std::allocator<enum rocksdb::CompressionType> > const & __cdecl rocksdb::GetSupportedCompressions(void)" (?GetSupportedCompressions@rocksdb@@YAAEBV?$vector@W4CompressionType@rocksdb@@V?$allocator@W4CompressionType@rocksdb@@@std@@@std@@XZ)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: virtual bool __cdecl rocksdb::MergeOperator::PartialMergeMulti(class rocksdb::Slice const &,class std::deque<class rocksdb::Slice,class std::allocator<class rocksdb::Slice> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class rocksdb::Logger *)const " (?PartialMergeMulti@MergeOperator@rocksdb@@UEBA_NAEBVSlice@2@AEBV?$deque@VSlice@rocksdb@@V?$allocator@VSlice@rocksdb@@@std@@@std@@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@5@PEAVLogger@2@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: virtual bool __cdecl rocksdb::MergeOperator::FullMergeV3(struct rocksdb::MergeOperator::MergeOperationInputV3 const &,struct rocksdb::MergeOperator::MergeOperationOutputV3 *)const " (?FullMergeV3@MergeOperator@rocksdb@@UEBA_NAEBUMergeOperationInputV3@12@PEAUMergeOperationOutputV3@12@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: virtual bool __cdecl rocksdb::MergeOperator::FullMergeV2(struct rocksdb::MergeOperator::MergeOperationInput const &,struct rocksdb::MergeOperator::MergeOperationOutput *)const " (?FullMergeV2@MergeOperator@rocksdb@@UEBA_NAEBUMergeOperationInput@12@PEAUMergeOperationOutput@12@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl rocksdb::Customizable::SerializeOptions(struct rocksdb::ConfigOptions const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?SerializeOptions@Customizable@rocksdb@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBUConfigOptions@2@AEBV34@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "protected: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl rocksdb::Customizable::GetOptionName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?GetOptionName@Customizable@rocksdb@@MEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV34@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: virtual class rocksdb::Status __cdecl rocksdb::Customizable::GetOption(struct rocksdb::ConfigOptions const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (?GetOption@Customizable@rocksdb@@UEBA?AVStatus@2@AEBUConfigOptions@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAV56@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: virtual bool __cdecl rocksdb::Customizable::AreEquivalent(struct rocksdb::ConfigOptions const &,class rocksdb::Configurable const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)const " (?AreEquivalent@Customizable@rocksdb@@UEBA_NAEBUConfigOptions@2@PEBVConfigurable@2@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "public: __cdecl rocksdb::DBOptions::DBOptions(void)" (??0DBOptions@rocksdb@@QEAA@XZ)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "private: virtual bool __cdecl rocksdb::AssociativeMergeOperator::PartialMerge(class rocksdb::Slice const &,class rocksdb::Slice const &,class rocksdb::Slice const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class rocksdb::Logger *)const " (?PartialMerge@AssociativeMergeOperator@rocksdb@@EEBA_NAEBVSlice@2@00PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAVLogger@2@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "private: virtual bool __cdecl rocksdb::AssociativeMergeOperator::FullMergeV2(struct rocksdb::MergeOperator::MergeOperationInput const &,struct rocksdb::MergeOperator::MergeOperationOutput *)const " (?FullMergeV2@AssociativeMergeOperator@rocksdb@@EEBA_NAEBUMergeOperationInput@MergeOperator@2@PEAUMergeOperationOutput@42@@Z)
IfcParse.lib(IfcFile.cpp.obj) : error LNK2001: unresolved external symbol "bool const rocksdb::kDefaultToAdaptiveMutex" (?kDefaultToAdaptiveMutex@rocksdb@@3_NB)
ifcwrap\_ifcopenshell_wrapper.cp311-win_amd64.pyd : fatal error LNK1120: 34 unresolved externals

Or on Unix:
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcEntityInstanceData.cpp.o): in function `rocksdb::PinnableSlice::PinnableSlice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:141: undefined reference to `rocksdb::Cleanable::Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcEntityInstanceData.cpp.o): in function `rocksdb::PinnableSlice::~PinnableSlice()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: /home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::Configurable::~Configurable()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/configurable.h:59: undefined reference to `vtable for rocksdb::Configurable'
/usr/bin/ld: /home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/configurable.h:59: undefined reference to `vtable for rocksdb::Configurable'
/usr/bin/ld: /home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/configurable.h:59: undefined reference to `vtable for rocksdb::Configurable'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::Customizable::GetOptionsPtr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/customizable.h:105: undefined reference to `rocksdb::Configurable::GetOptionsPtr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/usr/bin/ld: /home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/customizable.h:105: undefined reference to `rocksdb::Configurable::GetOptionsPtr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/usr/bin/ld: /home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/customizable.h:105: undefined reference to `rocksdb::Configurable::GetOptionsPtr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::Options::Options()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/options.h:1628: undefined reference to `rocksdb::DBOptions::DBOptions()'
/usr/bin/ld: /home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/options.h:1628: undefined reference to `rocksdb::ColumnFamilyOptions::ColumnFamilyOptions()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `IfcParse::impl::rocks_db_file_storage::rocks_db_file_storage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, IfcParse::IfcFile*, bool)':
/home/andrej/ifcopenshell/src/ifcparse/IfcFile.cpp:421: undefined reference to `rocksdb::GetSupportedCompressions()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `init_db':
/home/andrej/ifcopenshell/src/ifcparse/IfcFile.cpp:440: undefined reference to `rocksdb::kDefaultToAdaptiveMutex'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::NewLRUCache(unsigned long, int, bool, double, std::shared_ptr<rocksdb::MemoryAllocator>, bool, rocksdb::CacheMetadataChargePolicy, double)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/cache.h:282: undefined reference to `rocksdb::LRUCacheOptions::MakeSharedCache() const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `init_db':
/home/andrej/ifcopenshell/src/ifcparse/IfcFile.cpp:445: undefined reference to `rocksdb::NewBlockBasedTableFactory(rocksdb::BlockBasedTableOptions const&)'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::DB::OpenForReadOnly(rocksdb::Options const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::DB**, bool)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/db.h:243: undefined reference to `rocksdb::DB::OpenForReadOnly(rocksdb::Options const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unique_ptr<rocksdb::DB, std::default_delete<rocksdb::DB> >*, bool)'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::DB::Open(rocksdb::Options const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::DB**)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/db.h:187: undefined reference to `rocksdb::DB::Open(rocksdb::Options const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unique_ptr<rocksdb::DB, std::default_delete<rocksdb::DB> >*)'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb_set_view<unsigned long>::iterator::extract_current_value() const':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_set_view.h:70: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::PinnableSlice::~PinnableSlice()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::PinnableSlice::PinnableSlice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:141: undefined reference to `rocksdb::Cleanable::Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::PinnableSlice::~PinnableSlice()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb_set_view<unsigned long>::iterator::iterator(rocksdb_set_view<unsigned long>::iterator const&)':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_set_view.h:103: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: /home/andrej/ifcopenshell/src/ifcparse/rocksdb_set_view.h:106: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `IfcParse::impl::rocks_db_file_storage::process_deletion_inverse(IfcUtil::IfcBaseClass*)':
/home/andrej/ifcopenshell/src/ifcparse/IfcFile.cpp:526: undefined reference to `rocksdb::WriteBatch::~WriteBatch()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::WriteBatch::WriteBatch(unsigned long, unsigned long)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/write_batch.h:67: undefined reference to `rocksdb::WriteBatch::WriteBatch(unsigned long, unsigned long, unsigned long, unsigned long)'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `rocksdb::WriteBatch::DeleteRange(rocksdb::Slice const&, rocksdb::Slice const&)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/write_batch.h:164: undefined reference to `rocksdb::WriteBatch::DeleteRange(rocksdb::ColumnFamilyHandle*, rocksdb::Slice const&, rocksdb::Slice const&)'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o): in function `IfcParse::impl::rocks_db_file_storage::process_deletion_inverse(IfcUtil::IfcBaseClass*)':
/home/andrej/ifcopenshell/src/ifcparse/IfcFile.cpp:526: undefined reference to `rocksdb::WriteBatch::~WriteBatch()'
/usr/bin/ld: /home/andrej/ifcopenshell/src/ifcparse/IfcFile.cpp:547: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: /home/andrej/ifcopenshell/src/ifcparse/IfcFile.cpp:526: undefined reference to `rocksdb::WriteBatch::~WriteBatch()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTIN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x10): undefined reference to `typeinfo for rocksdb::AssociativeMergeOperator'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x20): undefined reference to `rocksdb::Customizable::GetOption(rocksdb::ConfigOptions const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x28): undefined reference to `rocksdb::Customizable::AreEquivalent(rocksdb::ConfigOptions const&, rocksdb::Configurable const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x38): undefined reference to `rocksdb::Configurable::PrepareOptions(rocksdb::ConfigOptions const&)'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x40): undefined reference to `rocksdb::Configurable::ValidateOptions(rocksdb::DBOptions const&, rocksdb::ColumnFamilyOptions const&) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x50): undefined reference to `rocksdb::Configurable::ParseStringOptions(rocksdb::ConfigOptions const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x58): undefined reference to `rocksdb::Configurable::ConfigureOptions(rocksdb::ConfigOptions const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >*)'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x60): undefined reference to `rocksdb::Configurable::ParseOption(rocksdb::ConfigOptions const&, rocksdb::OptionTypeInfo const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void*)'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x68): undefined reference to `rocksdb::Configurable::OptionsAreEqual(rocksdb::ConfigOptions const&, rocksdb::OptionTypeInfo const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void const*, void const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x70): undefined reference to `rocksdb::Customizable::SerializeOptions(rocksdb::ConfigOptions const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0x78): undefined reference to `rocksdb::Customizable::GetOptionName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0xb8): undefined reference to `rocksdb::MergeOperator::FullMergeV3(rocksdb::MergeOperator::MergeOperationInputV3 const&, rocksdb::MergeOperator::MergeOperationOutputV3*) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0xc0): undefined reference to `rocksdb::AssociativeMergeOperator::PartialMerge(rocksdb::Slice const&, rocksdb::Slice const&, rocksdb::Slice const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, rocksdb::Logger*) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcFile.cpp.o):(.data.rel.ro._ZTVN12_GLOBAL__N_126ConcatenateIdMergeOperatorE+0xc8): undefined reference to `rocksdb::MergeOperator::PartialMergeMulti(rocksdb::Slice const&, std::deque<rocksdb::Slice, std::allocator<rocksdb::Slice> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, rocksdb::Logger*) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb_map_adapter<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, DefaultCodec<unsigned long> >::iterator::operator*() const':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:261: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: /home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:263: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb_map_adapter<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, DefaultCodec<unsigned long> >::iterator::operator==(rocksdb_map_adapter<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, DefaultCodec<unsigned long> >::iterator const&) const':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:296: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: /home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:296: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb::PinnableSlice::~PinnableSlice()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb::PinnableSlice::PinnableSlice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:141: undefined reference to `rocksdb::Cleanable::Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb::PinnableSlice::~PinnableSlice()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: /home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb::PinnableSlice::PinnableSlice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:141: undefined reference to `rocksdb::Cleanable::Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb::PinnableSlice::~PinnableSlice()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb_map_adapter<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, DefaultCodec<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::iterator::operator*() const':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:261: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: /home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:263: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb_map_adapter<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, DefaultCodec<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::find(unsigned long const&) const':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:327: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb_map_adapter<std::tuple<int, int, int>, std::vector<unsigned int, std::allocator<unsigned int> >, DefaultCodec<std::vector<unsigned int, std::allocator<unsigned int> > > >::find(std::tuple<int, int, int> const&) const':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:327: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb_map_adapter<std::tuple<int, int, int>, std::vector<unsigned int, std::allocator<unsigned int> >, DefaultCodec<std::vector<unsigned int, std::allocator<unsigned int> > > >::iterator::operator*() const':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:261: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o):/home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:263: more undefined references to `rocksdb::Slice::ToString[abi:cxx11](bool) const' follow
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb::PinnableSlice::~PinnableSlice()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb::PinnableSlice::PinnableSlice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:141: undefined reference to `rocksdb::Cleanable::Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb::PinnableSlice::~PinnableSlice()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb_map_adapter<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, DefaultCodec<unsigned long> >::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:327: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb_map_adapter<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, DefaultCodec<unsigned long> >::iterator::iterator(rocksdb_map_adapter<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, DefaultCodec<unsigned long> >::iterator const&)':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:230: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: /home/andrej/ifcopenshell/src/ifcparse/rocksdb_map_adapter.h:233: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb::PinnableSlice::PinnableSlice(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:141: undefined reference to `rocksdb::Cleanable::Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb::PinnableSlice::~PinnableSlice()':
/home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: /home/andrej/ifcopenshell/build/Linux/x86_64/install/rocksdb-9.11.2/include/rocksdb/slice.h:138: undefined reference to `rocksdb::Cleanable::~Cleanable()'
/usr/bin/ld: ../ifcparse/libIfcParse.a(IfcParse.cpp.o): in function `rocksdb_set_view<unsigned long>::iterator::operator==(rocksdb_set_view<unsigned long>::iterator const&) const':
/home/andrej/ifcopenshell/src/ifcparse/rocksdb_set_view.h:170: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
/usr/bin/ld: /home/andrej/ifcopenshell/src/ifcparse/rocksdb_set_view.h:170: undefined reference to `rocksdb::Slice::ToString[abi:cxx11](bool) const'
collect2: error: ld returned 1 exit status
make[2]: *** [ifcconvert/CMakeFiles/IfcConvert.dir/build.make:236: ifcconvert/IfcConvert] Error 1
make[1]: *** [CMakeFiles/Makefile2:569: ifcconvert/CMakeFiles/IfcConvert.dir/all] Error 2
2026-02-26 17:12:44 +05:00
Andrej730 6492fdeb05 build-all - add zlib and openssl to RHEL packages 2026-02-26 17:12:44 +05:00
Andrej730 8eb0641e70 build-all - mention zlib requirement 2026-02-26 17:12:44 +05:00
Andrej730 6face696cb build-all - use cmake arg instead of a patch to disable ExpToCasExe 2026-02-26 17:12:42 +05:00
Andrej730 4c4eed5dd4 build_rocky - switch to rocky 9
As rocky 8 is not updating anymore for 2 years and we need some updated dependencies (e.g. `bison` 3.5+ for newer version of `swig`).
2026-02-26 17:01:56 +05:00
Andrej730 634600b65f FindOpenCASCADE - rescan dependencies for cmake config 2026-02-26 17:01:56 +05:00
Andrej730 d43b9ee353 build-all - ensure Python was built with openssl 2026-02-26 17:01:56 +05:00
Andrej730 5ea4290920 build-all - ensure bison is installed 2026-02-26 17:01:56 +05:00
Andrej730 c8ca904333 build-all - distinct command and path in logs 2026-02-26 17:01:56 +05:00
Andrej730 59c28b5ae6 build_rocky - use dnf instead of yum
It's using `dnf` either way, but just to make it more explicit.
2026-02-26 17:01:56 +05:00
Andrej730 c649a4b522 build-all - don't fail silently on missing Python dependencies 2026-02-26 17:01:55 +05:00
Andrej730 5ebd4256a1 build-all-win.py - fix missing compression
Resulting in larger zip files for builds, reported in 7404
2026-02-26 17:01:55 +05:00
Andrej730 3ec9d69556 build-deps - support building Boost for VS2026 2026-02-26 17:01:55 +05:00
Andrej730 54a6fb651e tool.ps1 - support commands with 0 args
No such commands atm though.
2026-02-26 17:01:55 +05:00
Andrej730 dcac336b98 tool.ps1 - refer to cecho.cmd directly, use return instead of exit 0
Which is useful when debugging and calling tools.ps1 directly - less thing to modify to make it work.
Also replaced `exit 0` with `return`, so it would be possible to reuse functions inside `tools.ps1`
2026-02-26 17:01:55 +05:00
Andrej730 88a5717295 build-deps.cmd - fix issue building opencollada in cmake 4 2026-02-26 17:01:55 +05:00
Andrej730 8bfceec1fd vs-cfg.cmd - document some output vars 2026-02-26 17:01:55 +05:00
Andrej730 3807479e42 build-deps - update occt config to support cmake 4
And also to make it work in sync with `build-all.py`.
2026-02-26 17:01:54 +05:00
Andrej730 aebcb676f2 windows - add occt patch to support cmake 4 2026-02-26 17:01:54 +05:00
Andrej730 ba5ea08aee Bump swig version to support cmake 4 2026-02-26 17:01:54 +05:00
Andrej730 d4ebf3f308 cmake - error if svgpp submodule is not initialized 2026-02-26 17:01:54 +05:00
Andrej730 d9e488d518 cmake format 2026-02-26 17:01:54 +05:00
Andrej730 1fb6227d13 build-deps - use other mpir fork to support VS 2026 2026-02-26 17:01:54 +05:00
Andrej730 0e90cd81b3 vs-cfg.cmd - add support for Visual Studio 18 2026 2026-02-26 17:01:53 +05:00
Andrej730 ac23c7a74b vs-cfg.cmd - more readable error on supported versions of VS 2026-02-26 17:01:51 +05:00
Andrej730 7322082a0d typing 2026-02-26 17:01:48 +05:00
Andrej730 0234809d0b Prefer direct api calls over tool.Ifc.run 2026-02-26 17:01:48 +05:00
Andrej730 38381f44b9 ci-bonsai-daily - generate timestamp once for all builds
To avoid running in a situation when some builds are using one tag and some are using another and then unstable repo script fails to find builds for some platforms.
2026-02-26 17:01:47 +05:00
Andrej730 83fed6257e run-cmake.bat - deduplicate cmake args code 2026-02-26 17:01:47 +05:00
Andrej730 40d43732ca build-deps - bump proj version to avoid errors in cmake 4+ 2026-02-26 17:01:47 +05:00
Andrej730 521c8eae0d run-cmake.bat - document USE_NINJA env var 2026-02-26 17:01:47 +05:00
Andrej730 5aa7ba6be6 IfcConvert - fix Windows builds stuck on 0.8.0 version 2026-02-26 17:01:47 +05:00
Thomas Krijnen e3464b395e --recursion-limit option in validate.py 2026-02-26 12:38:36 +01:00
Thomas Krijnen 9ab9da2ca8 Update black exclude dirs 2026-02-26 12:36:17 +01:00
Thomas Krijnen 077a0c3755 Run black on express/ 2026-02-26 12:36:01 +01:00
Thomas Krijnen 18527a78e1 rule_executor.py don't log RecursionError as error 2026-02-26 12:35:40 +01:00
falken10vdl 0be348707c Update scale_font_size method to accept a None parameter so it is cleaner the calls from the rest of the code base 2026-02-25 13:28:58 -03:00
falken10vdl 1b784e22af Add decorator font scale property addon setting 2026-02-25 13:28:58 -03:00
falken10vdl c0857c715a Refactor scale_font_size to improve DPI and pixel size handling for better font scaling 2026-02-25 13:28:58 -03:00
falken10vdl ecaea5f776 refactor scale_font_size as per developers feedback 2026-02-25 13:28:58 -03:00
falken10vdl dde6e2d62b black 2026-02-25 13:28:58 -03:00
falken10vdl 8df4b2cd56 Scale font size in PolylineDecorator and BoundingBoxDecorator based on Blender's UI preferences 2026-02-25 13:28:58 -03:00
Richard Brice ece7d6b97f Fixes example in documentation 2026-02-25 14:21:10 +01:00
Thomas Krijnen 2d7a556dd5 Fix sectioned solid cap #7674 2026-02-24 11:26:18 +01:00
651 changed files with 45799 additions and 5461 deletions
+3 -2
View File
@@ -1,7 +1,8 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/BlankSpruce/gersemi/0.24.0/gersemi/configuration.schema.json
# Needed for gersemi to detect custom functions and macros.
definitions: ["./cmake"]
# Gersemi doesn't support autodetection of macros/functions from other files or from the current one
# and requires to explicitly list directories/cmake files that define them.
definitions: ["./cmake", "./src"]
disable_formatting: false
extensions: []
indent: 4
+7 -7
View File
@@ -40,6 +40,8 @@ jobs:
# preinstalled: xz, cmake
brew install git bison autoconf automake libffi findutils
echo "$(brew --prefix findutils)/libexec/gnubin" >> $GITHUB_PATH
# Mac is using bison 2.5 by default, but we need 3.5+ for swig.
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
- name: Install aws cli
run: |
@@ -47,11 +49,11 @@ jobs:
- name: Unpack Dependencies
run: |
install_root=$(find ./build -maxdepth 4 -type d -name install 2>/dev/null | head -n 1 || true)
[ -n "$install_root" ] && find "$install_root" -type f -name 'cache-*.tar.gz' -maxdepth 1 -exec tar -xzf {} -C "$install_root" \; || true
cd build
python ../nix/cache_dependencies.py unpack
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
uses: hendrikmuhs/ccache-action@v1.2.22
with:
key: mac-${{ matrix.arch }}
@@ -81,7 +83,7 @@ jobs:
- name: Upload Build Logs
if: always()
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: build-logs-osx-${{ matrix.arch }}
path: |
@@ -93,9 +95,7 @@ jobs:
- name: Pack Dependencies
run: |
cd build
for install_dir in $(find $(find . -maxdepth 4 -name install) -mindepth 1 -maxdepth 1 -type d); do
test -f $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz || tar -czf $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz -C $(dirname "$install_dir") $(basename "$install_dir");
done
python ../nix/cache_dependencies.py pack
- name: Commit and Push Changes to Build Repository
run: |
+4 -4
View File
@@ -26,10 +26,10 @@ jobs:
- name: Unpack Dependencies
run: |
cd ifcopenshell_build
python ../IfcOpenShell/pyodide/cache_dependencies.py unpack
python ../IfcOpenShell/nix/cache_dependencies.py unpack
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
uses: hendrikmuhs/ccache-action@v1.2.22
with:
key: ubuntu-22.04-${{ runner.arch }}
@@ -42,7 +42,7 @@ jobs:
- name: Upload Build Logs
if: always()
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: build-logs-pyodide
path: |
@@ -65,7 +65,7 @@ jobs:
- name: Pack Dependencies
run: |
cd ifcopenshell_build
python ../IfcOpenShell/pyodide/cache_dependencies.py pack
python ../IfcOpenShell/nix/cache_dependencies.py pack
- name: Commit and Push Changes to Build Repository
run: |
+10 -13
View File
@@ -6,13 +6,13 @@ on:
jobs:
build_ifcopenshell:
runs-on: ubuntu-22.04
container: rockylinux:8
container: rockylinux:9
steps:
- name: Install Dependencies
run: |
yum update -y
yum install -y gcc gcc-c++ git autoconf automake bison make zip cmake python3 \
dnf update -y
dnf install -y gcc gcc-c++ git autoconf automake bison make zip cmake python3 python3-pip \
bzip2 patch mesa-libGL-devel libffi-devel fontconfig-devel \
sqlite-devel bzip2-devel zlib-devel openssl-devel xz-devel \
readline-devel ncurses-devel libffi-devel libuuid-devel git-lfs \
@@ -38,20 +38,19 @@ jobs:
with:
repository: IfcOpenShell/build-outputs
path: ./build
ref: rockylinux8-x64
ref: rockylinux9-x64
lfs: true
token: ${{ secrets.BUILD_REPO_TOKEN }}
- name: Unpack Dependencies
run: |
install_root=$(find ./build -maxdepth 4 -type d -name install 2>/dev/null | head -n 1 || true)
[ -n "$install_root" ] && find "$install_root" -type f -name 'cache-*.tar.gz' -maxdepth 1 -exec tar -xzf {} -C "$install_root" \; || true
cd build
python3 ../nix/cache_dependencies.py unpack
- name: ccache
# TODO: Use tag after 1.2.20 releases.
uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639
uses: hendrikmuhs/ccache-action@v1.2.22
with:
key: ubuntu-22.04-${{ runner.arch }}-rockylinux8
key: ubuntu-22.04-${{ runner.arch }}-rockylinux9
- name: Run Build Script
shell: bash
@@ -61,7 +60,7 @@ jobs:
- name: Upload Build Logs
if: always()
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: build-logs-rocky
path: |
@@ -72,9 +71,7 @@ jobs:
- name: Pack Dependencies
run: |
cd build
for install_dir in $(find $(find . -maxdepth 4 -name install) -mindepth 1 -maxdepth 1 -type d); do
test -f $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz || tar -czf $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz -C $(dirname "$install_dir") $(basename "$install_dir");
done
python3 ../nix/cache_dependencies.py pack
- name: Commit and Push Changes to Build Repository
run: |
+10 -13
View File
@@ -6,13 +6,13 @@ on:
jobs:
build_ifcopenshell:
runs-on: ubuntu-22.04-arm
container: arm64v8/rockylinux:8
container: arm64v8/rockylinux:9
steps:
- name: Install Dependencies
run: |
yum update -y
yum install -y gcc gcc-c++ git autoconf automake bison make zip cmake python3 \
dnf update -y
dnf install -y gcc gcc-c++ git autoconf automake bison make zip cmake python3 python3-pip \
bzip2 patch mesa-libGL-devel libffi-devel fontconfig-devel \
sqlite-devel bzip2-devel zlib-devel openssl-devel xz-devel \
readline-devel ncurses-devel libffi-devel libuuid-devel git-lfs \
@@ -38,20 +38,19 @@ jobs:
with:
repository: IfcOpenShell/build-outputs
path: ./build
ref: rockylinux8-arm64
ref: rockylinux9-arm64
lfs: true
token: ${{ secrets.BUILD_REPO_TOKEN }}
- name: Unpack Dependencies
run: |
install_root=$(find ./build -maxdepth 4 -type d -name install 2>/dev/null | head -n 1 || true)
[ -n "$install_root" ] && find "$install_root" -type f -name 'cache-*.tar.gz' -maxdepth 1 -exec tar -xzf {} -C "$install_root" \; || true
cd build
python3 ../nix/cache_dependencies.py unpack
- name: ccache
# TODO: Use tag after 1.2.20 releases.
uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639
uses: hendrikmuhs/ccache-action@v1.2.22
with:
key: ubuntu-22.04-${{ runner.arch }}-rockylinux8
key: ubuntu-22.04-${{ runner.arch }}-rockylinux9
- name: Run Build Script
shell: bash
@@ -61,7 +60,7 @@ jobs:
- name: Upload Build Logs
if: always()
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: build-logs-rocky-arm64
path: |
@@ -72,9 +71,7 @@ jobs:
- name: Pack Dependencies
run: |
cd build
for install_dir in $(find $(find . -maxdepth 4 -name install) -mindepth 1 -maxdepth 1 -type d); do
test -f $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz || tar -czf $(dirname "$install_dir")/cache-$(basename "$install_dir").tar.gz -C $(dirname "$install_dir") $(basename "$install_dir");
done
python3 ../nix/cache_dependencies.py pack
- name: Commit and Push Changes to Build Repository
run: |
+28 -11
View File
@@ -5,11 +5,26 @@ on:
jobs:
build_ifcopenshell:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
arch: ['x64']
include:
- arch: x64
runs_on: windows-2022
deps_dir: _deps-vs2022-x64-installed
vcvars: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"'
build_branch: windows-x64
zip_suffix: win64
- arch: ARM64
runs_on: windows-11-arm
deps_dir: _deps-vs2022-ARM64-installed
vcvars: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsarm64.bat"'
build_branch: windows-arm64
zip_suffix: win-arm64
runs-on: ${{ matrix.runs_on }}
steps:
- name: Checkout Repository
uses: actions/checkout@v6
@@ -20,8 +35,8 @@ jobs:
uses: actions/checkout@v6
with:
repository: IfcOpenShell/build-outputs
path: _deps-vs2022-x64-installed
ref: windows-${{ matrix.arch }}
path: ${{ matrix.deps_dir }}
ref: ${{ matrix.build_branch }}
lfs: true
token: ${{ secrets.BUILD_REPO_TOKEN }}
@@ -31,14 +46,13 @@ jobs:
- name: Unpack Dependencies
run: |
cd _deps-vs2022-x64-installed
cd ${{ matrix.deps_dir }}
Get-ChildItem -Path . -Filter 'cache-*.zip' | ForEach-Object {
7z x $_.FullName
}
- name: ccache
# TODO: Use tag after 1.2.20 releases.
uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639
uses: hendrikmuhs/ccache-action@v1.2.22
with:
key: win-${{ matrix.arch }}
# Windows ccache needs ~1GB
@@ -47,14 +61,16 @@ jobs:
- name: Run Build Script And Pack .zip Archives
shell: cmd
env:
TARGET_ARCH: ${{ matrix.arch }} # lets the Python script know which arch to target (optional override)
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call ${{ matrix.vcvars }}
cd win
python build-all-win.py
- name: Pack Dependencies
run: |
cd _deps-vs2022-x64-installed
cd ${{ matrix.deps_dir }}
Get-ChildItem -Path . -Directory | ForEach-Object {
$cacheFile = "cache-$($_.Name).zip"
echo $cacheFile
@@ -65,12 +81,13 @@ jobs:
- name: Commit and Push Changes to Build Repository
run: |
cd _deps-vs2022-x64-installed
cd ${{ matrix.deps_dir }}
git config user.name "IfcOpenBot"
git config user.email "ifcopenbot@ifcopenshell.org"
git checkout -B ${{ matrix.build_branch }}
git add *.zip
git commit -m "Update build artifacts [skip ci]" || echo "No changes to commit"
git push || echo "Push failed"
git push --set-upstream origin ${{ matrix.build_branch }} || echo "Push failed"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
+9 -4
View File
@@ -7,6 +7,9 @@ on:
jobs:
lint-formatting:
runs-on: ubuntu-latest
env:
MIN_IOS_PY_VERSION: "3.10"
MIN_BLENDER_PY_VERSION: "3.11"
steps:
- name: Action - checkout repository
uses: actions/checkout@v6
@@ -14,12 +17,12 @@ jobs:
- name: Action - install python
uses: actions/setup-python@v6
with:
python-version: "3.10"
python-version: ${{ env.MIN_IOS_PY_VERSION }}
- name: Action - install python
uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: ${{ env.MIN_BLENDER_PY_VERSION }}
- name: Install dependencies
run: |
@@ -33,8 +36,10 @@ jobs:
id: syntax-errors
run: |
ERROR=0
python3.10 -W error -m compileall -q src/ifcopenshell-python || ERROR=1
python3.11 -W error -m compileall -q src/bonsai || ERROR=1
# Using 2 Python versions - one minimum required for IfcOpenShell
# and other that's used by Blender currently.
python${{ env.MIN_IOS_PY_VERSION }} -W error -m compileall -q src/ifcopenshell-python || ERROR=1
python${{ env.MIN_BLENDER_PY_VERSION }} -W error -m compileall -q src/bonsai || ERROR=1
exit $ERROR
continue-on-error: true
+10 -10
View File
@@ -24,9 +24,15 @@ jobs:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell'
outputs:
timestamp: ${{ steps.timestamp.outputs.timestamp }}
steps:
- name: Set env
run: echo ok go
- name: Get current timestamp
id: timestamp
# Include hours and minutes to release tag
# to avoid possibility of unstable repo's index.json
# pointing to the new file when index.json itself wasn't yet updated.
run: echo "timestamp=$(date +'%y%m%d%H%M')" >> $GITHUB_OUTPUT
build:
needs: activate
@@ -67,12 +73,6 @@ jobs:
- name: Get current version
id: version
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Get current date
id: date
# Include hours and minutes to release tag
# to avoid possibility of unstable repo's index.json
# pointing to the new file when index.json itself wasn't yet updated.
run: echo "date=$(date +'%y%m%d%H%M')" >> $GITHUB_OUTPUT
- name: Compile
run: |
cd src/bonsai && make dist PLATFORM=${{ matrix.config.short_name }} PYVERSION=${{ matrix.pyver }}
@@ -88,8 +88,8 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.find_zip.outputs.filepath }}
asset_name: ${{ steps.find_zip.outputs.filename }}
release_name: "bonsai-${{steps.version.outputs.version}}-alpha${{steps.date.outputs.date}} (unstable)"
tag: "bonsai-${{steps.version.outputs.version}}-alpha${{steps.date.outputs.date}}"
release_name: "bonsai-${{steps.version.outputs.version}}-alpha${{ needs.activate.outputs.timestamp }} (unstable)"
tag: "bonsai-${{steps.version.outputs.version}}-alpha${{ needs.activate.outputs.timestamp }}"
overwrite: true
body: "See README in https://github.com/IfcOpenShell/bonsai_unstable_repo/ on how to setup autoupdates for daily Bonsai builds."
@@ -24,7 +24,7 @@ jobs:
if: |
github.repository == 'IfcOpenShell/IfcOpenShell'
steps:
- uses: mamba-org/setup-micromamba@v2 # https://github.com/mamba-org/setup-micromamba
- uses: mamba-org/setup-micromamba@v3 # https://github.com/mamba-org/setup-micromamba
with:
environment-name: test-env
create-args: >-
@@ -84,7 +84,7 @@ jobs:
run: |
curl -L https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.13.sdk.tar.xz | tar -xvJf - -C /Users/runner/work/
- uses: mamba-org/setup-micromamba@v2 # https://github.com/mamba-org/setup-micromamba
- uses: mamba-org/setup-micromamba@v3 # https://github.com/mamba-org/setup-micromamba
with:
environment-name: test-env
create-args: >-
+7 -7
View File
@@ -35,7 +35,7 @@ jobs:
-
name: ccache
uses: hendrikmuhs/ccache-action@v1.2
uses: hendrikmuhs/ccache-action@v1.2.22
-
name: Build ifcopenshell
@@ -73,7 +73,7 @@ jobs:
make package
working-directory: build
- name: Upload
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
# Artifact name
name: ifcos-artifacts
@@ -91,26 +91,26 @@ jobs:
lfs: true
- name: Download
uses: actions/download-artifact@v7.0.0
uses: actions/download-artifact@v8.0.1
with:
# Artifact name
name: ifcos-artifacts
path: artifacts/
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
-
name: Login to Dockerhub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: aecgeeks
password: ${{ secrets.DOCKER_HUB_TOKEN }}
-
name: Build container image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: artifacts
repository: aecgeeks/ifcopenshell
@@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pyver: [py39, py310, py311, py312, py313, py314]
pyver: [py310, py311, py312, py313, py314]
config:
- {
name: "Windows 64bit",
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pyver: [py39, py310, py311, py312, py313, py314]
pyver: [py310, py311, py312, py313, py314]
config:
- {
name: "Windows 64bit",
+3 -4
View File
@@ -79,10 +79,7 @@ jobs:
libhdf5-dev libcgal-dev libeigen3-dev
- name: ccache
# TODO: temporarily pointing to 1.2.19 to get notified by dependabot when 1.2.20 is released
# to update hardcoded references to commits in some other workflows.
# Then we can switch back to 1.2 in all actions.
uses: hendrikmuhs/ccache-action@v1.2.19
uses: hendrikmuhs/ccache-action@v1.2.22
with:
key: ubuntu-22.04-${{ runner.arch }}
@@ -184,6 +181,7 @@ jobs:
"-DSCHEMA_VERSIONS=2x3;4;4x3_add2" \
-DGLTF_SUPPORT=On \
-DWITH_ROCKSDB=On \
-DBUILD_EXAMPLES=ON \
../cmake
sudo make -j $(nproc)
sudo make install
@@ -256,6 +254,7 @@ jobs:
cd ../ifcpatch && make test || ERROR=1
pip install -e ../ifctester --no-deps
cd ../ifctester && make test || ERROR=1
make build-ids-docs || ERROR=1
# Run mathutils related tests at the end to ensure no other code is relying on mathutils.
cd ../ifcopenshell-python
pip install mathutils
@@ -31,7 +31,7 @@ jobs:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@v6
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v4
@@ -47,4 +47,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v5
+16 -3
View File
@@ -5,6 +5,8 @@
/_installed-vs*-x*/
/build/
/src/examples/build/
# ifctester docs output
/src/ifctester/test/build/
# output directories
/cmake/out/
@@ -12,6 +14,7 @@
/src/ifcmax/out/
/src/ifcwrap/out/
/src/qtviewer/out/
/src/ifctester/webapp/public/pyodide/
/win/BuildDepsCache*.txt
@@ -80,10 +83,14 @@ src/ifcopenshell-python/test/build
# bonsai i18n
src/bonsai/bonsai/translations.py
# bonsai test temp files
# bonsai external dependencies (cloned for just ty checks)
src/bonsai/external_dependencies/
# bonsai test temp/cache files
src/bonsai/test/files/temp
src/bonsai/test/files/basic.ifc.cache.blend
src/bonsai/test/files/basic.ifc.cache.sqlite
src/bonsai/test/files/*.cache.blend
src/bonsai/test/files/*.cache.json
src/bonsai/test/files/*.cache.sqlite
# bonsai data
src/bonsai/bonsai/bim/data/build/
@@ -115,3 +122,9 @@ dev_environment.bat
src/ifcopenshell-python/ifcopenshell/express/*.exp
src/ifcopenshell-python/ifcopenshell/express/*.exp.cache.dat
# temp files from AI coding tools
*.claude
*.py.tmp*
*.json.tmp*
+19 -10
View File
@@ -13,6 +13,7 @@ import hashlib
import os
import pathlib
import re
import subprocess
from typing import NoReturn
from urllib import request
@@ -20,7 +21,7 @@ from github import Github
def get_repo_tag_names() -> list[str]:
git_return = os.popen("git tag -l").read()
git_return = subprocess.check_output("git tag -l", text=True)
tag_names = [tag_name for tag_name in git_return.split("\n") if tag_name]
print(f"{len(tag_names)} tag_names found in repo")
return tag_names
@@ -78,6 +79,10 @@ def get_release_zip(tag: str) -> tuple[str, str]:
raise Exception(f"Couldn't find the release matching '{python_version}' and '{TARGET_OS}' in tag '{tag}'.")
def run(command: str) -> None:
subprocess.check_output(command)
start = datetime.datetime.now()
URL_CHOCO_PACKAGE = "https://community.chocolatey.org/packages/blender"
@@ -97,7 +102,7 @@ should_release = False
target_release_tag = ""
TARGET_OS = "windows-x64"
git_status = os.popen("git status").read()
git_status = subprocess.check_output("git status", text=True)
print(git_status)
for tag_name in get_repo_tag_names():
@@ -147,7 +152,7 @@ blenderbim_build_version = target_release_tag.replace("blenderbim-", "")
# url_blenderbim_py3x_win_zip
release_zip_file_name, url_blenderbim_py3x_win_zip = get_release_zip(target_release_tag)
os.popen(f"wget {url_blenderbim_py3x_win_zip} --no-verbose").read()
subprocess.check_call(f"wget {url_blenderbim_py3x_win_zip} --no-verbose")
# sha256sum_blenderbim_py310_win_zip
sha256sum_blenderbim_py3x_win_zip = get_file_sha256_hash(release_zip_file_name)
@@ -201,13 +206,13 @@ print("[INFO] inserting dynamic chocolatey package parameters successful")
print("\n_____ build choco.exe with mono")
choco_version = "1.1.0"
os.popen(f"wget https://github.com/chocolatey/choco/archive/refs/tags/{choco_version}.tar.gz --quiet").read()
os.popen(f"tar -xzf {choco_version}.tar.gz").read()
run(f"wget https://github.com/chocolatey/choco/archive/refs/tags/{choco_version}.tar.gz --quiet")
run(f"tar -xzf {choco_version}.tar.gz")
print("choco tar unpack successful")
os.chdir("choco-1.1.0")
os.popen("./build.sh").read()
run("./build.sh")
os.popen("cp -r build_output/chocolatey /opt/chocolatey").read()
run("cp -r build_output/chocolatey /opt/chocolatey")
os.chdir(BLENDERBIM_DIR)
if pathlib.Path("/opt/chocolatey/choco.exe").exists():
@@ -215,11 +220,15 @@ if pathlib.Path("/opt/chocolatey/choco.exe").exists():
print("\n_____ build choco pack")
os.popen("mono /opt/chocolatey/choco.exe pack --allow-unofficial").read()
os.popen('mono /opt/chocolatey/choco.exe setapikey --key="{choco_token}" --source="https://push.chocolatey.org/" --allow-unofficial').read()
run("mono /opt/chocolatey/choco.exe pack --allow-unofficial")
run(
'mono /opt/chocolatey/choco.exe setapikey --key="{choco_token}" --source="https://push.chocolatey.org/" --allow-unofficial'
)
print("\n_____ build choco push")
os.popen('mono /opt/chocolatey/choco.exe push --source="https://push.chocolatey.org/" --key="$CHOCO_TOKEN" --allow-unofficial --verbose').read()
run(
'mono /opt/chocolatey/choco.exe push --source="https://push.chocolatey.org/" --key="$CHOCO_TOKEN" --allow-unofficial --verbose'
)
print(f"choco push of version: {target_release_tag} successful!")
print(f"it took: {datetime.datetime.now() - start}")
+18 -10
View File
@@ -80,7 +80,7 @@ option(BUILD_IFCGEOM "Build IfcGeom." ON)
option(BUILD_IFCPYTHON "Build IfcPython." ON)
option(BUILD_CONVERT "Build IfcConvert executable." ON)
option(BUILD_DOCUMENTATION "Build IfcOpenShell Documentation." OFF)
option(BUILD_EXAMPLES "Build example applications." ON)
option(BUILD_EXAMPLES "Build example applications." OFF)
option(BUILD_GEOMSERVER "Build IfcGeomServer executable (Open CASCADE is required)." ON)
option(BUILD_IFCMAX "Build IfcMax, a 3ds Max plug-in, Windows-only." OFF)
option(BUILD_QTVIEWER "Build IfcOpenShell Qt GUI Viewer" OFF) # QtViewer requires Qt6
@@ -258,10 +258,10 @@ if(WITH_ROCKSDB)
set(ROCKSDB_LIBRARIES "IFCOPENSHELL_RocksDB")
target_compile_definitions(IFCOPENSHELL_RocksDB INTERFACE IFOPSH_WITH_ROCKSDB)
set(SWIG_DEFINES ${SWIG_DEFINES} -DIFOPSH_WITH_ROCKSDB)
target_link_libraries(
IFCOPENSHELL_RocksDB
INTERFACE $<IF:$<TARGET_EXISTS:RocksDB::rocksdb-shared>,RocksDB::rocksdb-shared,RocksDB::rocksdb>
)
# Shared binaries for `rocksdb` only support limited API (only `c.h`), but we use `db.h` API.
# So rocksdb supported only as a static library.
# See https://github.com/facebook/rocksdb/issues/981.
target_link_libraries(IFCOPENSHELL_RocksDB INTERFACE RocksDB::rocksdb)
if(WITH_ZSTD)
# @todo do we actually need the zstd include dir or rather just pass
@@ -368,12 +368,20 @@ if(ENABLE_BUILD_OPTIMIZATIONS)
# Linker
# /OPT:REF enables also /OPT:ICF and disables INCREMENTAL
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF")
set(LINKER_FLAGS_RELEASE "/LTCG /OPT:REF")
# /OPT:NOICF is recommended when /DEBUG is used (http://msdn.microsoft.com/en-us/library/xe4t6fc1.aspx)
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:NOICF")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF")
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:NOICF")
set(LINKER_FLAGS_RELWITHDEBINFO "/DEBUG /OPT:NOICF")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${LINKER_FLAGS_RELEASE}")
set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
"${CMAKE_SHARED_LINKER_FLAGS_RELEASE} ${LINKER_FLAGS_RELWITHDEBINFO}"
)
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${LINKER_FLAGS_RELEASE}")
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${LINKER_FLAGS_RELWITHDEBINFO}")
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} ${LINKER_FLAGS_RELEASE}")
set(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
"${CMAKE_MODULE_LINKER_FLAGS_RELEASE} ${LINKER_FLAGS_RELWITHDEBINFO}"
)
else()
# GCC-like: Release should use O3 but RelWithDebInfo 02 so enforce 03. Anything other useful that could be added here?
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
+11
View File
@@ -43,6 +43,17 @@ if(NOT OCC_INCLUDE_DIR AND NOT OCC_LIBRARY_DIR)
set_target_properties(TKernel PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${OpenCASCADE_INCLUDE_DIR}")
endif()
if(
OpenCASCADE_VERSION VERSION_LESS "7.9.0"
AND CMAKE_VERSION GREATER_EQUAL "3.24"
AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
)
# Before 7.9.0 targets in OCCT cmake configs are not linked to each other
# leading to missing symbols on Unix. Link them as a single group as a workaround.
# Only needed for gcc, because other compilers (e.g. Apple Clang, MSVC) do rescan automatically.
set(OpenCASCADE_LIBRARIES "$<LINK_GROUP:RESCAN,${OpenCASCADE_LIBRARIES}>")
endif()
if(OpenCASCADE_VERSION VERSION_LESS "7.9.0" AND WIN32)
# Bug in OCCT cmake configs < 7.9.0 - missing linked library.
list(APPEND OpenCASCADE_LIBRARIES WSOCK32.lib)
+59 -76
View File
@@ -75,27 +75,30 @@ Used environment variables:
# #
# for python37 to install correctly additionally: #
# * libffi(-dev[el]) #
# for Python build we also needs ssl #
# for Python build we also needs ssl and zlib #
# (since we do `pip install numpy` at the end) #
# * libssl-dev #
# #
# on debian 7.8 these can be obtained with: #
# $ apt-get install git gcc g++ autoconf bison bzip2 cmake #
# mesa-common-dev libffi-dev libfontconfig1-dev #
# libssl-dev xz #
# libssl-dev xz zlib1g-dev #
# #
# on ubuntu 14.04: #
# $ apt-get install git gcc g++ autoconf bison make cmake #
# mesa-common-dev libffi-dev libfontconfig1-dev #
# libssl-dev xz-utils #
# libssl-dev xz-utils zlib1g-dev #
# #
# on OS X El Capitan with homebrew: #
# $ brew install git bison autoconf automake libffi cmake #
# $ # `bison` shipped with Mac is too old for swig build, #
# $ # so we use `brew`. #
# $ export PATH=$(brew --prefix bison)/bin:$PATH #
# #
# on RHEL-related distros: #
# $ yum install git gcc gcc-c++ autoconf bison make cmake #
# $ dnf install git gcc gcc-c++ autoconf bison make cmake #
# mesa-libGL-devel libffi-devel fontconfig-devel bzip2 #
# automake patch byacc xz #
# automake patch byacc xz zlib-devel openssl-devel #
"""
@@ -147,9 +150,8 @@ OCCT_VERSION = "7.8.1"
BOOST_VERSION = "1.86.0"
EIGEN_VERSION = "3.4.0"
PCRE_VERSION = "8.41"
PCRE2_VERSION = "10.32"
LIBXML2_VERSION = "2.13.8"
SWIG_VERSION = "4.1.0"
SWIG_VERSION = "4.2.1"
OPENCOLLADA_VERSION = "v1.6.68"
HDF5_VERSION = "1.13.1"
@@ -246,15 +248,8 @@ if WASM:
# https://github.com/pyodide/pyodide-build/pull/249
WASM_CMAKE_IS_USING_INIT_VARS = get_pyodide_build_version() >= (99, 0, 0)
# pyodide provide empty `CXXFLAGS`, leading to issues using C++ files compiled with `-fexceptions`
# which is used by OCCT.
# https://github.com/pyodide/pyodide-build/issues/251
side_module_cxx_flags = os.environ.get("SIDE_MODULE_CXXFLAGS", "")
if side_module_cxx_flags.strip():
print("SIDE_MODULE_CXXFLAGS are already passed from pyodide build ('{side_module_cxx_flags}').")
print("Maybe it's time to stop overriding them in the script?")
os.environ["SIDE_MODULE_CXXFLAGS"] = os.environ["SIDE_MODULE_CFLAGS"]
# 0.31 is required for SIDE_MODULE_CXXFLAGS to be provided.
assert get_pyodide_build_version() >= (0, 31)
# Set defaults for missing empty environment variables
@@ -294,6 +289,7 @@ DEPS_DIR = os.getenv("DEPS_DIR", DEFAULT_DEPS_DIR)
if not os.path.exists(DEPS_DIR):
os.makedirs(DEPS_DIR)
INSTALL_DIR = Path(DEPS_DIR) / "install"
BUILD_CFG = os.getenv("BUILD_CFG", "RelWithDebInfo")
@@ -319,24 +315,18 @@ cecho(f"* Build Directory = {BUILD_DIR}", MAGENTA)
cecho(f"* Dependency Directory = {DEPS_DIR}", MAGENTA)
cecho(f" - The directory where {PROJECT_NAME} dependencies are installed.")
cecho(f"* Build Config Type = {BUILD_CFG}", MAGENTA)
cecho(
""" - The used build configuration type for the dependencies.
Defaults to RelWithDebInfo if not specified."""
)
cecho(""" - The used build configuration type for the dependencies.
Defaults to RelWithDebInfo if not specified.""")
if BUILD_CFG == "MinSizeRel":
cecho(" WARNING: MinSizeRel build can suffer from a significant performance loss.", RED)
cecho(f"* IFCOS_NUM_BUILD_PROCS = {IFCOS_NUM_BUILD_PROCS}", MAGENTA)
cecho(
""" - How many compiler processes may be run in parallel.
"""
)
cecho(""" - How many compiler processes may be run in parallel.
""")
cecho(f" * IFCOS_SCHEMAS = '{os.environ.get('IFCOS_SCHEMAS')}'", MAGENTA)
cecho(
""" - IFC Schemas to compile. If not provided, fallback to default provided in cmake.
"""
)
cecho(""" - IFC Schemas to compile. If not provided, fallback to default provided in cmake.
""")
dependency_tree: "dict[str, tuple[str, ...]]" = {
"IfcParse": ("boost", "libxml2", "hdf5", "rocksdb"),
@@ -345,13 +335,12 @@ dependency_tree: "dict[str, tuple[str, ...]]" = {
"OpenCOLLADA": ("libxml2", "pcre"),
"IfcGeomServer": ("IfcGeom",),
"IfcOpenShell-Python": ("python", "swig", "IfcGeom"),
"swig": ("pcre2",),
"swig": (),
"boost": (),
"libxml2": (),
"python": (),
"occ": (),
"pcre": (),
"pcre2": (),
"json": (),
"hdf5": (),
"cgal": (),
@@ -418,7 +407,6 @@ if WASM:
"opencollada",
"swig",
"pcre",
"pcre2",
"IfcGeom",
"IfcConvert",
"IfcGeomServer",
@@ -433,13 +421,16 @@ print("Building:", *sorted(targets, key=lambda t: len(list(gather_dependencies(t
# Check that required tools are in PATH
yacc = "yacc" # Used during swig building process, installed with `bison` on Debian / `byacc` on Red Hat.
bison = "bison"
missing_commands: "list[str]" = []
required_commands = [git, bunzip2, tar, cc, cplusplus, autoconf, automake, make, "patch", "cmake", yacc, xz]
required_commands = [git, bunzip2, tar, cc, cplusplus, autoconf, automake, make, "patch", "cmake", yacc, xz, bison]
if "wasm" in flags:
# Skip swig build for WASM.
required_commands.append("swig")
required_commands.append("pyodide")
required_commands.remove(yacc)
required_commands.remove(bison)
for cmd in required_commands:
if shutil.which(cmd) is None:
@@ -498,7 +489,7 @@ def run(cmds: "Sequence[str]", cwd: "Union[str, None]" = None, can_fail: bool =
collector.append(line)
pipe.close()
logger.debug(f"running command {' '.join(cmds)} in directory {cwd}")
logger.debug(f"running command `{' '.join(cmds)}` in directory '{cwd}'")
stdout: list[str] = []
stderr: list[str] = []
@@ -544,14 +535,14 @@ BOOST_LOCATION = f"https://github.com/boostorg/boost/releases/download/boost-{BO
# Helper functions
def run_autoconf(arg1: str, configure_args: "list[str]", cwd: str) -> None:
def run_autoconf(dependency_name: str, configure_args: "list[str]", cwd: str) -> None:
configure_path = os.path.realpath(os.path.join(cwd, "..", "configure"))
if not os.path.exists(configure_path):
run(
[bash, "./autogen.sh"], cwd=os.path.realpath(os.path.join(cwd, ".."))
) # only run autogen.sh in the directory it is located and use cwd to achieve that in order to not mess up things
# Using `sh` over `bash` fixes issues with building swig
prefix = os.path.realpath(f"{DEPS_DIR}/install/{arg1}")
prefix = os.path.realpath(f"{DEPS_DIR}/install/{dependency_name}")
wasm = []
if "wasm" in flags:
@@ -930,20 +921,15 @@ if "pcre" in targets:
restore_env("CC", OLD_CC)
restore_env("CXX", OLD_CXX)
if "pcre2" in targets:
build_dependency(
name=f"pcre2-{PCRE2_VERSION}",
mode="autoconf",
build_tool_args=[DISABLE_FLAG],
download_url=f"https://downloads.sourceforge.net/project/pcre/pcre2/{PCRE2_VERSION}/",
download_name=f"pcre2-{PCRE2_VERSION}.tar.bz2",
)
if "swig" in targets:
dependency_name = f"swig-{SWIG_VERSION}"
build_dependency(
name=f"swig-{SWIG_VERSION}",
mode="autoconf",
build_tool_args=["--disable-ccache", f"--with-pcre2-prefix={DEPS_DIR}/install/pcre2-{PCRE2_VERSION}"],
name=dependency_name,
mode="cmake",
build_tool_args=[
"-DWITH_PCRE=OFF",
f"-DCMAKE_INSTALL_PREFIX={DEPS_DIR}/install/{dependency_name}",
],
download_url="https://github.com/swig/swig.git",
download_name="swig",
download_tool=download_tool_git,
@@ -951,21 +937,18 @@ if "swig" in targets:
)
if USE_OCCT and "occ" in targets:
patches = []
occt_args: "list[str]" = []
patches: "list[str]" = []
if OCCT_VERSION < "7.4":
patches.append("./patches/occt/enable-exception-handling.patch")
if OCCT_VERSION == "7.7.1":
# Skip ExpToCasExe as we don't need it and it requires additional dependencies.
# Before 7.7.2 ExpToCasExe is part of DataExchange, DETools doesn't exist yet.
# Since we do need DataExchange (used for IgesSerializer), we use a patch to skip only ExpToCasExe.
if "7.7.2" > OCCT_VERSION >= "7.7":
patches.append("./patches/occt/no_ExpToCasExe.patch")
if OCCT_VERSION == "7.7.2":
patches.append("./patches/occt/no_ExpToCasExe_7_7_2.patch")
if OCCT_VERSION == "7.8.1":
patches.append("./patches/occt/no_ExpToCasExe_7_8_1.patch")
if OCCT_VERSION == "7.9.1":
patches.append("./patches/occt/no_ExpToCasExe_7_9_1.patch")
elif OCCT_VERSION >= "7.7.2":
occt_args.append("-DBUILD_MODULE_DETools=OFF")
if "wasm" in flags:
patches.append("./patches/occt/no_em_js.patch")
@@ -986,6 +969,7 @@ if USE_OCCT and "occ" in targets:
f"-DUSE_GLES2=OFF",
f"-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
*MAC_CROSS_COMPILE_INTEL_ARGS,
*occt_args,
],
download_url="https://github.com/Open-Cascade-SAS/OCCT",
download_name="occt",
@@ -1101,23 +1085,19 @@ if "python" in targets and not USE_CURRENT_PYTHON_VERSION and "wasm" not in flag
PYTHON_CONFIGURE_ARGS.extend(["--with-universal-archs=intel-64", "--enable-universalsdk"])
for PYTHON_VERSION in PYTHON_VERSIONS:
try:
build_dependency(
f"python-{PYTHON_VERSION}",
"autoconf",
PYTHON_CONFIGURE_ARGS,
f"http://www.python.org/ftp/python/{PYTHON_VERSION}/",
f"Python-{PYTHON_VERSION}.tgz",
)
except RuntimeError as e:
# Sometimes setting up modules such as pip/lzma can cause
# the python installer script to return a non zero exit
# code where actually the headers and dynamic libraries
# are installed correctly. This is all we need so we catch
# the exception and only reraise if a partially successful
# install is not detected.
if not os.path.exists(os.path.join(DEPS_DIR, "install", f"python-{PYTHON_VERSION}")):
raise e
# Don't fail silently on missing Python dependencies (e.g. openssl or zlib),
# because later ifcopenshell-python build will fail too but in a more confusing way.
build_dependency(
f"python-{PYTHON_VERSION}",
"autoconf",
PYTHON_CONFIGURE_ARGS,
f"http://www.python.org/ftp/python/{PYTHON_VERSION}/",
f"Python-{PYTHON_VERSION}.tgz",
)
python_bin = INSTALL_DIR / f"python-{PYTHON_VERSION}" / "bin" / "python3"
# `_ssl` module is present -> we will be able to install `numpy` later
# to verify IfcOpenShell installation
run([str(python_bin), "-c", "import _ssl"])
if MAC_CROSS_COMPILE_INTEL:
assert original_path
@@ -1535,13 +1515,16 @@ if "IfcOpenShell-Python" in targets:
)
# Copy setup.py where pyodide build system expects it.
shutil.copy(REPO_PATH / "pyodide" / "setup.py", REPO_PATH)
# Empty pyproject so it's contents won't affect the resulting wheelthe the
# otherwise the wheel will use version and dependencies from toml, not setup.py.
(REPO_PATH / "pyproject.toml").write_text("")
elif USE_CURRENT_PYTHON_VERSION:
python_info = sysconfig.get_paths()
compile_python_wrapper(platform.python_version(), python_info["include"], sys.executable)
else:
for python_version in PYTHON_VERSIONS:
python_path = Path(DEPS_DIR) / "install" / f"python-{python_version}"
python_path = INSTALL_DIR / f"python-{python_version}"
module_dir = compile_python_wrapper(python_version, python_path=python_path)
assert module_dir
# Not sure why, but added after reading this in the logs
@@ -5,9 +5,13 @@ This script is finding common install directory and either
packs each folder into a tar.gz archive, if it wasn't packed before,
or unpacks existing archives.
Expected to be executed from 'build' directory (e.g. that might contain 'Linux/x86_64/install').
Usage: python cache_dependencies.py [pack|unpack]
"""
import platform
import subprocess
import sys
import tarfile
from pathlib import Path
@@ -17,23 +21,35 @@ CACHE_PREFIX = "cache-"
def get_install_dir() -> Path:
for data in Path.cwd().glob("*/*/install"):
if platform.system() == "Darwin":
pattern = "Darwin/*/*/install"
else:
pattern = "*/*/install"
for data in Path.cwd().glob(pattern):
return data
raise Exception("No install dir found")
def run(cmd: str) -> None:
print(f"Running command: `{cmd}`")
subprocess.check_call(cmd, shell=True)
def pack_dependencies(install_dir: Path) -> None:
# Process each install_dir
for dependency_path in install_dir.iterdir():
if not dependency_path.is_dir():
continue
dependency_name = dependency_path.name
# Skip ifcopenshell - it's a build output, not a dependency to reuse across builds.
if dependency_name == "ifcopenshell":
continue
tar_path = install_dir / f"{CACHE_PREFIX}{dependency_name}.tar.gz"
if tar_path.exists():
print(f"Skipping existing cache: '{tar_path}'")
else:
with tarfile.open(tar_path, "w:gz") as tar:
tar.add(dependency_path, arcname=dependency_path.name)
# Python's `tarfile` is 10x slower than `tar` cli, so we use `tar`.
run(f'tar -czf "{tar_path}" -C "{install_dir}" "{dependency_name}"')
print(f"Created cache: '{tar_path}'")
+9 -13
View File
@@ -1,13 +1,9 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd17283f77..6cecf9dad3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -826,6 +826,8 @@ if (EMSCRIPTEN)
list (REMOVE_ITEM BUILD_TOOLKITS ExpToCasExe)
endif()
+list (REMOVE_ITEM BUILD_TOOLKITS ExpToCasExe)
+
# bison
if (BUILD_YACCLEX)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
--- a/adm/MODULES
+++ b/adm/MODULES
@@ -3,5 +3,5 @@ ModelingData TKG2d TKG3d TKGeomBase TKBRep
ModelingAlgorithms TKGeomAlgo TKTopAlgo TKPrim TKBO TKBool TKHLR TKFillet TKOffset TKFeat TKMesh TKXMesh TKShHealing
Visualization TKService TKV3d TKOpenGl TKOpenGles TKMeshVS TKIVtk TKD3DHost
ApplicationFramework TKCDF TKLCAF TKCAF TKBinL TKXmlL TKBin TKXml TKStdL TKStd TKTObj TKBinTObj TKXmlTObj TKVCAF
-DataExchange TKXDE TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKXDECascade TKExpress ExpToCasExe
+DataExchange TKXDE TKXSBase TKSTEPBase TKSTEPAttr TKSTEP209 TKSTEP TKIGES TKXCAF TKXDEIGES TKXDESTEP TKSTL TKVRML TKXmlXCAF TKBinXCAF TKRWMesh TKXDECascade TKExpress
Draw TKDraw TKTopTest TKOpenGlTest TKOpenGlesTest TKD3DHostTest TKViewerTest TKXSDRAW TKDCAF TKXDEDRAW TKTObjDRAW TKQADraw TKIVtkDraw DRAWEXE
@@ -1,13 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1bacca1a48..11f931ad39 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -820,6 +820,8 @@ else()
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
endif()
+list (REMOVE_ITEM BUILD_TOOLKITS ExpToCasExe)
+
# bison
if (BUILD_YACCLEX)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
@@ -1,13 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 86905287dc..9d0bce984c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -828,6 +828,8 @@ else()
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
endif()
+list (REMOVE_ITEM BUILD_TOOLKITS ExpToCasExe)
+
# bison
if (BUILD_YACCLEX)
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
@@ -1,13 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34300d41ad..09b2e0d45f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -721,6 +721,8 @@ else()
OCCT_CHECK_AND_UNSET ("3RDPARTY_DOT_EXECUTABLE")
endif()
+list (REMOVE_ITEM BUILD_TOOLKITS ExpToCasExe)
+
# bison
if (BUILD_YACCLEX)
list (APPEND OCCT_3RDPARTY_CMAKE_LIST "adm/cmake/bison")
+7 -2
View File
@@ -1,9 +1,12 @@
#!/usr/bin/bash
set -ex
# Script is assuming that it will be possible to execute it multiple times
# therefore we're clearing venv each time and ignoring existing 'emsdk' folder.
# Install uv.
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python 3.13
uv venv --python 3.13 --clear
source .venv/bin/activate
# Install pyodide cross build environment.
@@ -13,7 +16,9 @@ uv pip install pyodide-build
uv run pyodide xbuildenv install
# Emscripten doesn't come with xbuildenv.
git clone https://github.com/emscripten-core/emsdk
if [ ! -d emsdk ]; then
git clone https://github.com/emscripten-core/emsdk
fi
pushd emsdk
PYODIDE_EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version)
./emsdk install ${PYODIDE_EMSCRIPTEN_VERSION}
+185 -4
View File
@@ -2,10 +2,10 @@
name = "IfcOpenShell"
version = "0.0.0"
dependencies = [
"black==26.1.0",
"ruff==0.15.1",
"black==26.3.1",
"ruff==0.15.8",
"poethepoet",
"gersemi==0.25.4",
"gersemi==0.26.1",
]
[tool.black]
@@ -15,7 +15,8 @@ include = '''
|nix/.*.pyi?$
'''
extend-exclude = '''
src/ifcopenshell-python/ifcopenshell/express/*
src/ifcopenshell-python/ifcopenshell/express/rules/*
|src/ifcopenshell-python/ifcopenshell/express/express_parser.py
|src/ifcopenshell-python/ifcopenshell/mvd/*
|src/ifcopenshell-python/ifcopenshell/simple_spf/*
|src/ifc2ca/templates/*
@@ -27,6 +28,12 @@ extend-exclude = '''
reportInvalidTypeForm = false
disableBytesTypePromotions = true
reportUnnecessaryTypeIgnoreComment = true
# Pylance doesn't respect gitignore, so we have to exclude files manually here
# to avoid VS Code slowing down.
# https://github.com/microsoft/pylance-release/issues/5169
exclude = [
"_deps",
]
# Define here general ruff settings,
# then they will be inherited by projects' .toml files.
@@ -71,6 +78,139 @@ ignore = [
"UP032", # Replace .format with f-string
]
[tool.ty.rules]
all = "ignore"
# Structural rules (no deep type inference needed, easier to adapt).
abstract-method-in-final-class = "error"
ambiguous-protocol-member = "error"
byte-string-type-annotation = "error"
conflicting-declarations = "error"
conflicting-metaclass = "error"
cyclic-class-definition = "error"
cyclic-type-alias-definition = "error"
dataclass-field-order = "error"
duplicate-base = "error"
duplicate-kw-only = "error"
empty-body = "error"
escape-character-in-forward-annotation = "error"
final-on-non-method = "error"
final-without-value = "error"
fstring-type-annotation = "error"
ignore-comment-unknown-rule = "error"
implicit-concatenated-string-type-annotation = "error"
inconsistent-mro = "error"
ineffective-final = "error"
instance-layout-conflict = "error"
invalid-dataclass = "error"
invalid-dataclass-override = "error"
invalid-enum-member-annotation = "error"
invalid-explicit-override = "error"
invalid-frozen-dataclass-subclass = "error"
invalid-generic-class = "error"
invalid-generic-enum = "error"
invalid-ignore-comment = "error"
invalid-legacy-positional-parameter = "error"
invalid-legacy-type-variable = "error"
invalid-named-tuple = "error"
invalid-newtype = "error"
invalid-overload = "error"
invalid-paramspec = "error"
invalid-protocol = "error"
invalid-syntax-in-forward-annotation = "error"
invalid-total-ordering = "error"
invalid-type-alias-type = "error"
invalid-type-checking-constant = "error"
invalid-type-guard-definition = "error"
invalid-type-variable-bound = "error"
invalid-type-variable-constraints = "error"
invalid-typed-dict-header = "error"
invalid-typed-dict-statement = "error"
override-of-final-method = "error"
override-of-final-variable = "error"
possibly-missing-import = "error"
possibly-missing-submodule = "error"
# Has false positives due to ty walrus operator bug.
# possibly-unresolved-reference = "error"
raw-string-type-annotation = "error"
redundant-final-classvar = "error"
shadowed-type-variable = "error"
subclass-of-final-class = "error"
super-call-in-named-tuple-method = "error"
unavailable-implicit-super-arguments = "error"
unbound-type-variable = "error"
undefined-reveal = "error"
unresolved-global = "error"
unresolved-import = "error"
unresolved-reference = "error"
unused-ignore-comment = "error"
unused-type-ignore-comment = "error"
useless-overload-body = "error"
# Non-structural rules:
deprecated = "error"
zero-stepsize-in-slice = "error"
possibly-missing-implicit-call = "error"
unused-awaitable = "error"
# Function argument rules:
# Conflicts with `ifcopenshell.api.geometry.add_representation` type of callables we have, confusing them with a module.
# call-non-callable = "error"
conflicting-argument-forms = "error"
# Too many false positives.
# invalid-argument-type = "error"
missing-argument = "error"
parameter-already-assigned = "error"
positional-only-parameter-as-kwarg = "error"
too-many-positional-arguments = "error"
unknown-argument = "error"
# Has a lot of warnings due to current ty walrus operator issues.
# index-out-of-bounds = "error"
# unresolved-attribute = "error"
[tool.ty.environment]
extra-paths = [
"src/bonsai/external_dependencies",
"src/bcf",
"src/bsdd",
"src/bonsai",
"src/ifc4d",
"src/ifc5d",
"src/ifccityjson",
"src/ifcclash",
"src/ifccsv",
"src/ifcdiff",
"src/ifcfm",
"src/ifcopenshell-python",
"src/ifcpatch",
"src/ifctester",
]
[tool.ty.src]
exclude = [
# External dependencies cloned for type checking only.
"src/bonsai/external_dependencies",
# Submodules.
"src/ifcopenshell-python/ifcopenshell/express",
"src/ifcopenshell-python/ifcopenshell/mvd",
"src/ifcopenshell-python/ifcopenshell/simple_spf",
"src/svgfill/3rdparty",
# Has special dependencies.
"src/ifcopenshell-python/ifcopenshell/geom/app.py",
"src/ifcopenshell-python/ifcopenshell/geom/code_editor_pane.py",
"src/ifcopenshell-python/ifcopenshell/util/doc.py",
"src/ifcopenshell-python/ifcopenshell/util/generate_pset_templates.py",
"src/ifcopenshell-python/ifcopenshell/util/ifc4x3dev_scrape_data_for_docs.py",
# Too esoteric.
"src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.py",
"src/ifc2ca/templates",
# Too dev.
"src/bcf/setup.py",
"src/bsdd/yml_to_classes.py",
# Deprecated.
"src/ifc2ca/_deprecated",
]
[tool.poe.tasks]
ruff-main = "ruff check --extend-exclude nix/build-all.py"
@@ -80,6 +220,47 @@ ruff.sequence = ["ruff-main", "ruff-old"]
black = "black ."
ty.sequence = ["ty-bonsai", "ty-ios"]
ty.help = "Run ty type checker. Requires ty-venv to be set up first."
ty-bonsai = "ty check src/bonsai --python=src/bonsai/.venv"
ty-venv.sequence = ["ty-venv-bonsai", "ty-venv-ios"]
ty-venv-bonsai.sequence = [
{cmd = "uv venv src/bonsai/.venv --python=3.11 --allow-existing"},
{cmd = "uv pip install -r src/bonsai/type-check-requirements.txt --python=src/bonsai/.venv"},
]
ty-venv-ios.sequence = [
{cmd = "uv venv src/ifcopenshell-python/.venv --python=3.10 --allow-existing"},
{cmd = "uv pip install -r src/ifcopenshell-python/type-check-requirements.txt --python=src/ifcopenshell-python/.venv"},
]
format.sequence = ["black", "ruff-main", "ruff-old"]
cmake-format = "gersemi . --in-place"
[tool.poe.tasks.ty-ios]
# --ignore unresolved-reference: walrus operator false positives in ty.
cmd = """
ty check
src/bcf
src/bsdd
src/ifc2ca
src/ifc4d
src/ifc5d
src/ifccityjson
src/ifcclash
src/ifccsv
src/ifcdiff
src/ifcfm
src/ifcopenshell-python
src/ifcpatch
src/ifctester
--python=src/ifcopenshell-python/.venv
--ignore unresolved-reference
"""
[tool.poe.tasks.bonsai-deps]
help = "Clone or update Bonsai external dependencies."
cmd = "python src/bonsai/scripts/bonsai_deps.py"
+3 -3
View File
@@ -34,8 +34,8 @@ client_id, client_secret = "", ""
class OAuthReceiver(http.server.BaseHTTPRequestHandler):
def do_GET(self) -> None:
query = urllib.parse.parse_qs(urllib.parse.urlparse(self.path).query)
self.server.auth_code = query.get("code", [""])[0] # type:ignore
self.server.auth_state = query.get("state", [""])[0] # type:ignore
self.server.auth_code = query.get("code", [""])[0]
self.server.auth_state = query.get("state", [""])[0]
self.send_response(200)
self.send_header("Content-type", "text/plain")
self.end_headers()
@@ -255,7 +255,7 @@ class BcfClient:
project_id: str = "",
topics: str = "",
query_string: Optional[str] = None,
) -> list[Any]:
) -> None:
# return self.get(
# f"/projects/{project_id}/topics",
# {
+14 -10
View File
@@ -173,16 +173,17 @@ def assert_viewpoints(viewpoints):
assert viewpoint.snapshot is not None
# TODO: dead code - ported from v2 but buildingSMART/BCF-XML has no v3 MaximumInformation.bcf equivalent
def assert_second_viewpoint(viewpoint, expected_selection, expected_exception, expected_coloring) -> None:
expected_vp = mdl.VisualizationInfo(
components=mdl.Components(
view_setup_hints=mdl.ViewSetupHints(
spaces_visible=False,
space_boundaries_visible=False,
openings_visible=False,
),
selection=expected_selection,
visibility=mdl.ComponentVisibility(
view_setup_hints=mdl.ViewSetupHints(
spaces_visible=False,
space_boundaries_visible=False,
openings_visible=False,
),
exceptions=expected_exception,
default_visibility=False,
),
@@ -193,6 +194,7 @@ def assert_second_viewpoint(viewpoint, expected_selection, expected_exception, e
camera_direction=mdl.Direction(x=0.6745243072509766, y=-0.6599355936050415, z=-0.33091068267822266),
camera_up_vector=mdl.Direction(x=0.2271970510482788, y=-0.24091780185699463, z=0.9435783624649048),
field_of_view=60,
aspect_ratio=1.0,
),
guid="21dd4807-e9af-439e-a980-04d913a6b1ce",
)
@@ -200,16 +202,17 @@ def assert_second_viewpoint(viewpoint, expected_selection, expected_exception, e
assert viewpoint.snapshot is not None
# TODO: dead code - ported from v2 but buildingSMART/BCF-XML has no v3 MaximumInformation.bcf equivalent
def assert_third_viewpoint(viewpoint, expected_selection, expected_exception, expected_coloring) -> None:
expected_vp = mdl.VisualizationInfo(
components=mdl.Components(
view_setup_hints=mdl.ViewSetupHints(
spaces_visible=False,
space_boundaries_visible=False,
openings_visible=True,
),
selection=expected_selection,
visibility=mdl.ComponentVisibility(
view_setup_hints=mdl.ViewSetupHints(
spaces_visible=False,
space_boundaries_visible=False,
openings_visible=True,
),
exceptions=expected_exception,
default_visibility=True,
),
@@ -220,6 +223,7 @@ def assert_third_viewpoint(viewpoint, expected_selection, expected_exception, ex
camera_direction=mdl.Direction(x=0.7232745289802551, y=0.5967116951942444, z=-0.3475759029388428),
camera_up_vector=mdl.Direction(x=0.27662187814712524, y=0.21082592010498047, z=0.937567412853241),
field_of_view=60,
aspect_ratio=1.0,
),
guid="81daa431-bf01-4a49-80a2-1ab07c177717",
)
+4 -24
View File
@@ -104,7 +104,7 @@ endif
endif # def PLATFORM
# Current build commit hash.
OLD:=e8eb5e4
OLD:=1c5b825
.PHONY: bump
bump:
ifndef NEW
@@ -223,19 +223,8 @@ endif
cd build/bonsai/bim/data/gantt/ && wget https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.css
# Provides IFCJSON functionality
cd build && wget -O ifc2json.zip https://github.com/IFCJSON-Team/IFC2JSON_python/archive/refs/heads/master.zip
cd build && unzip ifc2json.zip && rm ifc2json.zip
# IFCJSON doesn't have pyproject.toml, so we use python command.
cd build && . env/$(VENV_ACTIVATE) && cd IFC2JSON_python-*/file_converters && \
$(PYTHON) -c "from setuptools import setup; \
setup( \
name='ifcjson', \
version='0.0.1', \
author='Jan Brouwer', \
author_email='jan@brewsky.nl', \
packages=['ifcjson'], \
)" bdist_wheel
cp -r build/IFC2JSON_python-*/file_converters/dist/*.whl build/wheels/
# TODO: Use official repo, once https://github.com/IFCJSON-Team/IFC2JSON_python/pull/8 is merged.
cd build && . env/$(VENV_ACTIVATE) && $(PYTHON) -m pip wheel "git+https://github.com/Andrej730/IFC2JSON_python.git@pyproject_toml" --no-deps -w wheels/
# Brickschema requires pkg_resources which is provided by Blender.
# Provides Brickschema functionality
@@ -243,16 +232,7 @@ endif
cd build/bonsai/bim/data/brick/ && wget https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl
# Required for hipped roof generation
cd build && wget https://github.com/prochitecture/bpypolyskel/archive/refs/heads/master.zip
cd build && unzip master.zip && rm master.zip
cd build && . env/$(VENV_ACTIVATE) && cd bpypolyskel-master && \
$(PYTHON) -c "from setuptools import setup; \
setup( \
name='bpypolyskel', \
version='0.0.0', \
packages=['bpypolyskel'], \
)" bdist_wheel
cp -r build/bpypolyskel-master/dist/*.whl build/wheels/
cd build && . env/$(VENV_ACTIVATE) && $(PYTHON) -m pip wheel "git+https://github.com/prochitecture/bpypolyskel" --no-deps -w wheels/
# folder for executable files
mkdir -p build/bonsai/libs/bin
+38 -37
View File
@@ -34,14 +34,12 @@ IN_PACKAGE = __package__ == "bonsai"
import platform
import re
import shutil
import traceback
import uuid
import webbrowser
from collections import deque
from collections.abc import Generator
from pathlib import Path
from typing import Any, Union
from typing import TYPE_CHECKING, Any, Union
last_commit_hash = "8888888"
last_commit_date = "9999999"
@@ -73,6 +71,21 @@ REINSTALLED_BBIM_VERSION: Union[str, None] = None
REGISTERED_BBIM_PACKAGE: str
def is_registering() -> bool:
"""
During addon registration ``bpy.context`` and ``bpy.data`` are restricted
and you can't access their properties.
"""
import bpy
if TYPE_CHECKING or bpy.app.version >= (5, 0, 0):
import _bpy_restrict_state as bpy_restrict_state
else:
import bpy_restrict_state
return isinstance(bpy.context, bpy_restrict_state._RestrictContext)
def initialize_bbim_semver():
"""Initialize `bbim_semver` dictionary.
@@ -94,9 +107,13 @@ def initialize_bbim_semver():
bbim_semver["version"] = version_str
def get_debug_info():
def get_debug_info(*, bonsai_failed_to_load: bool = False) -> dict[str, Any]:
import bpy
bbim_version = bbim_semver["version"]
# All data here should be gettable even in case of `bpy.context` and `bpy.data` being inaccessible
# and Bonsai completely failed to load.
debug_info = {
"os": platform.system(),
"os_version": platform.version(),
@@ -112,6 +129,14 @@ def get_debug_info():
"last_error": last_error,
}
# Can't access blend data or context during registration.
# If Bonsai failed to load we cannot safely access any of its properties or its tools
# as they may not be registered yet and acessing them will break Bonsai Fatal Error UI.
if is_registering() or bonsai_failed_to_load:
return debug_info
import bonsai.tool as tool
# Add .blend file save information
if bpy.data.is_saved:
debug_info["blend_file_path"] = bpy.data.filepath
@@ -132,7 +157,7 @@ def get_debug_info():
return debug_info
def format_debug_info(info: dict):
def format_debug_info(info: dict[str, Any]) -> str:
last_actions = ""
for action in info["last_actions"]:
last_actions += f"\n# {action['type']}: {action['name']}"
@@ -150,33 +175,10 @@ def get_binaries(path: Path) -> Generator[Path, None, None]:
yield from path.glob("**/*.so")
def safe_link_dlls() -> None:
# Blender 4.2+ has a problem on Windows for disabling/enabling/reinstalling extensions
# with loaded binary dependencies (on Windows you can't remove a binary if it's loaded by some program).
# To avoid this issue we temporary hard link dlls to our temp directory on unregister()
# (unregister is executed before Blender will try to uninstall dependencies and the issue will arise).
# Then, Blender won't have a problem unlinking unloaded dlls as they are still linked somewhere.
# On register() we clean up our temp directory with binaries.
#
# TODO: If user uninstalls Bonsai to never use it again, temporary directory won't be cleared.
#
# See: https://projects.blender.org/blender/blender/issues/125049
import bpy
ext_path = Path(bpy.utils.user_resource("EXTENSIONS"))
local_path = ext_path / ".local"
# We use random hash subfolder as user may try to enable/disable addon multiple times.
random_hash = uuid.uuid4().hex[:8]
temp_local = ext_path / ".local_temp" / random_hash
temp_local.mkdir(parents=True)
for filepath in get_binaries(local_path):
dest_path = temp_local / filepath.relative_to(local_path)
dest_path.parent.mkdir(exist_ok=True, parents=True)
os.link(filepath, dest_path)
# TODO: remove before 0.8.6 release.
# On Windows issues with removing extensions were resolved in Blender 4.3,
# but we removed our workaround that was producing some junk only in 0.8.5 release.
# So we're temporarily keeping the part that's cleaning up outputs from previous releases.
def clean_up_dlls_safe_links() -> None:
import bpy
@@ -206,6 +208,8 @@ def clean_up_dlls_safe_links() -> None:
if IN_BLENDER:
import bpy
initialize_bbim_semver()
def get_binary_info() -> dict[str, Any]:
@@ -297,9 +301,6 @@ if IN_BLENDER:
purge_cache()
def unregister():
if platform.system() == "Windows":
safe_link_dlls()
import bonsai.bim
bonsai.bim.unregister()
@@ -334,7 +335,7 @@ if IN_BLENDER:
bl_context = "scene"
def draw(self, context):
info = get_debug_info()
info = get_debug_info(bonsai_failed_to_load=True)
layout = self.layout
layout.alert = True
@@ -410,7 +411,7 @@ if IN_BLENDER:
bl_description = "Copies debugging information to your clipboard for use in bugreports"
def execute(self, context):
info = get_debug_info()
info = get_debug_info(bonsai_failed_to_load=True)
info.update(get_binary_info())
info = format_debug_info(info)
context.window_manager.clipboard = info
+1 -10
View File
@@ -24,21 +24,14 @@ 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
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
@@ -79,9 +72,7 @@ class IfcExporter:
def set_header(self):
self.file.header.file_name.name = os.path.basename(self.ifc_export_settings.output_file)
self.file.header.file_name.time_stamp = (
datetime.datetime.utcnow().replace(tzinfo=datetime.UTC).astimezone().replace(microsecond=0).isoformat()
)
self.file.header.file_name.time_stamp = datetime.datetime.now().astimezone().replace(microsecond=0).isoformat()
self.file.header.file_name.preprocessor_version = "IfcOpenShell {}".format(ifcopenshell.version)
self.file.header.file_name.originating_system = "{} {}".format(
self.get_application_name(), tool.Blender.get_bonsai_version()
+8 -5
View File
@@ -45,16 +45,19 @@ from bonsai.bim.module.nest.decorator import NestDecorator
cwd = os.path.dirname(os.path.realpath(__file__))
global_subscription_owner = object()
# Separate owner for per-object msgbus subscriptions (name, active_material_index).
# Using a dedicated owner allows clearing all per-object subscriptions at once
# during undo/redo without affecting other global subscriptions.
object_subscription_owner = object()
def name_callback(obj: Union[bpy.types.Object, bpy.types.Material], data: str) -> None:
try:
obj.name
except:
# The object is invalid but somehow still has a callback. Clear all
# msgbus subscriptions to prevent useless further triggers.
bpy.msgbus.clear_by_owner(obj)
return # In case the object RNA is gone during an undo / redo operation
# The object is invalid but somehow still has a callback.
# This can occur during undo/redo when the Python wrapper is stale.
return
# Blender names are up to 63 UTF-8 bytes
if len(bytes(obj.name, "utf-8")) >= 63:
return
@@ -189,7 +192,7 @@ def subscribe_to(obj: bpy.types.ID, data_path: str, callback: Callable[[bpy.type
return
bpy.msgbus.subscribe_rna(
key=subscribe_to,
owner=obj,
owner=object_subscription_owner,
args=(
obj,
data_path,
-1
View File
@@ -28,7 +28,6 @@ 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,
+4 -9
View File
@@ -316,11 +316,8 @@ class IfcStore:
del IfcStore.id_map[data["id"]]
if "guid" in data:
del IfcStore.guid_map[data["guid"]]
obj = IfcStore.get_object_by_name(data["obj"])
if obj is None:
# obj was just created during this step and didn't existed before.
return
bpy.msgbus.clear_by_owner(obj)
# Note: msgbus subscriptions are cleared globally during
# rebuild_element_maps which runs after every undo/redo.
@staticmethod
def commit_link_element(data: OperationData) -> None:
@@ -367,10 +364,8 @@ class IfcStore:
del IfcStore.id_map[data["id"]]
if "guid" in data:
del IfcStore.guid_map[data["guid"]]
obj = IfcStore.get_object_by_name(data["obj"])
# obj might be removed after unlink.
if not obj:
bpy.msgbus.clear_by_owner(obj)
# Note: msgbus subscriptions are cleared globally during
# rebuild_element_maps which runs after every undo/redo.
@staticmethod
def unlink_element(
+5 -4
View File
@@ -32,7 +32,6 @@ import ifcopenshell.api.pset
import ifcopenshell.geom
import ifcopenshell.ifcopenshell_wrapper as W
import ifcopenshell.util.element
import ifcopenshell.util.geolocation
import ifcopenshell.util.placement
import ifcopenshell.util.representation
import ifcopenshell.util.shape
@@ -65,8 +64,8 @@ class MaterialCreator:
mesh: Union[OBJECT_DATA_TYPE, None],
shape_has_openings: bool,
) -> None:
if ((rep := getattr(element, "Representation", ...) is not ...) and not rep) or (
(rep := getattr(element, "RepresentationMaps", ...) is not ...) and not rep
if (((rep := getattr(element, "Representation", ...)) is not ... and not rep) or
((rep := getattr(element, "RepresentationMaps", ...)) is not ... and not rep)
):
return
@@ -748,6 +747,7 @@ class IfcImporter:
self.update_progress((percent_average / 100 * progress_range) + start_progress)
shape = iterator.get()
if shape:
assert isinstance(shape, W.TriangulationElement)
product = self.file.by_id(shape.id)
self.create_product(product, shape)
results.add(product)
@@ -1021,7 +1021,8 @@ class IfcImporter:
obj.hide_select = True
obj.hide_viewport = True
self.project["blender"].objects.link(obj)
self.project["blender"].BIMCollectionProperties.obj = obj
collection_props = tool.Blender.get_collection_props(self.project["blender"])
collection_props.obj = obj
props = tool.Blender.get_object_bim_props(obj)
props.collection = self.collections[project.GlobalId] = self.project["blender"]
@@ -19,7 +19,6 @@
import blf
import bpy
import gpu
import ifcopenshell
import ifcopenshell.util.element
from bpy.types import SpaceView3D
from bpy_extras import view3d_utils
@@ -27,7 +26,6 @@ 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
def transparent_color(color, alpha=0.1):
@@ -103,7 +101,7 @@ class AggregateDecorator:
cls.is_installed = False
def dotted_line_shader(self):
vert_out = gpu.types.GPUStageInterfaceInfo("my_interface")
vert_out = gpu.types.GPUStageInterfaceInfo("my_interface") # ty:ignore[too-many-positional-arguments]
vert_out.smooth("FLOAT", "v_ArcLength")
shader_info = gpu.types.GPUShaderCreateInfo()
@@ -19,8 +19,6 @@
from typing import TYPE_CHECKING
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.group
import ifcopenshell.api.pset
import ifcopenshell.api.root
@@ -23,12 +23,7 @@ import ifcopenshell.util.element
from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
@@ -37,8 +32,6 @@ 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:
@@ -21,7 +21,6 @@ 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
class BIM_PT_aggregate(Panel):
@@ -18,24 +18,14 @@
# pyright: reportUnnecessaryTypeIgnoreComment=error
import calendar
import json
import os
import time
from datetime import datetime
import bpy
import ifcopenshell.api.alignment
import ifcopenshell.api.spatial
import ifcopenshell.geom
import ifcopenshell.util.selector
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
@@ -23,16 +23,12 @@ 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 Attribute, StrProperty
from bonsai.bim.prop import Attribute
class BIMAttributeProperties(PropertyGroup):
+11 -2
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 bpy.props
import bpy.types
from typing import TYPE_CHECKING
import bpy
class AuginProperties(bpy.types.PropertyGroup):
@@ -27,3 +28,11 @@ class AuginProperties(bpy.types.PropertyGroup):
project_name: bpy.props.StringProperty(name="Project Name")
project_filename: bpy.props.StringProperty(name="IFC Filename")
is_success: bpy.props.BoolProperty(name="Is Successful Upload", default=False)
if TYPE_CHECKING:
username: str
password: str
token: str
project_name: str
project_filename: str
is_success: bool
@@ -19,9 +19,7 @@
import os
from typing import Union
import bcf
import bcf.bcfxml
import bcf.v2.bcfxml
import bpy
import bonsai.tool as tool
+4 -9
View File
@@ -16,22 +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 os
import tempfile
import uuid
import webbrowser
from math import atan, cos, degrees, radians, sin, tan
from math import atan, degrees, radians, 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
import bcf.v3.model
@@ -43,11 +39,10 @@ import ifcopenshell.util.geolocation
import ifcopenshell.util.unit
import numpy as np
from bpy_extras.io_utils import ExportHelper, ImportHelper
from mathutils import Euler, Matrix, Vector, geometry
from mathutils import Matrix, Vector
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
@@ -1258,8 +1253,8 @@ class ActivateBcfViewpoint(bpy.types.Operator):
else:
obj.data.show_background_images = False
area = next(area for area in context.screen.areas if area.type == "VIEW_3D")
area.spaces[0].region_3d.view_perspective = "CAMERA"
assert (space := tool.Blender.get_view3d_space())
space.region_3d.view_perspective = "CAMERA"
if self.file:
self.set_viewpoint_components(viewpoint, context)
+1 -3
View File
@@ -24,8 +24,6 @@ from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
@@ -232,7 +230,7 @@ class BcfTopic(PropertyGroup):
def get_related_topics(self: "BCFProperties", context: bpy.types.Context) -> list[tuple[str, str, str]]:
global RELATED_TOPICS_ENUM_ITEMS
global RELATED_TOPICS_ENUM_ITEMS # ty: ignore[unresolved-global]
props = self
active_topic = props.active_topic
active_related_topics = active_topic.related_topics.keys()
-1
View File
@@ -18,7 +18,6 @@
from __future__ import annotations
import os
from typing import TYPE_CHECKING
import bpy
@@ -20,7 +20,6 @@ import bmesh
import gpu
from bpy.types import SpaceView3D
from gpu_extras.batch import batch_for_shader
from mathutils import Vector
import bonsai.tool as tool
@@ -27,20 +27,18 @@ import ifcopenshell.api
import ifcopenshell.api.boundary
import ifcopenshell.api.root
import ifcopenshell.geom
import ifcopenshell.ifcopenshell_wrapper as W
import ifcopenshell.util.element
import ifcopenshell.util.placement
import ifcopenshell.util.representation
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
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
@@ -704,6 +702,7 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
while True:
tree.add_element(iterator.get_native())
shape = iterator.get()
assert isinstance(shape, W.TriangulationElement)
shapes[shape.id] = {
"verts": ifcopenshell.util.shape.get_vertices(shape.geometry),
"faces": ifcopenshell.util.shape.get_faces(shape.geometry),
@@ -21,13 +21,7 @@ from typing import TYPE_CHECKING, Union
import bpy
from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
+1 -2
View File
@@ -16,8 +16,7 @@
# 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 bpy.types import Panel, UIList
from bpy.types import Panel
import bonsai.tool as tool
from bonsai.bim.module.boundary.data import SpaceBoundariesData
+2 -6
View File
@@ -63,8 +63,7 @@ class BrickschemaData:
if namespace == "https://brickschema.org/schema/Brick":
return []
results = []
query = BrickStore.graph.query(
"""
query = BrickStore.graph.query("""
PREFIX brick: <https://brickschema.org/schema/Brick#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
@@ -81,10 +80,7 @@ class BrickschemaData:
}
}
GROUP BY ?object
""".replace(
"{uri}", uri
)
)
""".replace("{uri}", uri))
for row in query:
predicate_uri = row.get("predicate")
predicate_name = predicate_uri.toPython().split("#")[-1]
@@ -19,7 +19,6 @@
import os
import bpy
import ifcopenshell.api
from bpy_extras.io_utils import ExportHelper, ImportHelper
import bonsai.bim.handler
+5 -8
View File
@@ -23,10 +23,7 @@ from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
@@ -34,7 +31,7 @@ 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.bim.prop import StrProperty
from bonsai.tool.brick import BrickStore
@@ -49,26 +46,26 @@ def get_libraries(self, context):
def get_namespaces(self, context):
global NAMESPACES_ENUM_ITEMS
global NAMESPACES_ENUM_ITEMS # ty: ignore[unresolved-global]
NAMESPACES_ENUM_ITEMS = [(uri, f"{alias}: {uri}", "") for alias, uri in BrickStore.namespaces]
return NAMESPACES_ENUM_ITEMS
def get_brick_entity_classes(self, context):
global ENTITY_CLASSES_ENUM_ITEMS
global ENTITY_CLASSES_ENUM_ITEMS # ty: ignore[unresolved-global]
entity = self.brick_entity_create_type
ENTITY_CLASSES_ENUM_ITEMS = [(uri, uri.split("#")[-1], "") for uri in BrickStore.entity_classes[entity]]
return ENTITY_CLASSES_ENUM_ITEMS
def get_brick_roots(self, context):
global BRICK_ROOTS_ENUM_ITEMS
global BRICK_ROOTS_ENUM_ITEMS # ty: ignore[unresolved-global]
BRICK_ROOTS_ENUM_ITEMS = [(root, root, "") for root in BrickStore.root_classes]
return BRICK_ROOTS_ENUM_ITEMS
def get_brick_relations(self, context):
global BRICK_RELATIONS_ENUM_ITEMS
global BRICK_RELATIONS_ENUM_ITEMS # ty: ignore[unresolved-global]
BRICK_RELATIONS_ENUM_ITEMS = [(uri, uri.split("#")[-1], "") for uri in BrickStore.relationships]
for relation in BrickschemaData.data["active_relations"]:
if relation["predicate_name"] == "label":
+12 -1
View File
@@ -16,9 +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/>.
from __future__ import annotations
from typing import TYPE_CHECKING
import bpy
from bpy.types import Panel, UIList
import bonsai.tool as tool
if TYPE_CHECKING:
from bonsai.bim.module.brick.prop import Brick
from bonsai.bim.helper import prop_with_search
from bonsai.bim.module.brick.data import BrickschemaData, BrickschemaReferencesData
from bonsai.tool.brick import BrickStore
@@ -274,7 +283,9 @@ class BIM_PT_brickschema_viewport(Panel):
class BIM_UL_bricks(UIList):
split_screen = False
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
def draw_item(
self, context, layout: bpy.types.UILayout, data, item: Brick, icon, active_data, active_propname
) -> None:
if item:
split = layout.split(factor=0.85, align=True)
row = split.row()
@@ -16,13 +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/>.
import bpy
import ifcopenshell
import ifcopenshell.util.classification
import ifcopenshell.util.date
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
def refresh():
@@ -19,7 +19,6 @@ import textwrap
from typing import Any
import bpy
import bsdd
import ifcopenshell.api.pset
import ifcopenshell.util.element
+3 -6
View File
@@ -23,10 +23,7 @@ from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
@@ -34,7 +31,7 @@ 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 bonsai.bim.prop import Attribute
def get_active_dictionary(self: "BIMBSDDProperties", context: object) -> tool.Blender.BLENDER_ENUM_ITEMS:
@@ -163,7 +160,7 @@ class BIMBSDDProperties(PropertyGroup):
default=False,
)
classification_psets: CollectionProperty(name="Classification Psets", type=BSDDPset)
if TYPE_CHECKING:
active_dictionary: str
active_dictionary: str
@@ -182,7 +179,7 @@ class BIMBSDDProperties(PropertyGroup):
should_filter_ifc_class: bool
use_only_ifc_properties: bool
classification_psets: bpy.types.bpy_prop_collection_idprop[BSDDPset]
@property
def active_class(self) -> Union[BSDDClassification, None]:
return tool.Blender.get_active_uilist_element(self.classes, self.active_class_index)
+1 -1
View File
@@ -24,7 +24,6 @@ import bpy
from bpy.types import Panel, UIList
import bonsai.tool as tool
import bsdd
from bonsai.bim.module.bsdd.data import BSDDData
if TYPE_CHECKING:
@@ -84,6 +83,7 @@ class BIM_PT_bsdd(Panel):
row = self.layout.row()
row.operator("bim.load_bsdd_dictionaries")
class BIM_UL_bsdd_dictionaries(UIList):
def draw_item(
self,
+3 -3
View File
@@ -17,13 +17,11 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import math
from math import cos, pi, radians, sin, sqrt
from typing import Union
from math import pi, sqrt
import bmesh
import bpy
import bpy_extras
import ifcopenshell.util.unit
import mathutils
from mathutils import Matrix, Vector
@@ -39,6 +37,7 @@ messages = {
class CadTrimExtend(bpy.types.Operator):
bl_idname = "bim.cad_trim_extend"
bl_label = "CAD Trim / Extend"
bl_description = "Extends/reduces element to 3D cursor"
@classmethod
def poll(cls, context):
@@ -84,6 +83,7 @@ class CadTrimExtend(bpy.types.Operator):
class CadMitre(bpy.types.Operator):
bl_idname = "bim.cad_mitre"
bl_label = "CAD Mitre"
bl_description = "Joins two non-parallel paths at their intersection"
@classmethod
def poll(cls, context):
-2
View File
@@ -22,8 +22,6 @@ 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)
+60 -24
View File
@@ -20,12 +20,10 @@ import os
from functools import partial
import bpy
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 bonsai.bim.module.model.data import RailingData, RoofData
def load_custom_icons():
@@ -108,23 +106,37 @@ class CadTool(WorkSpaceTool):
)
row = layout.row(align=True)
add_layout_hotkey_operator(row, "Extend", "S_E", "Extends/reduces element to 3D cursor", ui_context)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(
row, "Join", "S_T", "Joins two non-parallel paths at their intersection", ui_context
row, "Extend", "S_E", bpy.ops.bim.cad_trim_extend.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "Fillet", "S_F", bpy.ops.bim.add_ifcarcindex_fillet.__doc__, ui_context)
add_layout_hotkey_operator(
row, "Join", "S_T", bpy.ops.bim.cad_mitre.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__, ui_context)
add_layout_hotkey_operator(
row, "Fillet", "S_F", bpy.ops.bim.add_ifcarcindex_fillet.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "Rectangle", "S_R", bpy.ops.bim.add_rectangle.__doc__, ui_context)
add_layout_hotkey_operator(
row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "Circle", "S_C", bpy.ops.bim.add_ifccircle.__doc__, ui_context)
add_layout_hotkey_operator(
row, "Rectangle", "S_R", bpy.ops.bim.add_rectangle.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "3-Point Arc", "S_V", bpy.ops.bim.set_arc_index.__doc__, ui_context)
add_layout_hotkey_operator(
row, "Circle", "S_C", bpy.ops.bim.add_ifccircle.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "Reset Vertex", "S_X", bpy.ops.bim.reset_vertex.__doc__, ui_context)
add_layout_hotkey_operator(
row, "3-Point Arc", "S_V", bpy.ops.bim.set_arc_index.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(
row, "Reset Vertex", "S_X", bpy.ops.bim.reset_vertex.__doc__.split("\n", 1)[1].strip(), ui_context
)
elif (
isinstance(data, tool.Geometry.TYPES_WITH_MESH_PROPERTIES)
@@ -134,15 +146,21 @@ class CadTool(WorkSpaceTool):
layout, "Edit Axis", "bim.edit_extrusion_axis", "bim.disable_editing_extrusion_axis", ui_context
)
row = layout.row(align=True)
add_layout_hotkey_operator(row, "Extend", "S_E", "Extends/reduces element to 3D cursor", ui_context)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(
row, "Join", "S_T", "Joins two non-parallel paths at their intersection", ui_context
row, "Extend", "S_E", bpy.ops.bim.cad_trim_extend.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "Fillet", "S_F", bpy.ops.bim.cad_fillet.__doc__, ui_context)
add_layout_hotkey_operator(
row, "Join", "S_T", bpy.ops.bim.cad_mitre.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__, ui_context)
add_layout_hotkey_operator(
row, "Fillet", "S_F", bpy.ops.bim.cad_fillet.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(
row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__.split("\n", 1)[1].strip(), ui_context
)
else:
if (
@@ -170,19 +188,37 @@ class CadTool(WorkSpaceTool):
add_layout_hotkey_operator(row, "Set Gable Roof Angle", "S_R", "Set Gable Roof Angle", ui_context)
row = layout.row(align=True)
add_layout_hotkey_operator(row, "Extend", "S_E", "Extends/reduces element to 3D cursor", ui_context)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(
row, "Join", "S_T", "Joins two non-parallel paths at their intersection", ui_context
row, "Extend", "S_E", bpy.ops.bim.cad_trim_extend.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "Fillet", "S_F", bpy.ops.bim.add_ifcarcindex_fillet.__doc__, ui_context)
add_layout_hotkey_operator(
row, "Join", "S_T", bpy.ops.bim.cad_mitre.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__, ui_context)
add_layout_hotkey_operator(
row, "Fillet", "S_F", bpy.ops.bim.add_ifcarcindex_fillet.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "2-Point Arc", "S_C", bpy.ops.bim.cad_arc_from_2_points.__doc__, ui_context)
add_layout_hotkey_operator(
row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__.split("\n", 1)[1].strip(), ui_context
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(row, "3-Point Arc", "S_V", bpy.ops.bim.cad_arc_from_3_points.__doc__, ui_context)
add_layout_hotkey_operator(
row,
"2-Point Arc",
"S_C",
bpy.ops.bim.cad_arc_from_2_points.__doc__.split("\n", 1)[1].strip(),
ui_context,
)
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
add_layout_hotkey_operator(
row,
"3-Point Arc",
"S_V",
bpy.ops.bim.cad_arc_from_3_points.__doc__.split("\n", 1)[1].strip(),
ui_context,
)
class CadHotkey(bpy.types.Operator):
@@ -18,9 +18,6 @@
import json
import bpy
import ifcopenshell.util.element
import bonsai.tool as tool
@@ -17,7 +17,6 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import blf
import bmesh
import gpu
from bpy.types import SpaceView3D
from bpy_extras.view3d_utils import location_3d_to_region_2d
@@ -18,16 +18,13 @@
import json
import logging
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
@@ -460,9 +457,7 @@ class HideClash(bpy.types.Operator):
def execute(self, context):
ClashDecorator.uninstall()
for area in context.screen.areas:
if area.type == "VIEW_3D":
area.tag_redraw()
tool.Blender.update_all_viewports(context)
return {"FINISHED"}
+1 -2
View File
@@ -26,7 +26,6 @@ from bpy.props import (
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
@@ -34,7 +33,7 @@ from ifcopenshell.geom.main import CLASH_TYPE_ITEMS, ClashType
from mathutils import Vector
import bonsai.tool as tool
from bonsai.bim.prop import Attribute, BIMFilterGroup, StrProperty
from bonsai.bim.prop import BIMFilterGroup, StrProperty
class ClashSource(PropertyGroup):
@@ -18,7 +18,6 @@
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.classification
import ifcopenshell.api.pset
import ifcopenshell.util.classification
@@ -23,10 +23,7 @@ from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
@@ -25,7 +25,6 @@ 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,
@@ -19,7 +19,6 @@
from typing import TYPE_CHECKING
import bpy
import ifcopenshell.api
import ifcopenshell.api.constraint
import bonsai.bim.helper
@@ -20,19 +20,13 @@ from typing import TYPE_CHECKING, Literal
import bpy
from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
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
@@ -18,7 +18,6 @@
from typing import Any
import bpy
import ifcopenshell
import bonsai.tool as tool
+1 -7
View File
@@ -20,19 +20,13 @@ from typing import TYPE_CHECKING
import bpy
from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
from bonsai.bim.module.context.data import ContextData
from bonsai.bim.prop import Attribute, StrProperty
from bonsai.bim.prop import Attribute
class BIMContextProperties(PropertyGroup):
@@ -18,13 +18,11 @@
from typing import Any, Union
import bpy
import ifcopenshell
import ifcopenshell.util.cost
import ifcopenshell.util.date
import ifcopenshell.util.element
import ifcopenshell.util.unit
from ifcopenshell.util.doc import get_entity_doc, get_predefined_type_doc
import bonsai.tool as tool
@@ -987,10 +987,10 @@ class ExportCostSchedulesToPDF(bpy.types.Operator, ExportHelper):
@classmethod
def poll(cls, context):
try:
import typst
import typst # noqa: F401
return True
except:
except ModuleNotFoundError:
cls.poll_message_set(
"Typst not available.\nIt can be installed from Quality and\nControl -> Debug and using 'typst' with Pip Install.\n(Run Blender as Administrator)"
)
@@ -19,16 +19,13 @@
from typing import TYPE_CHECKING, Literal, Union
import bpy
import ifcopenshell.api
import ifcopenshell.api.cost
from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
+44 -15
View File
@@ -26,10 +26,11 @@ from bpy.types import Panel, UIList
import bonsai.bim.helper
import bonsai.bim.module.cost.prop as CostProp
import bonsai.tool as tool
from bonsai.bim.module.cost.data import CostSchedulesData
from bonsai.bim.module.cost.data import CostItem, CostSchedulesData
if TYPE_CHECKING:
from bonsai.bim.module.cost.prop import BIMCostProperties, CostItemQuantity
from bonsai.bim.prop import StrProperty
class BIM_PT_cost_schedules(Panel):
@@ -398,8 +399,8 @@ class BIM_PT_cost_item_types(Panel):
op = row2.operator("bim.calculate_cost_item_resource_value", text="", icon="DISC")
op.cost_item = cost_item.ifc_definition_id
rtprops = context.scene.BIMResourceTreeProperties
rprops = tool.Resource.get_resource_props()
rtprops = rprops.tree
if rtprops.resources and rprops.active_resource_index < len(rtprops.resources):
if has_quantity_names:
op = row2.operator("bim.assign_cost_item_quantity", text="", icon="PROPERTIES")
@@ -661,9 +662,18 @@ class BIM_UL_cost_items_trait:
split2.alignment = "LEFT"
split2.label(text="Rate")
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
def draw_item(
self,
context,
layout: bpy.types.UILayout,
data: BIMCostProperties,
item: CostProp.CostItem,
icon,
active_data,
active_propname,
) -> None:
if item:
self.props = tool.Cost.get_cost_props()
self.props = data
cost_item = CostSchedulesData.data["cost_items"][item.ifc_definition_id]
row = layout.row(align=True)
@@ -694,7 +704,7 @@ class BIM_UL_cost_items_trait:
# TODO: reimplement "bim.copy_cost_item_values" somewhere with better UX
def draw_parent_operator(self, row, cost_item_id):
def draw_parent_operator(self, row: bpy.types.UILayout, cost_item_id: int) -> None:
if self.props.active_cost_item_id:
if self.props.active_cost_item_id != cost_item_id:
op = row.operator("bim.change_parent_cost_item", text="", icon="LINKED", emboss=False).new_parent = (
@@ -703,7 +713,7 @@ class BIM_UL_cost_items_trait:
else:
row.label(text="", icon="BLANK1")
def draw_hierarchy(self, row, item):
def draw_hierarchy(self, row: bpy.types.UILayout, item: CostProp.CostItem) -> None:
for i in range(0, item.level_index):
row.label(text="", icon="BLANK1")
if item.has_children:
@@ -749,7 +759,7 @@ class BIM_UL_cost_items_trait:
else:
row.label(text="-")
def draw_value_column(self, layout, cost_item):
def draw_value_column(self, layout: bpy.types.UILayout, cost_item: CostItem) -> None:
if cost_item["TotalAppliedValue"]:
text = "{0:,.2f}".format(cost_item["TotalAppliedValue"]).replace(",", " ")
if cost_item["UnitBasisValueComponent"] not in [None, 1]:
@@ -760,13 +770,13 @@ class BIM_UL_cost_items_trait:
else:
layout.label(text="-")
def draw_total_cost_column(self, layout, cost_item):
def draw_total_cost_column(self, layout: bpy.types.UILayout, cost_item: CostItem) -> None:
format_numbers = "{0:,.2f}".format(cost_item["TotalCost"]).replace(",", " ")
currency = CostSchedulesData.data["currency"]
text = "{} {}".format(format_numbers, currency["name"]) if currency else format_numbers
layout.label(text=text)
def draw_order_operator(self, row, ifc_definition_id, cost_item):
def draw_order_operator(self, row: bpy.types.UILayout, ifc_definition_id: int, cost_item: CostItem) -> None:
if cost_item["NestingIndex"] is not None:
if cost_item["NestingIndex"] == 0:
op = row.operator("bim.reorder_cost_item_nesting", icon="TRIA_DOWN", text="")
@@ -793,12 +803,14 @@ class BIM_UL_cost_item_rates(BIM_UL_cost_items_trait, UIList):
def draw_quantity_column(self, layout, cost_item):
self.draw_uom_column(layout, cost_item)
def draw_total_cost_column(self, layout, cost_item):
def draw_total_cost_column(self, layout: bpy.types.UILayout, cost_item: CostItem) -> None:
pass # No such thing as a total cost in a schedule of rates
class BIM_UL_cost_columns(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
def draw_item(
self, context, layout: bpy.types.UILayout, data, item: StrProperty, icon, active_data, active_propname
) -> None:
if item:
row = layout.row(align=True)
row.prop(item, "name", emboss=False, text="")
@@ -806,9 +818,17 @@ class BIM_UL_cost_columns(UIList):
class BIM_UL_cost_item_types(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
props = tool.Cost.get_cost_props()
cost_item = props.cost_items[props.active_cost_item_index]
def draw_item(
self,
context,
layout: bpy.types.UILayout,
data: BIMCostProperties,
item: CostProp.CostItemType,
icon,
active_data,
active_propname,
) -> None:
cost_item = data.cost_items[data.active_cost_item_index]
if item:
row = layout.row(align=True)
@@ -844,7 +864,16 @@ class BIM_UL_cost_item_quantities(UIList):
class BIM_UL_product_cost_items(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
def draw_item(
self,
context,
layout: bpy.types.UILayout,
data,
item: CostItemQuantity,
icon,
active_data,
active_propname,
) -> None:
if item:
row = layout.row(align=True)
op = row.operator("bim.highlight_product_cost_item", text="", icon="STYLUS_PRESSURE")
@@ -21,7 +21,6 @@ import os
from functools import partial
import bpy
import ifcopenshell
from bpy.types import WorkSpaceTool
import bonsai.tool as tool
@@ -20,7 +20,6 @@ import json
from math import atan2, degrees
import bpy
import ifcopenshell
import ifcopenshell.util.element
import bonsai.tool as tool
@@ -19,14 +19,10 @@
from __future__ import annotations
import json
import logging
import os
import tempfile
from collections import Counter
from typing import TYPE_CHECKING
import bpy
import ifccsv
import ifcopenshell
import ifcopenshell.util.selector
from bpy_extras.io_utils import ExportHelper, ImportHelper
+1 -5
View File
@@ -23,15 +23,11 @@ from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
from bonsai.bim.prop import BIMFilterGroup, StrProperty
from bonsai.bim.prop import BIMFilterGroup
class CsvAttribute(PropertyGroup):
@@ -29,7 +29,6 @@ from typing import TYPE_CHECKING, Any, Literal, Union, assert_never, get_args
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.pset
import ifcopenshell.geom
import ifcopenshell.ifcopenshell_wrapper as W
@@ -20,13 +20,9 @@ from typing import TYPE_CHECKING, Literal, get_args
import bpy
from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
@@ -32,18 +32,10 @@
from typing import TYPE_CHECKING
import bpy
# Properties have many different data types. We won't use all of them in this
# demo module, but this is a list for your reference.
from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
@@ -98,8 +98,8 @@ class VisualiseDiff(bpy.types.Operator):
obj.color = (0.0, 1.0, 0.0, 1.0)
elif global_id in diff["changed"]:
obj.color = (0.0, 0.0, 1.0, 1.0)
area = next(area for area in context.screen.areas if area.type == "VIEW_3D")
area.spaces[0].shading.color_type = "OBJECT"
assert (space := tool.Blender.get_view3d_space())
space.shading.color_type = "OBJECT"
return {"FINISHED"}
+1 -5
View File
@@ -23,16 +23,12 @@ from bpy.props import (
BoolProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
)
from bpy.types import PropertyGroup
from bonsai.bim.module.diff.data import DiffData
from bonsai.bim.prop import BIMFilterGroup, StrProperty
from bonsai.bim.prop import BIMFilterGroup
def update_diff_json_file(self: "DiffProperties", context: bpy.types.Context) -> None:
@@ -19,8 +19,6 @@
import os
import bpy
import ifcopenshell
import ifcopenshell.util.schema
from natsort import natsorted
import bonsai.tool as tool
@@ -19,11 +19,11 @@
import json
import bpy
import ifcopenshell.util.element
import bonsai.bim.handler
import bonsai.core.document as core
import bonsai.tool as tool
from bonsai.bim.module.document.data import DocumentData, ObjectDocumentData
from bonsai.bim.module.document.data import ObjectDocumentData
class LoadProjectDocuments(bpy.types.Operator):
@@ -1,21 +1,18 @@
from typing import TYPE_CHECKING, Union
from typing import TYPE_CHECKING, Literal, Union
import bpy
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.document.data import DocumentData, refresh
from bonsai.bim.prop import Attribute, StrProperty
from bonsai.bim.prop import Attribute
def update_document_name(self: "Document", context: bpy.types.Context) -> None:
@@ -69,7 +66,7 @@ class Document(PropertyGroup):
tree_depth: int
has_children: bool
is_expanded: bool
document_type: str
document_type: Literal["PROJECT", "INFORMATION", "REFERENCE"]
class DocumentObject(PropertyGroup):
+33 -6
View File
@@ -16,10 +16,22 @@
# You should have received a copy of the GNU General Public License
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
from typing import TYPE_CHECKING
import bpy
from bpy.types import Panel, UIList
import bonsai.tool as tool
if TYPE_CHECKING:
from bonsai.bim.module.document.prop import (
BIMDocumentProperties,
Document,
DocumentObject,
)
from bonsai.bim.helper import draw_attributes
from bonsai.bim.module.document.data import DocumentData, ObjectDocumentData
@@ -208,7 +220,16 @@ class BIM_PT_object_documents(Panel):
class BIM_UL_documents(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
def draw_item(
self,
context,
layout: bpy.types.UILayout,
data: BIMDocumentProperties,
item: Document,
icon,
active_data,
active_propname,
) -> None:
if item:
row = layout.row(align=True)
indent_depth = 0
@@ -253,16 +274,22 @@ class BIM_UL_documents(UIList):
class BIM_UL_document_objects(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
def draw_item(
self,
context,
layout: bpy.types.UILayout,
data: BIMDocumentProperties,
item: DocumentObject,
icon,
active_data,
active_propname,
) -> None:
if item:
row = layout.row(align=True)
row.prop(item, "name", text="", emboss=False, icon="OBJECT_DATA")
row.operator("bim.select_object", text="", icon="RESTRICT_SELECT_OFF").obj_name = item.name
props = tool.Document.get_document_props()
if props.active_document:
document = props.active_document
if document := data.active_document:
op = row.operator("bim.unassign_document", text="", icon="X")
op.document = document.ifc_definition_id
op.obj = item.name
@@ -18,15 +18,12 @@
from __future__ import annotations
import math
import os
from pathlib import Path
from typing import Optional
import bmesh
import bpy
import ifcopenshell.util.element
from mathutils import Matrix, Vector
from mathutils import Vector
import bonsai.tool as tool
+2 -2
View File
@@ -22,9 +22,9 @@ from pathlib import Path
from typing import Any, Union
import bpy
import ifcopenshell.util.classification
import ifcopenshell.util.element
import ifcopenshell.util.representation
import ifcopenshell.util.selector
import ifcopenshell.util.placement
import ifcopenshell.util.unit
from natsort import natsorted
@@ -23,7 +23,7 @@ from functools import cache
from math import acos, atan, cos, degrees, pi, radians, sin
from pathlib import Path
from timeit import default_timer as timer
from typing import Optional, Union
from typing import Optional
import blf
import bmesh
@@ -34,7 +34,6 @@ import ifcopenshell.util.element
import ifcopenshell.util.representation
import ifcopenshell.util.unit
import numpy as np
import shapely
from bpy.types import SpaceView3D
from bpy_extras.view3d_utils import location_3d_to_region_2d
from gpu_extras.batch import batch_for_shader
@@ -71,9 +70,9 @@ class profile_consequential:
cls.start_time = None
lines = "\n".join(cls.lines)
print(lines)
import pyperclip
pyperclip.copy(lines)
assert (wm := bpy.context.window_manager)
wm.clipboard = lines
cls.lines = []
@@ -1788,7 +1787,7 @@ class CutDecorator:
# Handle both old float64 and new float32 checksums for version compatibility
rot_checksum_bytes: bytes = eval(DecoratorData.camera_rotation_checksum)
rot_check = tool.Blender.np_frombuffer_legacy(rot_checksum_bytes, 9)
rot_check = tool.Blender.np_frombuffer_legacy(rot_checksum_bytes, 9).reshape(3, 3)
rot_real = tool.Blender.np_array_legacy(obj.matrix_world.to_3x3())
rot_dot = np.dot(rot_check, rot_real.T)
angle_rad = np.arccos(np.clip((np.trace(rot_dot) - 1) / 2, -1, 1))
@@ -151,7 +151,7 @@ from bpy_extras.view3d_utils import (
)
from gpu_extras.batch import batch_for_shader
from ifcopenshell.util.unit import si_conversions
from mathutils import Matrix, Vector
from mathutils import Matrix, Vector, geometry
from mathutils.geometry import intersect_line_line
from mathutils.kdtree import KDTree
@@ -1243,9 +1243,7 @@ class SnapManager:
@staticmethod
def _redraw_viewport() -> None:
"""Force 3D viewport redraw."""
for area in bpy.context.screen.areas:
if area.type == "VIEW_3D":
area.tag_redraw()
tool.Blender.update_all_viewports()
def build_snap_cache(
self, context: bpy.types.Context, active_obj: bpy.types.Object, include_active: bool = False
@@ -1287,7 +1285,7 @@ class SnapManager:
continue
coords = np.empty(vertex_count * 3, dtype=np.float32)
mesh.vertices.foreach_get("co", coords) # type: ignore[arg-type]
mesh.vertices.foreach_get("co", coords)
coords = coords.reshape(-1, 3)
matrix = np.array(obj_eval.matrix_world, dtype=np.float32)
@@ -17,10 +17,8 @@
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
import math
from typing import Union
import bpy
import ifcopenshell
import ifcopenshell.util.element
import ifcopenshell.util.unit
import mathutils.geometry
@@ -458,7 +456,8 @@ def format_distance(
tx_dist = fmt % d_cm
else:
tx_dist = fmt % value
assert f"Unexpected unit_system - '{unit_system}'."
# tx_dist = fmt % value
return tx_dist
@@ -18,9 +18,9 @@
import hashlib
import json
import logging
import multiprocessing
import os
import re
import shutil
import subprocess
import time
@@ -40,10 +40,9 @@ from typing import (
import bmesh
import bpy
import logging
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.document
import ifcopenshell.api.geometry
import ifcopenshell.api.pset
import ifcopenshell.api.style
import ifcopenshell.geom
@@ -55,17 +54,14 @@ import ifcopenshell.util.shape_builder
import ifcopenshell.util.unit
import numpy as np
import shapely
import shapely.ops
from bpy_extras.image_utils import load_image
from bpy_extras.io_utils import ImportHelper
from lxml import etree
from mathutils import Color, Matrix, Vector
from mathutils import Color, Vector
import bonsai.bim.import_ifc
import bonsai.bim.export_ifc
import bonsai.bim.handler
import bonsai.bim.helper
import bonsai.bim.module.drawing.annotation as annotation
import bonsai.bim.import_ifc
import bonsai.bim.module.drawing.sheeter as sheeter
import bonsai.bim.module.drawing.svgwriter as svgwriter
import bonsai.core.drawing as core
@@ -1430,6 +1426,7 @@ class CreateDrawing(bpy.types.Operator):
"/Pset_.*Common/.Status",
"EPset_Status.Status",
"EPset_Status.UserDefinedStatus",
"Material.Name",
]
group = root.find("{http://www.w3.org/2000/svg}g")
@@ -3309,9 +3306,8 @@ class AddTextLiteral(bpy.types.Operator):
attr.data_type = "string"
attr.string_value = literal_attr_values[attr_name]
box_alignment_mask = [False] * 9
box_alignment_mask[6] = True # bottom_left box_alignment
literal_props.box_alignment = box_alignment_mask
literal_props.align_vertical = "bottom"
literal_props.align_horizontal = "left"
return {"FINISHED"}
@@ -3369,57 +3365,55 @@ class OrderTextLiteralDown(bpy.types.Operator):
return {"FINISHED"}
# Ifc Operator is unnecessary, because suboperator is handling IFC changes.
class AssignSelectedObjectAsProduct(bpy.types.Operator):
class AssignSelectedObjectAsProduct(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.assign_selected_as_product"
bl_label = "Assign Selected Object As Product"
bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):
if len(context.selected_objects) != 2:
cls.poll_message_set("2 objects need to be selected")
if len(context.selected_objects) < 2:
cls.poll_message_set("At least 2 objects need to be selected")
return False
return True
def execute(self, context):
assert bpy.context.view_layer
def _execute(self, context):
objs = context.selected_objects[:]
obj1, obj2 = objs
element1 = tool.Ifc.get_entity(obj1)
element2 = tool.Ifc.get_entity(obj2)
assert element1 and element2
ifc_objs = [(o, tool.Ifc.get_entity(o)) for o in objs if tool.Ifc.get_entity(o)]
# Check if at least one object is an IfcAnnotation
is_annotation1 = element1.is_a("IfcAnnotation")
is_annotation2 = element2.is_a("IfcAnnotation")
annotations = [(o, e) for o, e in ifc_objs if e.is_a("IfcAnnotation")]
non_annotations = [(o, e) for o, e in ifc_objs if not e.is_a("IfcAnnotation")]
if not (is_annotation1 or is_annotation2):
self.report({"ERROR"}, "At least one of the selected objects must be IfcAnnotation.")
if not annotations:
self.report({"ERROR"}, "At least one selected object must be an IfcAnnotation.")
return {"CANCELLED"}
# If both are annotations, use the currently active object as relating product
if is_annotation1 and is_annotation2:
if len(non_annotations) == 1:
# One product, one or more annotations — assign all annotations to the product.
product = non_annotations[0][1]
elif len(non_annotations) == 0 and len(annotations) == 2:
# Both objects are annotations — use the non-active one as the relating product.
active_obj = context.active_object
if active_obj == obj1:
other_selected_object = obj1
bpy.context.view_layer.objects.active = obj2
if annotations[0][0] == active_obj:
annotation_obj, annotation = annotations[0]
product = annotations[1][1]
else:
other_selected_object = obj2
bpy.context.view_layer.objects.active = obj1
# If only one is an annotation, make it the active object
elif is_annotation1:
other_selected_object = obj2
bpy.context.view_layer.objects.active = obj1
annotation_obj, annotation = annotations[1]
product = annotations[0][1]
core.edit_assigned_product(tool.Ifc, tool.Drawing, obj=annotation_obj, product=product)
tool.Blender.update_viewport()
return
else:
other_selected_object = obj1
bpy.context.view_layer.objects.active = obj2
self.report(
{"ERROR"},
"Select exactly one product object and one or more IfcAnnotation objects.",
)
return {"CANCELLED"}
assert (active_obj := context.active_object)
props = tool.Drawing.get_object_assigned_product_props(active_obj)
props.relating_product = other_selected_object
bpy.ops.bim.edit_assigned_product()
return {"FINISHED"}
for annotation_obj, _ in annotations:
core.edit_assigned_product(tool.Ifc, tool.Drawing, obj=annotation_obj, product=product)
tool.Blender.update_viewport()
class EditAssignedProduct(bpy.types.Operator, tool.Ifc.Operator):
@@ -3876,7 +3870,6 @@ class AddReferenceImage(bpy.types.Operator, tool.Ifc.Operator, ImportHelper):
layout.prop(self, "x_length")
layout.prop(self, "y_length")
def _execute(self, context):
project_props = tool.Project.get_project_props()
project_props.load_indexed_maps = self.show_texture_solid_mode
@@ -3892,8 +3885,7 @@ class AddReferenceImage(bpy.types.Operator, tool.Ifc.Operator, ImportHelper):
image_filepath = Path(tool.Ifc.get_uri(self.filepath, use_relative_path=self.use_relative_path))
ifc_file = tool.Ifc.get()
params = {"check_existing": False}
image = load_image(abs_path.name, str(abs_path.parent), **params)
image = load_image(abs_path.name, str(abs_path.parent), check_existing=False)
mesh = bpy.data.meshes.new(image_filepath.stem)
obj = bpy.data.objects.new(image_filepath.stem, mesh)
@@ -3905,7 +3897,7 @@ class AddReferenceImage(bpy.types.Operator, tool.Ifc.Operator, ImportHelper):
unit_scale = ifcopenshell.util.unit.calculate_unit_scale(ifc_file)
hx = self.x_length * 0.5 / unit_scale
hy = self.y_length * 0.5 / unit_scale
verts = [(-hx, -hy, 0.0), ( hx, -hy, 0.0), ( hx, hy, 0.0), (-hx, hy, 0.0)]
verts = [(-hx, -hy, 0.0), (hx, -hy, 0.0), (hx, hy, 0.0), (-hx, hy, 0.0)]
item = builder.mesh(verts, [[0, 1, 2, 3]])
ifc_context = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Body", "MODEL_VIEW")
@@ -4183,10 +4175,7 @@ class SelectSimilarTextLiteralValue(bpy.types.Operator):
should_select = True
break
elif self.attribute_type == "box_alignment":
box_alignment_attr = next(
(attr for attr in literal.attributes if attr.name == "BoxAlignment"), None
)
if box_alignment_attr and box_alignment_attr.string_value == self.literal_value:
if literal.get_box_alignment() == self.literal_value:
should_select = True
break
+37 -51
View File
@@ -18,23 +18,18 @@
import enum
import json
import os
from collections.abc import Callable
from pathlib import Path
from typing import TYPE_CHECKING, Any, Literal, Union, get_args
from typing import TYPE_CHECKING, Any, Literal, Union
import bpy
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.api.pset
import ifcopenshell.util.element
from bpy.props import (
BoolProperty,
BoolVectorProperty,
CollectionProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
PointerProperty,
StringProperty,
@@ -42,19 +37,17 @@ from bpy.props import (
from bpy.types import PropertyGroup
from mathutils import Matrix
import bonsai.bim.module.drawing.annotation as annotation
import bonsai.bim.module.drawing.decoration as decoration
import bonsai.core.drawing as core
import bonsai.tool as tool
from bonsai.bim.module.drawing.data import (
AnnotationData,
DecoratorData,
DrawingsData,
ElementValuesData,
SheetsData,
)
from bonsai.bim.module.drawing.data import refresh as refresh_drawing_data
from bonsai.bim.prop import Attribute, BIMFilterGroup, StrProperty
from bonsai.bim.prop import Attribute, BIMFilterGroup
diagram_scales_enum = []
@@ -679,20 +672,6 @@ class BIMCameraProperties(PropertyGroup):
return ortho_scale, aspect_ratio
DEFAULT_BOX_ALIGNMENT = [False] * 6 + [True] + [False] * 2
BOX_ALIGNMENT_POSITIONS = [
"top-left",
"top-middle",
"top-right",
"middle-left",
"center",
"middle-right",
"bottom-left",
"bottom-middle",
"bottom-right",
]
class ElementValueRow(PropertyGroup):
"""Represents a single element value row with category, key, and formatted value"""
@@ -795,40 +774,38 @@ def get_category_items_with_counts(self, context):
class LiteralProps(PropertyGroup):
def set_box_alignment(self, new_value):
markers = new_value.count(True)
if not markers:
return
if markers > 1:
prev_value = self.get("box_alignment", DEFAULT_BOX_ALIGNMENT)
# looking for the first value changed to positive
first_changed_value = next((i for i in range(9) if new_value[i] and new_value[i] != prev_value[i]), None)
# if nothing have changed we just keep the previous value
if first_changed_value is None:
return
new_value = [False] * 9
new_value[first_changed_value] = True
self["box_alignment"] = new_value
position_string = BOX_ALIGNMENT_POSITIONS[next(i for i in range(9) if new_value[i])]
self.attributes["BoxAlignment"].set_value(position_string)
def get_box_alignment(self):
return self.get("box_alignment", DEFAULT_BOX_ALIGNMENT)
attributes: CollectionProperty(name="Attributes", type=Attribute)
box_alignment: BoolVectorProperty(
name="Box alignment", size=9, set=set_box_alignment, get=get_box_alignment, default=DEFAULT_BOX_ALIGNMENT
)
ifc_definition_id: IntProperty(name="IFC definition ID", default=0)
align_horizontal: EnumProperty(
items=[
("left", "Left", "", "ALIGN_LEFT", 0),
("middle", "Middle", "", "ALIGN_CENTER", 1),
("right", "Right", "", "ALIGN_RIGHT", 2),
],
default="left",
name="Horizontal Alignment",
)
align_vertical: EnumProperty(
items=[
("top", "Top", "", "ALIGN_TOP", 0),
("middle", "Middle", "", "ALIGN_MIDDLE", 1),
("bottom", "Bottom", "", "ALIGN_BOTTOM", 2),
],
default="middle",
name="Vertical Alignment",
)
def get_box_alignment(self) -> str:
alignment = self.align_vertical + "-" + self.align_horizontal
if alignment == "middle-middle":
alignment = "center"
return alignment
def get_literal_edited_data(self) -> dict[str, str]:
text_data = {
"CurrentValue": self.attributes["Literal"].string_value,
"Literal": self.attributes["Literal"].string_value,
"BoxAlignment": self.attributes["BoxAlignment"].string_value,
"BoxAlignment": self.get_box_alignment(),
}
return text_data
@@ -866,12 +843,19 @@ class LiteralProps(PropertyGroup):
if TYPE_CHECKING:
attributes: bpy.types.bpy_prop_collection_idprop[Attribute]
value: str
box_alignment: tuple[bool, bool, bool, bool, bool, bool, bool, bool, bool]
ifc_definition_id: int
align_horizontal: str
align_vertical: str
element_value_rows: bpy.types.bpy_prop_collection_idprop[ElementValueRow]
category_for_adding: str
def update_text_alignment(self, context):
for literal_props in self.literals:
literal_props.align_horizontal = self.align_horizontal
literal_props.align_vertical = self.align_vertical
class BIMTextProperties(PropertyGroup):
is_editing: BoolProperty(name="Is Editing", default=False)
literals: CollectionProperty(name="Literals", type=LiteralProps)
@@ -905,6 +889,7 @@ class BIMTextProperties(PropertyGroup):
],
default="left",
name="Horizontal Alignment",
update=update_text_alignment,
)
align_vertical: EnumProperty(
items=[
@@ -914,6 +899,7 @@ class BIMTextProperties(PropertyGroup):
],
default="middle",
name="Vertical Alignment",
update=update_text_alignment,
)
if TYPE_CHECKING:
@@ -22,7 +22,6 @@ import string
from pathlib import Path
from textwrap import wrap
import bpy
import openpyxl
import openpyxl.cell # Unnecessary, bug in typeshed.
import openpyxl.utils # Unnecessary, bug in typeshed.
@@ -33,7 +32,6 @@ from odf.table import Table, TableCell, TableColumn, TableRow
from odf.text import P
import bonsai.tool as tool
from bonsai.bim.ifc import IfcStore
from bonsai.bim.module.drawing.svgwriter import SvgWriter
DEBUG = False
@@ -335,12 +335,9 @@ class BaseLinesShader(BaseShader):
TYPE = "LINES"
DEF_GLSL = (
BaseShader.DEF_GLSL
+ """
DEF_GLSL = BaseShader.DEF_GLSL + """
#define GAP_SIZE {gap_size}
"""
)
GEOM_GLSL = """
layout(lines) in;
@@ -369,9 +366,6 @@ class BaseLinesShader(BaseShader):
}
"""
def __init__(self, gap_size=16):
super().__init__(gap_size=gap_size)
def glenable(self):
super().glenable()
@@ -401,13 +395,10 @@ class DotsGizmoShader(GizmoShader):
TYPE = "POINTS"
DEF_GLSL = (
BaseShader.DEF_GLSL
+ """
DEF_GLSL = BaseShader.DEF_GLSL + """
#define CIRCLE_SEGMENTS 12
#define CIRCLE_RADIUS 8
"""
)
GEOM_GLSL = """
layout(points) in;
@@ -26,7 +26,6 @@ import xml.etree.ElementTree as ET
from pathlib import Path
from xml.dom import minidom
import bpy
import ifcopenshell.util.geolocation
import pystache
from mathutils import Vector

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