<?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: EllipticArcSegment in SceneView in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1200539#M11229</link>
    <description>&lt;P&gt;Hi. Thanks for following up in the Esri Community!&lt;/P&gt;&lt;P&gt;Unfortunately there is a bug in Runtime that means that true curves in a GraphicsOverlay require that the graphics overlay &lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.UI.GraphicsOverlay.RenderingMode.html#Esri_ArcGISRuntime_UI_GraphicsOverlay_RenderingMode" target="_self"&gt;rendering mode is set to static&lt;/A&gt;. The default mode is dynamic.&lt;/P&gt;&lt;P&gt;This also impacts true curves in a feature layer backed by a mobile geodatabase, but that doesn't impact you here.&lt;/P&gt;&lt;P&gt;One alternative you could consider if you must display the GraphicsOverlay in dynamic mode is to &lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Geometry.GeometryEngine.Densify.html" target="_self"&gt;densify the curve geometry&lt;/A&gt; and use the densified geometry for your graphic.&lt;/P&gt;&lt;P&gt;Hope this helps. I'll see how we can expose this information through the docs until we are able to fix it.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2022 19:15:38 GMT</pubDate>
    <dc:creator>Nicholas-Furness</dc:creator>
    <dc:date>2022-08-08T19:15:38Z</dc:date>
    <item>
      <title>EllipticArcSegment in SceneView</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1200218#M11226</link>
      <description>&lt;P&gt;I want to create an arc in an&amp;nbsp;SceneView. People told me I have to use&amp;nbsp;EllipticArcSegment, and it works in&amp;nbsp;MapView, but I can use it in&amp;nbsp;SceneView. When I use&amp;nbsp;EllipticArcSegment in ScenView I get a line not an arc. See the picture.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public MainWindow()
{
InitializeComponent();
MySceneView.Scene = new Scene(BasemapStyle.ArcGISImageryStandard);
MyMapView.Map = new Map(BasemapStyle.ArcGISTopographic);

MapPoint _spain = new MapPoint(-4.00475, 40.637861, SpatialReferences.Wgs84);
Graphic _arc = CreateArc(_spain, 0.080, 90.0, 45.0);
Graphic _arc1 = CreateArc(_spain, 0.080, 90.0, 45.0);
_AiminginZone_GO.Graphics.Add(_arc);
_AiminginZone_GO1.Graphics.Add(_arc1);
MyMapView.GraphicsOverlays.Add(_AiminginZone_GO);
MySceneView.GraphicsOverlays.Add(_AiminginZone_GO1);
}

private Graphic CreateArc(MapPoint center, double radius, double arcAngle, double azimuth)
{

_AiminginZone_GO.Graphics.Clear();
_AiminginZone_GO1.Graphics.Clear();
// set up spatial references
SpatialReference wgs84 = SpatialReferences.Wgs84;
SpatialReference webMercator = SpatialReferences.WebMercator;
// make a point in lat/long (WGS84)
MapPoint centrePoint = new MapPoint(center.X, center.Y, 56, wgs84);
MapPoint centrePoint1 = new MapPoint(center.X+0.05, center.Y, 56, wgs84);
// project it to a mercator projection where the unit of measure is metres
MapPoint mercatorPoint = (MapPoint)GeometryEngine.Project(centrePoint, webMercator);
// create an arc segment which is 50Kilometers radius, starting at 90 degrees, the arc angle is 45 degrees clockwise
//EllipticArcSegment arcSegment = new EllipticArcSegment(centrePoint, mercatorPoint, (Math.PI / 180) * 90, true, true, (Math.PI / 180) * 90, (Math.PI / 180) * -45, wgs84);
EllipticArcSegment arcSegment = EllipticArcSegment.CreateCircularEllipticArc(mercatorPoint, 50000, (Math.PI / 180) * 90, (Math.PI / 180) * -45, webMercator);

// make a part with the segment
Part part = new Part(webMercator);
part.Add(arcSegment);

// create the line from the part
Polyline line = new Polyline(part);

// add it to a graphic and graphics overlay to allow us to visualise it
var polylineSymbol = new SimpleLineSymbol(SimpleLineSymbolStyle.Dash, System.Drawing.Color.Red, 3.0);
Graphic arcGraphic = new Graphic(line, polylineSymbol);
return arcGraphic;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="00.Compare.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/47999i1CD9C901505A0E6E/image-size/large?v=v2&amp;amp;px=999" role="button" title="00.Compare.png" alt="00.Compare.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 18:01:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1200218#M11226</guid>
      <dc:creator>FranciscoLopez</dc:creator>
      <dc:date>2022-08-07T18:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: EllipticArcSegment in SceneView</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1200539#M11229</link>
      <description>&lt;P&gt;Hi. Thanks for following up in the Esri Community!&lt;/P&gt;&lt;P&gt;Unfortunately there is a bug in Runtime that means that true curves in a GraphicsOverlay require that the graphics overlay &lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.UI.GraphicsOverlay.RenderingMode.html#Esri_ArcGISRuntime_UI_GraphicsOverlay_RenderingMode" target="_self"&gt;rendering mode is set to static&lt;/A&gt;. The default mode is dynamic.&lt;/P&gt;&lt;P&gt;This also impacts true curves in a feature layer backed by a mobile geodatabase, but that doesn't impact you here.&lt;/P&gt;&lt;P&gt;One alternative you could consider if you must display the GraphicsOverlay in dynamic mode is to &lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Geometry.GeometryEngine.Densify.html" target="_self"&gt;densify the curve geometry&lt;/A&gt; and use the densified geometry for your graphic.&lt;/P&gt;&lt;P&gt;Hope this helps. I'll see how we can expose this information through the docs until we are able to fix it.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 19:15:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1200539#M11229</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2022-08-08T19:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: EllipticArcSegment in SceneView</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1200695#M11231</link>
      <description>&lt;P&gt;Hi Nicholas, I have tried to use&amp;nbsp;Densify without success. I am new using using GIS Tools and I do not understand how to resolve the problem using densify.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 06:35:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1200695#M11231</guid>
      <dc:creator>FranciscoLopez</dc:creator>
      <dc:date>2022-08-09T06:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: EllipticArcSegment in SceneView</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1200740#M11235</link>
      <description>&lt;P&gt;Hi, so I was doing some test using the following the attached code and the results are very stranger, see the pictures.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-justify"&gt;I am using SceneView (Left picture) and MapView (Right picture). In the code, I draw a circle using&amp;nbsp;GeodesicEllipseParameters and it make a perfect circle in the both Views. And I draw a Arc using EllipticArcSegment.CreateCircularEllipticArc where I cant make an arc that it follows the circle. In the pictures can show differents results.&lt;/P&gt;&lt;P&gt;The result is different using Dynamic or Static rendering.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;I'd like to make a semi circle forms part of the main circle. So, How can I do it? The semi circle is defined by a radius, angle and azimuth.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private void ShowGraphics(MapPoint center, double radius, double startAngle, double azimuth)
        {
            CheckGOType();
            //***********************************************************************************
            MyMapView.GraphicsOverlays.Clear();
            MySceneView.GraphicsOverlays.Clear();
            GraphicsOverlay MyMapView_go = new GraphicsOverlay();
            GraphicsOverlay MySceneView_go = new GraphicsOverlay();
            MyMapView_go.RenderingMode = ValueSelectes;
            MySceneView_go.RenderingMode = ValueSelectes;
            MyMapView_go.Graphics.Clear();
            MySceneView_go.Graphics.Clear();
            MyMapView_go.Graphics.Add(MakeArc(center, radius / 100, startAngle, azimuth));
            MySceneView_go.Graphics.Add(MakeArc(center, radius / 100, startAngle, azimuth));
            MyMapView.GraphicsOverlays.Add(MyMapView_go);
            MySceneView.GraphicsOverlays.Add(MySceneView_go);
            //***********************************************************************************
            GraphicsOverlay CircleScene = new GraphicsOverlay();
            GraphicsOverlay CircleMap = new GraphicsOverlay();
            CircleScene.RenderingMode = GraphicsRenderingMode.Dynamic;
            CircleMap.RenderingMode = GraphicsRenderingMode.Dynamic;
            CircleScene.Graphics.Clear();
            CircleMap.Graphics.Clear();
            CircleMap = MakeEllipseGraphicsOverlay(center, radius);
            CircleScene = MakeEllipseGraphicsOverlay(center, radius);
            MyMapView.GraphicsOverlays.Add(CircleMap);
            MySceneView.GraphicsOverlays.Add(CircleScene);
        }
        private void CheckGOType()
        {
            if (tDynamic.IsChecked == true)
            {
                ValueSelectes = GraphicsRenderingMode.Dynamic;
            }
            if (tStatic.IsChecked == true)
            {
                ValueSelectes = GraphicsRenderingMode.Static;
            }
        }
        private Graphic MakeArc(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));
            var polylineSymbol = new SimpleLineSymbol(SimpleLineSymbolStyle.Solid, System.Drawing.Color.White, 2.0);
            Graphic ellipseGraphic = new Graphic(builder.ToGeometry(), polylineSymbol);
            return ellipseGraphic;
        }
        private GraphicsOverlay MakeEllipseGraphicsOverlay(MapPoint center, double distance)
        {
            // Create a simple fill symbol with outline.
            SimpleLineSymbol curvedLineSymbol = new SimpleLineSymbol(SimpleLineSymbolStyle.Solid, System.Drawing.Color.Black, 5);
            SimpleFillSymbol curvedFillSymbol = new SimpleFillSymbol(SimpleFillSymbolStyle.Null, System.Drawing.Color.Purple, curvedLineSymbol);
            // Create a graphics overlay for the polygons with curve segments.
            GraphicsOverlay ellipseGraphicsOverlay = new GraphicsOverlay();

            // Create and assign a simple renderer to the graphics overlay.
            ellipseGraphicsOverlay.Renderer = new SimpleRenderer(curvedFillSymbol);
            // Create the polygon geometry, then create a graphic using that polygon.
            Polygon ellipse = MakeEllipseGeometry(center, distance);
            Graphic ellipseGraphic = new Graphic(ellipse);
            // Add the graphic to the graphics overlay.
            ellipseGraphicsOverlay.Graphics.Add(ellipseGraphic);
            return ellipseGraphicsOverlay;
        }
        private Polygon MakeEllipseGeometry(MapPoint center, double distance)
        {
            // Creates a GeodesicEllipseParameters object to use for GeometryEngine.EllipseGeodesic method.
            GeodesicEllipseParameters parameters = new GeodesicEllipseParameters
            {
                Center = center,
                GeometryType = GeometryType.Polygon,
                SemiAxis1Length = distance,
                SemiAxis2Length = 0,
                AxisDirection = 0,
                MaxPointCount = 2360,
                // Angular unit is degrees by default.
                AngularUnit = AngularUnits.Degrees,
                // Linear unit is meters by default.
                LinearUnit = LinearUnits.Kilometers,
                MaxSegmentLength = 0.001
            };
            Polygon ellipsePoly = (Polygon)GeometryEngine.EllipseGeodesic(parameters);
            return ellipsePoly;
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="01.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48117i89A5C1DD21447B0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="01.png" alt="01.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="02.png" style="width: 800px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48116iCB9DFB95DB96600C/image-size/large?v=v2&amp;amp;px=999" role="button" title="02.png" alt="02.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="03.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48119i368484F7368D106F/image-size/large?v=v2&amp;amp;px=999" role="button" title="03.png" alt="03.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="04.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48118i366C957632759B74/image-size/large?v=v2&amp;amp;px=999" role="button" title="04.png" alt="04.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="05.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48120i073697585CE14E66/image-size/large?v=v2&amp;amp;px=999" role="button" title="05.png" alt="05.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 11:03:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1200740#M11235</guid>
      <dc:creator>FranciscoLopez</dc:creator>
      <dc:date>2022-08-09T11:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: EllipticArcSegment in SceneView</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1308512#M11986</link>
      <description>&lt;P&gt;Could you please tell me how to draw the circle on a SceneView centered on a point and with a radius? &amp;nbsp;I can't seem to display it using .GeodesicEllipseParameters&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 03:50:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/ellipticarcsegment-in-sceneview/m-p/1308512#M11986</guid>
      <dc:creator>alionthego</dc:creator>
      <dc:date>2023-07-17T03:50:50Z</dc:date>
    </item>
  </channel>
</rss>

