public ToolpathSet() { Paths = new List <IToolpath>(); eType = ToolpathTypes.Custom; isPlanar = isLinear = false; }
public LinearToolpath3(ILinearToolpath <T> copy) { Path = new List <T>(); _pathtype = copy.Type; foreach (T v in copy) { Path.Add(v); } }
public virtual Vector3d AppendZChange(double ZDelta, double fSpeed, ToolpathTypes ttype = ToolpathTypes.PlaneChange) { LinearToolpath zup = new LinearToolpath(ttype); zup.AppendVertex(new PrintVertex(currentPos, NO_RATE, NO_DIM), TPVertexFlags.IsPathStart); Vector3d toPos = new Vector3d(currentPos); toPos.z += ZDelta; zup.AppendVertex(new PrintVertex(toPos, fSpeed, NO_DIM), TPVertexFlags.IsPathEnd); AppendPath(zup); return(currentPos); }
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; }
public void Append(IToolpath path) { if (Paths.Count == 0) { eType = path.Type; isPlanar = path.IsPlanar; isLinear = path.IsLinear; } else if (eType != path.Type) { eType = ToolpathTypes.Composite; isPlanar = isPlanar && path.IsPlanar; isLinear = isLinear && path.IsLinear; } Paths.Add(path); }
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); }
public void ChangeType(ToolpathTypes type) { Type = type; }
// todo: add speed // ?? extend PolyLine3d ?? public LinearToolpath3(ToolpathTypes type = ToolpathTypes.Travel) { Path = new List <T>(); _pathtype = type; }
public virtual Vector3d AppendMoveToZ(double ZAbs, double fSpeed, ToolpathTypes ttype = ToolpathTypes.PlaneChange) { double zDelta = ZAbs - currentPos.z; return(AppendZChange(zDelta, fSpeed, ttype)); }