Introducing SVG Flattening for Laser and Vinyl Cutting

October 08, 2019 ·  Thomas Yip
Software Development Director · Everything SVG · How to Vecta

SVG editing for vinyl cutters and laser engravers just got much easier with Vecta's new feature - SVG Flattening. This feature is made possible with Vecta's user - John Robinson's feedback and input, thanks John!

What is flattening?

Flattening is an operation that removes shapes or part of shapes that is hidden under another. Consider the following semi transparent shapes:

What is flattening in SVG, illustrated
What is flattening in SVG, illustrated

For flattening operations, the yellow circle is fragmented, and the part of the shape that lies under the blue triangle is removed.

Why would you use flattening for?

Many hobbyists rely on SVG graphics to feed their laser engravers or vinyl cutting software to produce amazing products (like the Go board coasters shown below).

Go board coasters image, credits to John
Go board coasters image, credits to John

However the amount of work that goes into the drawing is huge and time consuming.

Consider a single Go piece on a grid as below:

Flattening problems explained
Flattening problems explained

It is easy to draw 2 grid lines and place a round Go piece on top, but the grid that runs under the Go piece will get engraved as well, which is NOT what you wanted.

The solution

Although users can use our advanced shape operations to do all these manually, with the flattening operation, all the work is fully automated, resulting in huge productivity.

How flattening works

Flattening removes shapes and paths underneath filled shapes (irrespective of their filled color and opacity).

Flatten only removes when shapes are filled
Flatten only removes when shapes are filled

Flattening will not remove shapes if the shape on top is not filled.

Added benefits

Vecta is designed to provide accuracy, with real world measurement units in inches, m, cm, and mm, which is particularly useful for accurate sizing.

In addition, Vecta also lets you create plugins using simple Javascript, where sky's the limit to what you can automate.

Do let us know if you have any comments on how we help you create SVG better, easier, faster.

Thanks for reading.

AUTHOR

Thomas Yip
Software Development Director

As the creator and founder of Electra Cloud, which is now known as Capital Electra X, he introduced the market to an innovative, disruptive, and fully cloud-native electrical CAD solution. The driving force behind Capital Electra X, he is committed to shaping the future of easy-to-use Electrical CAD software development. Find him on Linkedin.

Keep yourself updated with the latest development on SVG, Web development, CSS and Javascript.

vecta.io Early Access