예제 #1
0
        public void BeginTravel()
        {
            var newPath = new PolyLine3d();

            if (ActivePath != null && ActivePath.VertexCount > 0)
            {
                newPath.AppendVertex(ActivePath.End);
            }

            push_active_path();
            ActivePath     = newPath;
            ActivePathType = ToolpathTypes.Travel;
        }
예제 #2
0
        public void LinearMoveToAbsolute3d(LinearMoveData move)
        {
            if (ActivePath == null)
            {
                throw new Exception("GCodeToLayerPaths.LinearMoveToAbsolute3D: ActivePath is null!");
            }

            // if we are doing a Z-move, convert to 3D path
            bool bZMove = (ActivePath.VertexCount > 0 && ActivePath.End.z != move.position.z);

            if (bZMove)
            {
                ActivePathType = ToolpathTypes.PlaneChange;
            }

            ActivePath.AppendVertex(move.position);
        }