* Clean KCL Samples and Update Walkie Talkie * revolve keyword args * Update kcl-samples simulation test output --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
		
			
				
	
	
		
			38 lines
		
	
	
		
			1012 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			1012 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
// Antenna
 | 
						|
 | 
						|
 | 
						|
// import constants
 | 
						|
import antennaLength, antennaBaseWidth, antennaBaseHeight, antennaTopWidth, antennaTopHeight from "globals.kcl"
 | 
						|
 | 
						|
// Set units
 | 
						|
@settings(defaultLengthUnit = in)
 | 
						|
 | 
						|
export fn antenna () {
 | 
						|
  // Create the antenna base sketch
 | 
						|
  sketch001 = startSketchOn('XY')
 | 
						|
    |> startProfileAt([0, 0], %)
 | 
						|
    |> line(end = [antennaBaseWidth, 0])
 | 
						|
    |> line(end = [0, -antennaBaseHeight])
 | 
						|
    |> line(end = [-antennaBaseWidth, 0])
 | 
						|
    |> close()
 | 
						|
  
 | 
						|
  // Create the antenna top sketch
 | 
						|
  loftPlane = offsetPlane('XY', offset = antennaLength)
 | 
						|
  
 | 
						|
  sketch002 = startSketchOn(loftPlane)
 | 
						|
    |> startProfileAt([
 | 
						|
         (antennaBaseWidth - antennaTopWidth) / 2,
 | 
						|
         (antennaBaseHeight - antennaTopHeight) / 2
 | 
						|
       ], %)
 | 
						|
    |> xLine(length = antennaTopWidth)
 | 
						|
    |> yLine(length = -antennaTopHeight)
 | 
						|
    |> xLine(length = -antennaTopWidth)
 | 
						|
    |> close()
 | 
						|
  
 | 
						|
  // Create the antenna using a loft
 | 
						|
  antenna = loft([sketch001, sketch002])
 | 
						|
    |> appearance(color = "#000000")
 | 
						|
  return antenna
 | 
						|
  
 | 
						|
}
 |