<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DRAWING ARCS in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1200213#M11225</link>
    <description>&lt;P&gt;I forget I and using&amp;nbsp;SceneView not&amp;nbsp;MapView. I want to draw it in SceneView . Do you know how?&lt;/P&gt;</description>
    <pubDate>Sun, 07 Aug 2022 17:10:41 GMT</pubDate>
    <dc:creator>FranciscoLopez</dc:creator>
    <dc:date>2022-08-07T17:10:41Z</dc:date>
    <item>
      <title>DRAWING ARCS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1198868#M11206</link>
      <description>&lt;P&gt;Hi everyone.&lt;/P&gt;&lt;P&gt;I need to draw several arcs in a overlay. I need to make a function where with a location, angle and distance, draw an arc like the attached file.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 09:47:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1198868#M11206</guid>
      <dc:creator>FranciscoLopez</dc:creator>
      <dc:date>2022-08-03T09:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING ARCS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1200100#M11221</link>
      <description>&lt;P&gt;This seems to work, perhaps give it a test to make sure you get the correct shape based on your inputs.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private Geometry CreateWedgeGeometry(MapPoint center, double radius, double arcAngle, double azimuth)
{
    SpatialReference spatialReference = center.SpatialReference;

    // Get the angle of the azimuth.
    var directionAngle = 90 - azimuth;
    directionAngle = (directionAngle &amp;lt; 0) ? directionAngle + 360 : directionAngle;
    directionAngle = (directionAngle &amp;gt; 360) ? directionAngle - 360 : directionAngle;            

    // Subtract half of the arc angle from the direction (wedge should be split by the azimuth angle).
    var startPointDegrees = directionAngle - (arcAngle / 2);
    startPointDegrees = (startPointDegrees &amp;lt; 0) ? startPointDegrees + 360 : startPointDegrees;
    startPointDegrees = (startPointDegrees &amp;gt; 360) ? startPointDegrees - 360 : startPointDegrees;

    // Get the radian values of the angles.
    var startPointRadians = startPointDegrees * Math.PI / 180.0;
    var arcAngleRadians = arcAngle * Math.PI / 180;

    // Create an arc segment with the center point, radius, start point of the arc, arc angle, and spatial reference.
    EllipticArcSegment arc = EllipticArcSegment.CreateCircularEllipticArc(center, radius, startPointRadians, arcAngleRadians, spatialReference);

    // create the sides of the wedge (center point to start/end points of the arc).
    var startSide = new LineSegment(center, arc.StartPoint);
    //var endSide = new LineSegment(center, arc.EndPoint);
            
    // Create the wedge-shaped polygon.
    PolygonBuilder builder = new PolygonBuilder(spatialReference);
    // Note: only need to add one of the sides to complete the polygon.
    builder.AddPart(
        new Part(new Segment[]
        {
            startSide,
            arc
        }, spatialReference)
    );

    return builder.ToGeometry();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Based on your image, "arcAngle" is&amp;nbsp;&lt;EM&gt;α, and "radius" is D. The "azimuth" defines the orientation (compass direction) of the wedge. To create something like what's shown in your image, you'd call it like this:&lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Geometry wedge = CreateWedgeGeometry(originPoint, 1000000, 90.0, 360.0);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Hope that helps, Thad&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 23:50:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1200100#M11221</guid>
      <dc:creator>ThadTilton</dc:creator>
      <dc:date>2022-08-05T23:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING ARCS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1200123#M11223</link>
      <description>&lt;P&gt;Hi, first of all, thanks a lot for your help. I have used your code to make this:&lt;/P&gt;&lt;P&gt;MapView.CreateAimingZone(_latitude, _longitude, 0.078,90,180);&lt;/P&gt;&lt;P&gt;public void CreateAimingZone(double latitude, double longitude, double radius, double arcAngle, double azimuth)&lt;BR /&gt;{&lt;BR /&gt;MapPoint center = new MapPoint(longitude,latitude);&lt;BR /&gt;Graphic AimiinZone = CreateWedgeGeometry(center, radius, arcAngle, azimuth);&lt;BR /&gt;_ringRange_GO.Graphics.Add(AimiinZone);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;private Graphic CreateWedgeGeometry(MapPoint center, double radius, double arcAngle, double azimuth)&lt;BR /&gt;{&lt;BR /&gt;SpatialReference spatialReference = center.SpatialReference;&lt;/P&gt;&lt;P&gt;// Get the angle of the azimuth.&lt;BR /&gt;var directionAngle = 90 - azimuth;&lt;BR /&gt;directionAngle = (directionAngle &amp;lt; 0) ? directionAngle + 360 : directionAngle;&lt;BR /&gt;directionAngle = (directionAngle &amp;gt; 360) ? directionAngle - 360 : directionAngle;&lt;/P&gt;&lt;P&gt;// Subtract half of the arc angle from the direction (wedge should be split by the azimuth angle).&lt;BR /&gt;var startPointDegrees = directionAngle - (arcAngle / 2);&lt;BR /&gt;startPointDegrees = (startPointDegrees &amp;lt; 0) ? startPointDegrees + 360 : startPointDegrees;&lt;BR /&gt;startPointDegrees = (startPointDegrees &amp;gt; 360) ? startPointDegrees - 360 : startPointDegrees;&lt;/P&gt;&lt;P&gt;// Get the radian values of the angles.&lt;BR /&gt;var startPointRadians = startPointDegrees * Math.PI / 180.0;&lt;BR /&gt;var arcAngleRadians = arcAngle * Math.PI / 180;&lt;/P&gt;&lt;P&gt;// Create an arc segment with the center point, radius, start point of the arc, arc angle, and spatial reference.&lt;BR /&gt;EllipticArcSegment arc = EllipticArcSegment.CreateCircularEllipticArc(center, radius, startPointRadians, arcAngleRadians, spatialReference);&lt;/P&gt;&lt;P&gt;// create the sides of the wedge (center point to start/end points of the arc).&lt;BR /&gt;var startSide = new LineSegment(center, arc.StartPoint);&lt;BR /&gt;//var endSide = new LineSegment(center, arc.EndPoint);&lt;/P&gt;&lt;P&gt;// Create the wedge-shaped polygon.&lt;BR /&gt;PolygonBuilder builder = new PolygonBuilder(spatialReference);&lt;BR /&gt;// Note: only need to add one of the sides to complete the polygon.&lt;BR /&gt;builder.AddPart(&lt;BR /&gt;new Part(new Segment[]&lt;BR /&gt;{&lt;BR /&gt;startSide,&lt;BR /&gt;arc&lt;BR /&gt;}, spatialReference)&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;Graphic ellipseGraphic = new Graphic(builder.ToGeometry());&lt;/P&gt;&lt;P&gt;//return builder.ToGeometry();&lt;BR /&gt;return ellipseGraphic;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My result is in the attached file, I am doing something wrong. I have made a tringle.&lt;/P&gt;&lt;P&gt;Other different is a use de value 1000000 in radius I can't see anything, but i I use 0.08 the Radius, Distance is 8Km.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Aug 2022 07:46:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1200123#M11223</guid>
      <dc:creator>FranciscoLopez</dc:creator>
      <dc:date>2022-08-06T07:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING ARCS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1200213#M11225</link>
      <description>&lt;P&gt;I forget I and using&amp;nbsp;SceneView not&amp;nbsp;MapView. I want to draw it in SceneView . Do you know how?&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 17:10:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1200213#M11225</guid>
      <dc:creator>FranciscoLopez</dc:creator>
      <dc:date>2022-08-07T17:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING ARCS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1200741#M11236</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;ThadTilton&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please, see the link&amp;nbsp;&lt;A title="EllipticArcSegment.CreateCircularEllipticArc" href="https://community.esri.com/t5/arcgis-runtime-sdk-for-net-questions/ellipticarcsegment-in-sceneview/m-p/1200695#M11231" target="_blank" rel="noopener"&gt;EllipticArcSegment.CreateCircularEllipticArc&lt;/A&gt;&amp;nbsp;To see what is the problem with&amp;nbsp;EllipticArcSegment.CreateCircularEllipticArc&lt;/P&gt;&lt;P&gt;Anyway, Thanks a lot for your help. I have learned a lot.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 10:57:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1200741#M11236</guid>
      <dc:creator>FranciscoLopez</dc:creator>
      <dc:date>2022-08-09T10:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING ARCS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1201025#M11245</link>
      <description>&lt;P&gt;Hey Francisco, for display in 3D, you need to densify the arc. This will represent the arc as a series of linear segments rather than a true curve. The tricky part might be finding the ideal "maxSegmentLength" to get a smooth curve (without going too small, which could hurt performance). Here's an example of densifying so the returned "curve" is composed of segments not less than 10,000 meters (10 km).&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// Densify the arc for display in 3D.
var densifiedPoly = GeometryEngine.Densify(builder.ToGeometry(), 10000);
return densifiedPoly; // builder.ToGeometry();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 19:54:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1201025#M11245</guid>
      <dc:creator>ThadTilton</dc:creator>
      <dc:date>2022-08-09T19:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING ARCS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1201761#M11252</link>
      <description>&lt;P&gt;I am sorry&amp;nbsp;&lt;SPAN&gt; ThadTilton&lt;/SPAN&gt;&lt;SPAN class=""&gt;, I can't get your result. Please could you send me the code to get the result you attached?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 06:29:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1201761#M11252</guid>
      <dc:creator>FranciscoLopez</dc:creator>
      <dc:date>2022-08-11T06:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING ARCS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1202234#M11258</link>
      <description>&lt;P&gt;Here's the function:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private Geometry CreateDensifiedWedgeGeometry(MapPoint center, double radius, double arcAngle, double azimuth)
{
    SpatialReference spatialReference = center.SpatialReference;

    // Get the angle of the azimuth.
    var directionAngle = 90 - azimuth;
    directionAngle = (directionAngle &amp;lt; 0) ? directionAngle + 360 : directionAngle;
    directionAngle = (directionAngle &amp;gt; 360) ? directionAngle - 360 : directionAngle;

    // Subtract half of the arc angle from the direction (wedge should be split by the azimuth angle).
    var startPointDegrees = directionAngle - (arcAngle / 2);
    startPointDegrees = (startPointDegrees &amp;lt; 0) ? startPointDegrees + 360 : startPointDegrees;
    startPointDegrees = (startPointDegrees &amp;gt; 360) ? startPointDegrees - 360 : startPointDegrees;

    // Get the radian values of the angles.
    var startPointRadians = startPointDegrees * Math.PI / 180.0;
    var arcAngleRadians = arcAngle * Math.PI / 180;

    // Create an arc segment with the center point, radius, start point of the arc, arc angle, and spatial reference.
    EllipticArcSegment arc = EllipticArcSegment.CreateCircularEllipticArc(center, radius, startPointRadians, arcAngleRadians, spatialReference);

    // create the sides of the wedge (center point to start/end points of the arc).
    var startSide = new LineSegment(center, arc.StartPoint);
    //var endSide = new LineSegment(center, arc.EndPoint);

    // Create the wedge-shaped polygon.
    PolygonBuilder builder = new PolygonBuilder(spatialReference);
    // Note: only need to add one of the sides to complete the polygon.
    builder.AddPart(
        new Part(new Segment[]
        {
           startSide,
           arc
        }, spatialReference)
    );

    // Densify the arc for display in 3D.
    var densifiedPoly = GeometryEngine.Densify(builder.ToGeometry(), 100000);

    return densifiedPoly; // builder.ToGeometry();
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I call it with this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private void CreateWedgeButton_Click(object sender, RoutedEventArgs e)
{
    MapPoint origin = new MapPoint(x: 40e5, y: 5e5, SpatialReferences.WebMercator);
    Geometry wedgeGeometry = CreateDensifiedWedgeGeometry(origin, 1000000, 90, 360);
    Graphic wedgeGraphic = new Graphic(wedgeGeometry);

    var curvedGraphicsOverlay = MySceneView.GraphicsOverlays["curvedoverlay"];
    curvedGraphicsOverlay.Graphics.Add(wedgeGraphic);

    MySceneView.SetViewpoint(new Viewpoint(wedgeGeometry));
}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 11 Aug 2022 22:25:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1202234#M11258</guid>
      <dc:creator>ThadTilton</dc:creator>
      <dc:date>2022-08-11T22:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: DRAWING ARCS</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1202659#M11263</link>
      <description>&lt;P&gt;Thanks a lot. My problem is than I am new in GIS and I have problem to understand the concepts. I have to learn about the different Dantum. Any way, thanks a lot for your solution.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Aug 2022 07:28:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/drawing-arcs/m-p/1202659#M11263</guid>
      <dc:creator>FranciscoLopez</dc:creator>
      <dc:date>2022-08-14T07:28:08Z</dc:date>
    </item>
  </channel>
</rss>

