Exemplo n.º 1
0
        public static PlanBuilder Shape4dTest()
        {
            var metricShapeThickness = 300;
            var points          = ShapeDrawing.CircleToSquare();
            var projector       = new PlaneProjector(metricShapeThickness, Configuration.FullWireLength);
            var projectedPoints = projector.Project(points);
            var planner         = new StraightLinePlanner4D(Speed.FromDeltaT(3000));

            return(planner.CreateConstantPlan(new Trajectory4D(projectedPoints.As4Dstep())));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Builds plan configured by the workspace.
        /// ASSUMING the starting position be correctly set up on <see cref="EntryPoint"/>.
        /// </summary>
        internal void BuildPlan(PlanBuilder plan)
        {
            var speedPoints = new List <Speed4Dstep>();

            _entryPoint.Build(this, speedPoints, null);

            var planPoints    = speedPoints.Select(p => p.Point).ToList();
            var segmentSpeeds = speedPoints.Select(p => Tuple.Create(p.SpeedUV, p.SpeedXY)).ToArray();

            //scheduler needs referential point
            planPoints.Insert(0, _entryPoint.CutPoints.First());

            var scheduler      = new StraightLinePlanner4D(CuttingSpeed);
            var trajectoryPlan = scheduler.CreateConstantPlan(new Trajectory4D(planPoints), segmentSpeeds);

            plan.Add(trajectoryPlan.Build());
        }