[Bf-committers] Adding support for tetrahedron and hexahedron elements

George Anderson george.anderson at stanford.edu
Thu Nov 7 23:02:38 CET 2013


I don't think you need to add any C-level source code for this. You should be able to do it with the Python interface, with "mesh.from_pydata (http://www.blender.org/documentation/blender_python_api_2_69_1/bpy.types.Mesh.html?highlight=from_pydata#bpy.types.Mesh.from_pydata)", passing in the vertex and edge lists. As I understand it, Bmesh handles most non-manifold cases. You could choose whether or not to pass in the face list as well, if you need them.


The Python interface should be sufficient for import/export/viewing.

However, if you want to be able to generate such meshes with the mouse (sounds like a nightmare for most reasonable meshes!), then you may have to dig deeper.

I'm very interested in this feature as well. Blender could potentially be an excellent way to examine slices through volumetric data, and even to edit or refine finite element meshes. It's been on my wish-list for a while now.  

George  

четверг, ноября 7, 2013 в 1:51 PM, Iman Brasseur написал:

> Hi everybody,
>  
> I'm looking into adding support for volumetric elements in Blender. The
> idea is to be able to create and export meshes for finite elements that
> contain tetrahedral and hexahedral elements. To create such meshes one
> could start for example with a single tetrahedron. Then when selecting a
> triangular face, instead of extruding the triangle as a wedge-shaped new
> surface, it would create a new tetrahedral element that shares 3 vertices
> with the original tetrahedron.
>  
> Going through the source code, I thought I should start with bmesh_class.h
> and add (next to the BMVert, BMEdge, BMFace) a new element type BMVol to
> add the new volumetric element there. Does that seem like the right way to
> start? Any quick hints to pieces of code I should look at would be greatly
> appreciated!
>  
> Thanks!
>  
> Iman
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org (mailto:Bf-committers at blender.org)
> http://lists.blender.org/mailman/listinfo/bf-committers
>  
>  




More information about the Bf-committers mailing list