Example A-2: Simple Filled 3D Part
In this example, a complete 3D part with a shape of 50×75×100 voxels is created with a base material of 1 and a voxel size of 0.02 units in all directions. The parameter log_debug is set to True for demonstration purposes.
The part is then exported to an Abaqus™ input file in 3D mode with C3D8R elements. The Non-Empty elements (which happens to be the whole model), are requested to be exported.
The code can be found in the examples folder of the main repository. It is also included below:
"""Script for Example A-2: Simple Filled 3D Part."""
from vcams.voxelpart import VoxelPart
# Create the part.
part = VoxelPart(size=(50, 75, 100), base_material=1, voxel_size=(0.02, 0.02, 0.02), name='Ex A-2 Simple 3D Part',
description='Example A-2: A simple 50*75*100 3D part filled with elements.', log_debug=True)
# Output the part.
part.output_abaqus_inp(file_name='ex_a2_simple_part_3d',
elem_code='C3D8R', dim='3D',
material_elem_sets='Non-Empty')