-
Notifications
You must be signed in to change notification settings - Fork 14
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
Blender UI / integration with voxelisation toolkit software #88
Comments
Hello I'm Adama a computer graphic student and an art lover. This project is pretty fun ! If i well understand the goal is to create a blender add to provide a GUI for a voxel apps ? |
G'day @dororo-ak absolutely! Yes, the voxelisation toolkit is an existing app which you can play with (here's a sample IFC model you can use https://www.ifcwiki.org/images/e/e3/AC20-FZK-Haus.ifc ) and it needs a Blender UI to help non-programmers play with it. That Blender UI could be absolutely anything - a panel, interactive workspace tool, nodes, web-based, etc. It should integrate to some degree (at a minimum, be bundled with) https://blenderbim.org/ If you're up for it, start playing with the voxelisation toolkit, install the BlenderBIM Add-on, and start drafting up an proposal :) |
Hello @Moult, do I need to look at IFCOpenShells code or just build the Blender tool for the cmd line tool provided? |
There will be some integration required with IfcOpenShell as IFC geometry will likely be used as inputs for voxec. Bundling may be as simple as including the executable cross-platform with the add-on and executed with subprocess, or as complex as building Python bindings to voxec and replacing the DSL. |
With the latest release there is also a python binding: https://github.com/opensourceBIM/voxelization_toolkit/releases/tag/v0.3.2 We currently only have Linux builds. If you're on Windows try WSL. This will make integration a bit more straightforward. f = ifcopenshell.open(ifn)
s = ifcopenshell.geom.settings(
USE_WORLD_COORDS=True,
DISABLE_OPENING_SUBTRACTIONS=False,
USE_BREP_DATA=True,
DISABLE_TRIANGULATION=True
)
it = ifcopenshell.geom.iterator(s, f)
if it.initialize():
while True:
elem = it.get()
geom = elem.geometry.brep_data
vox = voxec.run('voxelize', geom, method='volume')
vox_bounds = np.array(vox.world_bounds())
print(vox_bounds)
print(vox.count())
vox.boolean_union(...)
if not it.next():
break
this With the python bindings it's much more natural do have some proper control flow and integration. There are some example voxelization scripts here https://github.com/opensourceBIM/voxelization_toolkit/blob/master/python/voxec/__init__.py#L227 Note that this is the old way of invoking voxec.exe with a textfile to execute. Within the project we can rewrite these I know that @Moult also has some sample scripts to estimate formwork (the molds in which concrete is poured at the construction site). The python bindings also allow for much more natural integration in terms of visualization. You could draw the voxels immediately to the Blender OpenGL context. Things are still under development and a bit fluid, but there is really an interesting foundation to build upon to create a new type of analysis interface in CAD applications for the built environment that you can prototype. |
Outline
There is software known as the Voxelisation Toolkit. It takes an input text file with commands in it and parses a 3D model. It converts the 3D model into voxels (e.g. 3D cubes that represent geometry), analyses those voxels, and outputs statistics (e.g. distance between voxels, etc).
Voxels are super cool and can be used to calculate head heights, resolve complex non-manifold geometry, egress distances, or concrete formwork areas and strutting distances, and air volume for mechanical calculations. All of this stuff is useful for engineers and construction professionals.
This is currently only available to computer programmers who know how to code this file and write code to parse the results. Yikes! This project is to add a UI in Blender to start making this general purpose analysis tool available to non-programmers.
Details
You will be expected to design an interface for the voxelisation toolkit, prepack some simple recipes, and write scripts that take the output (currently visualised as images or plots) and instead visualise the results in 3D by generating 3D coloured meshes that represent the output.
Expected Outcome
Future Possibilities
Bundle scripts for common usecases, like formwork calculation, air volume calculation, or external / internal metadata addition.
Project Properties
Skills
Difficulty
Medium
Size
Medium to Long
Additional Information
The text was updated successfully, but these errors were encountered: