Skip to content

layerling 1.107.0

Choose a tag to compare

@henmedia henmedia released this 24 Oct 06:53
· 1052 commits to main since this release
  • The browser is asked once to keep the designs (a mail from a user): layerling never called navigator.storage.persist(), so every browser was free to clear the designs, thumbnails and fonts first when it ran short of room. With a design in the browser it now asks once (persistentStorage.ts, remembered in layerling.persistentStorageAsked): Chrome and Edge decide on their own, Firefox asks the person once, Safari grants it only to an installed web app. The designs work either way. The guide's chapter on installing now says why installing helps on Safari: Safari clears the data of a website that has not been visited for seven days, not that of an installed app. Found by a user who lost his designs that way.
  • Soft light (#812): The view is lit by a strong main light from above at the front right plus a strong even light, and the renderer clips colour at white (no tone mapping), so a face of a dark colour that points up came out nearly white, while faces turned away stayed dark. A new setting Soft light (Appearance, off by default; WorkplaneWorkspaceSettings.softLighting) adds a light that sits in the camera and shines where it looks (lights.head in viewportScene.ts), and turns the fixed lights well down (softSceneLightLevels in workplaneGrid.ts): a face turned towards you is lit, none is burnt out, and the main light stays a little for the shadows. The contrast slider still works with it; Reset light and shadows and Classic look switch it off. Texts in the seven complete languages; the guide (chapter View and workplane, German and English) describes it. Unit tests in shadingSettings.test.ts; tried in the editor with a dark red box and a blue cylinder, with and without. Asked for by @VZ-studios.
  • Smooth turns a corner with two handles smooth at once (#347): A point whose two handles had been broken apart (a corner with handles) stayed as it was when it was set to smooth, with the point's menu or the 3 key: only its name changed, and it took a detour through Corner. The two handles are now lined up through the point in the direction they share, each keeping its own length (alignedSmoothHandles in sketchSmoothHandles.ts); a point with fewer than two handles is smoothed as before. Unit test in sketchSmoothHandles.test.ts; not tried in the editor yet. Reported by @djelliott19.
  • A group keeps its pivot after Edit group (#807): Closing a group opened with Edit group ([[E]]) built it anew and kept only its name, colour, hole setting, see-through and hidden state, so a rotation pivot set on the group was gone. It now keeps its pivot on the same spot, also when its parts moved while it was open (carryShapePivot in finishOpenGroup). Tried in the editor through the AI bridge: a group with its pivot at (25, 5, 3) opened, a part moved, closed, the pivot still at (25, 5, 3), and gone again without the fix. Reported by @raradek.
  • The Height field keeps the base of a turned body in place (#808): A text or box laid on a sloped face and given a new height in the properties slid up or down the face: the Height field kept only the body's lowest point at the same height above the plate. A turned body now grows along its own up axis from the middle of its base, as the handle and the AI bridge already did (patchWithResizeAnchor in viewportResize.ts uses heightPatchKeepingBase); after a pull on the lower handle the middle of the top face stays instead. A body that is not turned keeps its bottom as before. Unit tests in heightKeepsBase.test.ts with the text and box from the report (63.43 degrees, 1 to 10 mm); tried in the editor through the Height field: the middle of the base stayed at the same spot for both. Reported by @MethylBromide.
  • Danish: the leave-site hint quotes Chromium's own wording (#809): workspace.confirmTabCloseHint now quotes "Vil du forlade denne side?" instead of a literal translation, as every other language quotes its browser's real dialog. By @Henrikth12.
  • brepjs 20.5.0 (#810): The CAD library moves from 18.164.3 to 20.5.0, and its occt-wasm override is gone, as brepjs now allows occt-wasm 5 itself. It brings fixes for freeing native results when a cast or placement fails, boolean options on occt-wasm, and a compound of separate solids kept as one boolean operand. Typecheck, unit tests and all 464 e2e tests pass on the current branch; not tried in the editor yet. By @andymai.
  • Shift steps by the snap grid in a size or position field (#749): In a clicked size or position field Shift with Up, Down or the mouse wheel jumped ten millimetres, too far for a fine grid. It now steps by the snap grid (5 mm with a 5 mm grid), and by ten steps with the grid off; angles and other fields keep ten steps, Ctrl and Alt are unchanged (shiftStep in wheelNextValue). Unit test in wheelValueStep.test.ts; tried in the editor on a box's length: 20 to 25 with a 5 mm grid, ten more with the grid off. Asked for by @MartinShake.
  • Inserting a design keeps its notes and reference points (#814): "Insert into this design" (and dropping .lyl files on the import window) brought in the bodies of the saved design but threw its notes and reference points away. They now come along the way a custom shape's do (notesForInsertedShapes): fresh ids, pinned to the inserted bodies, closed, and added after the notes already in the design, so they are numbered on from them; free notes and reference points come too, as the whole design does. Only as many as the design has room for, with the same message as a custom shape. The insert moved from the editor into useCustomShapes beside the custom shape's, both sharing addInsertedBodies. The guide (chapter Files and saving, every guide language that has it) says so. Unit test in myShapes.test.ts.
  • On a workplane set on a face the sketch shows the bodies as seen from it (#778): The sketch showed of each body only the face lying on the plane. A plane set on a facet of a round body stands a little askew, so that face was a thin strip at one end; a part of a group behind the plane, such as a cylinder on a capsule, was left out; and a body with no face on the plane was drawn as one rough polygon round all its points, a tower of a box, a cylinder, a sphere and a cone as a single blob. Each body, and each part of a group, now shows its outline as seen from the plane (sketchReferenceShapeOnWorkplane with seen, footprintOfPositions with asSeen); the base plate keeps the footprint, and a body with no flat bottom there gets its outline from above instead of the hull too. Unit tests in sketchReferenceOutline.test.ts; checked with the design from the report: the capsule (152.5 x 9.5) and the cylinder on it in side view, where only a strip of 3 mm showed before. Reported by @NWoods56.
  • Wall thickness for Gridfinity bins (#455): A bin's wall was fixed at 0.95 mm, not a whole number of lines for a 0.4 or 0.6 mm nozzle, and too thin for heavy tools or a block with one small pocket. A Gridfinity bin now has Wall thickness, from 0.8 mm (two lines of a 0.4 mm nozzle) up to where the walls meet, 0.95 mm to begin with so existing bins stay as they are. The wall is set in from the outside, which never changes, so the bin still fits the baseplate and stacks with any other. The inner corners are rounded by 3.75 mm less the wall and square from a wall of 3.75 mm, and a scooped or divided bin's floor edges are rounded as much. With the lip, a wall over 1.75 mm stops at a flat ledge 0.85 mm under 7 mm per height unit, where shelves and dividers stop, so a stacked bin's feet stay 0.5 mm clear; the floor goes no higher. Where the walls leave less than 1 mm inside, the bin is built solid, and the floor's row is hidden while it is. Finger scoops and label shelves without room are left out and fewer compartments are built and offered; an open side stays open at any wall that leaves an inside. The view, the exports and the exact body agree, so the edge tool and STEP work on it. layerling_create_shape, layerling_update_object and layerling_read_scene take and report gridfinityWallThickness. Contributed by @mlugo-apx.
  • Multi-colour SVG: one body per colour (#818): An SVG drawn in several colours came in as a single body, its colours lost. It now comes in as one body per fill colour (an outline counts by its stroke), each in its colour and in its place in the drawing, a kept page included (importedColourShapesFromSvg, svgColourGroups); each body is a sketch of its own outlines (sketchProfileFromSvgPaths), or a mesh that carries itself, as the file holds every colour. One colour, or more than 12 as a traced picture has, stays one body. Guide (Files and saving, every language) and the welcome page say so. Unit tests in svgImportColours.test.ts; tried in the editor with a drawing of a red rectangle and circle and a blue square with a hole: two bodies, red and blue, in their places. Asked for by @microenh.
  • Small holes in an imported mesh are closed before a split, group or cut (#791): A mesh with an opening anywhere, such as an OBJ figure whose eyes are open cups, was refused by the kernel as a whole, and Split said only "Split kernel error: Not manifold". When the kernel refuses a mesh, layerling now caps its openings and tries again (closeSmallMeshHoles in meshHoleFill.ts, through manifoldFromMeshData in editorBooleans.ts): corners are welded by position, the edges only one triangle uses are chained into rims, and a rim is capped by a fan from its centre, turned like the triangles beside it, when it is small (at most a tenth of the mesh's diagonal) or flat (off its plane by at most 5 % of its radius), and no fan triangle folds back. A mesh with an edge three triangles share is left alone. Split, Group, Cut and the AI bridge say how many holes were closed; a large opening whose rim bends stays open, and the message says so in plain words instead of "Not manifold" (status.holesTooLarge, in every language). Exports are unchanged. The guide (Solids and holes, German and English) describes it. Unit tests in meshHoleFill.test.ts; tried in the editor with the file from the report. Reported by @aloarjr810.
  • Scale by percent shows decimals (#817): The New size field took a value such as 102.5 % and scaled by exactly that, but then showed it rounded to 103, as its slider moves in whole steps, so decimals looked ignored; and a value between 99.5 and 100.5 counted as 100 and could not be applied. The field now keeps and shows up to two decimals (decimals on EdgeModifierSlider), whole values still without; the slider keeps whole steps, and only exactly 100 % counts as no change (isUnchangedPercent). The status message gives the percentage with two decimals. Unit test in scaleByPercent.test.ts. Asked for by @bgrdtruk.
  • Tape measure: typing a length moves a body (#823): A straight measurement with a body at one end at least now has a number that can be clicked (editable on the tape overlay). A typed length moves the body at the second point along the measured line until the distance is that length, as Tinkercad's ruler does; when only the body at the first point is selected, that one moves (tapeMovableShapeId). The measuring points stay on the body, so the measurement follows; a whole edge, or both ends on one body, stays a plain number. One undo step. Tried in the editor in a headless browser: two boxes measured top to top at 80.80, typed 100, the second box moved along the line and the measurement read 100.00. Asked for by @danyvanimpe-lab.
  • A new shape snaps to the middle of a face (#823): A shape placed by click (Cruise) on a body's face now snaps to the middle of that face when the pointer is within a third of the face's reach from it, a corner or edge under the pointer winning; a shape dragged from the library onto a face lands on that face, in its middle (before, it went to the workplane, wherever the pointer was). Alt sets it down freely in both cases. The middle is the area centre of the connected flat face the pointer is on (planarFaceCentre in faceCentre.ts, cached per triangle), so two separate faces in one plane stay apart. Guide (Shapes and Measuring, every guide language that has them) and the welcome page say so. Unit tests in faceCentre.test.ts; tried in the editor in a headless browser: by click near the middle and by dragging, a cylinder on a 40 mm box landed at its centre, far from it and with Alt where the pointer was. Asked for by @danyvanimpe-lab.
  • A quieter start (#819): npm run dev printed two Node warnings about the build scripts loading TypeScript files and webpack's "Critical dependency" warning from brepjs on every compile, which looked like errors. The scripts run with --disable-warning=MODULE_TYPELESS_PACKAGE_JSON and the brepjs warning is ignored (ignoreWarnings in next.config.ts). Reported by @plainpylut.