Skip to content

Commit

Permalink
- support tangent constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorDArcyEvans committed Apr 15, 2023
1 parent 7e5057a commit ee9d492
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NeoGeoSolver.NET.UI.Web/Pages/Index.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ private bool Apply_Tangent()

if (selCircs.Count != 1 && selArcs.Count == 1)
{
// cons = selLines[0].Line.IsTangentTo(selArcs[0].Arc);
cons = selLines[0].Line.IsTangentTo(selArcs[0].Arc);
}

if (cons is null)
Expand Down
7 changes: 7 additions & 0 deletions NeoGeoSolver.NET/Constraints/ConstraintExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ public static LineCircleDistance IsTangentTo(this Line line, Circle circle)
constr.SetValue(0);
return constr;
}

public static LineArcDistance IsTangentTo(this Line line, Arc arc)
{
var constr = new LineArcDistance(line, arc);
constr.SetValue(0);
return constr;
}

public static Perpendicular IsPerpendicularTo(this Line line0, Line line1) => new Perpendicular(line0, line1);

Expand Down

0 comments on commit ee9d492

Please sign in to comment.