mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-30 16:41:34 -05:00
feat: add Box.Translate and improve NFP/IFP geometry APIs
Add immutable Translate methods to Box. Make NoFitPolygon ToClipperPath/FromClipperPath public with optional offset parameter. Refactor InnerFitPolygon.ComputeFeasibleRegion to accept PathsD directly, letting Clipper2 handle implicit union. Add UpdateBounds calls after polygon construction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
2ed02c2dae
commit
facd07d7de
3 files changed
+40
-25
No files matched your search
@@ -74,6 +74,16 @@ namespace OpenNest.Geometry
|
||||
Location += voffset;
|
||||
}
|
||||
|
||||
public Box Translate(double x, double y)
|
||||
{
|
||||
return new Box(X + x, Y + y, Width, Length);
|
||||
}
|
||||
|
||||
public Box Translate(Vector offset)
|
||||
{
|
||||
return new Box(X + offset.X, Y + offset.Y, Width, Length);
|
||||
}
|
||||
|
||||
public double Left
|
||||
{
|
||||
get { return X; }
|
||||
|
||||
Reference in new issue
Block a user