Structs

Functions

作角度为angle(单位: 角度)的直线, 计算其与一个凸多边形的交点, 如果只有一个交点, 返回两个相同的点 polygon 2 维点

正方形切 4分之一圆弧 input ⚪心 [f32;2] 弧方向向量 [f32;2] 半径 f32 角度 f32 output 点列表 * 逆时针 Vec<[f32;2]>

矩形切 圆角 input 左上坐标

沿指定方向对指定属性列表做指定点的插值 input: positions 点列表 indices attrs lg_attrs lg_pos start end output: attrs

in: points 三维点数据 attrs 多个属性的 各点属性数据集 polygon_indices 多边形顶点数据 lg_attrs 多种属性值列表 lg_pos 插值区间列表 start 插值计算起点 end 插值计算终点 out: points 中点的属性数据流

根据指定切割线列表,切割出多个多边形 input: positions: 初始点列表 indices: 初始多边形点序号列表 lg_pos: 切割线在切割域内位置 start: 切割域起点 end: 切割域终点 output: points: 结果点列表 indices: [结果多边形点序号列表]

将一个多边形按照指示方向的多个空间线切分, 返回新的多边形 input: points: 初始点数据集 - 三维数据 polygon_indices: 初始多边形点索引列表 lg_pos: 分割百分比列表 start: 分割方向的起点 end: 分割方向的终点 output: (点数据流, [多边形顶点…]) 点数据流:在 points 后续添加点数据, [多边形顶点…]: 分割出来的多各多边形的索引列表, 索引列表为 points 中点索引

矩形切圆角矩形

将一个矩形转化为圆角矩形, 返回多边形的顶点流, 顶点为三维顶点 多边形方向:逆时针

矩形切圆角矩形 - 带 边框

处理带border 的圆角矩形 input: x, y: 左上 w, h:矩形大小 radius: 圆角半径 z: output: (三维点数据, 多边形点索引)

处理带border 的圆角矩形 input: x, y: 左上 w, h:矩形大小 radius: 圆角半径 z: level: 细分级别 4 / 8 / 16 output: (三维点数据, 多边形点索引)

将一个矩形转化为圆角矩形, 返回多边形的顶点流, 顶点为三维顶点 多边形方向:逆时针

根据指定切割线列表,切割出多个多边形 input: positions: [初始点列表] indices: [初始多边形点序号列表] lg_pos: 切割线在切割域内位置 start: 切割域起点 end: 切割域终点 output: points: 结果点列表 indices: [结果多边形点序号列表]

Type Definitions

input 起点 [x, y] 终点 [x, y] 划分数据 [percent…] output lines [ a, b, c ]

(x, y)

(x, y, z)

(点数据流, [多边形顶点…])