forked from 1b-agent/opencadstudio-upstream
Extend GPU analytical circle and arc rendering to block inserts
- Emit transformed analytical curves (circles, arcs, ellipses) in block expansion as standalone wires rather than merging them into batched line strips. - Keep render_instance unset on analytical curves in block prototypes so they route directly to CircleGpu / EllipseGpu instead of BlockWireGpu. - Support TangentGeom::Circle in extract_circle_instance and wire partitioning. - Drop analytical tangents on wires clipped by xclip so clipped geometry falls back correctly to line segments. - Add unit test verifying block circles and arcs extract as analytical GPU instances.
This commit is contained in:
1 parent
690971c44e
commit
73cd759ca4
5 files changed
+202
-11
No files matched your search
@@ -215,6 +215,14 @@ pub fn extract_circle_instance(
|
||||
return None;
|
||||
}
|
||||
let (center, axis_x, axis_y, radius, start_angle, end_angle) = match wire.tangent_geoms[0] {
|
||||
crate::scene::model::wire_model::TangentGeom::Circle { center, radius } => (
|
||||
[center[0] as f64, center[1] as f64, center[2] as f64],
|
||||
[1.0, 0.0, 0.0],
|
||||
[0.0, 1.0, 0.0],
|
||||
radius as f64,
|
||||
0.0f32,
|
||||
std::f32::consts::TAU,
|
||||
),
|
||||
crate::scene::model::wire_model::TangentGeom::PlanarCircle {
|
||||
center,
|
||||
axis_x,
|
||||
|
||||
Reference in new issue
Block a user