internal override void BuildPlan(PlanBuilder3D builder, MillingWorkspacePanel workspace) { var offsetLines = afterScaleTransformation(_currentOffsetLines); var currentDepth = 0.0; while (currentDepth < MillingDepth) { var depthIncrement = Math.Min(workspace.MaxLayerCut, MillingDepth - currentDepth); currentDepth += depthIncrement; foreach (var cluster in offsetLines) { builder.GotoTransitionLevel(); builder.AddRampedLine(cluster[0]); builder.GotoZ(currentDepth); foreach (var point in cluster) { builder.AddCuttingSpeedTransition(point); } } } builder.GotoTransitionLevel(); builder.AddRampedLine(EntryPoint); }
internal override void BuildPlan(PlanBuilder3D builder, MillingWorkspacePanel workspace) { var offsetLines = afterScaleTransformation(_currentOffsetLines); if (!offsetLines.Any() || !offsetLines.First().Any()) { return; } builder.AddRampedLine(offsetLines.First().First()); var currentDepth = 0.0; while (currentDepth <= MillingDepth) { builder.GotoZ(currentDepth); foreach (var cluster in offsetLines) { foreach (var point in cluster) { builder.AddCuttingSpeedTransition(point); } } var depthIncrement = Math.Min(workspace.MaxLayerCut, MillingDepth - currentDepth); if (depthIncrement <= 0) { break; } currentDepth += depthIncrement; } builder.GotoTransitionLevel(); builder.AddRampedLine(EntryPoint); }