| | |
| | | |
| | | namespace WIDESEAWCS_Common |
| | | { |
| | | public enum AreaInfo |
| | | /// <summary> |
| | | /// 表示å个æ¨åçå®ä½ç±» |
| | | /// </summary> |
| | | public class Block |
| | | { |
| | | CLOutAreaA, |
| | | CLOutAreaB, |
| | | CLOutAreaC |
| | | public int L { get; set; } // é¿åº¦ï¼æ²¿Xè½´ï¼ |
| | | public int W { get; set; } // å®½åº¦ï¼æ²¿Yè½´ï¼ |
| | | public int H { get; set; } // é«åº¦ï¼æ²¿Zè½´ï¼ |
| | | public int X { get; set; } // Xåæ ï¼å·¦ä¸è§ï¼ |
| | | public int Y { get; set; } // Yåæ ï¼å·¦ä¸è§ï¼ |
| | | public int Z { get; set; } // Zåæ ï¼åºé¨é«åº¦ï¼ |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¸çæä½ä¿¡æ¯ï¼ä½¿ç¨ä¸å¿ç¹åæ ï¼ |
| | | /// </summary> |
| | | public class SuctionInfo |
| | | { |
| | | public int[] PickCenter { get; set; } // æåä¸å¿ç¹[x,y,z] |
| | | public int[] PlaceCenter { get; set; } // æ¾ç½®ä¸å¿ç¹[x,y,z] |
| | | public int Rotation { get; set; } // å®é
æè½¬è§åº¦ |
| | | |
| | | public Point Point { get; set; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¾ç½®ç»æè¾åºåæ° |
| | | /// </summary> |
| | | public class PlacementResult |
| | | { |
| | | public List<int> VertexCoordinates { get; set; } // 8个顶ç¹åæ ï¼é¡ºåºï¼åºé¢åè§+é¡¶é¢åè§ï¼ |
| | | public int[] Center { get; set; } // ä¸å¿ç¹åæ (x,y,z) |
| | | public SuctionInfo SuctionInfo { get; set; } // å¸çæä½åæ° |
| | | } |
| | | |
| | | // è¾
å©ç±»å®ä¹åº------------------------------------------ |
| | | |
| | | /// <summary> |
| | | /// äºç»´åæ ç¹ï¼ç¨äºä½ç½®æ¥æ¾ï¼ |
| | | /// </summary> |
| | | public struct Point |
| | | { |
| | | public int X { get; } |
| | | public int Y { get; } |
| | | |
| | | public Point(int x, int y) |
| | | { |
| | | X = x; |
| | | Y = y; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¯æé¢æè¿°ï¼ç¨äºå屿¾ç½®ï¼ |
| | | /// </summary> |
| | | public class SupportSurface |
| | | { |
| | | public int X { get; set; } // æ¯æé¢èµ·å§Xåæ |
| | | public int Y { get; set; } // æ¯æé¢èµ·å§Yåæ |
| | | public int Z { get; set; } // æ¯æé¢é«åº¦ |
| | | public int AvailableLength { get; set; } // å¯ç¨é¿åº¦ï¼Xè½´æ¹åï¼ |
| | | public int AvailableWidth { get; set; } // å¯ç¨å®½åº¦ï¼Yè½´æ¹åï¼ |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç©å½¢åºåï¼ç¨äºç¢°ææ£æµï¼ |
| | | /// </summary> |
| | | public class Rectangle |
| | | { |
| | | public int Left { get; } |
| | | public int Top { get; } |
| | | public int Right { get; } |
| | | public int Bottom { get; } |
| | | |
| | | public Rectangle(int left, int top, int right, int bottom) |
| | | { |
| | | Left = left; |
| | | Top = top; |
| | | Right = right; |
| | | Bottom = bottom; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç©å½¢ç¸äº¤æ£æµï¼èèé´è·çº¦æï¼ |
| | | /// </summary> |
| | | public bool IntersectsWith(Rectangle other) |
| | | { |
| | | return !(Right < other.Left || |
| | | Left > other.Right || |
| | | Bottom < other.Top || |
| | | Top > other.Bottom); |
| | | } |
| | | } |
| | | } |