Bitbybit Docs
    Preparing search index...

    Class OCCTFillets

    Rounding and beveling the edges of OpenCascade shapes: a fillet replaces a sharp edge with a rounded surface of a given radius, a chamfer with a flat bevel of a given distance. Edges are chosen by 0-based index in the order shapes.edge.getEdges lists them, or passed in directly; flat outlines and faces are rounded at their corners with fillet2d, whose corner indexes start at 1. A radius that does not fit, for instance larger than a neighbouring face, makes the kernel fail, so start small. Every method returns a new shape.

    Index

    Constructors

    2d fillets

    • Rounds the corners of a flat wire or face with arcs of a given radius.

      Without indexes every corner is rounded with radius. With indexes, counted from 1 along the outline, only those corners are rounded, each with radius or the matching entry of radiusList, as long as indexes. Wires with free-form edges use fillet3DWire.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The rounded wire or face

      const rectangle = await bitbybit.occt.shapes.wire.createRectangleWire({ width: 10, length: 5, center: [0, 0, 0], direction: [0, 1, 0] });
      const rounded = await bitbybit.occt.fillets.fillet2d({ shape: rectangle, radius: 1 });
      const twoCorners = await bitbybit.occt.fillets.fillet2d({ shape: rectangle, radiusList: [1, 2], indexes: [1, 3] });
    • Joins two edges that lie in one plane with a rounding arc of the given radius, trimming the edges to meet it, and returns the three pieces as one wire.

      The plane is given by planeOrigin and planeDirection, its normal. When several arcs fit, solution picks one by index; -1 takes the one nearest planeOrigin.

      Parameters

      Returns Promise<TopoDSWirePointer>

      The wire of first edge, arc and second edge

      const corner = await bitbybit.occt.fillets.filletTwoEdgesInPlaneIntoAWire({
      edge1: horizontal,
      edge2: vertical,
      planeOrigin: [0, 0, 0],
      planeDirection: [0, 1, 0],
      radius: 1,
      solution: -1,
      });

    3d chamfers

    • Bevels the edges of a shape by a distance, in model units, cutting each sharp edge back to a flat strip.

      Without indexes every edge is beveled with distance. With indexes, counted from 0 in the order shapes.edge.getEdges lists them, only those edges are beveled, each with distance or the matching entry of distanceList, in edge order.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with beveled edges

      const beveled = await bitbybit.occt.fillets.chamferEdges({ shape: box, distance: 1 });
      
    • Bevels the given edges of a shape, each by its own distance.

      The edges must belong to the shape; distanceList pairs with them by position and must have the same length, or an error is thrown.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with beveled edges

      const edges = await bitbybit.occt.shapes.edge.getEdges({ shape: box });
      const beveled = await bitbybit.occt.fillets.chamferEdgesList({ shape: box, edges: [edges[0], edges[1]], distanceList: [1, 2] });
    • Bevels one edge of a shape with an uneven chamfer: distance1 is measured on face, one of the two faces meeting at the edge, and distance2 on the other.

      The face decides which side gets which distance; swap them to flip the bevel.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with the beveled edge

      const edges = await bitbybit.occt.shapes.edge.getEdges({ shape: box });
      const faces = await bitbybit.occt.shapes.face.getFaces({ shape: box });
      const beveled = await bitbybit.occt.fillets.chamferEdgeTwoDistances({ shape: box, edge: edges[0], face: faces[0], distance1: 1, distance2: 2 });
    • Bevels several edges of a shape, each by its own distance and angle, the distance measured on the edge's paired face and the angle in degrees from it.

      faces, distances and angles pair with edges by position and must all have the same length, or an error is thrown.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with beveled edges

      const beveled = await bitbybit.occt.fillets.chamferEdgesDistsAngles({
      shape: box,
      edges: [edges[0], edges[1]],
      faces: [faces[0], faces[0]],
      distances: [1, 0.5],
      angles: [30, 60],
      });

    3d fillets

    • Rounds the edges of a shape with a fillet radius, in model units.

      Without indexes every edge is rounded with radius. With indexes, counted from 0 in the order shapes.edge.getEdges lists them, only those edges are rounded, each with radius or the matching entry of radiusList, paired with the selected edges in edge order.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with rounded edges

      const box = await bitbybit.occt.shapes.solid.createBox({ width: 10, length: 20, height: 5, center: [0, 0, 0] });
      const rounded = await bitbybit.occt.fillets.filletEdges({ shape: box, radius: 1 });
      const twoEdges = await bitbybit.occt.fillets.filletEdges({ shape: box, radiusList: [1, 2], indexes: [0, 3] });
    • Rounds the given edges of a shape, each with its own radius.

      The edges must belong to the shape; radiusList pairs with them by position and must have the same length, or an error is thrown.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with rounded edges

      const edges = await bitbybit.occt.shapes.edge.getEdges({ shape: box });
      const rounded = await bitbybit.occt.fillets.filletEdgesList({ shape: box, edges: [edges[0], edges[1]], radiusList: [1, 2] });
    • Rounds one edge of a shape with a radius that changes along it.

      paramsU are positions along the edge as fractions from 0 at its start to 1 at its end, and radiusList gives the radius at each; the kernel blends smoothly between them. The two lists must have the same length, or an error is thrown.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with the rounded edge

      const edges = await bitbybit.occt.shapes.edge.getEdges({ shape: box });
      const tapered = await bitbybit.occt.fillets.filletEdgeVariableRadius({ shape: box, edge: edges[0], radiusList: [0.5, 2, 0.5], paramsU: [0, 0.5, 1] });
    • Rounds several edges of a shape, each with the same radius profile that changes along it.

      paramsU are positions along each edge as fractions from 0 to 1 and radiusList the radius at each; the lists must have the same length, or an error is thrown.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with the rounded edges

      const edges = await bitbybit.occt.shapes.edge.getEdges({ shape: box });
      const tapered = await bitbybit.occt.fillets.filletEdgesSameVariableRadius({ shape: box, edges: [edges[0], edges[2]], radiusList: [0.5, 2, 0.5], paramsU: [0, 0.5, 1] });
    • Rounds several edges of a shape, each with its own radius profile that changes along it.

      radiusLists and paramsULists hold one list per edge, in edge order; within each pair the positions are fractions from 0 to 1 along the edge and the radii apply there. All three lists must have the same length, or an error is thrown.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with the rounded edges

      const edges = await bitbybit.occt.shapes.edge.getEdges({ shape: box });
      const tapered = await bitbybit.occt.fillets.filletEdgesVariableRadius({
      shape: box,
      edges: [edges[0], edges[2]],
      radiusLists: [[0.5, 2], [2, 0.5]],
      paramsULists: [[0, 1], [0, 1]],
      });
    • Rounds the corners of a wire that does not lie in one plane.

      The kernel has no direct 3D wire fillet, so the wire is extruded along direction into a shell, the shell is filleted and the rounded wire is read back off it; direction must not be parallel to the wire and must leave room for the fillets.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The rounded wire

      const rounded = await bitbybit.occt.fillets.fillet3DWire({ shape: zigzagWire, radius: 0.5, direction: [0, 5, 0] });
      
    • Rounds the corners of several wires that do not lie in one plane, as fillet3DWire does for one, with the same radius, indexes and direction for all.

      Parameters

      Returns Promise<TopoDSShapePointer[]>

      The rounded wires, in the same order

      const rounded = await bitbybit.occt.fillets.fillet3DWires({ shapes: [wireA, wireB], radius: 0.5, direction: [0, 5, 0] });