I have created a GUI using Eto so it can be used on both a Windows and Mac platform. In order to get the form to look reasonable with 3 controls on one line, I used PixelLayout instead of DynamicLayout for some of the controls. But I read this is highly discouraged, as each control may be different sizes based on the platform. One way of dealing with this is to just develop 2 sets of locations for the controls, 1 for Windows and 1 for Mac.
My questions is: In my Python script, how do I tell whether Rhino is running on a Windows machine or a Mac?
Here is what the form looks like with 3 controls on the second line:
and here are some examples of using it to trim a mesh to a boundary curve, make a hole inside the boundary curve and make a trench inside the boundary curve:
The mesh has 1.4M faces and I have not been able to trim it in Rhino using Mesh Tools → Trim Mesh without creating ragged edges (mesh faces not trimmed to boundary shape), or failing with no error message. The Python script fixes these issues, at least for my collection of meshes.
Which looks like it agrees with the kernel version (platform.uname() on Python2.7 in terminal gives ('Darwin', 'jesterMacPro.local', '18.5.0', 'Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64', 'x86_64', 'i386'), see third element of tuple.
But I don’t think this is a good indicator - what if in the future there is a Windows 18?
The os.sep is probably currently the best workaround, it gives on the Mac indeed a forward slash (as it would on any *nix type system). A proper functioning platform module would be much better though.