mtex-toolbox / mtex

MTEX is a free Matlab toolbox for quantitative texture analysis. Homepage:
http://mtex-toolbox.github.io/
GNU General Public License v2.0
274 stars 182 forks source link

calcPolygonsC produces negative areas #2076

Open vedadb opened 4 months ago

vedadb commented 4 months ago

Mentioned in #2046

When reconstructing grains the first grainCalc produces normal areas - after having removed ebsd-pixels of grains smaller than e.g. 5px the second grainCalc SOMETIMES produces negative areas.

I found that this was coupled to calcPolygonsC and does not occur with calcPolygons. The poly objects formed are different for the two functions in those cases and the algorithm for the C-function needs to be checked to make sure that it produces the same results.

I will see if I can get some data for you, but essentially the functionality must be the same for them.

What MTEX version do you use? MTEX 5.10.2

ralfHielscher commented 4 months ago

Thank you for reporting. A demo data set would ne nice of course.