Header


ben.pastel's blog


Subscribe to this feed: Syndicate content

Pather

ben.pastel - Posted on 15 December 2010

I've just finished a set of improvements to the pather.

Our default pather (source "shared/pather/simplecrosshatchpather.cpp") first traces the outer and inner contours twice, so that the object looks smooth on the outside. Then it fills in the shape with straight lines, and connects the ends of these lines together as well as it can:

crosshatch_sphere_vertical
one level of an 11-sided psuedo-sphere


On each successive level, it switches between vertical and horizontal lines, to make the structure stronger:

crosshatch_sphere_horizontal
the next level of the same psuedo-sphere


We also have an experimental pather (source "shared/pather/concentricloopspather.cpp") that traces concentric loops from the edge of the object inwards. I've gotten this to work quite well on convex polygons...

loops_sphere
the same psuedo-sphere, concentric loops pather


...but it still has trouble on shapes with part of the interior excluded:

loops_rook_fail
failed attempt at the crenelated top of a rook (chess piece)


My main focus has been improving our default pather. It worked pretty well on a lot of shapes, but it had problems with path width, shape deformation, etc.:

crosshatch_before


Here's the same shape after my improvements.

crosshatch_after
--
Ben