Add polycon shape to field viewer
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
using StructureHelperCommon.Models.Shapes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FieldVisualizer.Entities.Values.Primitives
|
||||
{
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels
|
||||
// Create the PathFigure using triangle vertices.
|
||||
var figure = new PathFigure
|
||||
{
|
||||
StartPoint = new Point(triangle.Point1.X, triangle.Point1.Y),
|
||||
StartPoint = new Point(triangle.Point1.X, - triangle.Point1.Y),
|
||||
IsClosed = true,
|
||||
IsFilled = true
|
||||
};
|
||||
@@ -249,8 +249,8 @@ namespace FieldVisualizer.ViewModels.FieldViewerViewModels
|
||||
// Add the remaining vertices as LineSegments
|
||||
var segments = new PathSegmentCollection
|
||||
{
|
||||
new LineSegment(new Point(triangle.Point2.X, triangle.Point2.Y), true),
|
||||
new LineSegment(new Point(triangle.Point3.X, triangle.Point3.Y), true)
|
||||
new LineSegment(new Point(triangle.Point2.X, - triangle.Point2.Y), true),
|
||||
new LineSegment(new Point(triangle.Point3.X, - triangle.Point3.Y), true)
|
||||
// Closing is handled by IsClosed = true, so we don't need to add a segment back to Point1
|
||||
};
|
||||
figure.Segments = segments;
|
||||
|
||||
@@ -1,19 +1,8 @@
|
||||
using FieldVisualizer.Entities.Values.Primitives;
|
||||
using FieldVisualizer.Windows.UserControls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace FieldVisualizer.Windows
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user