99 lines
		
	
	
		
			119 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			99 lines
		
	
	
		
			119 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| ---
 | |
| title: "fillet"
 | |
| subtitle: "Function in std::solid"
 | |
| excerpt: "Blend a transitional edge along a tagged path, smoothing the sharp edge."
 | |
| layout: manual
 | |
| ---
 | |
| 
 | |
| Blend a transitional edge along a tagged path, smoothing the sharp edge.
 | |
| 
 | |
| ```kcl
 | |
| fillet(
 | |
|   @solid: Solid,
 | |
|   radius: number(Length),
 | |
|   tags: [Edge; 1+],
 | |
|   tolerance?: number(Length),
 | |
|   tag?: TagDecl,
 | |
| ): 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
 | |
| 
 | |
| | Name | Type | Description | Required |
 | |
| |----------|------|-------------|----------|
 | |
| | `solid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | The solid whose edges should be filletted | Yes |
 | |
| | `radius` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The radius of the fillet | Yes |
 | |
| | `tags` | [`[Edge; 1+]`](/docs/kcl-std/types/std-types-Edge) | The paths you want to fillet | Yes |
 | |
| | `tolerance` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | Defines the smallest distance below which two entities are considered coincident, intersecting, coplanar, or similar. For most use cases, it should not be changed from its default value of 10^-7 millimeters. | No |
 | |
| | `tag` | [`TagDecl`](/docs/kcl-std/types/std-types-TagDecl) | Create a new tag which refers to this fillet | No |
 | |
| 
 | |
| ### Returns
 | |
| 
 | |
| [`Solid`](/docs/kcl-std/types/std-types-Solid) - A solid is a collection of extruded surfaces.
 | |
| 
 | |
| 
 | |
| ### Examples
 | |
| 
 | |
| ```kcl
 | |
| 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)
 | |
|        ],
 | |
|      )
 | |
| 
 | |
| ```
 | |
| 
 | |
| 
 | |
| 
 | |
| ```kcl
 | |
| 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)
 | |
|        ],
 | |
|      )
 | |
| 
 | |
| ```
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 |