kcl-std → functions → gdt::datum

gdt::datumFunction in std::gdt

WARNING: This function is experimental and may change or be removed.

GD&T datum feature.

gdt::datum(
  face: TaggedFace,
  name: string,
  framePosition?: Point2d,
  framePlane?: Plane,
  fontPointSize?: number(_),
  fontScale?: number(_),
): GdtAnnotation

Arguments

NameTypeDescriptionRequired
faceTaggedFaceThe face to be annotated.Yes
namestringThe name of the datum.Yes
framePositionPoint2dThe position of the feature control frame relative to the leader arrow. The default is [100mm, 100mm].No
framePlanePlaneThe plane in which to display the feature control frame. The default is XY. Other standard planes like XZ and YZ can also be used. The frame may be displayed in a plane parallel to the given plane.No
fontPointSizenumber(_)The font point size to use for the annotation text rendering. The default is 36.No
fontScalenumber(_)Scale to use for the annotation text after rendering with the point size. The default is 1.0. Must be greater than 0.No

Returns

GdtAnnotation - A GD&T annotation.

Examples

@settings(experimentalFeatures = allow, defaultLengthUnit = in)

width = 5

startSketchOn(XY)
  |> startProfile(at = [0, 0])
  |> line(end = [width, 0], tag = $side1)
  |> line(end = [0, width], tag = $side2)
  |> line(end = [-width, 0], tag = $side3)
  |> line(end = [0, -width], tag = $side4)
  |> close()
  |> extrude(length = 5, tagStart = $bottom, tagEnd = $top)

gdt::datum(
  face = side2,
  name = "A",
  framePosition = [5, 0],
  framePlane = XZ,
)

Found a typo?