We use cookies to personalize content, interact with our analytics companies, advertising networks and cooperatives, and demographic companies, provide social media features, and to analyze our traffic. Our social media, advertising and analytics partners may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services. Learn more.
To be honest, I’m not exactly sure ! “somehow”, that rect statement is stopping the import from happening ( with no error message), or the import happens successfully, but the rect “covers” everything else. Maybe try putting it back in and change Z-Order ( I assume you can do that with an SVG ) ?
I tried your code with both the rect as you wrote it, and a rect with no fill or stroke. Neither worked. But it did when I removed the rect statement. Needs some more playing with to see the real issue, and I’m not fully confident on what the actual issue is !
aehm no, I included this spaces after < characters only, to make it possible to display the svg-string here in the forum
My code didn’t produce this spaces.
But I will look at the second issue, because easel couldn’t handle the rect. After replacing the rect with a path, everything works fine …
Is there a code example, how to read in text-files?
I want to read in gerber-files, to convert them to SVG with a lib.
The second thing, I have to do then, would be to produce contours around the lines, that are produced by the lib, because easel sees them as lines and not as areas.
is there any other way to let easel carve around a line?
At the top of this thread is an example of how to have a file type for input.,
{id: “Your file”, type: “file-input”},
I would imagine that the Params would then just return a long string containing the file that you can parse. I would make a quick example, and then send out the value of that field to the log.
If you have a file-input property, Easel will pass you a URL to the file. You have to read from that URL to open the file. There is a known issue in Easel right now where if the user has had the app loaded for a while then the signatures on the URLs can time out. We’ll be fixing that behind the scenes so that the URLs you are given will always work.
Hey Andy, not at the moment. Descriptions are stored as plain text and rendered inside of a p tag. I think it would be neat to let devs render their own html or markdown in the description. I’ll discuss it with the rest of the team.
It would also be handy to be able to have tooltips for the adjustable paremeters, either by hovering over, or a little “?” button. Since touch screens are an option a button might be better. It can be a little hard conveying the function of a parameter just in the name.
i am trying out some stuff and finally got the size figured out (using the width, height and viewBox attributes of the svg tag). now i can make a line (with rounded ends) or hole: but if i make the line width or hole the size of the mill (say 1/8") easel still complains it is too small. how much larger does the minimum width need to be?
This is a well known “feature” of Easel based on how it generates paths, it can’t cut a path the same size as the bit. As you found, you can either tweak the hole size or the bit size slightly.
If you add a param like so:
{id: "Use MM", type: "boolean", value: false},
you can use the following code to setup the viewbox for inches or mm
var useMM="in";
if (params["Use MM"] === true)
{
useMM="mm";
}
'<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="'+width+useMM+'" height="' +height+useMM+'" viewBox="0 0 '+width+' '+height+'">',
This then lets the user use either mm or inch for their dimensions and the viewbox is scaled to suit
i figured out the absolute sizing. that works fine. thanks
i like to cut out an object (but need to use “fill”) and although the factor is only 1.005x i still see the router do 2 passes (per depth). no tricks to have it do in a single pass?