Commit 18cd4748 authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

plot contours by arm assigned function (#71)

parent 0c7dac46
......@@ -17,9 +17,9 @@ if __name__ == "__main__":
# load plan address from args
parser = argparse.ArgumentParser(description='to watch, visulise and inspect loaded plans')
help='plan to read')
args = parser.parse_args()
# load plan
......@@ -28,3 +28,7 @@ if __name__ == "__main__":
print("plan loaded, it is {}s long".format(plan.len()))
print("use to watch the plan in 3D")
print("use plan.visualise(x) to plot plan")
if args.gcode is not None:
contours = gc.decode_gcode(args.gcode)
print("Contours loaded into variable contours")
......@@ -436,3 +436,21 @@ def get_tracker(model):
print("Dependency graph completed and saved to " + pkl)
return tracker
def plot_plan_contours(plan, contours, colors=['black','magenta'], style='2d'):
wrapper for plotting contours
sorted_contours = []
for r in plan.trajs:
for traj in plan.trajs[r]:
if traj.contour is not None:
if style=='2d':
gc.plot_contours2d(*sorted_contours, colors=colors)
elif style=='3d':
gc.plot_contours3d(*sorted_contours, colors=colors)
raise Exception("style must be '2d' or '3d'")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment