215 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			215 KiB
		
	
	
	
	
	
	
	
title, excerpt, layout
| title | excerpt | layout | 
|---|---|---|
| chamfer | Cut a straight transitional edge along a tagged path. | manual | 
Cut a straight transitional edge along a tagged path.
Chamfer is similar in function and use to a fillet, except a fillet will blend the transition along an edge, rather than cut a sharp, straight transitional edge.
chamfer(data: ChamferData, solid: Solid, tag?: TagDeclarator) -> Solid
Arguments
| Name | Type | Description | Required | 
|---|---|---|---|
data | 
ChamferData | 
Data for chamfers. | Yes | 
solid | 
Solid | 
An solid is a collection of extrude surfaces. | Yes | 
tag | 
TagDeclarator | 
No | 
Returns
Solid - An solid is a collection of extrude surfaces.
Examples
// Chamfer a mounting plate.
width = 20
length = 10
thickness = 1
chamferLength = 2
mountingPlateSketch = startSketchOn("XY")
  |> startProfileAt([-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)
  |> chamfer({
       length = chamferLength,
       tags = [
         getNextAdjacentEdge(edge1),
         getNextAdjacentEdge(edge2),
         getNextAdjacentEdge(edge3),
         getNextAdjacentEdge(edge4)
       ]
     }, %)
// Sketch on the face of a chamfer.
fn cube(pos, scale) {
  sg = startSketchOn('XY')
    |> startProfileAt(pos, %)
    |> line(end = [0, scale])
    |> line(end = [scale, 0])
    |> line(end = [0, -scale])
  return sg
}
part001 = cube([0, 0], 20)
  |> close(tag = $line1)
  |> extrude(length = 20)
  |> chamfer({
       length = 10,
       tags = [getOppositeEdge(line1)]
     }, %, $chamfer1) // We tag the chamfer to reference it later.
sketch001 = startSketchOn(part001, chamfer1)
  |> startProfileAt([10, 10], %)
  |> line(end = [2, 0])
  |> line(end = [0, 2])
  |> line(end = [-2, 0])
  |> line(endAbsolute = [profileStartX(%), profileStartY(%)])
  |> close()
  |> extrude(length = 10)