-
-
Notifications
You must be signed in to change notification settings - Fork 823
Addition of numbering tool into Bonsai #7064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
BjornFidder
wants to merge
10
commits into
IfcOpenShell:v0.8.0
Choose a base branch
from
BjornFidder:upstream/numbering_tool
base: v0.8.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Addition of numbering tool into Bonsai #7064
BjornFidder
wants to merge
10
commits into
IfcOpenShell:v0.8.0
from
BjornFidder:upstream/numbering_tool
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduces a new 'numbering' module to the Bonsai OpenBIM Blender add-on, including operators, properties, UI panel, and utility functions for assigning, removing, and managing numbers on IFC elements. Updates core registration to support the new module and adds integration points in the tool layer.
Commented out most functionality in the numbering UI and properties to prepare for refactoring. Added new data and core files for numbering, updated imports, and introduced stubs for project retrieval. Updated workspace icon and method signature, and fixed import paths for utility functions.
This commit completes the implementation of the Numbering module UI and property group, enabling all settings, selection, ordering, and storage options for element numbering in the Bonsai Blender add-on. It refactors the workspace tool to use the new UI, updates operator references, and adds core and tool documentation for maintainability. Tool seems fully working, but there is still some refactoring to do, to use the NumberingData instead of static class variables, and to fix the format, the tool's formatting is not quite right. Also try to find a way to override the toolbar layout to be different from the sidebar layout.
Moved numbering logic from module/numbering/util.py to bonsai/core/numbering.py and deleted util.py. Updated imports across the module to use bonsai.core.numbering. Moved all the numbering settings to a separate UI panel (BIM_PT_Numbering), defined in ui.py, which is shown in the Tool panel of the sidebar, in a separate panel. Updated operator logic to use new Numbering class methods. Improved property naming for clarity and consistency.
This commit refactors and formats the BIM numbering module for improved readability and consistency. Changes include reformatting code, updating property definitions, improving error reporting, and cleaning up whitespace and indentation across multiple files. No functional changes were made.
Simplified type extraction in NumberFormatting by removing unnecessary list and str conversions. Updated ObjectGeometry to streamline Vector creation for min and max corners, improving code readability.
Eliminated the 'project' key and related method from NumberingData, as it is no longer used when updating data after polling. This simplifies the data structure and removes unnecessary code.
Refactored numbering-related classes and functions from src/bonsai/bonsai/core/numbering.py to src/bonsai/bonsai/tool/numbering.py. Updated imports in operator, prop, and ui modules to use bonsai.tool.numbering. Adjusted workspace keymap properties and extended the Numbering interface in core/tool.py. This improves modularity and separation of concerns between core and tool logic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The numbering tool discussed in this OSArch post has been added into Bonsai.
The tool is available from the toolbar, below the Structural tool. Using the tool, one can directly assign or remove numbers. If the tool is activated, the sidebar shows an additional panel under the Tool section, containing the UI for the numbering settings.
TODO:
Further notes:
This is my first pull request to IfcOpenShell. I have tried to be consistent with the conventions. I have not been consistent in adding type signatures everywhere. Also, the bonsai/tool/numbering.py file contains several static classes with internal data storage, which seems not in accordance with conventions.
I'd love to know what is required to get my additions in accordance with conventions and ready for inclusion into native Bonsai. Any help or ideas are also welcome.