📖 Official User Manual: 3DBricks & Stickers
Welcome to the definitive technical and operational guide for 3DBricks & Stickers. This specialized 3D web suite is engineered for two core missions: the creation, physical sizing, and 3D molding of LDraw stickers (flat and curved) for LEGO and TENTE pieces, and the mathematical correction and standardization of coordinate origins for community-made parts.
🖥️ INTERFACE OVERVIEW: Top Bar & Floating Windows
The workspace is divided into an interactive 3D canvas, a Top Bar for panel management, and a Bottom Bar for viewport and camera controls.
- Top Toolbar: Gives you quick access to toggle the 4 main modules (
⚙️ Manager / Pieces, 🏷️ Stickers, 📐 Origin Correction, 💾 Download) and the two integrated visual databases (📚 LEGO Catalog and 📚 TENTE Catalog).
- Window Manipulation: All floating panels and catalog modals can be freely dragged across the screen by clicking and holding any empty space on their background or header. Clicking any panel automatically brings it to the front.
- Resizing Panels: Every panel features a native resize handle in its bottom-right corner (20x20px zone). Drag it to expand or shrink the window to fit your screen.
- Accordion Sections: Inside the panels, sections marked with
▼ or ▶ can be clicked to collapse or expand their contents, keeping your workspace clean.
- Interactive Tooltips: Hovering your mouse over buttons and titles displays floating information balloons with quick tips.
🕹️ KEY CONCEPT: The Scene Manager & Interactive Viewer
Before you start working, it is vital to understand the Scene Manager (located inside the ⚙️ Manager / Pieces panel). It is the central brain from where you control every object in the 3D scene.
1. Loading Pieces (3 Methods)
- ⚙️ Block System Selector: Before loading from the web, select whether you are working with
🧱 LEGO or 🧱 TENTE. This directs the internal search engine to the correct LDraw server directories and texture folders (including automatic recursive downloading of sub-parts in /s/ and primitives in /p/ or /p/48/).
- ☁️ From Web Repository: Type the piece ID (e.g.,
3660 or 3660.dat) and press Enter or click Load. The system uses a smart queue manager to download all sub-parts without saturating your browser, and supports native !TEXMAP planar textures.
- 📚 Visual Catalogs (LEGO & TENTE): Click the catalog buttons in the top bar to open an interactive visual browser. When you select a piece inside the catalog, it automatically switches the Block System selector, closes the modal, and injects the piece directly into the 3D viewer.
- 💻 From your PC: Load any custom
.dat file directly from your local hard drive.
2. Scene Management & Security Rules
- Combine new files: CRITICAL If you are going to add a sticker to a piece or assemble multiple parts, always check this box! If left unchecked, loading a new piece will automatically wipe all unlocked models from the screen.
- Active Piece Selection: The list shows all loaded models. To move, rotate, align, or curve a model, you must select it first either by clicking its name in this list or by clicking directly on the 3D piece in the viewer (Raycasting). All sliders and Gizmo actions only affect the currently highlighted piece.
- Locking Pieces (🔒 Lock): Selecting a piece and clicking Lock freezes it. Its name turns gray with a 🔒 icon. While locked:
- It ignores 3D clicks in the viewport (preventing accidental selection while working on tiny stickers).
- The 3D Gizmo automatically detaches from it.
- It cannot be deleted with
🗑️ Delete or 💥 Clear (Clear will wipe the scene except locked pieces).
- Safety Barriers: While any piece in the scene is locked, Undo / Redo and Sticker Curving functions are blocked and will alert you why, preventing timeline or geometry corruption. Unlock the piece first if you need to use them.
- Status Console: Located at the bottom of the left panel, it logs real-time timestamps of your actions (e.g., sticker generation, shadow creation).
🎨 SECTION 1: Creation and Application of Stickers to LDraw (Ready for Printing)
Opened via the 🏷️ Stickers button. This module converts standard images (PNG, JPG, WEBP) into pure LDraw polygons (type 3 and 4 lines with 0x2RRGGBB direct hex colors). To allow smooth bending later, the engine generates a Flexible Articulated Mesh, automatically cutting polygons every 3 pixels maximum to create micro-joints.
1.1 Generate a Flat Sticker & Physical Sizing
- Upload the base piece as a reference: Load the LEGO/TENTE piece where the sticker will go, check "Combine new files", and optionally lock it (🔒) so you don't move it by mistake.
- Configure the Target Hologram: In the left panel, open "Target Hologram". Enter the physical size of your base piece:
Studs X / Studs Z: 1 stud = 20 LDU (8 mm).
Height (Plates): 1 plate = 8 LDU (3.2 mm). Standard brick height = 3 plates (24 LDU).
This draws a reference cage in the viewer (green in dark theme, red in light theme).
- Upload the Image: In the Stickers panel, select your image file. Pixels with high transparency (alpha ≤ 50) are automatically discarded, creating die-cut stickers natively.
- Adjust Size with the Flat Preview Shadow: Check 👁️ Show Flat Preview Shadow. A yellow wireframe box with a center crosshair (
_Sombra_Plana.dat) will appear in the scene.
- Modify
Scale (LDraw Units) (e.g., 0.3) and watch the wireframe grow or shrink in real time.
- Smart Inheritance Trick: You can move and rotate this yellow wireframe using the 3D Gizmo to place it directly on your piece's face! When you generate the sticker in Step 6, the final sticker will automatically inherit the exact position and rotation of this preview shadow, and the shadow will auto-delete.
- Check Real Physical Dimensions (mm): Look at the 📏 Physical Dimensions (Flat) box. The program calculates the exact real-world size in millimeters using the official LDraw standard (
1 LDU = 0.4 mm). Note: If a model has 3D depth (like a brick or an already curved sticker), this box will display -- mm x -- mm.
- Resolution and Studio 2.0 Color Fix:
Max resolution (px): Controls mesh density (default 128px). Exceeding 128px triggers a heavy-mesh warning. Use 128–256px for 3D use in Studio/LDCad, or higher values if you only intend to export a 300 DPI PNG for physical printing. Note: Studio 2.0 struggles with LDU scales below 0.2.
🔆 Color correction (Studio Render Only): Applies a Gamma 2.2 curve to RGB values so Studio's photorealistic render engine doesn't wash out or fade your sticker colors.
- Generation: Click 🎨 Generate Flat Sticker. You will be prompted to name the sticker. The program will format the header and inject the articulated 3D sticker into the scene.
1.2 Wrap Stickers on Curved Surfaces (Automatic Raycasting)
For complex organic pieces, slopes, cylinders, or domes, this tool shoots mathematical rays from every vertex of your flat sticker onto the underlying 3D piece, adapting to its exact topology.
- Prepare Scene: Have both your base piece and your flat sticker loaded in the scene. (Note: You can only curve flat stickers; trying to curve a 3D piece or a locked sticker will be blocked by the security scanner).
- Position Facing the Curve: Select the flat sticker in the Scene Manager. Activate the Gizmo (
🏗️ Move / 🔄 Rotate) and place the sticker floating in front of the curved surface of the base piece, parallel to the area you want to stamp.
- Magic Projection: With the flat sticker selected, press 🕸️ Automatic Surface Wrap (or Wrap to Curved Surface). The engine automatically detects the shooting direction, projects every vertex onto the base mesh with a
0.2 LDU normal offset (to prevent flickering/Z-fighting), converts quads into triangles for smooth contouring, and replaces the flat sticker with a new _envuelta.dat model.
1.3 Manual Curved Wrap (Precision Geometric Molding)
When you want a mathematically perfect curve without relying on a base piece's polygon topology (or when curving around empty air), use the Manual Molding engine.
- Choose Base Shape & Parameters: Open "Manual Curved Wrap" and select one of the 4 parametric molds (each shape remembers its own independent settings):
- Half Cylinder: Adjust
Radius, cylinder Width, and Arc in degrees (e.g., 90° = quarter cylinder, 180° = half cylinder).
- Hemisphere / Quarter Sphere: Adjust
Radius, Oval Shape (100 = perfectly round, other values stretch the Z-axis), and Vertical Cut angle.
- 'U' Shape: Creates a curved front with two straight parallel side wings. Adjust
Curve Radius, Width, and Straight Length.
- Generate & Place the Mold: Click 🧲 Create/Adjust Shadow. A semi-transparent orange 3D mold (
_Sombra_Manual) appears at the origin. Move this orange shadow to the exact position where your curve should sit.
- Orient Your Flat Sticker: Select your flat sticker in the Scene Manager list. If you want the sticker to be tilted or rotated on the curve, rotate the flat sticker now using the Gizmo.
- Curve Sticker: With the flat sticker selected, click 🕸️ Curve a sticker. The program wraps the sticker's vertices around the mathematical formula of the mold, places it at the exact position of the orange shadow, inherits the exact rotation angles you gave to your flat sticker, and automatically deletes the orange mold and the old flat version, creating a new
_curva.dat file.
📐 SECTION 2: Piece Origin Correction & Dictionary Generator (TENTE Ecosystem)
Why is it vital to correct the origin?
Community-designed TENTE and custom LDraw pieces often lack a unified coordinate origin (0,0,0). Some authors model from the geometric center, others from a bottom corner or the top stud. When importing these pieces into external 3D web builders or video games, rotations cause the pieces to orbit wildly out of place. This module aligns the piece to a standard bounding box and calculates a JSON compensation dictionary for all 64 standard 90-degree Euler combinations (covering the 24 real 3D orientations).
Workflow for Standardization and Dictionary Extraction
- Load Piece & Set Reference Cage: Load the
.dat piece. In "Target Hologram", set the studs (X, Z) and height (Plates) that match the real piece. The cage sits from Y = 0 downwards (in LDraw, negative Y is up, positive Y is down; the viewer flips Y and Z visually so you work comfortably right-side up).
- Automatic or Fine Alignment: Open the
📐 Origin Correction panel.
- Click 🎯 Auto Center: The engine resets any Gizmo edits, calculates the 3D bounding box of the mesh, snaps X and Z to the nearest 10 LDU stud grid, and aligns the bottom of the piece with the bottom of your Target Hologram.
- Fine Offset Sliders (X, Y, Z): Use the sliders or number boxes (in 0.5 LDU steps) to manually tweak the position until the piece fits inside the hologram cage like a glove.
- Calculate All Rotations: Once aligned in the base position (
0_0_0), click ✨ Auto-fill Rotations. The mathematical engine takes your base offset vector and applies Euler transformations across all 90° steps (0°, 90°, 180°, 270° on X, Y, and Z), populating the entire offset map in memory.
- Extract Dictionary Code: Copy the generated JSON snippet from the Generated Dictionary Code box at the bottom of the panel (e.g.,
"piece.dat": { "0_0_0": { ox: 0, oy: -24, oz: 0 }, ... }) and paste it directly into your external game or web builder's database.
💾 SECTION 3: Viewport Controls, Gizmo & Export Options
Bottom Toolbar & Advanced 3D Gizmo
- 🌐 Language Selector (EN / ES): Translates the entire interface and tooltips in real time.
- 🎥 Camera Views: Quickly snap the camera to orthographic-like angles (
Top, Bottom, Front, Back, Left, Right) aimed at the 0,0,0 origin.
- 3D Gizmo & Precision Numeric Popup (🏗️ Move / 🔄 Rotate / ❌ Gizmo Off):
- Double Pivot Architecture: Moving operates in World Space (`sceneGroup`), while Rotating operates in Local Space (`rotGroup`) using quaternion extraction to completely prevent Gimbal Lock.
- Floating Precision Input: As soon as you click and drag a single axis (X, Y, or Z) on the Gizmo, a floating numeric input box appears right next to your piece showing the exact value in
LDU (when moving) or ° Degrees (when rotating). You can type an exact number into this popup and press Enter for millimeter precision!
- 🌓 Theme & 👁️ Hide Grid: Switches between Dark Mode (
#2c3e50 background with green hologram) and Light Mode (#a6acaf background with red hologram for high contrast). Hide Grid toggles the floor grid, axis helper, and target hologram simultaneously so you can inspect or screenshot your model cleanly.
- ↩️ Undo / ↪️ Redo: Stores up to 30 historical states. Every slider touch, number focus, or Gizmo drag is automatically recorded before the change happens. (Blocked if any piece is locked 🔒).
- 📸 Capture PNG & 🔲 Fullscreen: Capture PNG takes an instant screenshot of the current 3D view. Fullscreen expands the app to fill your monitor.
Download & Export Panel (💾 Download)
- 💾 Download Scene (.dat): Exports all visible models in the scene into a single LDraw
.dat file, baking your current positions and rotations into the geometry while preserving sub-part calls (type 1 lines) to keep the file lightweight. If there are 2 or more models in the scene, it prompts you for a custom piece name and generates an official combined header.
- 📦 Fix and download standalone piece: The ultimate compatibility tool. It recursively opens every sub-part (type 1 lines) from the internal cache, multiplies their transformation matrices, resolves inherited colors (color 16), and flattens the entire hierarchy into pure polygons (types 2, 3, 4, 5). The resulting
_independiente.dat file has zero external dependencies and can be opened anywhere without missing sub-parts. (If your scene has no external sub-parts, the program will let you know so you can use the normal download).
- 🖼️ Export Flat to PNG (Real Size at 300 DPI): Exclusively for flat stickers. Renders the 2D vector polygons onto an HTML5 canvas with a transparent background at exact physical scale (
0.4 mm per LDU) and injects a binary pHYs chunk into the PNG header forcing 300 DPI (11,811 pixels per meter). When you print this PNG at "100% / Actual Size" on paper or vinyl, it will match the physical LEGO/TENTE brick down to the tenth of a millimeter.
📖 Manual de Uso Oficial: 3DBricks & Stickers
Bienvenido a la guía técnica y operativa definitiva de 3DBricks & Stickers. Esta suite web 3D especializada ha sido diseñada con dos misiones principales: la creación, dimensionado físico real y moldeado 3D de pegatinas LDraw (planas y curvas) para piezas de LEGO y TENTE, y la corrección matemática y estandarización de orígenes de coordenadas para piezas creadas por la comunidad.
🖥️ VISIÓN GENERAL DE LA INTERFAZ: Barra Superior y Ventanas Flotantes
El espacio de trabajo se divide en un lienzo 3D interactivo, una Barra Superior para gestionar los módulos y una Barra Inferior para el control de la cámara y el entorno.
- Barra de Herramientas Superior: Permite abrir o cerrar los 4 paneles principales (
⚙️ Gestor / Piezas, 🏷️ Pegatinas, 📐 Corregir Origen, 💾 Descargar) y los dos visores de bases de datos integrados (📚 Catálogo LEGO y 📚 Catálogo TENTE).
- Movimiento de Ventanas: Todos los paneles flotantes y las ventanas de catálogos se pueden arrastrar libremente por la pantalla haciendo clic y manteniendo pulsado en cualquier zona libre de su fondo o cabecera. Al tocar un panel, este pasa automáticamente al frente.
- Redimensionar Paneles (Deformación): Todos los paneles cuentan con un tirador en su esquina inferior derecha (zona de 20x20 píxeles). Arrástralo para ensanchar o alargar la ventana a tu gusto.
- Secciones Desplegables (Acordeones): Dentro de cada panel, puedes hacer clic sobre los títulos marcados con
▼ o ▶ para plegar o desplegar su contenido y mantener despejada la pantalla.
- Globos de Información (Tooltips): Al dejar el cursor sobre los botones y controles principales, aparecerá una etiqueta flotante explicando su función o advertencias clave.
🕹️ CONCEPTO CLAVE: El Gestor de Escena y Visor Interactivo
Antes de empezar a trabajar, es vital dominar el Gestor de Escena (situado dentro del panel ⚙️ Gestor / Piezas). Es el cerebro central desde donde administras todos los objetos presentes en el visor 3D.
1. Carga de Piezas (3 Métodos Disponibles)
- ⚙️ Selector de Sistema de Bloques: Antes de buscar en la web, elige si trabajas con
🧱 LEGO o 🧱 TENTE. Esto dirige el motor de búsqueda hacia las carpetas del servidor correspondientes (descargando automáticamente de forma recursiva todas las sub-piezas en /s/ y primitivas en /p/ o /p/48/, además de las carpetas de texturas).
- ☁️ Desde la Web: Escribe el código de la pieza (ej.
3660 o 3660.dat) y pulsa Enter o el botón Cargar. El programa utiliza una cola de descargas inteligente para bajar todas las sub-piezas complejas sin saturar el navegador (especialmente en iOS/Safari) y soporta texturas proyectadas mediante el estándar !TEXMAP.
- 📚 Catálogos Visuales (LEGO y TENTE): Pulsa los botones de catálogo en la barra superior para abrir el buscador visual interactivo. Al elegir una pieza dentro del catálogo, el programa cambia automáticamente el selector de sistema (LEGO/TENTE), cierra la ventana y carga la pieza directamente en el visor 3D.
- 💻 Desde tu PC: Sube cualquier archivo
.dat directamente desde tu disco duro local.
2. Administración de la Escena y Reglas de Seguridad
- Combinar nuevos archivos: MUY IMPORTANTE Si vas a añadir una pegatina a una pieza o juntar varios modelos, ¡marca siempre esta casilla! Si está desmarcada, al cargar un archivo nuevo se borrarán automáticamente todas las piezas no bloqueadas que hubiera en pantalla.
- Selección de Pieza Activa: La lista muestra todos los modelos cargados en memoria. Para mover, rotar, centrar o curvar un elemento, primero debes seleccionarlo haciendo clic sobre su nombre en la lista o haciendo clic directamente sobre la pieza 3D en el visor. Todos los deslizadores y el Gizmo actuarán únicamente sobre la pieza activa.
- Bloqueo de Piezas (🔒 Bloquear): Seleccionar una pieza y pulsar Bloquear la protege por completo. Su nombre pasará a color gris con un candado 🔒. Mientras esté bloqueada:
- El visor 3D ignorará los clics sobre ella (ideal para no seleccionar por error una pieza base grande mientras intentas tocar una pegatina diminuta).
- El Gizmo 3D se soltará automáticamente de la pieza.
- No podrá ser eliminada con
🗑️ Borrar ni con 💥 Limpiar (el botón Limpiar vaciará toda la escena respetando intactas las piezas bloqueadas).
- Barreras de Seguridad: Mientras exista cualquier pieza bloqueada en la escena, las funciones de Deshacer / Rehacer y las de Curvar Pegatinas quedarán desactivadas y te mostrarán un aviso explicando el motivo, evitando duplicidades o corrupciones en el historial. Desbloquea primero si necesitas usarlas.
- Consola de Estado: Situada en la parte inferior del panel izquierdo, registra con hora exacta cada acción importante realizada en la sesión.
🎨 SECCIÓN 1: Creación y Aplicación de Pegatinas a LDraw (Listas para Imprimir)
Accesible desde el botón 🏷️ Pegatinas. Este módulo transforma imágenes estándar (PNG, JPG, WEBP) en polígonos puros LDraw (líneas tipo 3 y 4 con colores hexadecimales directos 0x2RRGGBB). El secreto de su calidad reside en que genera una Malla Flexible Articulada: el algoritmo corta los polígonos cada 3 píxeles como máximo para crear micro-articulaciones que permiten doblar la pegatina suavemente sin que se rompa el dibujo.
1.1 Generar una Pegatina Plana y Dimensionado Físico Real
- Subir la pieza base como referencia: Carga la pieza de LEGO o TENTE donde irá colocada la pegatina, activa la casilla "Combinar nuevos archivos" y, opcionalmente, bloquéala (🔒) para no moverla por accidente.
- Configurar el Holograma Objetivo: En el panel izquierdo, despliega "Holograma Objetivo". Introduce las dimensiones en bloques de tu pieza base:
Tetones X / Tetones Z: 1 tetón equivale a 20 LDU (8 mm reales).
Alto (Placas): 1 placa equivale a 8 LDU (3,2 mm). Un ladrillo estándar mide 3 placas de alto (24 LDU).
Esto dibujará una jaula de referencia en el origen (verde en tema oscuro, roja en tema claro).
- Subir la Imagen: En el panel de Pegatinas, selecciona tu imagen. Los píxeles transparentes (alfa ≤ 50) se ignoran automáticamente, permitiendo crear pegatinas troqueladas sin fondo.
- Ajustar Tamaño con la Sombra Previa Plana: Activa la casilla 👁️ Mostrar Sombra Previa Plana. Aparecerá en escena un recuadro amarillo con una cruceta central llamado
_Sombra_Plana.dat.
- Modifica el valor
Escala (Uds. LDraw) (por defecto 0.3) y observa cómo el recuadro amarillo cambia de tamaño en tiempo real sobre tu pieza.
- Truco de Herencia Inteligente: ¡Puedes mover y rotar esta sombra amarilla usando el Gizmo 3D para dejarla ya colocada sobre la cara de tu pieza! Cuando pulses el botón de generar en el paso final, la pegatina definitiva heredará automáticamente la posición y rotación exactas de esta sombra previa, y la sombra amarilla se autoborrará sola.
- Comprobar las Dimensiones Físicas (mm): Fíjate en el recuadro 📏 Dimensiones Físicas (Planas). El programa calcula al instante cuánto medirá la pegatina en la vida real en milímetros aplicando la equivalencia oficial LDraw (
1 LDU = 0,4 mm). Nota: Si seleccionas una pieza 3D o una pegatina ya curvada, el visor mostrará -- mm x -- mm en gris porque ya tiene volumen tridimensional.
- Resolución y Corrección de Color para Studio 2.0:
Resolución máx (px): Define el detalle de la malla (por defecto 128px). Superar los 128px mostrará una advertencia de malla pesada. Usa 128 o 256px para trabajar en 3D fluido dentro de Studio/LDCad, o súbelo hasta 1024px si tu objetivo es únicamente exportar el PNG a 300 DPI para imprimir en papel/vinilo. Recuerda: Studio 2.0 no admite escalas LDU inferiores a 0.2.
🔆 Corrección de color (Solo Render Studio): Aplica una curva matemática Gamma 2.2 a los colores para evitar que la iluminación del motor de renderizado de Studio 2.0 destiña o aclare en exceso la pegatina.
- Generación: Pulsa 🎨 Generar Pegatina Plana. El programa te pedirá un nombre, generará la cabecera oficial LDraw e inyectará la pegatina articulada en la escena.
1.2 Envolver Pegatinas en Superficies Curvas (Raycasting Automático)
Ideal para adaptar pegatinas sobre piezas complejas, cabinas, pendientes, cilindros o cúpulas. El motor dispara rayos matemáticos desde cada vértice de la pegatina hacia la pieza base para calcar su relieve exacto.
- Preparar la Escena: Ten cargada tu pieza base y tu pegatina plana. (Nota de seguridad: El escáner interno comprobará que el objeto sea plano en el eje Z y que no esté bloqueado; nunca permitirá deformar por error una pieza 3D ni una pegatina ya curvada).
- Posicionar frente a la curva: Selecciona la pegatina plana en el Gestor de Escena. Activa el Gizmo (
🏗️ Mover / 🔄 Rotar) y coloca la pegatina flotando frente a la cara curva de la pieza base, paralela a la zona donde quieres estamparla.
- Proyección Automática: Con la pegatina plana seleccionada, pulsa 🕸️ Envolver Superficie Automático. El software detectará automáticamente hacia qué lado está la pieza, proyectará cada vértice sobre la superficie dejando un margen de
0.2 LDU sobre la normal (para evitar parpadeos o Z-fighting), dividirá los quads en triángulos para un ajuste orgánico perfecto y sustituirá la pegatina plana por el nuevo modelo _envuelta.dat.
1.3 Moldeado Curvo Manual (Precisión Geométrica con Sombra)
Cuando necesites una curvatura matemática perfecta sin depender de los polígonos de una pieza base (o para crear formas cilindricas/esféricas puras), utiliza el motor de Moldeado Curvo Manual.
- Elegir Forma Base y Parámetros: Despliega "Moldeado Curvo Manual" y elige uno de los 4 moldes paramétricos (el programa memoriza tus ajustes por separado para cada forma):
- Medio Cilindro: Ajusta el
Radio, la Anchura del cilindro y el ángulo de Arco en grados (ej. 90° = cuarto de cilindro, 180° = medio cilindro).
- Semiesfera / Cuarto de Esfera: Ajusta el
Radio, la Forma Ovalada (100 = esfera perfecta; otros valores estiran o achatarán la cúpula) y el ángulo de Corte Vertical.
- Forma de "U": Crea un frente curvo de 180° prolongado por dos paredes laterales rectas paralelas. Ajusta el
Radio Curva, la Anchura y la Longitud Recta de las patillas.
- Crear y Colocar el Molde: Pulsa 🧲 Crear/Ajustar Sombra. Aparecerá en el suelo un molde 3D naranja semitransparente llamado
_Sombra_Manual. Usa el Gizmo para mover esta sombra naranja hasta hacerla coincidir con la zona curva de tu pieza.
- Orientar la Pegatina Plana: Haz clic sobre tu pegatina plana en la lista del Gestor de Escena. Si necesitas que el dibujo quede girado o inclinado sobre el molde, róta la pegatina plana ahora mismo con el Gizmo.
- Curvar Pegatina: Con la pegatina plana seleccionada, pulsa 🕸️ Curvar Pegatina. La malla flexible abrazará matemáticamente el volumen del molde, se colocará en la posición exacta de la sombra naranja, heredará al milímetro los grados de rotación que le diste a tu pegatina plana, y eliminará automáticamente tanto el molde naranja como la pegatina plana antigua, generando la nueva pieza
_curva.dat.
📐 SECCIÓN 2: Corrección de Origen de Piezas y Diccionario (Ecosistema TENTE)
¿Por qué es vital corregir el origen?
Las piezas de TENTE y modelos personalizados diseñados por la comunidad no siempre comparten el mismo origen de coordenadas (0,0,0). Algunos autores modelan desde el centro geométrico, otros desde una esquina inferior o desde el tetón superior. Al importar estas piezas en constructores web 3D externos o videojuegos, las piezas salen desplazadas o describen órbitas erráticas al girarlas. Este módulo permite alinear la pieza en tiempo real y generar un diccionario JSON con las compensaciones exactas (Offsets) para las 64 combinaciones estándar de giros de 90° (que cubren las 24 orientaciones reales posibles en 3D).
Flujo de Trabajo para Estandarización y Extracción de Código
- Cargar Pieza y Ajustar Jaula: Carga el archivo
.dat. En "Holograma Objetivo", introduce los Tetones X, Z y el Alto en Placas reales de esa pieza. Verás la jaula proyectada desde el plano Y = 0 hacia abajo (recuerda que en el estándar LDraw el eje Y negativo apunta hacia arriba; el visor invierte internamente Y y Z para que trabajes cómodamente al derecho).
- Centrado Automático y Ajuste Fino: Abre el panel
📐 Corregir Origen.
- Pulsa 🎯 Centrar Automáticamente: El programa anulará cualquier giro previo del Gizmo, calculará la caja delimitadora (Bounding Box) de la pieza, ajustará X y Z a múltiplos de 10 LDU (rejilla de tetones) y enrasará la base de la pieza con el suelo de tu Holograma Objetivo.
- Deslizadores de Offset (X, Y, Z): Usa las barras o escribe en las casillas numéricas (en pasos de 0,5 LDU) para afinar la posición hasta que la pieza encaje como un guante dentro del holograma.
- Autocompletar todos los Giros: Con la pieza perfectamente centrada en su posición base (
0_0_0), pulsa ✨ Autocompletar Giros. El motor matemático tomará tu vector de corrección base y calculará mediante rotaciones de Euler las compensaciones exactas para todos los ángulos de 0°, 90°, 180° y 270° en los tres ejes.
- Extraer el Código: Copia el fragmento JSON del recuadro inferior Código Generado para Diccionario (ej.
"pieza.dat": { "0_0_0": { ox: 0, oy: -24, oz: 0 }, ... }) y pégalo directamente en el diccionario de tu aplicación o visor web externo.
💾 SECCIÓN 3: Controles del Visor, Gizmo de Precisión y Opciones de Descarga
Barra Inferior y Funcionamiento del Gizmo 3D
- 🌐 Selector de Idioma (EN / ES): Traduce al instante todos los paneles, botones y globos de ayuda de la aplicación.
- 🎥 Selector de Vistas de Cámara: Coloca rápidamente la cámara en vistas ortogonales puras (
Arriba, Abajo, Frente, Atrás, Izquierda, Derecha) apuntando al centro 0,0,0.
- Gizmo 3D y Cuadro Numérico Flotante (🏗️ Mover / 🔄 Rotar / ❌ Gizmo Off):
- Arquitectura de Doble Pivote: El modo Mover actúa sobre los ejes fijos del mundo (`sceneGroup`), mientras que el modo Rotar actúa sobre los ejes locales de la pieza (`rotGroup`) leyendo los cuaterniones puros para evitar bloqueos de cardán (Gimbal Lock).
- Ventanita de Precisión Numérica: En cuanto pinchas y arrastras sobre una flecha o arco concreto del Gizmo (X, Y o Z), aparece automáticamente junto a la pieza un cuadro numérico flotante que muestra el desplazamiento exacto en
LDU o el giro en ° Grados. ¡Puedes escribir a mano el número exacto en esa ventanita y pulsar Enter para lograr una precisión milimétrica!
- 🌓 Tema y 👁️ Ocultar Malla: El botón Tema alterna entre el Modo Oscuro (fondo azul noche con holograma verde) y el Modo Claro (fondo gris claro
#a6acaf con holograma rojo de alto contraste). Ocultar Malla apaga o enciende a la vez la rejilla del suelo, los ejes de colores y la jaula del holograma para dejar el modelo totalmente limpio.
- ↩️ Deshacer / ↪️ Rehacer: Memoria inteligente de hasta 30 estados. Guarda automáticamente una instantánea antes de que muevas el Gizmo, arrastres un deslizador o cambies un número. (Por seguridad, si tienes alguna pieza bloqueada con candado 🔒, te avisará de que debes desbloquearla antes de deshacer/rehacer).
- 📸 Capturar PNG y 🔲 Pantalla Completa: Capturar PNG descarga al instante una foto de lo que estás viendo en el visor 3D. Pantalla Completa expande la interfaz a todo el monitor.
Panel de Exportación y Descarga (💾 Descargar)
- 💾 Descargar Escena (.dat): Exporta todos los modelos presentes en el visor en un único archivo
.dat aplicando sus nuevas posiciones y rotaciones, pero conservando las llamadas a sub-piezas externas (líneas tipo 1) para que el archivo ocupe muy poco espacio. Si hay 2 o más piezas en pantalla, te pedirá un nombre para el conjunto y generará una cabecera LDraw combinada.
- 📦 Corrige y descarga pieza sin datos externos (Standalone): La herramienta definitiva de portabilidad. Busca recursivamente todas las sub-piezas y primitivas (líneas tipo 1) almacenadas en la memoria caché, multiplica sus matrices de transformación, resuelve los colores heredados (color 16) y aplana toda la geometría convirtiéndola en polígonos puros (líneas tipo 2, 3, 4 y 5). El archivo
_independiente.dat resultante no depende de ninguna librería externa y se verá perfecto en cualquier programa. (Si la pieza ya es simple y no contiene sub-piezas externas, el programa te avisará para que uses la descarga normal).
- 🖼️ Exportar Plana a PNG (Tamaño Real a 300 DPI): Diseñado exclusivamente para imprimir pegatinas planas. Dibuja los polígonos vectoriales 2D sin fondo y a escala física exacta (
0,4 mm por cada LDU), e inyecta en el código binario del archivo PNG un bloque de metadatos pHYs que fuerza una densidad de 300 PPP / DPI (11.811 píxeles por metro). Al mandar este PNG a tu impresora al "100% de escala / Tamaño real", la pegatina impresa medirá exactamente los milímetros indicados en el visor y encajará a la perfección sobre tu pieza física de TENTE o LEGO.