kcl library referencestdsolidfillet

filletFunction in std::solid

Blend a transitional edge along a tagged path, smoothing the sharp edge.

fillet(
  @solid: Solid,
  radius: number(Length),
  tags: [Edge; 1+],
  tolerance?: number(Length),
  tag?: tag,
): Solid

Fillet is similar in function and use to a chamfer, except a chamfer will cut a sharp transition along an edge while fillet will smoothly blend the transition.

Arguments

NameTypeDescriptionRequired
solidSolidThe solid whose edges should be fillettedYes
radiusnumber(Length)The radius of the filletYes
tags[Edge; 1+]The paths you want to filletYes
tolerancenumber(Length)The tolerance for this filletNo
tagtagCreate a new tag which refers to this filletNo

Returns

Solid - A solid is a collection of extrude surfaces.

Examples

width = 20
length = 10
thickness = 1
filletRadius = 2

mountingPlateSketch = startSketchOn(XY)
  |> startProfile(at = [-width/2, -length/2])
  |> line(endAbsolute = [width/2, -length/2], tag = $edge1)
  |> line(endAbsolute = [width/2, length/2], tag = $edge2)
  |> line(endAbsolute = [-width/2, length/2], tag = $edge3)
  |> close(tag = $edge4)

mountingPlate = extrude(mountingPlateSketch, length = thickness)
  |> fillet(
    radius = filletRadius,
    tags = [
      getNextAdjacentEdge(edge1),
      getNextAdjacentEdge(edge2),
      getNextAdjacentEdge(edge3),
      getNextAdjacentEdge(edge4)
    ],
  )

Rendered example of fillet 0

width = 20
length = 10
thickness = 1
filletRadius = 1

mountingPlateSketch = startSketchOn(XY)
  |> startProfile(at = [-width/2, -length/2])
  |> line(endAbsolute = [width/2, -length/2], tag = $edge1)
  |> line(endAbsolute = [width/2, length/2], tag = $edge2)
  |> line(endAbsolute = [-width/2, length/2], tag = $edge3)
  |> close(tag = $edge4)

mountingPlate = extrude(mountingPlateSketch, length = thickness)
  |> fillet(
    radius = filletRadius,
    tolerance = 0.000001,
    tags = [
      getNextAdjacentEdge(edge1),
      getNextAdjacentEdge(edge2),
      getNextAdjacentEdge(edge3),
      getNextAdjacentEdge(edge4)
    ],
  )

Rendered example of fillet 1