Well, I ended up finding a gem called âpolygon_clipperâ, which did seem to have the participation of the 'rbclipper` author. So, Iâve compiled a clipper gem that is using Clipper 6.4.2. It can be used with Ruby 2.2.x thru 2.6.x. Below are the steps to install it:
1. From stand-alone Ruby 2.5.1, enter ridk version
in a command or PowerShell window. Youâll see:
msys2:
path: C:\msys64
Add mingw64\bin to that path, and find two files there:
libgcc_s_seh-1.dll
libstdc++-6.dll
These files need to be added to:
C:\Program Files\SketchUp\SketchUp 2019
A complete list of the missing dllâs is above, but just these two are needed for clipper.
2. Also above is a file in a message of mine called su_utils.zip
. You need to download it and extract it somewhere. The file youâll need is su_gem.rb
.
3. The pre-compiled gem needs to be downloaded, the file is:
clipper-6.4.2.1-x64-mingw32.gem
available at:
https://ci.appveyor.com/project/MSP-Greg/rbclipper/builds/22774852/artifacts
4. Now, youâre ready to do something in SketchUp. The following are the steps I did in the SketchUp console (prefixed by >
) and the output from them. Anywhere Iâve shown <path>
, you need to substitute the correct location:
> require '<path>/su_gem.rb'
true
> SUGem.install '-lN <path>/clipper-6.4.2.1-x64-mingw32.gem'
Successfully installed clipper-6.4.2.1-x64-mingw32
1 gem installed
> require 'clipper'
true
> Clipper::VERSION
6.4.2.1
> Clipper::Clipper.instance_methods(false).sort.join "\r\n"
add_clip_polygon
add_clip_polygons
add_subject_polygon
add_subject_polygons
clear!
difference
intersection
multiplier
union
xor
None of the âclipperâ repositories have tests, and I havenât checked to see if it works. The methods that it should be defining are showing up, so thatâs as far as I wentâŚ