[Smtk-developers] More boost polygon work

David Thompson david.thompson at kitware.com
Thu Sep 10 20:53:59 EDT 2015


Hi all,

As a result of the previous boost.polygon evaluation, I was asked to make sure that booleans were still fast even when both the workpiece and tool inputs were complex. So, I've rotated the Chesapeake bay contour by a few degrees (anywhere from 10 to 50) and subtracted it from the original. It is fast: loading the dataset, rotating points, doing the boolean, and writing the output take a total of 0.08 seconds.

One other request I had was to see whether integer overflow would be a problem with the scaling factor chosen based on the smallest feature of interest. Assuming we use 64-bit integers for coordinates and make each integer 1mm in length, the largest "map" we could handle would be 2**63 mm = 10**15.965 m = 9.22 x 10**15 m = 5.73 x 10**12 miles. The semi-major axis of Earth's orbit around the sun is 149.5e9 m, so we could comfortably map every point the center of the earth travels around the sun in a year down to the nearest millimeter. More likely, we would choose quanta much smaller than a millimeter because intersection points along lines near the feature size would be hard to resolve otherwise. There is plenty of room to do this.

With that, I will proceed to implement a 2-d polygon session in SMTK that uses the boost approach (points stored in each session as integer coordinates, with the session transforming 3-d floating-point coordinates into 2-d integers by projection and scaling). You will be required to provide the transform and scaling information before inserting vertices, edges, or faces (or accept the default). Please let me know if you have any concerns.

	David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bay-SubtractRotatedInputs.pdf
Type: application/pdf
Size: 86958 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20150910/74b4a531/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bay-SubtractRotated45.pdf
Type: application/pdf
Size: 48457 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20150910/74b4a531/attachment-0003.pdf>


More information about the Smtk-developers mailing list