Files
make-cad/docs/api/make_point_rvertex.md
T
倪旌哲 e907fa88a4 Add Vertex and Wire classes documentation; implement auto documentation generation script
- Created `vertex.md` and `wire.md` to document the Vertex and Wire classes in the SimpleCAD API, detailing their attributes, methods, and usage examples.
- Introduced `auto_docs_gen.py` script to automate the extraction of API information from `operations.py` and generate markdown documentation.
- Updated `operations.py` to correct a comment regarding the target normal vector in the `helical_sweep_rsolid` function.
2025-07-06 23:24:31 +08:00

1.0 KiB

make_point_rvertex

API定义

def make_point_rvertex(x: float, y: float, z: float) -> Vertex

API作用

创建三维空间中的几何点,通常用作其他几何对象的构造参数,如作为线段的端点、 圆弧的控制点等。支持当前坐标系变换。

API参数说明

x

  • 类型: float
  • 说明: X坐标值,用于定义点在X轴方向的位置

y

  • 类型: float
  • 说明: Y坐标值,用于定义点在Y轴方向的位置

z

  • 类型: float
  • 说明: Z坐标值,用于定义点在Z轴方向的位置

返回值

Vertex: 创建的顶点对象,包含指定坐标的点

异常

  • ValueError: 当坐标无效时抛出异常

API使用例子

>>> # 创建原点
>>> origin = make_point_rvertex(0, 0, 0)

>>> # 创建指定坐标的点
>>> point = make_point_rvertex(1.5, 2.0, 3.0)

>>> # 在工作平面中创建点
>>> with SimpleWorkplane((1, 1, 1)):
...     local_point = make_point_rvertex(0, 0, 0)  # 实际位置为(1, 1, 1)