Skip to content

turn!(path, 0.0, radius) creates degenerate geometry that crashes OpenCASCADE #167

@ybrightye

Description

@ybrightye

turn!(path, 0.0, radius, style) creates a zero-length arc with identical start/end points. GDS rendering silently drops the degenerate edge, but solid model rendering crashes OCC:

Error : OpenCASCADE exception Geom_TrimmedCurve::U1 == U2

Root cause: Zero-angle turn → zero-length arc → consecutive identical polygon vertices → OCC rejects zero-parameter-range
Geom_TrimmedCurve.

Suggested fix: In turn!, skip or clamp angles below threshold (e.g., abs(angle) < 1e-8 → no-op), or filter zero-length edges in the solid
model polygon import.

Workaround: turn!(pth, 1e-6, radius) instead of turn!(pth, 0.0, radius).

Environment: DeviceLayout.jl v1.9.0, Julia 1.12.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions