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
@@ -150,7 +150,8 @@ pub fn classify_wire(wire: &WireModel) -> WireKind {
|
||||
&& wire.text_verts.is_empty()
|
||||
{
|
||||
match &wire.tangent_geoms[0] {
|
||||
crate::scene::model::wire_model::TangentGeom::PlanarCircle { .. }
|
||||
crate::scene::model::wire_model::TangentGeom::Circle { .. }
|
||||
| crate::scene::model::wire_model::TangentGeom::PlanarCircle { .. }
|
||||
| crate::scene::model::wire_model::TangentGeom::Arc { .. } => {
|
||||
if super::circle_gpu::extract_circle_instance(wire, 0.0).is_some() {
|
||||
return WireKind::Circle;
|
||||
@@ -214,7 +215,8 @@ pub fn partition_wires<'a>(
|
||||
&& wire.text_verts.is_empty()
|
||||
{
|
||||
match &wire.tangent_geoms[0] {
|
||||
crate::scene::model::wire_model::TangentGeom::PlanarCircle { .. }
|
||||
crate::scene::model::wire_model::TangentGeom::Circle { .. }
|
||||
| crate::scene::model::wire_model::TangentGeom::PlanarCircle { .. }
|
||||
| crate::scene::model::wire_model::TangentGeom::Arc { .. } => {
|
||||
if let Some(inst) = super::circle_gpu::extract_circle_instance(wire, depth) {
|
||||
circle_instances.push(inst);
|
||||
|
||||
Reference in new issue
Block a user