Struct PackPlacement
- Namespace
- GeometryHelper.Packing
- Assembly
- GeometryHelper.dll
Where one box goes: which sheet, how far it moves, and the box moved there.
public readonly struct PackPlacement : IEquatable<PackPlacement>
- Implements
- Inherited Members
Remarks
Boxes are only moved, never turned or resized. The move is the same for every point of what the box stands for, so adding Translation to any point of it, the origin of a drawing view or the insertion point of a block, puts it where its box goes, as long as the box was given in the same coordinates as that point.
Constructors
- PackPlacement(int, GeoVector2, GeoRectangle2, bool)
Initializes a new instance of the PackPlacement struct.
Properties
- Placed
Gets whether the box found a place: inside the usable area of its sheet and clear of every other box, but the boxes of its own group kept as they stood. False for a box larger than the usable area of a sheet, or not at finite coordinates.
- SheetIndex
Gets which sheet the box goes on: nought for the first, one more for each sheet after it, as GetFrame(int) counts them; -1 for a box that goes on none.
- Translation
Gets how far the box moves, in the units of the boxes, the sheets lying where Origin and NewSheet lay them; zero for a box that goes on none.
- ViewBox
Gets the box moved by Translation, the same size and as turned as it was given; the box as given for one that goes on none.
Methods
- Equals(PackPlacement)
Indicates whether this placement is the same as another: the same sheet, move, box and verdict, exactly.
Operators
- operator ==(PackPlacement, PackPlacement)
Compares two placements for equality.
- operator !=(PackPlacement, PackPlacement)
Compares two placements for inequality.