Skip to content

layerling 1.104.0

Choose a tag to compare

@henmedia henmedia released this 23 Oct 14:33
· 453 commits to main since this release
  • Opening a project no longer starts hundreds of compression workers (#786): Opening a .lyl file saves the project once before the editor appears, at compression level 1, and the zip library started one worker for every entry of at least 160,000 bytes, so a project with many mesh assets could launch hundreds at once. A streaming zip writer now runs at most two compression jobs at a time; small entries stay synchronous, level 0 stays uncompressed, entry order and timestamps are kept, and a worker error stops the save and ends the remaining work. This is not a fix for the memory errors some very large imports show. Contributed by @taylormadearmy.
  • Deeply nested groups no longer run the browser out of memory (#683): A design with groups nested many levels deep, such as a Tinkercad import (a 12 MB file with 667 bodies in 19 levels), crashed the tab a few seconds after opening. The editor builds a key for every group to know when its look or shape has changed, and each level of nesting put the key of the level below into its own as text, which doubles the escape characters every time: at 19 levels one key was 346 MB. The keys of the parts are now appended as they are, so the key stays small. Found with the files of @HopGabor62.
  • DXF for laser cutting shops (#774): The export window and the AI bridge's layerling_export_mesh write DXF next to SVG, with the views Silhouette from above and Footprint on the workplane (the visible-edges view would turn inner edges into cuts, so DXF has none). It is built the way laser cutting shops ask for it, from the file rules shops publish, confirmed by a CO2 laser user: only LINE, ARC and CIRCLE entities - no polylines, splines or blocks, and no curves made of short straight pieces, which make a cutting head shake - everything on layer 0 in colour 7 (white), DXF 2000 (AC1015) with $INSUNITS = 4, so millimetres stand in the file (R12 has no unit, and some programs read it as inches), Z = 0, scale 1:1, seen from above with the front at the bottom, the lower left corner at 0,0. The bodies' outlines are joined into one area first (CrossSection.union), so bodies that touch or overlap give one contour and no line is cut twice; every contour is closed, its pieces meeting end to end. The editor's outlines are polygons, so dxfExport.ts finds the round parts again: a whole loop on one circle becomes a CIRCLE, a run of corners on one circle an ARC through its two end corners. For a hole or a fillet this is the true circle, since the polygon's corners sit on it (a 5.5 mm hole comes out as a circle of 5.502 mm: the editor cuts holes a thousandth of a millimetre wider each side, CUTTER_LATERAL_PADDING); a free curve such as a letter gets arcs within 0.01 mm. A side counts as part of a curve only when it strays no more than 0.05 mm from the arc (EXACT_ROUND_TOLERANCE, as for the edge tool), so a hexagon or a star stays straight lines. The message names the numbers of circles, arcs and lines; a footprint outline that does not close is left out and counted. "Save to the server" works for DXF as well, as for the other formats (#779). The guide's table of formats has a row for it, the AI chapter, the three SKILL.md copies and texts in twelve languages. Unit tests for circles, rounded rectangles, slots, polygons that stay straight, a free curve within the tolerance, closed chains, the file's version, units, layer, colour, handles and orientation (dxfExport.test.ts); tried in the editor through the AI bridge and the export window (filleted plate with round, hexagonal and square holes; a plate with holes, a slot and text), the files checked with ezdxf (audit without errors, no open ends, fillets as arcs of 6.000 mm) and against the SVG of the same design (every corner within 0.01 mm). Not yet tried on a laser cutter: a shop's cutting test follows, and the guide says so. Asked by @plazmabokor on GitHub.
  • A group shows its real outline under the sketch (#778): A group of bodies, say a round plate and a gear, was drawn under the sketch as a plain box of its width and depth, so a plate and a gear showed up as a square. It now shows the outline of each of its parts, the round plate and the gear, and snaps to them. Reported by @NWoods56.
  • The revolve preview can be reset (#781): Since the 3D preview of a revolve can be panned, the shape could be moved out of sight with no way back. A small button in the top right corner of the preview and a double click on it now put the camera back to the first view of the shape; the view you set is still kept while you edit the sketch, until you reset it. The button's tooltip is a new sentence (sketch.revolvePreviewReset), written in English, German, Dutch, French, Russian, Czech and Slovenian. Contributed by @AbhiRoutray21.
  • Alt and the arrow keys move in fine steps (#749): Shift with an arrow key moves a body by five grid steps; Alt with an arrow key now does the opposite and moves it by a fifth of a grid step, so with a 1 mm grid it is 0.2 mm. It works on the workplane and in the sketch (points, lines, image and curve handles), and the keyboard shortcut list names it. With Shift and Alt held, Shift wins. Asked for by @KimA998.
  • Export files can be saved on the server (#779): When the server folder is on, the export window has "Save to the server" for STL, 3MF, OBJ, STEP, SVG, PNG and the drawing as well, not only for the design file. The file is written into the folder of the open design (or the folder open on the start page), so a program that shares it, such as a slicer in Docker, can open it. It does not show in the list of designs; a file of the same name is replaced only by a second press on the button. Asked for by @nekoprog.
  • The framing square's numbers no longer sit on each other (#777): With a body right at the corner of the framing square the three green distance fields (X, Y, Z) fell on the same spot and covered each other and the square's buttons. They now step aside where they would overlap, and stay at the middle of their arrows where there is room. Each number also starts with a small x, y or z, the axis it belongs to, so it can be read without hovering over the field. Reported by @willi1955.
  • Search the keyboard shortcuts: The shortcuts window has a search box at the top. It keeps only the shortcuts whose sentence, group or keys contain every word typed, in the language of the interface and under the key names it shows (Cmd and Option on a Mac); capital letters and accents do not matter, "ctrl+z" finds the combination, and a single letter or digit finds that key and the words starting with it rather than every word that holds the letter. Groups left empty disappear, and a search that finds nothing says so. The X at the end of the box empties it, and with the box empty the whole list is back. The box has the focus when the window opens (not on a touch screen, where that would bring up the keyboard) and stays in place while the list scrolls; the Print button prints what the window shows. The window's styles moved from globals.css to shortcuts.css, which the Graphite theme reads too. Texts in every interface language; the guide (chapter Keyboard shortcuts, every guide language) describes it. Unit test in shortcutsSearch.test.ts (jsdom); not tried in a real browser yet.
  • Notes on sketches: The sketch editor has a Manage section with the note tool; it and the N key place a note anywhere on the sketch, with the same pins and cards as in 3D (SketchNotes.tsx, reusing NoteOverlay). A sketch's notes are its body's: finishing pins them to the body (on the top of an extrusion or a sweep, on the drawn profile of a revolve, in the middle of its turn), and opening the sketch again brings the body's notes back onto it, those placed in 3D included; a note placed on a side in 3D keeps its height, a turned one its angle (sketchNotes.ts). While the sketch is open the notes travel in the sketch profile (SketchProfile.notes, never stored on a body), so the sketch's own undo and Cancel cover them. The N key is in the sketch shortcuts and the note tool in the sketch command search. The note callbacks moved out of LayerlingEditor.tsx into useEditorNotes.ts and the note styles out of globals.css into notes.css (added to GRAPHITE_SOURCES; the generated Graphite theme only changes order). The guide (chapters Sketches and Measuring and notes) describes it in every language that has those chapters, and the What's-new card is in all the program's languages. Unit tests in sketchNotes.test.ts.