Skip to content

Stack overflow when intersecting a triangle and a ball #246

@CameronBieganek

Description

@CameronBieganek

I'm not surprised that taking the intersection of a polygon with a primitive shape like a ball is not supported, since that's more in the realm of constructive solid geometry, but it might be nice if we could get a method error (or some other error) instead of a stack overflow:

julia> c = Ball(Point(0, 0), 1.0)
Ball{2,Float64}(Point(0.0, 0.0), 1.0))

julia> t = Triangle(Point(0, 0), Point(2, 0), Point(0, 2))
Triangle{2,Float64}
  └─Point(0.0, 0.0)
  └─Point(2.0, 0.0)
  └─Point(0.0, 2.0)

julia> t  c
ERROR: StackOverflowError:
Stacktrace:
 [1] intersecttype(f::Function, g1::Ball{2, Float64}, g2::Triangle{2, Float64, SVector{3, Point2}}) (repeats 79984 times)
   @ Meshes ~/.julia/packages/Meshes/6EgDO/src/intersections.jl:37

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions