public void Assign(ICellSpatialFilter source) { if (source.Fence != null) { Fence = new Fence(); Fence.Assign(source.Fence); } if (source.AlignmentFence != null) { AlignmentFence = new Fence(); // contains alignment boundary to help speed up filtering on alignment files AlignmentFence.Assign(source.AlignmentFence); } PositionX = source.PositionX; PositionY = source.PositionY; PositionRadius = source.PositionRadius; IsSquare = source.IsSquare; OverrideSpatialCellRestriction = new BoundingIntegerExtent2D(source.OverrideSpatialCellRestriction); StartStation = source.StartStation; EndStation = source.EndStation; LeftOffset = source.LeftOffset; RightOffset = source.RightOffset; CoordsAreGrid = source.CoordsAreGrid; IsSpatial = source.IsSpatial; IsPositional = source.IsPositional; IsDesignMask = source.IsDesignMask; SurfaceDesignMaskDesignUid = source.SurfaceDesignMaskDesignUid; IsAlignmentMask = source.IsAlignmentMask; AlignmentDesignMaskDesignUID = source.AlignmentDesignMaskDesignUID; }
public void Test_FenceTests_Assign() { Fence fenceSource = makeSimpleRectangleFence(); Fence fence = new Fence(); fence.Assign(fenceSource); Assert.Equal(4, fence.NumVertices); Assert.True(fence.Points[0].X == 0 && fence.Points[0].Y == 0 && fence.Points[1].X == 0 && fence.Points[1].Y == 100 && fence.Points[2].X == 100 && fence.Points[2].Y == 100 && fence.Points[3].X == 100 && fence.Points[3].Y == 0, "Fence point vertices incorrect"); }