Select to view content in your preferred language

In MultipatchBuilder, whats the difference between FirstRing and Ring esriPatchType

765
2
11-20-2020 02:35 PM
serbanmarin1
Emerging Contributor

What does the 'FirstRing' and 'Ring' esriPatch types mean in ArcGIS.Core.Geometry.esriPatchType. What are the differences between them?

From this link, I assumed there would be a way to define inner rings and outer rings, but my tests show that's not the case. 

In my tests I have two coordinate lists. One defines a small triangle and the other a bigger one. The small one is contained inside the big one. When I create a multipatch using the MultiPatchBuilderEx with the the two polygons as rings It ends up displaying the intersection of these two patches. I was expecting to see the difference between the two polygons. I've tried this both with the big triangle as FirstRing and the small polygon as Ring and vice versa but the results are the same.

Tags (1)
0 Kudos
2 Replies
by Anonymous User
Not applicable

This sample has a code snippet that creates a multipatch, you can check the sample for the use of FirstRing and Ring: https://github.com/esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/OverlayGroundSu... 

I order to add a 'hole' to your multipatch geometry you have to reverse the orientation of your 'hole' polygon:

https://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic15586.html

In general the following rule applies:

- outer rings are clockwise and holes are counterclockwise,

To tell if a polygon's orientation is clockwise check for an area greater than 0, if a polygon's orientation is counter clockwise the polygon area is less than 0. 

 

 

serbanmarin1
Emerging Contributor

Thanks for your answer.

I don't think ReverseOrientation will work because it needs a MultiPart while MultipatchBuilderEx works with Patch and MapPoint objects. I'm not sure what to do with the reversed Geometry once I create it.

Even if I were to get this working, it still doesn't explain why is there a Ring and FirstRing patch type in the SDK

 

Cheers,

0 Kudos