How to make an app

I thought about that too Jeff. Create and select a rectangle first before starting the app and have it do a fill of holes? I guess that is how many would use it.

Is there a way to find out the bit size that has been set within an app? No point scaling a ton of holes to 2mm if you are running a 3.175mm bit.

I’ll have a think.

Cheers

Ian

Hmm… That might be one way to go. The problem I noticed was that I could increase my x & y circle counts to a point where the circles went outside the window the app was running in. It might be better to have a fixed viewport that the circles get scaled up or down within. If you have a selected object, that object could fill that viewport (which is how the voronoi app works), or you could just have a fixed size viewport and then let the user scale the resulting shape to whatever size they want at the end. It would be as if the grid automatically got zoomed to fit the same width/height no matter what variables they selected on the left.

We don’t pass the bit size in right now, but we could add it. Are there any other parameters would be useful?

Understood. When I get some time to get into this deeper, I’ll look at the viewport issue. Makes a lot of sense.

Passed in prams like bit size are of course nice to haves as you could scale objects based on it. But as the user can change bit size after your app has run you cannot of course rely on it.

But right now, bit size and workpiece size as set by the user would be useful. I think although it appears Easel works within mm internally, could the apps also be told what units are set in the 2D view? That way we can scale the objects to the units the user is working in.

Cheers

Ian

Noticed that although apps still run twice for every slider step move (and only a performance issue right now), that none of the apps run at all at startup any more until the user moves/changes a control.

Is this a design change?

And possibly related to the above, every app throws an error at startup as below (from Chrome console):

This is an issue that we are aware of and have a fix coming out for.

This post has a link to a google form that you can submit to apply for early access:

Cheers,
Jeff

1 Like

Can you install Easel Local?

And it’s fixed. This indeed was the same reason for the error that you were seeing in the console. Thanks!

1 Like

Hmm… I don’t have any experience with Wine.

None of those questions are dumb and majority have already been asked Angus. Mainly the answers at the moment are “Not yet” or “No”. :smile:

My understanding is that the API for building apps is very early days so these kind of things don’t get asked/don’t come up until you get something out of the door that in turn generates this kind of discussion. It’ll be an iterative process.

Specifics wise, no, apps currently cannot know anything about what is happening is Easel itself. The only thing you can currently pass in is a selected feature, and this is optional.

I’ve been playing with app creation for a few weeks now and really like what has been done so far. But I agree, knowing more about what other things are happening in Easel would make apps much more useful.

I’m sure it’ll get there :smile:

Cheers

Ian

Ian is correct: your app doesn’t receive any information from Easel other than the parameters defined for your app and the (optional) paths of selected shapes. We’re definitely looking for questions and feedback like this in order to learn about how the API should work.

Could you tell us a little more about what kinds of things you are trying build and how you would use the data? The specific use cases might help us as we’re rethinking the APIs.

You can set an explicit width and height on the SVG element you return, and you can also use a viewbox to scale the coordinate system. For an example, you could refer to the source of some of the other apps, like the Voronoi one:

This will be changing in the near future so that shapes are returned in Easel’s native object model rather than as an SVG.

When Easel imports an SVG, it will import any paths with a “fill” as fills. It will import stroked paths as outlines.

Easel will map the stroke or fill color of a path to a cut depth using a grayscale-to-cut-depth approach where rgb(0, 0, 0) (black) means the cut is all the way through, and rgb(255, 255, 255) (white) means no cut at all, and anything in between is scaled linearly.

This will be more straightforward once we’ve made the transition to returning Easel’s native object model, but the way to do this with SVG is using the width, height, and viewBox of the svg element. Set the width and height to a value with a unit (cm, mm, or in). The values in viewBox (in order: left, top, width, height) define the “internal” coordinate system for all the path and other elements inside the SVG. They can be any numbers, but I think it’s easiest if you use 0 for the left and top, and the same numbers as you used for the width and height values, like this:

<svg xmlns="http://www.w3.org/2000/svg"
    width="4in" height="5in" viewBox="0 0 4 5">
    <!-- note there are no units for the viewBox numbers -->
    <!-- the `stroke-width` and `d` values below are in inches now -->
    <path fill="none" stroke="#000" stroke-width="0.25"
        d="M 2,1 L 3,1 3,3 Q 3,4 2,4 Q 1,4 1,3" />
</svg>

That’s something that will be possible once apps can use Easel’s native object model, but that unfortunately SVG has no way to express.

I was wondering about this as well, in my day job I use Brackets as my editor and push/pull using Git from within the software.

I was wondering about the possibility of some kind of automated pull of apps in Easel from say a GitHub repo? That way devs could push to their GitHub repo (or maybe even just a Gist) and do a little setup work to tell the apps portion of Easel where to get the code from.

Cheers

Ian

Hey Guys, Alex here. Nice to meet you all. Just started develping my app, 2 questions.

  1. How do I add a description next to the parameters in the initial container?

  2. How do I toggle tabs off on the svg I am sending over?

Thanks.

Thanks Angus, now how do I display a preview of SVG in the app window?

Pass the SVG string to the success callback of the executor function.

Isn’t that already happening?

success(svg);

That sends it to Easel, I want it to be a preview in the APP

I have 2 apps almost ready I would like you to look at, numbers 32, Quad and 44, Arc. They are simple, they are just more base primitives to build larger blocks from. Ultimately, I want to draw the bulkhead shown in this http://www.spirainternational.com/study/BolsaChicaStudy.pdf , since that’s what I want to cut out. I don’t have an X-Carve yet, so I haven’t tried them in real life.

A few Notes:

  1. I haven’t done proper icons for them yet !
  2. I used a text box instead of sliders. Ideally I would prefer a slider with embedded edit box for the value.
  3. I included a checkbox at the top to switch between mm and inches. It’s because of this, and the change in scaling that I used an edit box.
  4. I think it would be good to have this functionality built into the app framework.
  5. Based on the mm or inches I set the viewBox and size. The limited testing I did, they all seem to come back into Easel at the correct size.
  6. I’m not too happy with the interface for Quad, but I’m not sure what would be better. Setting a base X1,Y1 and X2,Y2, and then have sliders to set offsets for the lower points ?
  7. OnChange callbacks would be handy, so that dependancies can be updated when one value changes.

Anyway, any and all feedback welcome

Can someone take a look at Easel for me please. I’m trying to create a gradient from black to white. When I press submit, it Easel just sits there importing the svg, so it has either crashed, or is taking a really long time to process. I think the longest I waited was 5 minutes and then I gave up.

Based on a comment above from jeff talbot

Easel will map the stroke or fill color of a path to a cut depth using a
grayscale-to-cut-depth approach where rgb(0, 0, 0) (black) means the
cut is all the way through, and rgb(255, 255, 255) (white) means no cut
at all, and anything in between is scaled linearly.

What I am trying to achieve is a splice . This is a gradient cut in two pieces of wood to join them to create a longer piece with minimal loss of strength. You can see one in this picture

Currently Easel doesn’t support gradients, and will hang when you import the SVG. You verify this by taking a pre-made SVG and importing with the SVG import tool or just looking at this screenshot: