As described in the issue, the union operation does not preserve the color of one of the solids when they are non-intersecting. Upon inspection of the JSCAD code, I realized that there is a separate function to handle non-intersecting unions, and the toPolygons function was not called with the option of preserving the individual colors of a polygon using the boolean parameter colorizePolygons. This has been rectified in this PR.
Type of change
Please delete options that are not relevant.
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
How Has This Been Tested?
Running the snippet provided in #227
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules
Description
Fixes #227
As described in the issue, the
union
operation does not preserve the color of one of the solids when they are non-intersecting. Upon inspection of the JSCAD code, I realized that there is a separate function to handle non-intersecting unions, and thetoPolygons
function was not called with the option of preserving the individual colors of a polygon using the boolean parametercolorizePolygons
. This has been rectified in this PR.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Running the snippet provided in #227
Checklist: