Add polygon to DTO convert strategy

This commit is contained in:
Evgeny Redikultsev
2025-10-19 17:37:17 +05:00
parent 5bf01bcb09
commit ed66da123c
64 changed files with 759 additions and 266 deletions

View File

@@ -9,10 +9,10 @@ namespace StructureHelperCommon.Models.Shapes
{
public static class PolygonGeometryUtils
{
public static IPolygonShape GetTratsfromedPolygon(IPolygonShape polygon, double dx, double dy)
public static ILinePolygonShape GetTratsfromedPolygon(ILinePolygonShape polygon, double dx, double dy)
{
IPolygonShape newPolygon = new PolygonShape(Guid.Empty);
var updateLogic = new PolygonShapeUpdateStrategy();
ILinePolygonShape newPolygon = new LinePolygonShape(Guid.Empty);
var updateLogic = new LinePolygonShapeUpdateStrategy();
updateLogic.Update(newPolygon, polygon);
foreach (var item in newPolygon.Vertices)
{
@@ -21,7 +21,7 @@ namespace StructureHelperCommon.Models.Shapes
}
return newPolygon;
}
public static bool DoPolygonsEdgesIntersect(IPolygonShape polygon)
public static bool DoPolygonsEdgesIntersect(ILinePolygonShape polygon)
{
var vertices = polygon.Vertices;
int n = vertices.Count;