forked from 1b-agent/opencadstudio-upstream
feat(render): GPU analytical rendering for circles, arcs, and ellipses
- Render planar circles, circular arcs, ellipses, and elliptical arcs analytically via GPU-instanced screen-space quads and WGSL shaders. - Implement exact arc sweep clamping with round end caps matching the CAD wire shader. - Implement robust Newton-Raphson closest-point solver for ellipses with isotropic screen-space derivative anti-aliasing. - Integrate into wire pipeline and PersistentWireArena upload paths. - Remove unused mesh_volume_centroid function in doc_api.
This commit is contained in:
1 parent
143703d809
commit
0425f979f9
17 files changed
+1860
-40
No files matched your search
@@ -5408,6 +5408,21 @@ fn map_wire_ocs_to_wcs(wire: &mut WireModel, normal: Vector3) {
|
||||
*axis_x = map_vector(*axis_x);
|
||||
*axis_y = map_vector(*axis_y);
|
||||
}
|
||||
TangentGeom::PlanarEllipse {
|
||||
center,
|
||||
major_axis,
|
||||
normal,
|
||||
..
|
||||
} => {
|
||||
let mapped = map(center[0], center[1], center[2]);
|
||||
let map_vector = |axis: [f64; 3]| {
|
||||
let mapped = map(axis[0], axis[1], axis[2]);
|
||||
[mapped.0, mapped.1, mapped.2]
|
||||
};
|
||||
*center = [mapped.0, mapped.1, mapped.2];
|
||||
*major_axis = map_vector(*major_axis);
|
||||
*normal = map_vector(*normal);
|
||||
}
|
||||
}
|
||||
}
|
||||
wire.aabb = WireModel::UNBOUNDED_AABB;
|
||||
|
||||
Reference in new issue
Block a user