Bitbybit Docs
    Preparing search index...

    Class OCCTSheetMetalBeta

    Sheet metal parts as a shop makes them: flat regions of one thickness joined by bends, with flanges, hems, folds, joins, cuts and stamped forms. Each operation returns a new part, whose record names its regions and bends.

    A region's inside face is the face it was drawn on; a bend that turns up rises toward the side it looks at. Pick faces and edges by name with insideFace and the other pickers; create makes bend table rows and flange segments. Lengths are in model units, angles in degrees. An operation records what it adds under name, by default its word and the lowest free number, as flange2.

    Experimental: the operations and the record may still change.

    Index

    Constructors

    Properties

    bend

    • Beta

      Folds a flat region along a line across it, or jogs it with an offset, two opposite bends that land the far side parallel.

      The line through from and to may cross the outline at any angle. The fixed side stays; the band the bend takes is laid out at the K-factor. Role moved holds the faces that moved.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The folded part

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      const folded = await bitbybit.occt.fabrication.sheetMetal.bend({ part: base, insideFace, from: [20, 0, -40], to: [20, 0, 40], angle: 45 });
      const jogged = await bitbybit.occt.fabrication.sheetMetal.bend({ part: base, insideFace, from: [-20, 0, -40], to: [-20, 0, 40], angle: 30, offset: 6 });
    • Beta

      Cuts a tongue free on three sides of a hinge line and bends it out of the region, as a lanced tab.

      The hinge runs from from to to on the face's plane; the tongue is depth long on the side that moves, freed by a slot one kerf wide. Role walls holds the slot's faces.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The lanced part

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      const lanced = await bitbybit.occt.fabrication.sheetMetal.lance({ part: base, insideFace, from: [-10, 0, 10], to: [10, 0, 10], depth: 12, angle: 90 });
    • Beta

      Joins two plates drawn where they lie with one bend between them: cylindrical, or conical where endRadius differs from bendRadius.

      Each plate is cut back or extended to the bend. The second part's default names that the first uses are renumbered; given names must differ. Role reliefs holds any reliefs.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      One part of both

      const firstEdge = await bitbybit.occt.fabrication.sheetMetal.insideEdgeToward({ part: floor, region: "floor", direction: [0, 1, 0] });
      const secondEdge = await bitbybit.occt.fabrication.sheetMetal.insideEdgeToward({ part: wall, region: "wall", direction: [0, 0, 1] });
      const firstInsideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: floor, region: "floor" });
      const secondInsideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: wall, region: "wall" });
      const joined = await bitbybit.occt.fabrication.sheetMetal.join({ first: floor, firstInsideFace, firstEdge, second: wall, secondInsideFace, secondEdge, bendRadius: 2 });
    • Beta

      Closes the corner between two flanges by extending their ends: one overlapping the other's edge, or both meeting on the corner's miter.

      Each flange is given by its inside face and its end face at the corner, as endFaceToward picks it. Bends stopping short of the corner are carried to it, the plate's corner cut back; a seam records it.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The part with the corner closed

      const firstInsideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: box, region: "front" });
      const secondInsideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: box, region: "side" });
      const firstEndFace = await bitbybit.occt.fabrication.sheetMetal.endFaceToward({ part: box, region: "front", direction: [1, 0, 0] });
      const secondEndFace = await bitbybit.occt.fabrication.sheetMetal.endFaceToward({ part: box, region: "side", direction: [0, 1, 0] });
      const closed = await bitbybit.occt.fabrication.sheetMetal.closeCorner({ part: box, firstInsideFace, firstEndFace, secondInsideFace, secondEndFace, kind: Bit.Inputs.OCCT.sheetMetalClosureEnum.overlap });

    check

    • Beta

      Checks that a part and its record still make a sheet of one thickness.

      It reports rather than refuses. A record no longer matching the shape's faces, as after a boolean, is one problem; otherwise problems names each region, bend or face out of place. warnings, such as a bend below minimumRadius, leave it a sheet.

      Parameters

      Returns Promise<SheetCheckReport>

      Whether it is a sheet, its problems and its warnings

      const report = await bitbybit.occt.fabrication.sheetMetal.check({ part: bracket });
      console.log(report.isSheet, report.problems, report.warnings);

    edit

    • Beta

      Rips a slot gap wide through a region along a line, in from its outline or a hole.

      One end lies off the material; an end inside it is where the slit stops. A rip that parts the region makes the far side a region of its own, joined by a seam. Role walls holds the slot's faces.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The ripped part

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      const slit = await bitbybit.occt.fabrication.sheetMetal.rip({ part: base, insideFace, from: [-60, 0, 0], to: [-20, 0, 0], gap: 0.5 });
    • Beta

      Rips two regions apart along the edge where they meet, splitting the corner on its miter.

      The edge is a straight edge of the part lying on a face of each region, as where two walls of a box meet. The two regions are recorded as joined by a rip seam. Role walls holds the slot's faces.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The ripped part

      const corner = await bitbybit.occt.fabrication.sheetMetal.edgeBetween({ part: box, first: "front", second: "side" });
      const opened = await bitbybit.occt.fabrication.sheetMetal.ripEdge({ part: box, edge: corner, gap: 0.2 });
    • Beta

      Adds a flat face drawn on a region's plane to the region as a tab of the sheet's thickness.

      The face touches or overlaps the region's inside face, and holes in it stay holes; a tab that would run into a bend is refused. Role walls holds the tab's faces through the thickness.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The part with the tab

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      const tab = await bitbybit.occt.shapes.face.createRectangleFace({ width: 20, length: 20, center: [-55, 0, 0], direction: [0, 1, 0] });
      const tabbed = await bitbybit.occt.fabrication.sheetMetal.tab({ part: base, insideFace, tab });
    • Beta

      Cuts closed profiles drawn on a region's face square through the sheet, or pockets them to a depth.

      A profile may notch the outline, never reach a bend; on a formed region the cut follows the surface. A pocket is recorded as a form, name; a cut through records nothing. Roles walls and floors.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The cut part

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      const hole = await bitbybit.occt.shapes.wire.createCircleWire({ radius: 5, center: [0, 0, 0], direction: [0, 1, 0] });
      const drilled = await bitbybit.occt.fabrication.sheetMetal.cut({ part: base, face: insideFace, profiles: [hole] });
    • Beta

      Rounds or bevels the blank corners of a region's outline: the edges through the thickness where two of its sides meet.

      A round is a cylinder along the region's normal, never a bend; corners where a side runs into a bend are left alone. Role rounds holds the faces each corner became.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The part with its corners finished

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      const rounded = await bitbybit.occt.fabrication.sheetMetal.roundCorners({ part: base, insideFace, size: 5, kind: Bit.Inputs.OCCT.sheetMetalCornerKindEnum.convex });
    • Beta

      Moves, turns or mirrors a part together with its record, as a pattern's copy or a mirrored twin needs.

      The record's frames and axes move with the shape, so the result is a sheet like the part. A matrix that scales is refused, since it would change the thickness. The part has no roles.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The moved part

      const mirror = [-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
      const twin = await bitbybit.occt.fabrication.sheetMetal.transform({ part: bracket, transformation: mirror });

    flange

    • Beta

      Bends a flange off a straight edge of a region's inside face.

      The extents shorten or widen it along the edge, with reliefs where it stops short. Side angles or offsets slant its ends, profile adds bends for Z shapes and returns, and outline draws its last run. Roles end, sides, legEnds, reliefs and rim.1 on.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The flanged part

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      const edge = await bitbybit.occt.fabrication.sheetMetal.insideEdgeToward({ part: base, region: "base", direction: [1, 0, 0] });
      const bracket = await bitbybit.occt.fabrication.sheetMetal.flange({ part: base, insideFace, edge, angle: 90, length: 30, extentStart: 10, extentEnd: 10 });
    • Beta

      Bends a flange off each of several straight edges of one inside face, flanges sharing a corner meeting mitered there, with a corner relief where their bends meet.

      Each runs its whole edge. Role corners holds the reliefs' faces; each flange's roles hold its own faces alone, numbered from 1 in edges order, as 1.end and 2.legEnds.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The flanged part

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      const edges = await bitbybit.occt.shapes.edge.getEdges({ shape: insideFace });
      const tray = await bitbybit.occt.fabrication.sheetMetal.flanges({ part: base, insideFace, edges, angle: 90, length: 25, cornerRelief: Bit.Inputs.OCCT.sheetMetalCornerReliefEnum.circular });
    • Beta

      Folds a straight edge of a region back over the sheet as a hem: closed flat on it, open with a gap, a teardrop, a rolled edge or a double hem that hides the raw edge.

      Extents, reliefs and roles work as a flange's. A teardrop given no length runs as far as fits before it meets the sheet.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The hemmed part

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      const edge = await bitbybit.occt.fabrication.sheetMetal.insideEdgeToward({ part: base, region: "base", direction: [-1, 0, 0] });
      const hemmed = await bitbybit.occt.fabrication.sheetMetal.hem({ part: base, insideFace, edge, style: Bit.Inputs.OCCT.sheetMetalHemStyleEnum.open, length: 8, gap: 1 });

    form

    • Beta

      Stamps forms into a region's face: dimples, louvers, bridges or extruded holes at points, embosses along closed profiles or beads along paths.

      Each kind takes its own sizes and refuses another kind's. Each form is recorded, and has a role, as name, a dot and its number, such as louver1.2; role forms holds every new face.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The formed part

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      const vented = await bitbybit.occt.fabrication.sheetMetal.form({ part: base, face: insideFace, kind: Bit.Inputs.OCCT.sheetMetalFormEnum.louver, points: [[0, 0, -10], [0, 0, 10]], along: [1, 0, 0], length: 40, width: 8, height: 4 });
      const dimpled = await bitbybit.occt.fabrication.sheetMetal.form({ part: base, face: insideFace, kind: Bit.Inputs.OCCT.sheetMetalFormEnum.dimple, points: [[30, 0, 0]], diameter: 20, depth: 6, draft: 20 });
    • Beta

      Presses gussets across a cylindrical bend to stiffen it, at positions along the bend.

      Each is a chord across the bend's inside, depth in from its inner face, closed by two walls of the sheet's thickness, and is recorded, with a role, as name, a dot and its number, such as gusset1.2. Role forms holds every new face.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The stiffened part

      const [across] = await bitbybit.occt.fabrication.sheetMetal.bendNames({ part: bracket });
      const stiffened = await bitbybit.occt.fabrication.sheetMetal.gusset({ part: bracket, across, positions: [10, 30], width: 8, depth: 3 });

    pick

    • Beta

      Lists the names of a part's flat regions, in the order its record holds them, to pick faces and edges by.

      Parameters

      Returns Promise<string[]>

      The regions' names

      const names = await bitbybit.occt.fabrication.sheetMetal.regionNames({ part: bracket });
      
    • Beta

      Lists the names of a part's bends, in the order its record holds them, as gusset takes one.

      Parameters

      Returns Promise<string[]>

      The bends' names

      const names = await bitbybit.occt.fabrication.sheetMetal.bendNames({ part: bracket });
      
    • Beta

      Picks a region's inside face by the region's name: the face its flanges, hems, folds and cuts start from. Where the region has several, the largest.

      Parameters

      Returns Promise<TopoDSFacePointer>

      The inside face

      const insideFace = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: base, region: "base" });
      
    • Beta

      Picks a region's outside face by the region's name: the face across the thickness from its inside face. Where the region has several, the largest.

      Parameters

      Returns Promise<TopoDSFacePointer>

      The outside face

      const outsideFace = await bitbybit.occt.fabrication.sheetMetal.outsideFace({ part: base, region: "base" });
      
    • Beta

      Picks the edge of a region's inside face that lies furthest along a direction, judged by its middle; where several lie as far, the longest.

      A direction keeps naming the same side when sizes change: [1, 0, 0] is the edge at the largest x.

      Parameters

      Returns Promise<TopoDSEdgePointer>

      The furthest edge

      const edge = await bitbybit.occt.fabrication.sheetMetal.insideEdgeToward({ part: base, region: "base", direction: [1, 0, 0] });
      
    • Beta

      Picks the planar face through the thickness at a region's outline that lies furthest along a direction, judged by its center: a flange's end, which closeCorner takes as a leg's end, or its rim.

      A flange's ends picked so are its role legEnds, which only the part it returned still holds.

      Parameters

      Returns Promise<TopoDSFacePointer>

      The furthest end face

      const firstEndFace = await bitbybit.occt.fabrication.sheetMetal.endFaceToward({ part: box, region: "front", direction: [1, 0, 0] });
      
    • Beta

      Picks the edge where the faces of two regions meet, such as the inner corner of two walls closed against each other, which ripEdge parts; the longest where they share several.

      Parameters

      Returns Promise<TopoDSEdgePointer>

      The shared edge

      const corner = await bitbybit.occt.fabrication.sheetMetal.edgeBetween({ part: box, first: "front", second: "side" });
      const opened = await bitbybit.occt.fabrication.sheetMetal.ripEdge({ part: box, edge: corner });
    • Beta

      Picks the faces the operation that made a part names by a role, such as a flange's end or a cut's walls, as the part's roles lists them: in the order of the faces, which says nothing of where each lies, so pick one of several by where it lies, as endFaceToward does.

      Parameters

      Returns Promise<TopoDSFacePointer[]>

      The role's faces, an empty list for a role with none

      const [end] = await bitbybit.occt.fabrication.sheetMetal.facesOfRole({ part: bracket, role: "end" });
      

    show

    • Beta

      Gives a part an appearance read from its record: each kind of face in a color, the edges where bends meet their regions in another, and each side of the material in one when given.

      The part stays a part for the next operation, which reads no appearance and returns its part without one.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The part with its appearance

      const shown = await bitbybit.occt.fabrication.sheetMetal.colorByKind({ part: bracket, bendColor: "#7f9cc0", tangentEdgeColor: "#2f78c4" });
      await bitbybit.draw.drawAnyAsync({ entity: shown });
    • Beta

      Draws a part's bend lines as straight wires along each bend's axis, across the bend's whole width: where it meets its flat regions, or halfway round it.

      Tangent lines come two to a bend, the fixed region's first; center lines one. With bend given, only that bend's lines, to label or measure each by its bend's name.

      Parameters

      Returns Promise<TopoDSWirePointer[]>

      The lines, bend after bend in the order bendNames lists them

      const [name] = await bitbybit.occt.fabrication.sheetMetal.bendNames({ part: bracket });
      const tangents = await bitbybit.occt.fabrication.sheetMetal.bendLines({ part: bracket, bend: name });
      const centers = await bitbybit.occt.fabrication.sheetMetal.bendLines({ part: bracket, kind: Bit.Inputs.OCCT.sheetMetalBendLineEnum.insideCenter });

    start

    • Beta

      Starts a sheet metal part from a flat face, given its thickness.

      The face is the plate's outline, holes included. With side back it stays the inside face, so flanges that bend up rise the way it faces. The sheet's settings given here, such as bendRadius, kFactor and relief, are recorded for every later operation to inherit.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The new part, its role walls the faces around its outline

      const face = await bitbybit.occt.shapes.face.createRectangleFace({ width: 100, length: 60, center: [0, 0, 0], direction: [0, 1, 0] });
      const base = await bitbybit.occt.fabrication.sheetMetal.plate({ face, thickness: 2, bendRadius: 2, name: "base" });
      await bitbybit.draw.drawAnyAsync({ entity: base });
    • Beta

      Starts a part as a contour flange: an open profile of straight lines given a thickness and run along a direction, every corner a bend of the sheet's radius.

      Each segment becomes a region, name, name.2 and on. Roles start and end hold the faces at the profile's ends, sides those where the run starts and stops.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The new part

      const profile = await bitbybit.occt.shapes.wire.createPolylineWire({ points: [[0, 30, 0], [0, 0, 0], [50, 0, 0], [50, 30, 0]] });
      const channel = await bitbybit.occt.fabrication.sheetMetal.contour({ profile, direction: [0, 0, 1], length: 100, thickness: 2, name: "channel" });
      const web = await bitbybit.occt.fabrication.sheetMetal.insideFace({ part: channel, region: "channel.2" });
    • Beta

      Starts a part as a lofted flange between two profiles, such as a square-to-round transition.

      bent splits each curved edge into facetsPerBend flat facets joined by bends, opening a closed loft along a seam; formed rules open profiles of lines and arcs into one smooth region. Roles start, end, sides, seam and reliefs.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The new part

      const square = await bitbybit.occt.shapes.wire.createSquareWire({ size: 60, center: [0, 0, 0], direction: [0, 1, 0] });
      const circle = await bitbybit.occt.shapes.wire.createCircleWire({ radius: 20, center: [0, 40, 0], direction: [0, 1, 0] });
      const hood = await bitbybit.occt.fabrication.sheetMetal.loft({ first: square, second: circle, thickness: 1, facetsPerBend: 4 });
    • Beta

      Starts a part by carrying an open profile of straight lines along a path of straight segments, its runs meeting mitered at each corner of the path.

      The profile is drawn square to the path's first segment at its start; its segment along the path's plane becomes one web, name, round every corner. Role mitres holds the miters' faces.

      Parameters

      Returns Promise<SheetPart<TopoDSShapePointer>>

      The new part

      const profile = await bitbybit.occt.shapes.wire.createPolylineWire({ points: [[0, 0, 0], [0, 0, -30], [0, 20, -30]] });
      const path = await bitbybit.occt.shapes.wire.createPolylineWire({ points: [[0, 0, 0], [100, 0, 0], [100, 0, -80]] });
      const rim = await bitbybit.occt.fabrication.sheetMetal.sweep({ profile, path, thickness: 2, name: "rim" });