Skip to content

1.8.1

Latest

Choose a tag to compare

@matas-bitbybit-dev matas-bitbybit-dev released this 02 Dec 05:25
2938b8b

Release Notes v1.8.1

A release on top of 1.8.0, about sheet metal, Voronoi patterns and planar thickening, all new in
@bitbybit-dev/occt:

  • Sheet metal (beta): occt.fabrication.sheetMetal starts a part from a plate, a contour, a loft or a sweep,
    then adds flanges, hems, bends, joins, cuts and stamped forms. Every part carries a record of its regions and
    bends, so later steps pick faces by name. Docs, blog post.
  • Voronoi patterns (beta): occt.patterns.voronoi splits faces and solids into cells and builds perforations,
    frames, beams and foam from them, graded by any shape through its field. Docs, blog post.
  • Planar thickening: occt.operations.thickenPlanarShell thickens a shell of planar faces into one solid whose
    faces meet in mitred joints. Docs.
  • Design documents hold sheet metal features, so a sheet metal part can be written as JSON. Guide.
  • New OCCT kernels carry all of it, and Babylon.js, three.js and PlayCanvas draw a sheet metal part with its
    regions, bends and forms in their own colors.

Upgrading from 1.8.0

Nothing needs changing: code that ran on 1.8.0 runs as it did. 57 functions were added and none removed, so the
reference counts 2,324. The sheet metal and Voronoi members are marked beta; thickenPlanarShell and its report
twin are not. Outputs that differ from 1.8.0:

  • Fillets and chamfers of an open shell round again. 1.8.0 refused a rounding of a shell or a face that
    reached past the shape's box, such as a fillet ending at a free edge. Such a rounding may now reach past the
    box by its own radius or distance.
  • A fillet or chamfer that reaches too far beyond the shape is refused as occt.fillet.beyondShape or
    occt.chamfer.beyondShape, where 1.8.0 refused it as occt.fillet.failed or occt.chamfer.failed. Code that
    catches the old code for this case should catch the new one.
  • An edge or face that is not the shape's own, given to a fillet or chamfer method, is refused with its place
    in the list.
  • Range refusals name the whole range. An input outside a number's bounds reads "must be from 2 to 5", or
    "must be above 0 and at most 1" for an open end, where it read "must be at least 2". Code that matches the
    words of a refusal needs the new ones.
  • Babylon.js lines are never drawn thinner than a pixel. A line narrower than a pixel on screen, such as a
    small edgeWidth on a large model gives, is drawn a pixel wide in its own color, where it faded into faint
    dark dots. Lines at least a pixel wide look as they did.
  • babylon.scene.adjustActiveArcRotateCamera takes minZ, the camera's near plane. Leaving it out keeps the
    camera's own.

Sheet metal

occt.fabrication.sheetMetal builds parts of one sheet thickness. Each operation answers a SheetPart: the
shape, the role of each face and the sheet's record of its flat regions and bends. Refusals name the method
called, and a part whose record no longer matches its shape is refused with a pointer to check. Every operation
has a worked example on the sheet metal pages.

  • Starting a part: plate gives a flat face a thickness; contour runs an open profile of straight lines
    along a direction, with a bend at every corner; loft makes a lofted flange between two profiles, such as a
    square-to-round transition; sweep carries an open profile along a path of straight segments, its runs
    meeting mitred.
  • Flanges and hems: flange bends a flange off a straight edge of a region's inside face, and flanges off
    several edges of one face, meeting mitred where they share a corner. hem folds an edge back over the sheet:
    closed flat, open with a gap, a teardrop, a rolled edge or a double hem. create.flangeSegment adds further
    bends to a flange's profile, for Z shapes and returns.
  • Bends: bend folds a flat region along a line across it, or jogs it with an offset. lance cuts a tongue
    free on three sides and bends it out as a tab, and gusset presses gussets across a bend to stiffen it.
    create.bendTableRow makes a bend table row, a K-factor, bend allowance or bend deduction, for a thickness,
    inner radius and angle.
  • Joining and corners: join joins two plates where they lie with one bend, cylindrical or conical.
    closeCorner closes the corner between two flanges, one overlapping the other or both meeting on the miter.
    rip rips a slot through a region along a line, ripEdge rips two regions apart along the edge they share,
    and tab adds a flat face to a region as a tab.
  • Cutting, forming and finishing: cut cuts closed profiles through the sheet or pockets them to a depth.
    form stamps dimples, louvers, bridges and extruded holes at points, embosses along closed profiles and beads
    along paths. roundCorners rounds or bevels a region's blank corners.
  • Picking faces and edges: regionNames and bendNames list a part's regions and bends; insideFace,
    outsideFace, insideEdgeToward, insideEdgeNearest, endFaceToward, edgeBetween and facesOfRole pick
    by region name, direction, point or the role an operation gave.
  • Moving and checking: transform moves, turns or mirrors a part together with its record, for a pattern's
    copy or a mirrored twin. check checks that a part and its record still make a sheet of one thickness, as
    after a boolean.
  • Looks: colorByKind gives a part its colors by kind of face, an inside and an outside color included,
    and bendLines draws each bend's line across its width, standing off the part when asked.

Voronoi patterns

occt.patterns.voronoi works in a planar face or in a solid. Most methods have a WithReport twin that reports
every cell and piece. The Voronoi pages have an example of each, up to parts made for 3D printing.

  • Seeds: seeds2d and seeds3d place seeds at random, on a jittered grid or evenly spaced, then even them
    out in relax rounds. The same seed gives the same seeds, so a design stays put between runs.
  • Fields: affector makes any points, curves, faces, shells or solids grade the work by their nearness, and
    field gives the affectors' combined influence at points. Seed spacing, cell weights and sizes can follow it.
  • Cells: cells2d and cells3d split a face or a solid into the Voronoi or power cells of the seeds, and
    compSolid builds a convex solid's cells as one compsolid whose cells share their faces.
    delaunay2d joins the seeds whose cells meet by the edges or triangles of their Delaunay triangulation.
  • Perforations: perforate cuts a hole in each cell of a planar face, the cell made smaller by a scale or
    an inset, its corners rounded to radius.
  • Frames and beams: frames3d builds each face between the cells of a convex solid once, with a window, or
    each cell as a hollow wall. beams2d and beams3d put a beam on every cell edge with a sphere at each node,
    and report them as a graph.
  • Foam: foam makes a solid into one solid holding a void in each cell, closed-cell, or open-cell with
    windows between the voids, and through the solid's own faces when asked.
  • Refusals name the method called and the range a setting takes, such as "scale must be from 0.001 to
    0.999".

Planar thickening

  • occt.operations.thickenPlanarShell thickens a shell of planar faces, every face by one thickness or each
    by its own, to the side asked, and answers one solid or each face's piece apart. Faces sharing an edge meet in
    a mitre, and a hole of lines and circular arcs becomes a tunnel through its face.
  • thickenPlanarShellWithReport reports each face's thickness, mitres, square cuts and walls, tunnels and
    holes closed.
  • A face that is not planar, a thickness a face cannot hold or a hole that would cut a mitre is refused; a hole
    can be closed and reported instead. The thickness must be above 0.

Design documents

  • Sheet metal features: a design document holds a feature per sheet metal call, with the sheet's settings
    on the document and gauges on its materials. Faces are named from the record and the calls' histories, so a
    feature points at a region by its name and role.
  • A folded sheet folds again: the side a fold keeps keeps the region's name, the side it moves takes the
    fold's own, and a later fold names the region its line crosses.
  • occt.design.toTypeScript writes each sheet metal feature as its call, and the design document schema
    validates sheet roles and options.

Drawing

  • Sheet metal parts draw in Babylon.js, three.js and PlayCanvas through draw.optionsOcctSheet: regions,
    bends, formed regions and forms in their own colors, thin edges and, when asked, the bend lines. A list of
    parts draws the same way.
  • A part that answers its face roles draws as a plain shape does.

OCCT kernels

  • New kernels: the 32-bit, 64-bit and 64-bit multithreaded kernels carry the sheet metal, Voronoi and planar
    thickening functions.
  • The 64-bit kernels' typings re-export the standard kernel's instead of carrying a copy that could fall
    behind it. Code importing them reads the same types.
  • Mirrors documented: transforms.mirror, mirrorShapes and mirrorAxisToMatrix turn a shape a half turn
    about a line, so a left-handed shape stays left-handed; the docs now say so and point to mirrorAlongNormal
    for a mirror image across a plane. Their behaviour is unchanged.
  • Relinking kits: each kernel's relinking kit is published beside it, with a smoke test that checks every
    function the kernel's typings declare is bound.

Tooling and docs

  • Namespaces: new feature families gather under three branches instead of each adding a top-level one:
    parts by discipline, fabrication by process and patterns by family.
  • @bitbybit-dev/cad-cloud-sdk: types and request validation for CAD Cloud's Plateau foam route, which
    grows an open-cell foam inside a solid part of an uploaded STEP file and returns it as STL or 3MF with a
    report (Plateau foam). The pipeline operation types gain thickenPlanarShell.
  • @bitbybit-dev/mcp: get_guide("sheet-metal") opens the design documents guide's new sheet metal
    section.
  • Guides: the design documents guide has a section on sheet metal parts, with documents that were run.
  • Examples: the Next.js example takes Next.js 16.4.6, past the advisories of 16.4.1.
  • Languages: every locale has the texts of the sheet metal, Voronoi and thickening members and the revised
    mirror texts.

Dependencies

  • No engine or kernel library changed: BabylonJS 9.35.0, three.js 0.187.0 (@types/three 0.187.0),
    PlayCanvas 2.24.0, Manifold 3.5.4 and JSCAD 2.13.0; new OCCT kernels on OpenCascade 8.0.2. Every package is
    versioned 1.8.1.