# Processing to Blender to Inkscape to Axidraw: How To Remove Hidden 2D Lines

**URL:** <https://discourse.processing.org/t/processing-to-blender-to-inkscape-to-axidraw-how-to-remove-hidden-2d-lines/30450>\
**Category:** Processing\
**Created:** [June 2, 2021, 7:21pm UTC](https://discourse.processing.org/t/processing-to-blender-to-inkscape-to-axidraw-how-to-remove-hidden-2d-lines/30450 "2021-06-02T19:21:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eclipse](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eclipse](https://discourse.processing.org/u/eclipse)\
**Post date:** [June 2, 2021, 7:21pm UTC](https://discourse.processing.org/t/processing-to-blender-to-inkscape-to-axidraw-how-to-remove-hidden-2d-lines/30450/1 "2021-06-02T19:21:53Z")

</div>

> I want to draw in 2D using Processing, export the image as an SVG, and then plot with an Axidraw.  
> The issue I keep running into is that SVGs retain all lines, and therefore any lines that are covered by another shape’s fill are still drawn. Here is a simple example:

 ![Screen Shot 2021-06-02 at 2.10.04 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/2a5f447f09b6e368cbde71d54138b04d9a48d35f.png)

In this image, the circle covers the corner of the square because of the solid white fill. But when I open the file in Inkscape, the hidden corner is no longer hidden. Here are the 2 main routes I have heard might work based on my online research:

1. **Create/find a geometry library that only draw the parts of shapes that are shown.** I have not been able to find a Processing library with this functionality. I thought about creating my own, but would like to avoid that work if possible.
2. **Use Blender with Freestyle SVG Export to remove the hidden lines and then open in Inkscape.** I get stuck every time when I try to do this. I have basically no Blender experience but have watched several tutorials about exporting with Freestyle SVG and every time I end up with poor results. Does anyone have suggestions on good tutorials that specifically deal with 2D scenes/shapes in Blender? My approach so far has been to draw each shape in Processing with slightly different z-values so that it is easy to export using freestyle SVG but again, I have had no luck.

Here is the scene that I currently have in Blender:

 ![Screen Shot 2021-06-02 at 2.18.39 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/1c42740a395205cb2d3cc1666b18ebc49247a520.jpeg)

And here is the scene in Inkscape with the SVG exported from Blender. For some reason, only part of the paths are drawn (the blue lines shown which part will be drawn):

 ![Screen Shot 2021-06-02 at 2.19.49 PM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/08571c43b05057d8a0eccf57c05232bdb20ae96e.jpeg)

Any help would be greatly appreciated! I have been so limited in my plotting capabilities because of this issue!

---

<div class="post-metadata">

**Author:** ![micycle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micycle/32/201_2.png) [@micycle](https://discourse.processing.org/u/micycle)\
**Post date:** [June 2, 2021, 8:20pm UTC](https://discourse.processing.org/t/processing-to-blender-to-inkscape-to-axidraw-how-to-remove-hidden-2d-lines/30450/2 "2021-06-02T20:20:39Z")

</div>

You can subtract the upper shape from lower one. Someone else was trying to do the same thing recently…

> [@2D lineart - culling hidden lines for SVG output / Plotting](https://discourse.processing.org/t/2d-lineart-culling-hidden-lines-for-svg-output-plotting/30031/2):
>
> Ok, I think [GitHub - micycle1/PGS: Processing Geometry Suite](https://github.com/micycle1/PGS) is a way forward - Here’s my quick check The boxes on the left have fills which wouldn’t work on the plotter. The boxes on the right are made of : The foreground box (green), and the subtraction of the foreground box from the background box (red) No fill() used on the right hand side - So a bit of playing around to progressively add one house at a time to a resulting shape. Still would be keen to hear how anyone else would approac…
