feat(sdf): VDE-141 SdfNode::hex_prism 支持独立半径/边数(radius,height,sides=6)
工厂原仅接收 height 且把 radius 硬绑等于 height。改为 hex_prism(radius,height,sides=6),SdfParams 增 sides;新增通用 regular_polygon_prism 精确 SDF(扇区折叠,sides=6 与旧 hex_prism 几何一致),evaluate 经其求值;bounds 半径随 radius/height 计算。python 绑定同步。 判别性测试 +7:test_sdf_tree 半径/高度独立、边数控截面、非法边数夹取;test_sdf_primitives 顶点共享、面法向精确距离。sdf 6 套全绿(tree 34、primitives 69、to_mesh 6、optimize 21、operations 33、gradient 51)。
This commit is contained in:
@@ -44,7 +44,8 @@ nodes with the factory functions.
|
||||
.def_static("triangular_prism", &SdfNode::triangular_prism,
|
||||
py::arg("height"), "Triangular prism along Y")
|
||||
.def_static("hex_prism", &SdfNode::hex_prism,
|
||||
py::arg("height"), "Hexagonal prism along Y")
|
||||
py::arg("radius"), py::arg("height"), py::arg("sides") = 6,
|
||||
"Regular-polygon prism along Y (sides=6 → hexagon)")
|
||||
.def_static("link", &SdfNode::link,
|
||||
py::arg("radius"), py::arg("length"), py::arg("thickness"), "Link segment")
|
||||
.def_static("wedge", &SdfNode::wedge,
|
||||
|
||||
Reference in New Issue
Block a user