Difference between revisions of "Using Octree Refinement and Mesh Smoothing"

From TexGen
Jump to navigationJump to search
Line 8: Line 8:
  
 
==Python Functions for Octree Refinement and Smoothing==
 
==Python Functions for Octree Refinement and Smoothing==
The octree refinement and smoothing can be called via the Python console in TexGen (or from a script). Once a textile is created then the following sequence of commands should be used.
+
The octree refinement and smoothing can be called via the Python console in TexGen (or from a script). Once a textile is created then the following sequence of commands should be used:
 +
 
 +
t=GetTextile()
 +
oc=COctreeVoxelMesh()
 +
# Generate an octree mesh (see details about the arguments below)
 +
oc.SaveVoxelMesh(t, "my_octree_mesh", 3, 5, False, 50, 0.3, 0.3, False, False)
 +
# Delete the object to free memory
 +
del oc
 +
 
 +
The function SaveVoxelMesh in COctreeVoxelMesh class takes 10 arguments:

Revision as of 16:42, 12 March 2020

Voxel meshing presents an easy way of meshing textile composites of arbitrary complexity. However, the voxel discretisation of curved surfaces creates artificial stress concentrations which can affect results of finite element analysis. In addition, since a voxel mesh has a uniform size of elements, it might require a large number of elements to achieve a good resolution to capture yarns etc.

Octree mesh refinement allows the creation of meshes with voxels of variable size. This is achieved by selective refinement of voxels which are close to yarns surfaces. These voxels are split into 8 smaller voxels which can be also be split in smaller voxels until a desired element size is achieved. This allows creation of an octree-refined voxel mesh which can give more precise results than a regular voxel mesh with the same number of elements.

In addition to the octree refinement, a smoothing algorithm can be applied to the generated octree-refined mesh. The smoothing algorithm moves the nodes on the yarns surface in order to generate a smoother surface which would not create stress concentrations. Details of the algorithm and description of its parameters can be found here

Details of the method will be published soon.

Python Functions for Octree Refinement and Smoothing

The octree refinement and smoothing can be called via the Python console in TexGen (or from a script). Once a textile is created then the following sequence of commands should be used:

t=GetTextile() oc=COctreeVoxelMesh()

  1. Generate an octree mesh (see details about the arguments below)

oc.SaveVoxelMesh(t, "my_octree_mesh", 3, 5, False, 50, 0.3, 0.3, False, False)

  1. Delete the object to free memory

del oc

The function SaveVoxelMesh in COctreeVoxelMesh class takes 10 arguments: