Neil's assignment for this week: I'm already pretty experienced with Autodesk Fusion 360, so this week I'm challenging myself to learn one or two other 3-d CAD packages. It looks like the most practical are OpenCAD and OnShape. Major tasks for this week: Spoiler alert: time didn't permit. I got too deep into OnShape to do much with OpenCAD.

Learning OnShape

OnShape has a good step-by-step tutorial, with videos and step-by-step instructions, and assessment tests to make sure you got key concepts. It even gives certifications you can post to LinkedIn and so on. My only real complaint is that the info is presented in video form, rather than as a text document with still images. I hate listening to people talk, I'd rather read, and a transcript of a video is no substitute. I completed the following self-paced learning modules on OnShape's site:

I also started but didn't finish the following:

I have big plans for the sheet metal tool for next week's 2-d cutting class.

Challenge Models

I picked out a few interesting shapes from the Web to test my skills.
Flange
#1147: Flange
Knot
#1087: Knot
Here are my results, one as a 2-d engineering drawing, one as a 3-d printed object:
Flange drawing
#1147: Flange 2-d drawing
3D design file: studycadcam1147.step
SVG drawing file: studycadcam1147.svg
Flange drawing
#1087: Knot 3-d printed (with new Prusa organic supports!)
3D design file: studycadcam1087.step

Comparisons with Autodesk Fusion 360

I'm pretty experienced with Fusion 360, so here are some observations and reactions as I work with OnShape:

Final Project CAD Design in OnShape

The first step was looking up sizes for key parts that need to go into the thing. Of course I don't know what I'll end up using so this is all placeholders: for now I'm going with a 5-inch TFT display found on Adafruit, the Infineon TLV493D magnetic field sensor, and the Seeed Studio Xiao SAMD21 which I overheard someone mentioning on the Zoom call before class.

Actual design proceeded as follows:

Onshape parameters for final project
Define parameters for final project. These are only placeholders, but I'll be able to re-dimension the design parametrically once I know what's actually going into it.
Overall top view sketch
Create an overall sketch showing a plan view of the device, and the cavity where the electronics will go, and a screw hole. Use parameters everywhere. (This sketch is probably too complicated.)
Extrude and fillet the main frame
Extrude the overall frame and screen hole. Use a fillet to get rounded edges.
Cut out inner bezel
More extrudes to create an inner lip to hold the screen and circuit board in.
Mirror screw holes
Mirror screw holes.
Extrude screen as a separate part
Extrude the screen as a separate part. Eventually I'll need to add some clearance to the case but I'll worry about that later.
Electronics board
Extrude the electronics board. I'm just using blocks to represent components, this is sure to change.
Assembly window
Use the Assembly window to connect the three pieces together, using a Section view to ensure that nothing bumps into anything else.
End result
The end result!

2D Design: User Interface Mockup using Inkscape

I used Inkscape to think about how the user interface will look. I imagine three modes of operation: There will also be a button to control the complexity of the display. When the complexity is high, the optimization software will assume there are more magnetic sources, and the display will show more field line arrows. When it's low, you'll get a simple drawing of the one or two strongest magnetic sources. This will prevent random noise from being interpreted as extra "ghost magnets" that don't exist.

I drew mockups for the first two modes, but the "camera mode" would involve a bunch of 3-d perspective drawing in 2-d that I didn't have time for, and which would be easier to do in native 3d software, so I skipped it for now.

The biggest challenges in this drawing procedure was drawing natural-looking spline curves for the field lines, and making them symmetrical. To achieve symmetry I drew one quarter of one field line, and then duplicated it at different scales and mirrored it horizontally and vertically. It makes me wish I could use sketch constraints in 2-d drawing packages!

Inkscape UI mockup
Drawing a mockup of the intended user interface with Inkscape. Inkscape isn't as good as Illustrator at aligning objects, so I had to draw extra lines to get the field markers on a nice-looking grid.
Inkscape field line symmetry
Using mirroring to get the field lines symmetrical
Inkscape UI mockup files are uploaded to the repo. I currently have mockups for the "Z-axis field view" and the "2-d field line" view, but not the "3-D camera mode" view.

Top 5 things I hate about Inkscape:

  1. Bad "smart alignment" guides
  2. Tough to tell exactly what you've selected (points, paths, or groups)
  3. Is there a way to put common colors and styles onto a palette? I can't find it.
  4. Too much info conveyed through small cryptic icons
  5. I'm sure I'll think of more as I go on.
Fusion render window
Rendering the final scene in Fusion 360.

Rendering using Fusion 360

OnShape doesn't seem to have good free rendering tools, so I used Fusion 360 to create the final render. My process:
  1. export a STEP file from my OnShape design
  2. export PNG files of UI from Inkscape
  3. import STEP file and Inkscape PNG files into Fusion 360
  4. Create a permanent magnet, tabletop, and USB cable in Fusion to make the scene more lifelike.
  5. Apply "appearances" to all objects.
  6. Apply Inkscape UI image as a "decal" onto the camera's screen.
  7. Use Fusion's "local rendering" to create a final rendered image of the scene.
Here's the results!
Fusion render of final project (field line mode)
The final render (Field Line Mode)
I also did a render showing "vector arrow mode", using the field created by current flowing through a wire. I used Fusion's 3-d sketching with control point splines to create the wire path, and a sweep to create the wire itself. Keeping the wire from intersecting itself was a pain. I borrowed a pre-made design for an AA battery from the Fusion 360 Gallery to save some time.
Fusion render of final project (field vector mode)
The final render (vector arrow mode)
Final Design File: magnetic-field-camera.step