Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Hm, interesting idea, except I'm trying to erode the polygon, which should result in a smaller polygon. In your example, your green polygon has dilated into a larger blue shape. I am not sure that you can use RegionDilation to result in a smaller shape.
This returns EmptyRegion[1], the empty subset of R^1. This is surprising because our shapes are 2-dimensional, not 1, so I'd expect EmptyRegion[2] here. I see that RegionEmbeddingDimension returns 2 for the Polygon and the Line you suggested.
Just a note that when I adapted this solution to my image-cropping problem, I encountered a "bug" where TrackingFunction doesn't work with multiple Locators, as described here.
This helps, thank you! One last question: how would you tweak your example to use indexed variables like a[[1]] and a[[2]], instead of a and b, so that I could work with a list?
@flinty, thanks for digging in to that RFC, I didn't know the difference between multipart/alternative and multipart/mixed. Interestingly, Wolfram Tech Support emails have multipart/alternative MIME types, yet their text/plain and text/html parts are very different. (I filed a support ticket with WRI about that.)
@LouisB, thanks for pointing that out. Even adding Infinity to Cases, it still only finds the text/html portion only in the Plaintext field, where I would have to parse it out from the rest of the whole email. I was hoping MMA would offer something like ImportString[email, {"EML", {"Multiparts",2} } ] to parse it out for me.