cmonr / Eagle-ULPs

Scripts used in Eagle CAD
anomalousmaker.com
110 stars 22 forks source link

"You must enter at least 3 points to define a valid polygon!" #7

Open xoxota99 opened 5 years ago

xoxota99 commented 5 years ago

No idea what I'm doing wrong, but when I use this ULP, I get the above error.

xoxota99 commented 5 years ago

zipped SVG file attached.

cubey.svg.zip

hadron137 commented 5 years ago

This is caused when a point in the SVG file is repeated, (usually the last point). Also caused by a zero length 'h' or 'v' command, or when the SVG file tries to close itself without a 'z' command. Should be fixed in the next version that I submitted.

reneskytree commented 3 years ago

Hi, I am still getting this error. Should it be fixed in the current version?

0xhaggis commented 2 years ago

I'm seeing this error, too. It's caused by the last point being a repeat of the first point. For example:

CHANGE layer tPlace; CHANGE pour solid; Grid mm; SET WIRE_BEND 2;
polygon 0.001mm (49.082500mm 86.910790mm) (49.058563mm 86.903571mm) (49.082500mm 86.910790mm);
polygon 0.001mm (49.058563mm 1.670189mm) (49.035473mm 1.662125mm) (49.058563mm 1.670189mm);
polygon 0.001mm (36.231770mm 1.662125mm) (36.203098mm 1.664597mm) (36.231770mm 1.662125mm);
polygon 0.001mm (36.203091mm 86.897980mm) (36.184772mm 86.910785mm) (36.203091mm 86.897980mm);
polygon 0.001mm (1.667732mm 86.910790mm) (1.662123mm 86.936317mm) (1.667732mm 86.910790mm);
polygon 0.001mm (83.593635mm 98.337877mm) (83.599525mm 98.312635mm) (83.593635mm 98.337877mm);
polygon 0.001mm (81.923103mm 96.674458mm) (81.937920mm 96.658135mm) (81.923103mm 96.674458mm);
polygon 0.001mm (81.937920mm 88.589486mm) (81.923599mm 88.572653mm) (81.937920mm 88.589486mm);
polygon 0.001mm (47.405979mm 88.572658mm) (47.395126mm 88.552366mm) (47.405979mm 88.572658mm);
polygon 0.001mm (47.395126mm 3.348686mm) (47.389137mm 3.323517mm) (47.395126mm 3.348686mm);
polygon 0.001mm (37.887455mm 3.323517mm) (37.866497mm 3.333702mm) (37.887455mm 3.323517mm);
polygon 0.001mm (37.866493mm 88.568522mm) (37.839481mm 88.572653mm) (37.866493mm 88.568522mm);
polygon 0.001mm (3.353006mm 88.572658mm) (3.323866mm 88.574649mm) (3.353006mm 88.572658mm);
polygon 0.001mm (0.013452mm 85.247324mm) (-0.001468mm 85.263558mm) (0.013452mm 85.247324mm);
polygon 0.001mm (34.532650mm 85.247324mm) (34.541325mm 85.224839mm) (34.532650mm 85.247324mm);
polygon 0.001mm (34.541321mm 0.017273mm) (34.556179mm 0.000977mm) (34.541321mm 0.017273mm);
polygon 0.001mm (50.694214mm 0.000977mm) (50.720467mm 0.005875mm) (50.694214mm 0.000977mm);
polygon 0.001mm (50.720467mm 85.244615mm) (50.748894mm 85.247324mm) (50.720467mm 85.244615mm);
polygon 0.001mm (85.236938mm 85.247324mm) (85.260139mm 85.255280mm) (85.236938mm 85.247324mm);
polygon 0.001mm (85.237274mm 99.999632mm) (85.260139mm 99.991366mm) (85.237274mm 99.999632mm);

The image I used with svg2eagle is here: https://www.dropbox.com/s/citvtyfwbmvj692/test.svg?dl=0

When I try and run the generated script in Eagle it throws an error ("You must enter at least 3 points to define a valid polygon!") for each line of the script.