This plugin command removes lines hidden by polygons. It acts like a trimmer to receive a clean set of visible paths only. It does not remove common lines between opened paths, but for closed polygons. You need to install occult plugin for vpype. See vpypetools documentation.

It's a great helper for optimizing cutting jobs. It is really powerful in conjunction with Line Sorting. Also check out vpype Free Mode which can do the same and more.

Key phrases: remove overlapping lines, superimposed lines, remove duplicated lines, purge redundant lines, purge doubled lines, remove common edges, remove occulted lines, hidden line removal, retrace edges, chain paths, clean paths

This extension is similar (but superior) to 

(info) Also have a look at Purge Duplicate Path Nodes if you only want to remove duplicate knot handles in a path.

Troubleshooting / Upgrade extension

If the extension does not generate any output and you cannot explain why, please check if you have the latest version installed. Sometimes exceptions are hidden which show up when running from console instead.

Typical error like this:

Traceback (most recent call last):
  File "c:\users\tomate\appdata\local\programs\python\python39\lib\site-packages\click_plugins\core.py", line 37, in decorator
    group.add_command(entry_point.load())
  File "c:\users\tomate\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\__init__.py", line 2450, in load
    return self.resolve()
  File "c:\users\tomate\appdata\local\programs\python\python39\lib\site-packages\pkg_resources\__init__.py", line 2456, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\users\tomate\appdata\local\programs\python\python39\lib\site-packages\occult\occult.py", line 7, in <module>
    import pygeos
  File "c:\users\tomate\appdata\local\programs\python\python39\lib\site-packages\pygeos\__init__.py", line 1, in <module>
    from .lib import GEOSException  # NOQA
ImportError: DLL load failed while importing lib: Die angegebene Prozedur wurde nicht gefunden.


You can remove and reinstall the following way:

#failed
#pip3 install --upgrade git+https://github.com/LoicGoulefert/occult.git#egg=occult

#worked
pip3 uninstall git+https://github.com/LoicGoulefert/occult.git#egg=occult
pip3 install git+https://github.com/LoicGoulefert/occult.git#egg=occult


Simple example

Draw some rectangles



Layout edges above each other (simulate having common edges)

Run extension to remove common edges

Move the paths to some other directions to see how the edge removal was worked out

  • Total tooling length before vpype conversion: 292.28 mm
  • Total traveling length before vpype conversion: 63.61 mm
  • Total tooling length after vpype conversion: 219.21 mm
  • Total traveling length after vpype conversion: 55.42 mm
  • Total tooling length optimized: 25.00 %
  • Total traveling length optimized: 12.88 %
Old instructions to install OSGeo4W for Windows

Old instructions to install OSGeo4W for Windows

(info) The following steps were required for older vpype-occult versions only.

To use oder occult plugin versions for vpype, we needed to install pygeos library. This library needs C bindings which might fail on Windows. Even if installing pygeos successfully using pip, it might fail. The following solutions works to make occult extension execute successfully. Some additional information can be found at https://pygeos.readthedocs.io/en/latest/installation.html.

Install OSGeo4W

Set environment variables for GEOS

  • GEOS_INCLUDE_PATH = C:\OSGeo4W64\include
  • GEOS_LIBRARY_PATH = C:\OSGeo4W64\lib

Install Visual Studio Community Edition 2017 or newer

We need VS to compile pygeos. Downloadable at https://visualstudio.microsoft.com/de/downloads

Install pygeos module

pip3 install pygeos --force-reinstall --no-binary pygeos
  • No labels