Closed general

Etch strips the model's original colours (and marks across the short axis / on the side of Y-up models)

John Lauer · 20d ago ·closed by Ray

Summary

/etch (service 0.1.0, https://laserchip-6dn1tl7vjz5u.adom.cloud) returns a STEP in which every original colour is gone: the whole part is repainted with the service's two-tone scheme (black epoxy body, light-grey laser_etch inlay). Found while marking the parts of a buck molecule for AI Flow. Four related findings:

  1. Colours stripped. A TPS54202DDCR (SOT-23-6) model with tinned leads, a black body and a pin-1 dot came back with black leads and no pin-1 colour. A Panasonic EEE-FK1V470P electrolytic with a silver can and a black polarity stripe came back all black.
  2. Mark orientation. On the SOT-23-6 (2.9 x 1.6 mm body) the MPN is laid across the short axis: at the default frac 0.55 it overhangs the top face, and at frac 0.35 it fits but only at 0.136 mm. Laid along the long axis, the same MPN fits at 0.222 mm. The service should pick the longest usable top-face direction (or take an angle/axis parameter).
  3. Y-up models. The Panasonic model is Y-up (as many vendor STEPs are); the mark was etched on a side face and floats off the can. The service should find the real top face (or take an up-axis parameter, like step2glb thumbnail's --up-axis).
  4. Light bodies and features. On a light body (the aluminium can) a light-grey inlay has no contrast, and the mark was centred across the polarity stripe. A mark colour parameter and awareness of existing top-face features would help.

Repro

curl -X POST "https://laserchip-6dn1tl7vjz5u.adom.cloud/etch?mpn=TPS54202DDCR" --data-binary @TPS54202DDCR.step -o etched.step
step2glb thumbnail etched.step -o etched.png --pose iso      # leads and pin-1 dot are now black

Workaround used (keeps the original colours)

  1. Rotate the original (colour-preserving, via an XCAF assembly wrapper, so the colour attributes stay on the original shapes) so the long axis lies where the service writes, and stand Y-up models upright.
  2. POST it to /etch.
  3. From the etched result keep only the thin inlay solids at the very top; add them to the UNTOUCHED original as one laser_etch part with its own colour, lifted 0.01 mm so it does not z-fight with the top face.
  4. Rotate back.

Result on the TPS54202: tinned leads, black body, pin-1 dot, and a crisp 0.22 mm MPN along the long axis. Doing this inside the service (etch the recess into the original and copy the original XCAF colours to the result) would make the workaround unnecessary. The scripts are small (OCP/XCAF) and I am happy to share them.

2 Replies

John Lauer · 20d ago

One more finding from the same run: the inlay is a full extruded solid per glyph (side walls and underside), which on a SOT-23-6 adds 1,760 triangles to a 920-triangle part. Keeping only each glyph's top planar face as a zero-thickness sheet, lifted 0.01 mm, looks identical in KiCad 10 and step2glb renders and adds 359 triangles. A flat=true option (flat top faces instead of a recess plus inlay solids) would keep the mark light for board and molecule GLBs.

Ray · 7d ago

Fixed in adom-chip-laser 0.2.0. /etch now hands the STEP to service-occt /laser-etch (1.7.0), the same etch the component pages use. Your repro now gives:

  1. Colours: the part comes back untouched (TPS54202DDCR keeps its tinned leads and pin-1 dot), and the mark is its own Adom.LaserEtch part.
  2. Orientation: the mark runs along the long axis, 0.32 mm on the SOT-23-6, reading from pin 1.
  3. Y-up models: a vendor Y-up model is stood up before the fit, and the mark goes back into its own frame. EEE-FK1V470P gets its mark on the can top; the X-Etch-Stood-Up header says +Y.
  4. Light bodies: color=auto contrasts with the face, so the can gets a dark mark. The polarity stripe isn't treated as a feature yet; the mark goes in the largest clear area of the top.

Your follow-up: the default style=flat is a zero-thickness sheet 5 µm off the face. The old CadQuery path is still there as engine=legacy. Checked live on all six cases (TPS54202DDCR, EEE-FK1V470P in both orientations, VL53L5CX/L7CX/L8CX); every source colour is kept. Closing. Reopen if your repro still misbehaves.

Log in to reply.