Date:2012-03-21 05:00:12 (11 years 11 months ago)
Author:Werner Almesberger
Commit:6d70656ab2b280c9b77676a0d2f72928bdee88b8
Message:cameo/path.c (path_offset): handle also degenerate polygons of only one point

To do: use a square, not a circle. Also, extend this to degenerate
polygons consisting of two points.
Files: cameo/path.c (3 diffs)

Change Details

cameo/path.c
11/*
22 * path.c - Toolpath operations
33 *
4 * Written 2010-2011 by Werner Almesberger
5 * Copyright 2010-2011 Werner Almesberger
4 * Written 2010-2012 by Werner Almesberger
5 * Copyright 2010-2012 Werner Almesberger
66 *
77 * This program is free software; you can redistribute it and/or modify
88 * it under the terms of the GNU General Public License as published by
...... 
1717#include <assert.h>
1818
1919#include "util.h"
20#include "shape.h"
2021#include "path.h"
2122
2223
...... 
316317    int dog;
317318
318319    assert(path_is_closed(path));
320    if (path->first == path->last)
321        return circle(path->first->x, path->first->y, path->first->z,
322            path->r_tool, path->r_tool, 0.1, path->id);
319323    new = path_from(path);
320324    prev = path->first;
321325    for (p = path->first->next; p; p = p->next) {

Archive Download the corresponding diff file

Branches:
master



interactive