Closed JoeLambourne closed 4 years ago
Ooops. Yes. I see. The default line width wasn't working. I have this fixed now.
I get the following output
Exception processing sketch E:\projects\lambouj\Fusion360GalleryDataset\tools\fusion360gym\data\SingleSketchExtrude_Invalid.json.
'2e239e22-79c4-11ea-b17a-acde48001122'
Completed sketch2image.py
The exception fires because the sketch contains a uuid which doesn't have any corresponding point. SketchPlotter
will throw in this case and the exception handling in sketch2image.py
or other code using the utility need to catch this and record log the error appropriately.
Excellent. Will merge this in.
This PR adds some basic python functionality to plot sketches using matplotlib.
For some documentation on the new code please see tools/sketch2image/README.md
The code provides options allowing the output to be configured. For example the options allow a title and axis to be added to the sketch
or for only the sketch to be drawn, something which may be preferable to image processing algorithms
The code is broken into two pieces.
sketch_plotter.py
contains theSketchPlotter
class which draws a given sketch.create_sketch_images.py
provides a harness which loops over the json files in a folder and creates images for each sketch.