Open full view…

# Rest Machining

reynolds087
Sat, 01 Jan 2022 04:19:12 GMT

## Let's say I have a very small tool that I have to run extremely slow to prevent it from breaking. I only want to generate a toolpath where it cuts the sections that my larger tool cannot reach. Is there a way to do this? Currently I am running 3 passes on the entire copper layer and it takes very very long. There are only a few select spots where this tool needs to make small cuts to isolate some pads, but it's running for hours because I can't figure out how to exclude all of the areas my larger tool is cutting.

reynolds087
Fri, 07 Jan 2022 02:36:49 GMT

I installed the one you provided, but I still can't find GDAL_Config. I always get that error about the environment variable.

reynolds087
Fri, 07 Jan 2022 02:47:14 GMT

I get three new folders in my site-packages folder: GDAL-3.3.2.dist-info osgeo osgeo_utils

Marius Stanciu
Fri, 07 Jan 2022 03:45:15 GMT

I think you need to solve this issue first. Defaulting to user installation because normal site-packages is not writeable Looks like you cannot write where you have WinPython and then the package get installed elsewhere.

reynolds087
Fri, 07 Jan 2022 04:07:45 GMT

I got a version of GDAL installed from this website: https://www.gisinternals.com/release.php I had to install the core files and the python bindings. From the command prompt now, I can run "gdalinfo --version" and I get "GDAL 3.3.3, released 2021/10/25" I still can't build rasterio. I get this error message: ERROR: Command errored out with exit status 1: command: 'C:\Program Files\Python\Python39\python.exe' 'C:\Program Files\Python\Python39\lib\site-packages\pip\_vendor\pep517\in_process\ _in_process.py' build_wheel 'C:\Users\JOSH~1.REY\AppData\Local\Temp\tmp5u1nuby5' cwd: C:\Users\josh.reynolds\AppData\Local\Temp\pip-install-_9ekycqa\rasteri o_ae8a68958ada4f39813fcf098752325b Complete output (68 lines): INFO:root:Building on Windows requires extra options to setup.py to locate needed GDAL files. More information is available in the README. INFO:root:GDAL API version obtained from environment: 3.3.3 running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.9 creating build\lib.win-amd64-3.9\rasterio copying .\rasterio\control.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\coords.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\crs.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\drivers.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\dtypes.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\enums.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\env.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\errors.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\features.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\fill.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\io.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\mask.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\merge.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\path.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\plot.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\profiles.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\rpc.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\sample.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\session.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\tools.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\transform.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\vrt.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\warp.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\windows.py -> build\lib.win-amd64-3.9\rasterio copying .\rasterio\__init__.py -> build\lib.win-amd64-3.9\rasterio creating build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\blocks.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\bounds.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\calc.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\clip.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\convert.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\edit_info.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\env.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\gcps.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\helpers.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\info.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\insp.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\main.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\mask.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\merge.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\options.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\overview.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\rasterize.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\rm.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\sample.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\shapes.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\stack.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\transform.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\warp.py -> build\lib.win-amd64-3.9\rasterio\rio copying .\rasterio\rio\__init__.py -> build\lib.win-amd64-3.9\rasterio\rio running egg_info writing manifest file 'rasterio.egg-info\SOURCES.txt' running build_ext creating build\temp.win-amd64-3.9 creating build\temp.win-amd64-3.9\Release creating build\temp.win-amd64-3.9\Release\rasterio "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe " /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\josh.reynolds\AppData\Local\Temp\pip-build-env-0vejt6oc\ove rlay\Lib\site-packages\numpy\core\include "-IC:\Program Files\Python\Python39\include" "-IC:\Program Files\Python\Python39\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcrasterio/_base.c /Fobuild\temp.win-amd64-3.9\Release\rasterio/_base.obj _base.c rasterio/_base.c(648): fatal error C1083: Cannot open include file: 'cpl_conv.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x 64\\cl.exe' failed with exit code 2 ---------------------------------------- ERROR: Failed building wheel for rasterio Failed to build rasterio ERROR: Could not build wheels for rasterio which use PEP 517 and cannot be installed directly

Marius Stanciu
Fri, 07 Jan 2022 04:12:34 GMT

You cannot build rasterio.... you need to use the wheel from the gohlke website. And there itis in cersion 1.2.10 which require Gdal 3.3.2 therefore GDAL 3.3.3 will not work.

reynolds087
Fri, 07 Jan 2022 05:07:17 GMT

Marius Stanciu
Fri, 07 Jan 2022 05:29:49 GMT

I can tell you the following: - no matter how many logs you post, I can't help on building a wheel in Windows for GDAL and/or Rasterio. I tried myself and I could not do it without having to mess with a lot of toolchains. In the end I just used the wheels from the 'gohlke' website. - use WinPython. This works. Use a version with 'dot' in the name (the lower size). Like for example: https://sourceforge.net/projects/winpython/files/WinPython_3.9/3.9.8.0/Winpython64-3.9.8.0dot.exe/download - when you unzip WinPython do not do it in Program Files. Windows is kind of nasty with things installed there (permissions and stuff). Use a folder in the C drive or elsewhere. - use the GDAL and RASTERIO wheels from the Gohlke site: https://www.lfd.uci.edu/~gohlke/pythonlibs/ GDAL is a dependency for Rasterio, therefore GDAL needs to be installed before Rasterio. Make sure that the version of GDAL that you install is the one that the version of Rasterio wants (each version of Rasterio wants specifically a certain version of GDAL). See that I have posted a video on YouTube on how to ins tall everything. Make sure that you put in Windows PATH the paths to the folder where python.exe resides and to the Scripts folder. If you do as explained in the video you should have success. If you want to build the wheels from source for GDAL and RATERIO you may need to get in touch with the developers for those packages.

reynolds087
Fri, 07 Jan 2022 05:38:34 GMT

I didn't try to build rasterio that time, I used the wheel from the link you provided. And then I cd to the downloads folder and say: pip install rasterio-1.2.10-cp39-cp39-win_amd64.whl" Are you going to link to the Youtube video?

reynolds087
Fri, 07 Jan 2022 05:41:19 GMT

I found the video. I'll try following along.

reynolds087
Fri, 07 Jan 2022 07:09:49 GMT

It's still trying to build GDAL when I install rasterio from the downloaded wheel file. You sent me a link for the version compatible with Python 3.10. So I used winpython 3.10. A few of the packages in your video are no longer available, but in every case I chose the latest version with AMD64 and python 3.10 Other than that, I followed exactly in the video, and it doesn't work.

Marius Stanciu
Fri, 07 Jan 2022 07:28:32 GMT

I am sorry but I can't cover all possible situations and user configurations... Running from sources require a bit of experience. You don't need to use the latest pair of gdal-rasterio modules, you could use older versions but you need to do a bit of research to find what gdal version fit with what rasterio version. Here is the link for GDAL package on Python 3.9.x_64bit: http://s.go.ro/cuke958k

Marius Stanciu
Fri, 07 Jan 2022 07:46:35 GMT

Just in case you did not read it before: you install first GDAL and only after that you install rasterio.

reynolds087
Fri, 07 Jan 2022 08:31:09 GMT

Thanks, yes I followed the video exactly each step.

reynolds087
Sat, 08 Jan 2022 03:30:58 GMT

I got it working on a different computer. I just installed the latest version of all of the packages and it worked perfectly. I haven't tried it on the other computer because I've been working on this PC today, so I'll see if it's anything unique to that computer or just version incompatibility between the packages I was trying to install yesterday. Could also have been the order of the steps. I installed numpy+mkl first this time. I tried the rest function in the beta version, but I didn't see any difference. It' still generating a toolpath with a full pass for the small tool. Is there a way to get it to only run in the areas that it absolutely has to? Right now it seems like it wants to isolate every single polygon at least one pass with every tool. I would really like it to just detect the small pockets that the other tool can't fit, like in other CAM systems.

reynolds087
Sat, 08 Jan 2022 07:05:04 GMT

ideally you would set a distance offset, and then the toolpaths for each tool in the DB could be calculated to run most efficiently with each tool to clear the space. So if you set 2mm as the offset, the larger tool can clear 2mm of space around all of the traces, and then all of the little corners and narrow areas it can't reach, a toolpath could be created for the small tool to go in and clean up just those spots. Am I missing something. Is there already a workaround for this problem? It takes hours to run the very small tool around the whole board because it is so fragile. Feedrate is like 20mm/minute. and depth of cut has to start at -.001 to be sure it won't break. So it takes multiple passes to clear a full layer of copper.

Marius Stanciu
Sat, 08 Jan 2022 15:06:58 GMT

In the Isolation Plugin you need to be in Advanced mode. If that mode is not active by default (set in Preferences) then you can just click the button Basic in the UI and therefore switch to Advanced. Isolation mode by default is the normal isolation. You need to check the Rest checkbox and have more than one tool in the Tool Table, in order to be able to benefit from the 'Rest machining' option. The 'Rest machining' option is kind of experimental (I don't have much interest there, perhaps someone else will improve it if there is interest) and it works like that: - the isolation starts with the bigger diameter tool first. It will try to isolate all polygons (pcb features). The polygons that could not be isolated COMPLETELY are saved in a list. Once all the polygons are processed (some will be completely isolated and some will be left not isolated for the next step) the program goes to the next step - the isolation continues with the tool with the next smaller diameter and the polygons isolated will be those left not-isolated from previous step. If some polygons can't b e isolated with this tool too, they will be stored in another list that is passed to the next smaller tool and so on - the process continue until there are no longer polygons not isolated or there are no more tools. This is not a partial isolation. Either a polygon is isolated or it is not.  This is not something like: let's isolate a portion of the polygon with a bigger tool and where this bigger tool does not fit, let's try to fit a smaller tool. This like: either we can isolate a polygon completely with this tool or let it be isolated with the next tool.

Marius Stanciu
Sat, 08 Jan 2022 15:12:45 GMT

There are also other options that can help and can perhaps be combined, like zone isolation where you isolate a specific area with a specific tool and use the exception areas to prevent isolation etc. Yet, I did not tried those in combination, I developed them as standalone features so some issues may arise.

reynolds087
Sat, 08 Jan 2022 19:12:01 GMT

Two things: One, I am getting a toolpath with the small tool isolating evey polygon, even the ones the big tool can isolate, and that behavior is consistent among the beta, and the last two versions. Have you tested the rest feature recently? Maybe I am just doing something wrong because that would still be a big improvement if it worked like that. Two: I can't get the zone isolation to work either. I have tried it but I can't ever get a toolpath to generate if I select a rectangular area containing the polygon that I need to isolate with the small tool. Those features combined would solve the problem as as far as I'm concerned, but I'm not sure if they are working correctly.

Marius Stanciu
Sat, 08 Jan 2022 20:48:52 GMT

Hello again, Regarding isolation using rest_machining: https://ibb.co/30B4Nf8 In regards of the area selection isolation see this: https://ibb.co/Bq6LRdH

reynolds087
Sat, 08 Jan 2022 23:04:48 GMT

Thanks, man. That is great. Solved my issue. I was trying to enter a different number of passes and overlap percentage with each tool in the rest operation, and I wasn't seeing the expected result. But the area selection is actually a much better option for me. Works perfectly!! I just didn't see those messages in the corner.

next