1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-23 04:46:45 +02:00
Commit Graph

152 Commits

Author SHA1 Message Date
Werner Almesberger
a030eff963 cameo/: new command "flip" to flip paths on the X or Y axis 2012-08-23 09:04:44 -03:00
Werner Almesberger
c73509dacc cameo/fped2d2z.pl: new option -t Zmax to set the height of the workpiece
This is similar to -r, except that we don't swap X and Y, and we use
the specified value instead of searching for the maximum in the input
data.
2012-08-22 13:51:16 -03:00
Werner Almesberger
53fe70950d poly2d/: try to work around spurious aborts in CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2
cameo encountered spurious aborts with the following message:

  terminate called after throwing an instance of 'CGAL::Precondition_exception
  what():  CGAL ERROR: precondition violation!
  Expr: is_simple_2(first, last, traits)
  File: /usr/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h
  Line: 420

These aborts come and go even if just the coordinate origin is slightly
changed. Setting CGAL_POLYGON_NO_PRECONDITIONS in p2d_area_holes.cpp
made them go away in some cases, but cameo could still run into an
assertion violation (in CGAL).

We now check all the polygons, outer boundary and holes, being sent to
CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2 for
simplicity, and stop recursing if there is any hint of a problem.

This seems to avoid trouble for now, but the issue deserves further
investigation.
2012-08-22 13:50:19 -03:00
Werner Almesberger
072b7804ee cameo/: experimental command "outside" to detect real outer borders
Should be merged into tool_comp_paths later.
2012-06-12 15:23:01 -03:00
Werner Almesberger
378aab025f cameo/path.c: new function path_is_inside which calls p2d_contains_poly 2012-06-12 15:04:59 -03:00
Werner Almesberger
7b54293bff cameo/: move conversion between poly2d and "struct path" from area-poly2d.c to poly2d.c
Untested.
2012-06-12 15:04:40 -03:00
Werner Almesberger
f48754e067 cameo/path.c: make path_is_closed global 2012-06-12 14:24:50 -03:00
Werner Almesberger
382d14dcbb cameo/path.c: move assert(path_is_closed) into function and improve diagnostic
It's often hard to find an offending path. To help with this, we
now print the start and end coordinates.
2012-06-12 14:01:55 -03:00
Werner Almesberger
e69fa24133 cameo/: new commands "remove" and "keep" for path filtering (untested) 2012-06-12 12:32:08 -03:00
Werner Almesberger
3ee5b1aa31 poly2d/: add foreach_v2d* and foreach_edges looping constructs 2012-05-08 14:06:00 -03:00
Werner Almesberger
1c11f4d201 cameo/: use libpoly2d for area fills 2012-05-08 01:06:45 -03:00
Werner Almesberger
038667d0d8 poly2d/p2d_hsort.c (p2d_hier_free): use p2d_free, not p2d_free_all
This caused a double free.
2012-05-08 00:51:43 -03:00
Werner Almesberger
7f813b5254 poly2h/: auto-generate dependencies also for C++ code 2012-05-07 22:53:45 -03:00
Werner Almesberger
a950c5b13c poly2d/: simplify semantics of first/next offset in area fill 2012-05-07 22:45:39 -03:00
Werner Almesberger
46c8f8653c poly2d/: automatically switch between clockwise and counter-clockwise polygons
The only functions that care about this at the moment are from CGAL,
and there we can determine from context what to do.
2012-05-07 22:12:21 -03:00
Werner Almesberger
dfa85075e8 poly2d/: Yet another 2D polygon library (WIP) 2012-05-06 23:51:38 -03:00
Werner Almesberger
c2bfbd5a5e cameo: add two test cases (exhibiting brokenness) 2012-05-01 23:48:32 -03:00
Werner Almesberger
fcb508f1ef cameo/test/: move to cameo/test/1/ 2012-05-01 23:28:49 -03:00
Werner Almesberger
8ce420b10b cameo/excellon.c: recognize G90 code (absolute mode)
Recent KiCad emits this. We're in absolute mode anyway, so we simply
ignore it.
2012-04-01 19:26:46 -03:00
Werner Almesberger
479ae41070 cameo/README: added warning that "area" still has bugs 2012-03-29 18:44:14 -03:00
Werner Almesberger
c59e39356b cameo: new command "reverse" to reverse all paths
Experimentally used to reverse tool direction in the smoothing pass.
2012-03-21 20:31:29 -03:00
Werner Almesberger
c422be5543 spool: support jobs with more than one file
We could do this already, by piping from cat. But this way is cleaner.
2012-03-21 16:57:05 -03:00
Werner Almesberger
6c3bc3e58e gp2rml: properly calculate pen down time 2012-03-21 01:15:05 -03:00
Werner Almesberger
3e7fca45b3 cameo/fped2d2z.pl: outpout a dummy point at Z=0 (experimental)
This is signal for genpiece.pl to generate the top layer.
2012-03-21 01:02:43 -03:00
Werner Almesberger
6d70656ab2 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.
2012-03-21 01:00:12 -03:00
Werner Almesberger
079608ba6c cameo/zstack.pl: don't output lower layers at higher Z
We leave this to the designer :-)
2012-03-20 23:13:35 -03:00
Werner Almesberger
340fb2cf8b cameo: consider inside/outside also when checking corner points 2012-03-20 23:05:42 -03:00
Werner Almesberger
7a61482a04 cameo/area.c: move handling of left/right from hit_path to hit_segment
For future extensions.
2012-03-20 19:30:03 -03:00
Werner Almesberger
ebcdfd52ca cameo/area.c (hit_segment): clean up entry/exit handling 2012-03-20 19:18:08 -03:00
Werner Almesberger
d79424d9ae cameo/area.c: move equation solving from "intersect", for future sharing 2012-03-20 19:02:50 -03:00
Werner Almesberger
19bc92aa79 cameo/area.c (do_line): shorten segments to avoid duplicating outline cuts
We considered the outlines for dropping entire segments but not for
calculating their start and end points.
2012-03-19 19:46:40 -03:00
Werner Almesberger
4ea94e72dc cameo/fped2d2z.pl: added Z position substitution
We need this to add overshoot for milling through a piece.
2012-03-19 15:59:24 -03:00
Werner Almesberger
9f5751aaa9 cameo/fped2d2z.pl: added option -r, like in zstack.pl 2012-03-19 15:29:57 -03:00
Werner Almesberger
ce243b6a79 cameo/zstack.pl (usage): describe option -r
Also show usage on unknown option.
2012-03-19 15:29:57 -03:00
Werner Almesberger
76b1b3e42e gp2rml: improved distance calculation; corrected compiler invocation 2012-03-19 01:17:14 -03:00
Werner Almesberger
fb117b20e5 cameo/area.c (subordinates): fix trimming of list of subordinates 2012-03-19 01:02:19 -03:00
Werner Almesberger
18c9477137 cameo: "area" now works on Z layers individually (untested) 2012-03-19 00:26:41 -03:00
Werner Almesberger
5ecce7de9e cameo/zstack.pl: option -r to reverse the stack 2012-03-18 23:20:27 -03:00
Werner Almesberger
219e0a5c2d cameo/fped2d2z.pl: convert fped 2D stacks into 2.5D paths with Z information 2012-03-18 23:05:40 -03:00
Werner Almesberger
085754f931 cameo/zstack.pl: convert 2.5D paths into a stack with limited Z steps 2012-03-18 21:45:56 -03:00
Werner Almesberger
489ca9c24d cameo: documented "area"; miscellaneous cleanup
Also removed the tool diameter argument. We use the diameter from the
path, like "offset" does. In the long run, this convention probably
doesn't make sense, though.
2012-03-18 21:00:08 -03:00
Werner Almesberger
6811df57b6 cameo/area.c: removed debugging and obsolete code 2012-03-18 20:25:16 -03:00
Werner Almesberger
6fbdfd7120 cameo/area.c (touch): also consider whether we're looking for entry/exit 2012-03-18 20:15:50 -03:00
Werner Almesberger
b607816f95 cameo/area (hit_segment): only consider vectors pointing in the right direction
This way we avoid false positives, such as exit points while looking
for an entry.
2012-03-18 19:47:02 -03:00
Werner Almesberger
5a599e14f6 cameo: don't duplicate paths already cleared by the outline
Also pass information on whether we're about to enter or leave a
polygon.
2012-03-18 17:57:04 -03:00
Werner Almesberger
35c0624dc5 cameo: "area" now also adds the outline cuts
"offset" wasn't suitable for alternating inside and outside anyway.
2012-03-18 17:02:43 -03:00
Werner Almesberger
8c4dfc55b6 cameo/test/: test scenario for area fill 2012-03-18 13:19:13 -03:00
Werner Almesberger
2530a11c80 cameo: an attempt at area fill (WIP) 2012-03-18 13:16:26 -03:00
Werner Almesberger
6271d5f721 spool/: job spooler for CNC mill (migrated from Openmoko)
From
http://svn.openmoko.org/developers/werner/cncmap/spool/

Fixed a buffer termination bug that caused the mill to do strange
(yet almost always harmless) things at the end of a job.
2012-03-11 09:37:38 -03:00
Werner Almesberger
90254ef0bc cameo: also connect paths from gnuplot files
We only did this for Gerber.
2011-12-16 04:36:17 -03:00