2024-03-13 14:22:22 -07:00
|
|
|
---
|
|
|
|
title: "KCL Standard Library"
|
2025-04-03 22:24:51 -04:00
|
|
|
excerpt: "Documentation for the KCL standard library for the Zoo Design Studio."
|
2024-03-13 14:22:22 -07:00
|
|
|
layout: manual
|
|
|
|
---
|
|
|
|
|
|
|
|
## Table of Contents
|
|
|
|
|
2025-02-27 09:34:55 +13:00
|
|
|
### Language
|
|
|
|
|
|
|
|
* [`Types`](kcl/types)
|
|
|
|
* [`Modules`](kcl/modules)
|
|
|
|
* [`Settings`](kcl/settings)
|
|
|
|
* [`Known Issues`](kcl/known-issues)
|
|
|
|
|
2025-05-02 03:56:27 +12:00
|
|
|
### Functions
|
2025-02-27 09:34:55 +13:00
|
|
|
|
2025-03-08 03:53:34 +13:00
|
|
|
* **std**
|
2025-02-20 19:33:21 +13:00
|
|
|
* [`angledLine`](kcl/angledLine)
|
|
|
|
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
|
|
|
|
* [`appearance`](kcl/appearance)
|
|
|
|
* [`arc`](kcl/arc)
|
|
|
|
* [`assert`](kcl/assert)
|
2025-04-22 12:44:52 -05:00
|
|
|
* [`assertIs`](kcl/assertIs)
|
2025-02-20 19:33:21 +13:00
|
|
|
* [`bezierCurve`](kcl/bezierCurve)
|
|
|
|
* [`circleThreePoint`](kcl/circleThreePoint)
|
2025-04-23 21:26:09 -07:00
|
|
|
* [`clone`](kcl/clone)
|
2025-02-20 19:33:21 +13:00
|
|
|
* [`close`](kcl/close)
|
|
|
|
* [`extrude`](kcl/extrude)
|
2025-03-19 15:12:27 -07:00
|
|
|
* [`getCommonEdge`](kcl/getCommonEdge)
|
2025-02-20 19:33:21 +13:00
|
|
|
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
|
|
|
|
* [`getOppositeEdge`](kcl/getOppositeEdge)
|
|
|
|
* [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge)
|
2025-05-02 03:56:27 +12:00
|
|
|
* [`helix`](kcl/functions/std-helix)
|
2025-04-10 18:30:57 -07:00
|
|
|
* [`intersect`](kcl/intersect)
|
2025-04-11 21:59:11 +01:00
|
|
|
* [`involuteCircular`](kcl/involuteCircular)
|
2025-02-20 19:33:21 +13:00
|
|
|
* [`lastSegX`](kcl/lastSegX)
|
|
|
|
* [`lastSegY`](kcl/lastSegY)
|
|
|
|
* [`legAngX`](kcl/legAngX)
|
|
|
|
* [`legAngY`](kcl/legAngY)
|
|
|
|
* [`legLen`](kcl/legLen)
|
|
|
|
* [`line`](kcl/line)
|
|
|
|
* [`loft`](kcl/loft)
|
|
|
|
* [`map`](kcl/map)
|
2025-05-02 03:56:27 +12:00
|
|
|
* [`offsetPlane`](kcl/functions/std-offsetPlane)
|
2025-02-20 19:33:21 +13:00
|
|
|
* [`patternCircular2d`](kcl/patternCircular2d)
|
|
|
|
* [`patternCircular3d`](kcl/patternCircular3d)
|
|
|
|
* [`patternLinear2d`](kcl/patternLinear2d)
|
|
|
|
* [`patternLinear3d`](kcl/patternLinear3d)
|
|
|
|
* [`patternTransform`](kcl/patternTransform)
|
|
|
|
* [`patternTransform2d`](kcl/patternTransform2d)
|
|
|
|
* [`polygon`](kcl/polygon)
|
|
|
|
* [`pop`](kcl/pop)
|
|
|
|
* [`profileStart`](kcl/profileStart)
|
|
|
|
* [`profileStartX`](kcl/profileStartX)
|
|
|
|
* [`profileStartY`](kcl/profileStartY)
|
|
|
|
* [`push`](kcl/push)
|
|
|
|
* [`reduce`](kcl/reduce)
|
2025-05-02 03:56:27 +12:00
|
|
|
* [`revolve`](kcl/functions/std-revolve)
|
2025-02-26 16:45:19 -08:00
|
|
|
* [`rotate`](kcl/rotate)
|
|
|
|
* [`scale`](kcl/scale)
|
2025-02-20 19:33:21 +13:00
|
|
|
* [`segAng`](kcl/segAng)
|
|
|
|
* [`segEnd`](kcl/segEnd)
|
|
|
|
* [`segEndX`](kcl/segEndX)
|
|
|
|
* [`segEndY`](kcl/segEndY)
|
|
|
|
* [`segLen`](kcl/segLen)
|
|
|
|
* [`segStart`](kcl/segStart)
|
|
|
|
* [`segStartX`](kcl/segStartX)
|
|
|
|
* [`segStartY`](kcl/segStartY)
|
2025-04-25 16:01:35 -05:00
|
|
|
* [`startProfile`](kcl/startProfile)
|
2025-02-20 19:33:21 +13:00
|
|
|
* [`startSketchOn`](kcl/startSketchOn)
|
2025-04-10 18:30:57 -07:00
|
|
|
* [`subtract`](kcl/subtract)
|
2025-04-26 15:31:51 -05:00
|
|
|
* [`subtract2d`](kcl/subtract2d)
|
2025-02-20 19:33:21 +13:00
|
|
|
* [`sweep`](kcl/sweep)
|
|
|
|
* [`tangentToEnd`](kcl/tangentToEnd)
|
|
|
|
* [`tangentialArc`](kcl/tangentialArc)
|
2025-02-26 16:45:19 -08:00
|
|
|
* [`translate`](kcl/translate)
|
2025-04-10 18:30:57 -07:00
|
|
|
* [`union`](kcl/union)
|
2025-02-20 19:33:21 +13:00
|
|
|
* [`xLine`](kcl/xLine)
|
|
|
|
* [`yLine`](kcl/yLine)
|
2025-05-02 03:56:27 +12:00
|
|
|
* **std::math**
|
|
|
|
* [`abs`](kcl/functions/std-math-abs)
|
|
|
|
* [`acos`](kcl/functions/std-math-acos)
|
|
|
|
* [`asin`](kcl/functions/std-math-asin)
|
|
|
|
* [`atan`](kcl/functions/std-math-atan)
|
|
|
|
* [`atan2`](kcl/functions/std-math-atan2)
|
|
|
|
* [`ceil`](kcl/functions/std-math-ceil)
|
|
|
|
* [`cos`](kcl/functions/std-math-cos)
|
|
|
|
* [`floor`](kcl/functions/std-math-floor)
|
|
|
|
* [`ln`](kcl/functions/std-math-ln)
|
|
|
|
* [`log`](kcl/functions/std-math-log)
|
|
|
|
* [`log10`](kcl/functions/std-math-log10)
|
|
|
|
* [`log2`](kcl/functions/std-math-log2)
|
|
|
|
* [`max`](kcl/functions/std-math-max)
|
|
|
|
* [`min`](kcl/functions/std-math-min)
|
|
|
|
* [`polar`](kcl/functions/std-math-polar)
|
|
|
|
* [`pow`](kcl/functions/std-math-pow)
|
|
|
|
* [`rem`](kcl/functions/std-math-rem)
|
|
|
|
* [`round`](kcl/functions/std-math-round)
|
|
|
|
* [`sin`](kcl/functions/std-math-sin)
|
|
|
|
* [`sqrt`](kcl/functions/std-math-sqrt)
|
|
|
|
* [`tan`](kcl/functions/std-math-tan)
|
|
|
|
* **std::sketch**
|
|
|
|
* [`circle`](kcl/functions/std-sketch-circle)
|
|
|
|
* [`mirror2d`](kcl/functions/std-sketch-mirror2d)
|
|
|
|
* **std::solid**
|
|
|
|
* [`chamfer`](kcl/functions/std-solid-chamfer)
|
|
|
|
* [`fillet`](kcl/functions/std-solid-fillet)
|
|
|
|
* [`hollow`](kcl/functions/std-solid-hollow)
|
|
|
|
* [`shell`](kcl/functions/std-solid-shell)
|
|
|
|
* **std::units**
|
|
|
|
* [`units::toCentimeters`](kcl/functions/std-units-toCentimeters)
|
|
|
|
* [`units::toDegrees`](kcl/functions/std-units-toDegrees)
|
|
|
|
* [`units::toFeet`](kcl/functions/std-units-toFeet)
|
|
|
|
* [`units::toInches`](kcl/functions/std-units-toInches)
|
|
|
|
* [`units::toMeters`](kcl/functions/std-units-toMeters)
|
|
|
|
* [`units::toMillimeters`](kcl/functions/std-units-toMillimeters)
|
|
|
|
* [`units::toRadians`](kcl/functions/std-units-toRadians)
|
|
|
|
* [`units::toYards`](kcl/functions/std-units-toYards)
|
|
|
|
|
|
|
|
### Constants
|
|
|
|
|
|
|
|
* **std**
|
|
|
|
* [`END`](kcl/consts/std-END)
|
|
|
|
* [`START`](kcl/consts/std-START)
|
|
|
|
* [`X`](kcl/consts/std-X)
|
|
|
|
* [`XY`](kcl/consts/std-XY)
|
|
|
|
* [`XZ`](kcl/consts/std-XZ)
|
|
|
|
* [`Y`](kcl/consts/std-Y)
|
|
|
|
* [`YZ`](kcl/consts/std-YZ)
|
|
|
|
* [`Z`](kcl/consts/std-Z)
|
2025-03-08 03:53:34 +13:00
|
|
|
* **std::math**
|
2025-04-30 11:07:05 -04:00
|
|
|
* [`E`](kcl/consts/std-math-E)
|
|
|
|
* [`PI`](kcl/consts/std-math-PI)
|
|
|
|
* [`TAU`](kcl/consts/std-math-TAU)
|
2025-03-30 11:10:44 +13:00
|
|
|
* **std::turns**
|
|
|
|
* [`turns::HALF_TURN`](kcl/consts/std-turns-HALF_TURN)
|
|
|
|
* [`turns::QUARTER_TURN`](kcl/consts/std-turns-QUARTER_TURN)
|
|
|
|
* [`turns::THREE_QUARTER_TURN`](kcl/consts/std-turns-THREE_QUARTER_TURN)
|
|
|
|
* [`turns::ZERO`](kcl/consts/std-turns-ZERO)
|
2025-05-02 03:56:27 +12:00
|
|
|
|
|
|
|
### Types
|
|
|
|
|
|
|
|
See also the [types overview](types)
|
|
|
|
|
|
|
|
* **Primitive types**
|
2025-05-03 04:06:43 +12:00
|
|
|
* [`End`](kcl/types#End)
|
|
|
|
* [`ImportedGeometry`](kcl/types#ImportedGeometry)
|
|
|
|
* [`Start`](kcl/types#Start)
|
|
|
|
* [`TagDeclarator`](kcl/types#TagDeclarator)
|
|
|
|
* [`TagIdentifier`](kcl/types#TagIdentifier)
|
2025-05-02 03:56:27 +12:00
|
|
|
* [`any`](kcl/types/std-types-any)
|
|
|
|
* [`bool`](kcl/types/std-types-bool)
|
|
|
|
* [`number`](kcl/types/std-types-number)
|
|
|
|
* [`string`](kcl/types/std-types-string)
|
|
|
|
* [`tag`](kcl/types/std-types-tag)
|
2025-04-22 11:00:53 +12:00
|
|
|
* **std::types**
|
2025-05-02 03:56:27 +12:00
|
|
|
* [`Axis2d`](kcl/types/std-types-Axis2d)
|
|
|
|
* [`Axis3d`](kcl/types/std-types-Axis3d)
|
|
|
|
* [`Edge`](kcl/types/std-types-Edge)
|
|
|
|
* [`Face`](kcl/types/std-types-Face)
|
|
|
|
* [`Helix`](kcl/types/std-types-Helix)
|
|
|
|
* [`Plane`](kcl/types/std-types-Plane)
|
|
|
|
* [`Point2d`](kcl/types/std-types-Point2d)
|
|
|
|
* [`Point3d`](kcl/types/std-types-Point3d)
|
|
|
|
* [`Sketch`](kcl/types/std-types-Sketch)
|
|
|
|
* [`Solid`](kcl/types/std-types-Solid)
|