oas-geometry
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOAS 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 or .
oas-coreoas-layout当任务涉及坐标、曲线、多边形有效性、单位或角度约定时,即可使用本技能。这是规范中篇幅最大的部分,因此当你怀疑存在几何问题(如整数毫米违规、多边形未闭合、圆弧缠绕方向错误)时,请尽早加载它。如果工作内容是关于哪个实体拥有几何属性(例如房间 vs. 墙体等),则优先使用或。
oas-coreoas-layoutKey types
核心类型
- —
Pointin integer mm (optionally{ x, y }for railings on stairs)z - — ordered
Polygonarray plus explicitpoints;"closed": trueis allowed for open paths (e.g. railings)closed: false - — straight edge from
LineSegmenttostartend - — circular arc with
Arc,center,radius_mm,start_angle_degend_angle_deg - — full circle (
Circle,center)radius_mm - /
Spiral— specialty curves used for stairs and cornersFillet
- — 以整数毫米为单位的
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
关键规则
- No decimals in coordinates. Every ,
x,y, radius, length is integer millimeters. The single exception isz, which is a derived decimal value in square meters.area_m2 - Polygons must declare explicitly. A polygon without this flag is not closed by convention — don't rely on the last point matching the first.
"closed": true - Consistent winding. Point order must be uniformly clockwise or counterclockwise; do not mix. Positive rotation is counterclockwise.
- Arc sweep is CCW from to
start_angle_deg. If you want a clockwise visual arc, swap start/end — do not negate angles.end_angle_deg - Units are global. is
units.lengthand"mm"isunits.anglefor the whole document; do not introduce per-entity unit overrides."deg"
- 坐标中不得使用小数。 所有、
x、y、半径、长度均为整数毫米。唯一的例外是z,它是派生的平方米十进制值。area_m2 - 多边形必须显式声明。 按照约定,没有此标记的多边形是未闭合的——不要依赖最后一个点与第一个点匹配来实现闭合。
"closed": true - 一致的缠绕方向。 点的顺序必须统一为顺时针或逆时针;不得混合使用。正旋转方向为逆时针。
- 圆弧扫掠方向为从到
start_angle_deg的逆时针方向。 如果需要视觉上的顺时针圆弧,请交换起始/结束角度——不要取角度的负值。end_angle_deg - 单位为全局统一。 整个文档的为
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
相关技能
- and
oas-core— consumers of these geometric primitivesoas-layout - — for how these primitives map onto screen coordinates (Y typically inverts)
oas-render
- 和
oas-core— 这些几何基元的使用者oas-layout - — 关于这些基元如何映射到屏幕坐标(Y轴通常会反转)
oas-render