Skip to content

1.7.0

Latest

Choose a tag to compare

@matas-bitbybit-dev matas-bitbybit-dev released this 17 Nov 18:00
eb22ca7

Release Notes v1.7.0

A release on top of 1.6.2, about drawings, coordinate systems and new OCCT kernels:

  • Drawings as data: io.drawing builds a drawing, io.dxf and io.svg write and read DXF and SVG, and
    @bitbybit-dev/occt draws shapes into DXF and SVG and loads DXF.
  • A coordinate-system setting: after bitbybit.setConventions(1) a file matches the screen and a shape that
    names a hand shows that hand, in every kernel and renderer.
  • New OCCT kernels: pipes, booleans, faces with holes and scaled shapes give the right result or refuse,
    where they gave a wrong one.
  • Manifold recipes cut through faces that lie flush inside the host.
  • BabylonJS 9.35.0, three.js 0.187.0 and PlayCanvas 2.24.0.

Upgrading from 1.6.2

Nothing needs changing: with no coordinate system set, the packages behave as before. 22 functions were added
and none removed; the reference also lists the eight io.dxf builders it used to leave out, so it counts
2,240. Outputs that differ from 1.6.2:

  • occt.io.saveShapeSTEP with fromRightHanded turns the shape 90 degrees about X, so Y up becomes Z up.
    It used to turn it the other way, upside down. fromRightHanded is deprecated in favour of the setting.
  • Babylon's STL and glb exports leave out the back face of a shape drawn two-sided, which they wrote as
    every wall twice.
  • babylon.meshBuilder.createCapsule and createGround leave a doubleside mesh's facing alone.
  • A pipe that would come out inside out, and a boolean whose result loses what it should keep, are
    refused instead of returned (see OCCT kernels).
  • Deprecated: the io.dxf segment, path and part builders and their DTOs. io.drawing has each one
    under the same inputs.

Drawings

  • io.drawing builds a drawing from neutral parts: lineSegment, arcSegment, circleSegment,
    ellipseSegment, polylineSegment, splineSegment, path and part (a layer with a colour and a line
    type). svgToDxf and dxfToSvg convert between the formats.
  • io.dxf.dxfCreate writes AC1015 by default, keeps splines and ellipses exact and writes line types;
    R12 gets polylines within curveTolerance. io.dxf.dxfRead reads a DXF file, as text or bytes, into
    the same parts.
  • io.svg writes SVG (svgCreate, pathData) and reads it (svgRead), with reused elements, nested
    viewports, units and CSS.
  • occt.io.saveShapeDxf draws the edges a view of a shape sees, hidden ones on their own layer when
    asked. occt.io.svgLayer and svgCreate write layered SVG. occt.io.loadDxf and
    loadDxfStructured
    build wires, and faces when asked, from a DXF file. shapeToDxfPaths keeps curves
    exact.
  • occt.svg.loadSVG reads through base's SVG reader and reports the page size.
  • Readers and writers are bounded by the size of their input: a reader that reaches the bound stops with
    a warning, and a writer refuses the drawing.
  • line.distanceToPoint: how far a point lies from a line, to the nearest point between its ends.

Coordinate systems

OpenCascade, three.js and PlayCanvas are right-handed; a default Babylon.js scene is left-handed and draws the
kernel's numbers as the mirror image of the model.

  • bitbybit.setConventions(level), or conventions in the options of initBitByBit: level 1 speaks the
    engine's own coordinate system, and leaving it out keeps the behaviour from before the setting existed.
    bitbybit.setSettings hands the settings to every kernel and worker before it returns.
  • OCCT: STEP and STL files written and read, and OBJ and PLY files written, show what the screen shows;
    drawings lie on the system's ground; threads and helices keep their hand.
  • JSCAD: solids go into STL, 3MF and DXF files right-handed with Z up, facets outward.
  • Manifold: recipe roots are placed by the system that is set; instanced meshes stay instanced in a
    left-handed system.
  • Babylon.js: clearAllDrawn makes the scene right-handed under a right-handed setting; STL downloads are
    written in the file's axes and STL loads placed in the scene's.
  • core lists the operations whose results depend on the level (CONVENTIONS_SURFACE,
    isConventionSensitive, conventionSensitiveMentions), so an application can tell whether a script uses
    any.

OCCT kernels

  • Pipes: a profile at an end of its path is placed at that end, so a path that comes back to the profile's
    plane no longer sweeps inside out. pipe and pipeWithHistory refuse a sweep that still does
    (occt.pipe.insideOut), and a profile edge-on to its path at an end is refused instead of sweeping a solid
    of no volume.
  • Booleans are checked against points just inside their inputs. A result that keeps a tool, loses a body
    or cuts nothing is rebuilt, and refused when no rebuild holds. A design report notes a boolean kept
    although not valid.
  • Faces with holes build from wires a hair off their plane and from offsets of open wires; a refused face
    says when its holes touch or cross.
  • Scaled shapes: booleans, occt.corners.filletCornerByPoint and chamferCornerByPoint work on shapes
    placed by a scaling transform, and lengths, points at a length and divisions by length are true there.
  • Speed: wires and B-splines built from long paths and drawings take time in proportion to their segments,
    and a face with many holes compares only the holes whose boxes meet.
  • Variable-radius fillets: the docs say how the positions along an edge are read.

Manifold recipes

  • A cut whose end lies on a face inside its host's box, such as a sink hole as deep as a worktop under a
    backsplash, goes through that face instead of leaving a near-zero skin. Only that face moves, so no face
    beside it leans into a sliver.

Tooling and docs

  • @bitbybit-dev/cad-cloud-sdk: the nesting routes, unfold-and-nest, fileUnit on the unfold and nesting
    bodies, and pipeline types for the drawing operations.
  • Languages: every locale has the drawing, DXF and SVG help text and the revised descriptions; the locale
    files use one ellipsis and no em or en dash.
  • Guides: the geometry guide covers the conventions and what adjustYtoZ writes with and without them,
    and the agentic guide names true-shape nesting among the CAD Cloud algorithms. API.md is removed.
  • Examples: the create-app templates and examples take the new engines; the example dependencies move past
    their advisories (minimatch, glob, nuxt 4.6.4, fflate 0.8.3).
  • kernels.json names where each kernel build is published, so kernels:fetch downloads and checks it.

Dependencies

  • BabylonJS 9.35.0, three.js 0.187.0 (@types/three 0.187.0) and PlayCanvas 2.24.0; Manifold 3.5.4 and JSCAD
    2.13.0 unchanged; new OCCT kernels. Every package is versioned 1.7.0.