
modèle 3d de composants
import bpy import bmesh import math from mathutils import Vector, Euler # ============================================================================== # 1. LIMPIEZA DE LA ESCENA Y CONFIGURACIÓN DE UNIDADES (MILÍMETROS) # ============================================================================== bpy.ops.wm.read_factory_settings(use_empty=True) scene = bpy.context.scene scene.unit_settings.system = 'METRIC' scene.unit_settings.scale_length = 0.001 # 1 unidad Blender = 1 mm scene.unit_settings.length_unit = 'MILLIMETERS' # Creación de colecciones col_shell = bpy.data.collections.new("01_Coque_Externe_Gant") col_hardware = bpy.data.collections.new("02_Gabarits_Composants_PC") col_lights = bpy.data.collections.new("03_Eclairage_Vitres") scene.collection.children.link(col_shell) scene.collection.children.link(col_hardware) scene.collection.children.link(col_lights) # ============================================================================== # 2. CREACIÓN DE MATERIALES PBR # =
4K·PBR·Tripo H3.1