解决冲突并完成合并
This commit is contained in:
@@ -9,10 +9,12 @@ from build123d import Axis, Edge, Face, Plane, Solid, Vector, Wire, export_step
|
||||
|
||||
from .runtime_types import AxisSpec, HoleSpec, PlaneSpec, TopologyRecord, Vector3, canonical_plane_signature
|
||||
|
||||
|
||||
def _vector(value: list[float] | tuple[float, float, float]) -> Vector:
|
||||
# 将三元坐标(list 或 tuple)转换为 build123d 的 Vector 对象。
|
||||
return Vector(float(value[0]), float(value[1]), float(value[2]))
|
||||
|
||||
|
||||
def _arc_midpoint(edge: dict[str, Any], start: Vector, end: Vector, center: Vector) -> Vector:
|
||||
# 计算圆弧中点(配合 Edge.make_three_point_arc 三点画弧),支持显式法向与顺时针/逆时针方向。
|
||||
# 1. 半径:优先取 edge.radius_mm,缺省时由圆心到起点的距离推算。
|
||||
@@ -46,6 +48,7 @@ def _arc_midpoint(edge: dict[str, Any], start: Vector, end: Vector, center: Vect
|
||||
radius_vector = first.normalized() * radius
|
||||
return center + radius_vector * math.cos(half) + normal.cross(radius_vector) * math.sin(half)
|
||||
|
||||
|
||||
class Build123dGeometryAdapter:
|
||||
"""All B-rep construction and mutation lives in this adapter."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user