# Optional: Add thickness? Actually this is a thin shell, but the prompt "solid piece" suggests a volumetric form. # Let's add thickness by extruding the entire shape downward, but that duplicates geometry. Instead, we create a true solid by adding a bottom layer. # Better: create a thicker base by extruding bottom ring down.
import bpy import bmesh import math from mathutils import Vector optima interior
# Smooth shading for face in mesh.polygons: face.use_smooth = True # Optional: Add thickness
# Create a new mesh datablock and object mesh = bpy.data.meshes.new("OptimaInterior") obj = bpy.data.objects.new("OptimaInterior", mesh) bpy.context.collection.objects.link(obj) bpy.context.view_layer.objects.active = obj obj.select_set(True) Instead, we create a true solid by adding a bottom layer
# Now the mesh is closed (bottom cap, outer walls, top ring, inner cap) # But to make it "solid piece" we need all faces pointing outward. BMesh handles normals but we can recalc.
# Parameters radius = 1.0 height = 0.3 segments = 64 # High resolution for smooth curvature
# Create a central top cap (to make solid, but we want open interior? # Actually to be "solid" we need closed mesh. Let's add a top cap with hole? No, solid piece. # We'll create a central upper surface with a pattern.