oas-geometry

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OAS Geometry

OAS 几何

When to use

使用场景

Use this skill whenever the task touches coordinates, curves, polygon validity, units, or angular conventions. This is the largest section of the spec, so load it early when you suspect a geometry bug (integer-mm violations, polygon not closing, arc winding wrong). If the work is about which entity owns the geometry (room vs. wall etc.), prefer
oas-core
or
oas-layout
.
当任务涉及坐标、曲线、多边形有效性、单位或角度约定时,即可使用本技能。这是规范中篇幅最大的部分,因此当你怀疑存在几何问题(如整数毫米违规、多边形未闭合、圆弧缠绕方向错误)时,请尽早加载它。如果工作内容是关于哪个实体拥有几何属性(例如房间 vs. 墙体等),则优先使用
oas-core
oas-layout

Key types

核心类型

  • Point
    { x, y }
    in integer mm (optionally
    z
    for railings on stairs)
  • Polygon
    — ordered
    points
    array plus explicit
    "closed": true
    ;
    closed: false
    is allowed for open paths (e.g. railings)
  • LineSegment
    — straight edge from
    start
    to
    end
  • Arc
    — circular arc with
    center
    ,
    radius_mm
    ,
    start_angle_deg
    ,
    end_angle_deg
  • Circle
    — full circle (
    center
    ,
    radius_mm
    )
  • Spiral
    /
    Fillet
    — specialty curves used for stairs and corners
  • Point
    — 以整数毫米为单位的
    { x, y }
    (楼梯栏杆可选择性添加
    z
    坐标)
  • Polygon
    — 有序的
    points
    数组,加上显式的
    "closed": true
    closed: false
    适用于开放路径(如栏杆)
  • LineSegment
    — 从
    start
    end
    的直边
  • Arc
    — 包含
    center
    radius_mm
    start_angle_deg
    end_angle_deg
    的圆弧
  • Circle
    — 完整的圆形(包含
    center
    radius_mm
  • Spiral
    /
    Fillet
    — 用于楼梯和拐角的特殊曲线

Critical rules

关键规则

  1. No decimals in coordinates. Every
    x
    ,
    y
    ,
    z
    , radius, length is integer millimeters. The single exception is
    area_m2
    , which is a derived decimal value in square meters.
  2. Polygons must declare
    "closed": true
    explicitly.
    A polygon without this flag is not closed by convention — don't rely on the last point matching the first.
  3. Consistent winding. Point order must be uniformly clockwise or counterclockwise; do not mix. Positive rotation is counterclockwise.
  4. Arc sweep is CCW from
    start_angle_deg
    to
    end_angle_deg
    .
    If you want a clockwise visual arc, swap start/end — do not negate angles.
  5. Units are global.
    units.length
    is
    "mm"
    and
    units.angle
    is
    "deg"
    for the whole document; do not introduce per-entity unit overrides.
  1. 坐标中不得使用小数。 所有
    x
    y
    z
    、半径、长度均为整数毫米。唯一的例外是
    area_m2
    ,它是派生的平方米十进制值。
  2. 多边形必须显式声明
    "closed": true
    按照约定,没有此标记的多边形是未闭合的——不要依赖最后一个点与第一个点匹配来实现闭合。
  3. 一致的缠绕方向。 点的顺序必须统一为顺时针或逆时针;不得混合使用。正旋转方向为逆时针。
  4. 圆弧扫掠方向为从
    start_angle_deg
    end_angle_deg
    的逆时针方向。
    如果需要视觉上的顺时针圆弧,请交换起始/结束角度——不要取角度的负值。
  5. 单位为全局统一。 整个文档的
    units.length
    "mm"
    units.angle
    "deg"
    ;请勿引入针对单个实体的单位覆盖。

Full schema

完整 schema

See docs/geometry.md for the complete reference, including arc parameterization, spiral construction, and fillet rules.
请查看docs/geometry.md获取完整参考,包括圆弧参数化、螺旋线构造和圆角规则。

Related skills

相关技能

  • oas-core
    and
    oas-layout
    — consumers of these geometric primitives
  • oas-render
    — for how these primitives map onto screen coordinates (Y typically inverts)
  • oas-core
    oas-layout
    — 这些几何基元的使用者
  • oas-render
    — 关于这些基元如何映射到屏幕坐标(Y轴通常会反转)