[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: pcb GL can't render stretched arcs



On Thu, Jul 14, 2011 at 08:50:10AM +0200, Igor Lopez wrote:
> 
> Check if point px,py is on rotaded elliptic arc:
> 1) Translate point to use ellipse center as origin,
> Px = px-x
> Py = py-y
> 2) Insert Px, Py in Eq1
>  lval equal 0 -> point is exactly on arc
>  lval above zero -> point is inside arc
>  lval below zero -> point is outside arc
>

The problem here is that the elliptical arc has nonzero
thickness (usually, if it is a drawn solder arc). So I
actually need to see if the point is /within a certain
radius/ of the arc.

For that I need the distance from the point to the arc,
or to draw a circle around the point and check if that
intersects the arc.

To do either one analytically looks like a 4th order
equation must be solved. So I am looking for cheap
iterative solutions, or approximations, instead.

-- 
Andrew Poelstra
Email: asp11 at sfu.ca OR apoelstra at wpsoftware.net
Web:   http://www.wpsoftware.net/andrew/



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user