Beispiel #1
0
        private static double GetAngleForData(string islandToFillString, string layerSupportingIslandString, string debugName)
        {
            Polygons islandToFill = PolygonsHelper.CreateFromString(islandToFillString);

            SliceLayer prevLayer = new SliceLayer();

            prevLayer.Islands = new List <LayerIsland>();
            LayerIsland part = new LayerIsland();

            part.IslandOutline = PolygonsHelper.CreateFromString(layerSupportingIslandString);
            prevLayer.Islands.Add(part);
            prevLayer.Islands[0].BoundingBox.Calculate(prevLayer.Islands[0].IslandOutline);

            double bridgeAngle;
            bool   foundBridgeAngle = prevLayer.BridgeAngle(islandToFill, out bridgeAngle, debugName);

            return(bridgeAngle);
        }
Beispiel #2
0
        private static double GetAngleForData(string islandToFillString, string layerSupportingIslandString, string debugName)
        {
            Polygons islandToFill = CLPolygonsExtensions.CreateFromString(islandToFillString);

            var prevLayer = new SliceLayer
            {
                Islands = new List <LayerIsland>()
            };
            var part = new LayerIsland
            {
                IslandOutline = CLPolygonsExtensions.CreateFromString(layerSupportingIslandString)
            };

            prevLayer.Islands.Add(part);
            prevLayer.Islands[0].BoundingBox.Calculate(prevLayer.Islands[0].IslandOutline);

            prevLayer.BridgeAngle(islandToFill, 0, out double bridgeAngle, null, debugName);

            return(bridgeAngle);
        }
Beispiel #3
0
        private static double GetAngleForData(string islandToFillString, string layerSupportingIslandString, string debugName)
        {
            Polygons islandToFill = PolygonsHelper.CreateFromString(islandToFillString);

            SliceLayer prevLayer = new SliceLayer();
            prevLayer.Islands = new List<LayerIsland>();
            LayerIsland part = new LayerIsland();
            part.IslandOutline = PolygonsHelper.CreateFromString(layerSupportingIslandString);
            prevLayer.Islands.Add(part);
            prevLayer.Islands[0].BoundingBox.Calculate(prevLayer.Islands[0].IslandOutline);

            double bridgeAngle;
            bool foundBridgeAngle = prevLayer.BridgeAngle(islandToFill, out bridgeAngle, debugName);

            return bridgeAngle;
        }
Beispiel #4
0
		private static double GetAngleForData(string outlineString, string partOutlineString, string debugName)
		{
			Polygons outline = PolygonsHelper.CreateFromString(outlineString);

			SliceLayer prevLayer = new SliceLayer();
			prevLayer.Islands = new List<LayerIsland>();
			LayerIsland part = new LayerIsland();
			part.IslandOutline = PolygonsHelper.CreateFromString(partOutlineString);
			prevLayer.Islands.Add(part);
			prevLayer.Islands[0].BoundingBox.Calculate(prevLayer.Islands[0].IslandOutline);

			double bridgeAngle;
			prevLayer.BridgeAngle(outline, out bridgeAngle, debugName);
			return bridgeAngle;
		}