ID: | 6321 |
From: | rn...@igor2.repo.hu |
Date: | Thu, 28 Mar 2024 08:09:48 +0100 (CET) |
Subject: | [pcb-rnd] pcb-rnd: the new poly lib (you can start testing it!) |
Hi all, the first version of librnd's new polygon clipping library, called polybool, is near finished. The initial goal is to provide the same functionality as the original poly lib did but with increased precision and proper handling of corner cases. There are still a few documented cases (with reproducivble test sets) where polybool fails, but in these cases the original lib failed too. On the other hand I have a collection of more than 200 automated test cases that all pass, from which there are some where the original lib failed. So polybool should be a bit slower but should already fix most of the bugreports I got for pcb-rnd over the years. Which means it's time to start testing it. There are going to be multiple rounds of testing and a rather complicated pattern how polybool is going to be enabled because I don't want to break production usage and this whole polygon clipping business is very complex and can easily contain bugs. 1. until mid april: enable it manually To test it now, you must get the latest svn HEAD of librnd, because of new APIs and tons of polybool bugfixes. Configure and compile and install librnd normally, it will contain polybool by default. Then ./configure pcb-rnd with --enable-polybool; this is a configure-time decision to use the polybool instead of the original polygon library. Expect pcb-rnd make test to fail on RTT tests with --enable-polybool. I will have to evaluate each test case manually, but most of the failures are false positive: the new poly lib does a few things a bit differently and often more accurately which obviously introduces legit differences. 2. From mid April, except for pcb-rnd releases Librnd 4.2.0 is going to be released in mid April. Once that happens, I will enable polybool in pcb-rnd svn trunk by default until the next pcb-rnd release. This will help everyone working with svn HEAD to test the new code. Before the pcb-rnd release in July, I plan to switch it off by default again, so that the next pcb-rnd release will go out defaulting to the old poly lib, to be on the safe side. Then after the release I'll make polybool default on again in svn trunk so we put some more testing in. 3. After July Depending on how well polybool performs, I may repeat step 2 for more releases. Once we thnk polybool is safe enough I will leave it default-on. 4. Long term: old poly lib removal from librnd I won't be able to remove APIs from librnd without bumping librnd version to 5.0.0. So I am collecting all the old APIs to be removed, including the old polygon library (among with plans for breaking API changes) in the TODO and when there are enough such things, I will allocate a longish development cycle when I first switch over librnd to 5.0.0 then all the apps too. So for a while both the old and the new poly lib will be available in parallel in librnd. Both are always compiled and installed and each app depending on librnd >=4.2.0 can choose one of them configure-time. (Because of API compatibility reasons I couldn't make this choice runtime.) Best regards, Igor2
Reply subtree:
6321 [pcb-rnd] pcb-rnd: the new poly lib (you can start testing it!) from rn...@igor2.repo.hu