Bitbybit Docs
    Preparing search index...

    Class OCCTCorners

    Rounding and beveling single corners of an OpenCascade shell or solid, picked by a point near them rather than by edge index: the corner nearest each point is found, classified and treated on its own, leaving the rest of the shape untouched. A corner is where several edges meet at one vertex. classifyCornerByPoint reports what kind of corner a point would pick, and cornerByPointReport explains what a fillet did or why it was skipped.

    Index

    Constructors

    by point

    • Rounds the corner nearest each given point on a shell or solid, touching only that corner.

      radius is the rounding size; taperFactor, for 3D corners, sets how far the rounding reaches along the meeting edges, 0 for the tightest, 1 for the full reach. snapTolerance caps the point-to-vertex distance, 0 accepting the nearest; mode planarOnly skips 3D corners.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with rounded corners

      const rounded = await bitbybit.occt.corners.filletCornerByPoint({
      shape: box,
      points: [[5, 5, 5]],
      radius: 1,
      taperFactor: 1,
      snapTolerance: 0,
      mode: Bit.Inputs.OCCT.cornerModeEnum.auto,
      });
    • Bevels the corner nearest each given point on a shell or solid, touching only that corner.

      distance is how far the bevel reaches from the corner and angle its slope in degrees. snapTolerance caps how far a point may be from a vertex, 0 accepting the nearest; mode planarOnly skips 3D corners. A corner that cannot be beveled throws.

      Parameters

      Returns Promise<TopoDSShapePointer>

      The shape with beveled corners

      const beveled = await bitbybit.occt.corners.chamferCornerByPoint({
      shape: box,
      points: [[5, 5, 5]],
      distance: 1,
      angle: 45,
      snapTolerance: 0,
      mode: Bit.Inputs.OCCT.cornerModeEnum.auto,
      });
    • Looks up the corner nearest each given point and reports what kind it is, without changing the shape.

      Each entry says where the corner is, how far it was from the point, how many edges and faces meet there and whether it is planar, developable or a true 3D corner, or why none was found. It shows what filletCornerByPoint picks.

      Parameters

      Returns Promise<CornerByPointReport>

      The report with one entry per point

      const report = await bitbybit.occt.corners.classifyCornerByPoint({ shape: box, points: [[5, 5, 5]], snapTolerance: 0 });
      console.log(report.results[0].classification);
    • Runs the same corner rounding as filletCornerByPoint and returns a report instead of the shape: for each point, which corner was found, how it was classified, what was done and whether it succeeded.

      Handy for finding out why a fillet was skipped before changing the radius or the points.

      Parameters

      Returns Promise<CornerByPointReport>

      The report with one entry per point

      const report = await bitbybit.occt.corners.cornerByPointReport({
      shape: box,
      points: [[5, 5, 5]],
      radius: 1,
      taperFactor: 1,
      snapTolerance: 0,
      mode: Bit.Inputs.OCCT.cornerModeEnum.auto,
      });
      console.log(report.results[0].applied, report.results[0].message);