"""Plate blank (rectangular plate), any width, length and thickness. A `width` (X) by `length` (Y) rectangle centred on the origin, `thickness` up from the XY plane (+Z). """ from steve import Model width = 100 # mm Width length = 100 # mm Length thickness = 3 # mm Thickness material = "aluminium-6061" # Material # material choice: (STEVE material library id, appearance colour) MATERIALS = { "aluminium-6061": ("aluminum-6061-t6", "#d4d7db"), "aluminium-5052": ("aluminum-5052-h32", "#d4d7db"), "steel": ("steel-s235jr", "#8a8d91"), # EN 10025-2 S235JR "steel-dc01": ("steel-dc01", "#9a9da1"), # EN 10130 DC01 cold-rolled sheet "stainless-304": ("stainless-304", "#c9ccd0"), # EN 10088 1.4301 "brass": ("brass", "#c9a54a"), "acrylic": ("pmma", "#e8f1f5"), } material_id, colour = MATERIALS[material] model = Model() with model.sketch("outline_sketch", on="XY", name="Outline") as sk: sk.center_rect("outline", (0, 0), width, length) model.extrude("plate", "outline_sketch", distance=thickness, name="Plate") model.material(material_id, color=colour) result = model.result()