Add polycon shape to field viewer

This commit is contained in:
Evgeny Redikultsev
2025-10-28 22:02:59 +05:00
parent 09dcf4e7e9
commit c84dc47134
12 changed files with 198 additions and 38 deletions

View File

@@ -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;