Skip to content

R23 버전을 위한 초기 설정 #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dotnet.preferCSharpExtension": true
}
24 changes: 24 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
]
}
4 changes: 0 additions & 4 deletions AutoCADCommands.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ VisualStudioVersion = 15.0.28307.572
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoCADCommands", "AutoCADCommands\AutoCADCommands.csproj", "{C5F6C326-952B-43E8-9830-311F190BAB11}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoCADCommands.R18", "AutoCADCommands\AutoCADCommands.R18.csproj", "{EDA1D1A6-3204-4B82-8D5F-4F59815F072E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoCADCommands.R19", "AutoCADCommands\AutoCADCommands.R19.csproj", "{77B9F8FE-F75B-48C8-8249-6859E8D347E1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
27 changes: 22 additions & 5 deletions AutoCADCommands/Algorithms.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1388,13 +1388,30 @@ public static int PolyClean_ReducePoints(Polyline poly, double epsilon)
public static void PolyClean_RemoveColinearPoints(Polyline poly)
{
var points = poly.GetPolyPoints().ToArray();
var cleanList = new List<int>();
int j = 0;
for (int i = 1; i < points.Length; i++)
var cleanList = new List<Point2D>();
cleanList.Add(points[0]); // Add the first point

for (int i = 1; i < points.Length - 1; i++)
{
// TODO: implement this.
throw new NotImplementedException();
var prev = points[i - 1];
var curr = points[i];
var next = points[i + 1];

// Calculate the direction of the vectors prev-curr and curr-next
var dir1 = new Point2D(curr.X - prev.X, curr.Y - prev.Y);
var dir2 = new Point2D(next.X - curr.X, next.Y - curr.Y);

// If the directions are not the same, add the point to the clean list
if (dir1.X * dir2.Y - dir1.Y * dir2.X != 0)
{
cleanList.Add(curr);
}
}

cleanList.Add(points[points.Length - 1]); // Add the last point

// Replace the points in the polyline with the clean list
poly.SetPolyPoints(cleanList.ToArray());
}

/// <summary>
Expand Down
129 changes: 0 additions & 129 deletions AutoCADCommands/AutoCADCommands.R18.csproj

This file was deleted.

133 changes: 0 additions & 133 deletions AutoCADCommands/AutoCADCommands.R19.csproj

This file was deleted.

Loading