tkeskita / unstructured_grids Goto Github PK
View Code? Open in Web Editor NEWUnstructured Grids (3D Volume Meshes) Add-on for Blender
License: GNU General Public License v3.0
Unstructured Grids (3D Volume Meshes) Add-on for Blender
License: GNU General Public License v3.0
Moved old development ideas here from readme:
Don't save Unstructured Grid object in blend file to save disk space
(mesh is anyways thrown away and regenerated from UG text
strings)
Add Gzip option to OpenFOAM PolyMesh export
Split Cells (Edge Division) (e.g. hexahedral cell is split to 8
cells, tetrahedral cell is split into 4 cells)
Dissolve Internal Faces (merge cells)
Merge Overlapping Boundary Faces (e.g. to merge two mesh regions)
Separate Internal Faces (convert internal face to two boundary faces)
Split Cells (Center Slicing) (polyhedron cell face vertices are
connected to cell center)
Show Cells (creates temporary object with faces around
selected cells)
Fix Intersecting Boundaries (move boundary vertices so
that boundary faces don't intersect each other)
Support for OpenFOAM sets?
Mesh Quality metrics + operator to select bad cells. Definition of
bad cells depend on target simulation type, so there would need to
be several metrics. This would be nice-to-have but not essential,
since it is possible to use checkMesh utility of OpenFOAM, or
e.g. Mesh Quality filter in Paraview or e.g.
BVTKNodes
to evaluate mesh quality.
Hi, I tried to import a vtu (asci) file generated in paraview. It is a simple rectangular mesh with stress field values (tension).
But I tried many different methods and what I get is this error:
Traceback (most recent call last):
File "C:\Users\tcd\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\unstructured_grids-master\io_vtu.py", line 67, in execute
n = vtu_to_ugdata(text)
File "C:\Users\tcd\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\unstructured_grids-master\io_vtu.py", line 132, in vtu_to_ugdata
points = get_data_array_block("Points", "float", text)
File "C:\Users\tcd\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\unstructured_grids-master\io_vtu.py", line 190, in get_data_array_block
return get_list_from_text(datablock, vartype)
File "C:\Users\tcd\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\unstructured_grids-master\io_vtu.py", line 203, in get_list_from_text
valuelist.append(eval(command))
File "", line 1
float(<InformationKey)
^
SyntaxError: invalid syntax
Attached is the small vtu file (zipped) for reference.
simpcube_voltest01.zip
Any help greatly appreciated!
hey, this is very interesting and I plan to give it a whirl.
Would definitely appreciate a youtube tutorial showing an example from start to finish and covering all the functionality. Could you do this?
I developed a fairly simple shell extrusion / boundary layer extrusion method to create thin flat cell layers. I'll use this issue for notes.
General description:
Algorithm:
Definition of extrusion length to achieve constant thickness
Done:
Future ideas:
Hello,
I've just installed your addon, which looks great (just like your other addons). I'm running Arch Linux with the Blender installation from the official repo. It looks like Inside Blender my local Python version 3.9.0 is running. When I press 'Extrude Cells' I get the error message
Error: Python: Traceback (most recent call last): File "/home/.../.config/blender/2.91/scripts/addons/unstructured_grids-master/ug_extrude.py", line 110, in execute t0 = time.clock() AttributeError: module 'time' has no attribute 'clock'
I believe time.clock()
is not supported in Python versions >=3.8. Would it be possible to update the script?
Thanks and all the best,
Michael
Importing a polyMesh with baffles (patches with overlapping boundary faces) fail. Buest guess for failure is overlapping faces with shared vertices, which Blender does not allow. The error seen in debug printouts is as follows, and the boundary faces show incorrect materials --> indexing is messed up.
Python: Traceback (most recent call last):
File "/home/x/.config/blender/2.93/scripts/addons/unstructured_grids/io_polymesh.py", line 80, in execute
read_polymesh_files(self)
File "/home/x/.config/blender/2.93/scripts/addons/unstructured_grids/io_polymesh.py", line 103, in read_polymesh_files
polymesh_to_ugdata(self)
File "/home/x/.config/blender/2.93/scripts/addons/unstructured_grids/io_polymesh.py", line 215, in polymesh_to_ugdata
apply_materials_to_boundaries(ob)
File "/home/x/.config/blender/2.93/scripts/addons/unstructured_grids/io_polymesh.py", line 591, in apply_materials_to_boundaries
ob.data.polygons[facecount].material_index = mati
IndexError: bpy_prop_collection[index]: index 12061 out of range, size 12061
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.