Posts Tagged ‘ boat

Exporting usable CAD data from Maya

It’s that time of year again:  Time to help my father build a new aluminum boat.  It was an enjoyable process last year:  Based on a napkin sketch with some dimensions and angles he gave me, I modeled a boat out of NURBS in Maya, and through a lot of hoop-jumping, got him some useable data:

The biggest hurdle was getting him ‘the usable data’. The process of making the boat in Maya is discussed above.  But these were the export steps:

  • Export the mesh from Maya as obj.
  • Use online converter to go from obj -> pdf.
  • Then, my father gave the pdf to a buddy who traced it in CAD, gave it dimensions, then provided that to the plasma-cutter (as a DWG).
  • Ugh.

That process was super clunky.  I’ve been using Maya since… 1998(?) and never once needed to export anything CAD related, so this was all new territory.  To make this work I need a way to generate the CAD data myself, add dimensions to it, and export out as a DWG.  There must be a better way!

Turns out there is (and probably even a super-moar-better way than what I’m about to describe, if you know CAD better than I do, which wouldn’t be much of a stretch).  In the back of my head I remembered that Maya has a DXF exporter.  I don’t think I’ve ever once used it…

Part 1: Get CAD Software & Configure

Since this process is (currently) a once-a-year thing, I didn’t want to drop a bunch of cash (any really) to get some newfangled CAD software.  I’d read a lot about FreeCAD on the interwebs, it was available for Mac, so I installed it.

Fumbling around however, I realized it neither could import DXF, or export DWG, by default.

To get the DXF importer\exporter working, I followed the instructions here.

I never could actually get the DWG export working from the software, even following the instructions here.  However, that links to a standalone “Teigha File Converter” that will batch convert a directory of DXF files to DWG.  Good enough.

Also, this data needed to be in inches, so I changed the FreeCAD prefs as such.

Part 2: Export usable CAD data from Maya

I started by exporting the unrolled mesh as DXF from Maya:  There are zero options available.  But FreeCAD happily imported it.  Immediately, problems:  Missing triangles (you must exported triangulated mesh, can’t have quads\n-gons).  As a check, I exported this same data out as DXF, and reimported it:  Empty.  I don’t think FreeCAD likes to deal with polygonal mesh.

Next, I tried exporting the unrolled NURBS surfaces as DXF:  Those came in as empty groups in FreeCAD…

Finally, I converted the trimmed NURBS to their perimeter curves, and exported the curves:  Success!  This is what is important to know:

Export NURBS Curves from Maya as usable CAD data.

Polygonal Mesh = highly questionable.  NURBS Surfaces = no go.  Note I also tested locators & ‘distanceDimShape’ nodes:  They don’t export at all.

Once I had the boat’s unrolled\flattened curves in FreeCAD, I started adding draft dimensions.  Where I encountered my next problems:

  1. The scale was off by a factor of 10:  Even though Maya was set to inches, and FreeCAD was set to inches, everything was 10x as small in FreeCAD.  I noticed this is the same issue when I 3d print in cm:  Even though I have Maya in cm, and my slicer (Simplify3D) is in cm, they come in 10x smaller.  The fix?  Scale everything up in Maya 10x before export.
  2. From the top view in FreeCAD, all the curves looked just like Maya.  But when I went into a perspective view, the curves were actually going shooting up & down in space quite a bit:  Not on a flat plane.  But they are in a flat plane in Maya.  What’s going on?  Long story short:  In Maya after you do the 10x scale up, be sure to ‘freeze transformations’ on all the curves.  In addition to the scale, I had many other translate and rotate values on the curves to get them flat on the ground plate.  It appears that FreeCAD hates this.  But once everything was frozen, the curves showed up a-ok, from all angles.

Note:  Maya uses the Autodesk ‘DirectConnect’ file translators to export (and import) DXF data.  See the docs on the 2016 version in this pdf.

Part 3 : Add Draft Dimensions

Since I was told that this needed to be provided to the plasma cutter in inches, in FreeCAD’s ‘General -> Units’ prefs, I’d set them to “US customary (in/lb)”.  Next, via FreeCAD’s ‘Draft’ toolbox, I used the ‘Dimension’ tool to provide width & height values for all the curves.  This is where I ran into the next (and as of this authoring, unresolved) issue:  FreeCAD seems to auto-change the what unit is displayed in the dimension based on the length of the part being measured.  For example, I want all the dimensions to be in inches.  But they’d report inches, feet, and yards, depending on the length of the part.  After posting this issue to the forums, I learned that if you switch the units to “Imperial decimal (in\lb)” the dimensions will always be in inch.  Problem solved.  Thanks forum peoples!

Part 4 : Export

From FreeCAD, I export all the curves and dimensions as DXF, then using the Teigha File Converter, convert that to DWG.

And…. done?  Still need confirm from the plasma cutter the DWG is valid (I have no way of testing myself), but overall, a far less clunky data-export-pipeline than last time :)

Making (real) aluminum boats in Maya : The Results

Back in Feb I blogged about how I collaborated with my father (in Alaska) to help him design a new aluminum boat.  Using Autodesk Maya, and a napkin sketch he made, we worked together (remotely) to susout the dimensions.  By giving him files he provided to the local plasma cutter, by Feb (nice and cold up there) he’d got the bulk of it welded together.

A week ago I was able to spent a week up there, an amazing experience as always (pics here).  And one of the highlights was being able to finally (drive &) ride in the boat.  Was a great experience, and super interesting for myself to recognize the physical representation of the Maya model floating in the water.  It’s a thing of beauty:

boat_fixed

I only wonder how long until he builds another…? :)

Making (real) aluminum boats in Maya

render_persp

Maya render of the boat

pops_bro_boat

Current state of the boat, with my father and brother.

My father has been building boats since before I was born and running them on the rivers of Alaska:  Fiberglass canoe?  Check.  Flat-bottom wooden riverboats with dual outboards?  Check.  Should I mention the hovercraft? 😉  Over the past decade he’s branched out into welded aluminum flat-bottom riverboats with great success:  Make one, use it for a few years, sell it and make an upgraded version.  (On a side note, I can’t wait to retire… <wink>)

Late last year he came to me wondering if I could help with the design:  Could I create the 2d design files he would provide to a local plasma-cutter to cut the main boat forms?  Sounded like a good challenge, and a great opportunity to collaborate with my father (He’s in AK, I’m in CA).  Up until then he’d get the huge sheets of aluminum and cut them by hand.  Having a plasma-shooting robot do that sounded like a more exciting (+ accurate/faster) solution.

My father provided me the drawn plans with angles and dimensions:  I started the process of turning those into real 3d forms.

Initially I attempted to do the whole project in Autodesk Fusion 360:  I’d been teaching it to myself, but I was still very much a noob in the software.  Unfortunately I just couldn’t get it to do what I wanted:  Most importantly I couldn’t ‘unroll’ the 3d forms to 2d forms, which is needed for plasma cutting.  I worked directly with their support on this, but the software just wasn’t quite there yet.

So I decided to do it all in Autodesk Maya (which I’ve been using since it was released in ’99).  While Maya is great for games\film\vfx, I’d never much considered it for accurate CAD-style modeling.  However, it ended up working great. Here are the main takeaways on how I built the boat:

The initial boat model:

  • I started by modeling the real-world size sheets of aluminum out of NURBS planes.
  • I snapped and rotated the pieces together to get the overall shape of the boat based on the provided angles.
  • I applied bend deformers on a single axis to shape the NURBS into the correct swept forms.
  • Based on all the intersecting NURBS, I created curve-on-surface intersections:
intersectingNurbs

Right side bent NURBS intersection, with curves-on-surface, before trim.

  • Based on those intersections, I trimmed away the excess aluminum (NURBS).
  • Boat model complete! (see above render)

The unwrapped form:

  • I needed to ‘unwrap’ all the bent surfaces back to flat planes for export.
  • To do this, I would duplicate each of the bent/trimmed NURBS, convert them to polygonal mesh, and wrap deform the polys back to the original bent NURBS.
  • On the original, I’d access the bend deformer, and zero it:  This would flatten out the wrapped polys.  I’d delete history on the polys, leaving it flat, then bend the original piece back.  I’d then scale it perfectly flat, since the wrap wasn’t 100% accurate.
  • I’d repeat that process on each bent piece, ultimately giving me unwrapped flat pieces for all parts of the boat:
unrolled

Unrolled polys

Exported 2d data:

  • I exported each polygonal mesh as obj.  I then used online software to convert the obj to pdf’s, which the plasma cutter could use.

After my father got the 2d data he printed a scale model on paper, affixed it to poster-board, and made a small-scale mockup as a sanity check:

paper_boat

 

From there, it was off to the plasma cutter…

And the most amazing part?  It all worked:  After my father got the pieces back from the plasma cutter and starting tacking them, they all fit perfectly.  Sighs of relief on all sides.

While it’s been fun to 3d print small items, it was super rewarding to see a much larger-scale 3d model become reality, and do some ‘real’ work with my father.  I can’t wait to ride in it!


Update:  See the final results here!