import bpy
import mathutils
# Set up materials
si_mat = bpy.data.materials.new(name="Silicon")
si_mat.diffuse_color = (0.2, 0.55, 0.95, 1)
oxide_mat = bpy.data.materials.new(name="Oxide")
oxide_mat.diffuse_color = (1, 1, 1, 1)
gate_mat = bpy.data.materials.new(name="Gate")
gate_mat.diffuse_color = (0.3, 0.3, 0.9, 1)
# Create silicon block
bpy.ops.mesh.primitive_cube_add(location=(0, 0, 0))
silicon = bpy.context.object
silicon.dimensions = (4, 4, 2)
silicon.active_material = si_mat
# Create oxide layer
bpy.ops.mesh.primitive_cube_add(location=(0, 0, 1))
oxide = bpy.context.object
oxide.dimensions = (4, 4, 0.1)
oxide.active_material = oxide_mat
# Create fins
fin1 = bpy.ops.mesh.primitive_cube_add(location=(-1, -1, 0.5))
fin1.dimensions = (0.1, 2, 1.5)
fin2 = bpy.ops.mesh.primitive_cube_add(location=(1, -1, 0.5))
fin2.dimensions = (0.1, 2, 1.5)
# Create gate
bpy.ops.mesh.primitive_cube_add(location=(0, 0, 2))
gate = bpy.context.object
gate.dimensions = (0.1, 4, 0.5)
gate.active_material = gate_mat
This creates a simple rectangular silicon block as the base, with an oxide layer on top. Two fin structures are created inside the silicon. And a gate layer is created on top of the oxide layer in the center. Each part is assigned a differently colored material to distinguish them.
Additional details like tapered fins, gate dielectric, contacts etc. can be added to create a more realistic FinFET model. The basic colors and materials are setup here.