Manufacturing guy-at-large.

Filtering by Tag: MeshMixer

Remeshing wishlist

Added on by Spencer Wright.

So: I need to reduce overhangs on my lattice stem design. As you can see here in MeshMixer, there are a lot of them (highlighted in red/blue):

(Incidentally: If you know of a really easy way to measure the surface area of unsupported faces in an STL/OBJ, let me know! Right now I'm doing some crazy stuff in Blender (thanks, Alex) but I'd love a one-step process if there is one.)

Now as you'll recall, I'm generating these beams (and varying their thicknesses) in nTopology Element, but the method I'm using starts by looking at all the edges in an STL/OBJ that I create in MeshMixer. When I go to generate the lattice (in Element), a beam is created on every triangle edge of the mesh (which I created in MeshMixer). So if I want to control the orientation of the beams in the lattice, I really need to start with that input STL/OBJ.

But here's the thing: remeshing algorithms tend to prefer isotropic (equilateral) triangles, which result in a *lot* of beams that are oriented parallel to any given plane (e.g. the build plane). They also prefer nodes that have a valence close to 6 (valence refers to the number of other nodes that a given node is connected to).

This is mostly because most remeshers assume that you want to preserve features - a reasonable assumption, in general. But for the vast majority of my design (basically everywhere except the clamp faces and bolt hole features), I care *way* more about eliminating overhanging faces than I do about feature preservation.

Over the next week, I'll be playing with the underlying mesh a bunch more and trying to find a way to reliably reduce overhangs in my end design. Specifically, I'm looking at remeshing methods that result in:

  • Anisotropic triangles, specifically ones whose orientation I can set as a global variable. I want my triangles to be longer than they are wide/deep.
  • Nodes with valences <6. This will essentially reduce my beam count (I think).
  • A mesh which is adaptive (as opposed to regular), so that I can preserve my mechanical features (high density mesh) and still reduce beam count elsewhere (low density mesh).

I'm also interested in using some curved beams (especially in the clamp areas), but that's prioritized below the things above.

More soon!

Lattice design workflow, part 3: Integrating full mechanical features

Added on by Spencer Wright.

Note: As before, thanks to Bradley Rothenberg (of nTopology) and Ryan Schmidt (of MeshMixer/Autodesk) for their continued help on this workflow.

As documented previously (1, 23, 4), I've been working on a multi-step workflow to create printable lattice structures for mechanical parts. In earlier posts, I described some of the techniques I used to generate the lattice itself, and at this point I'm ready to refine the mechanical features and evaluate the end result.

I've made a few changes to my remeshed surfaces since my last post, so I start this process today in MeshMixer. Here I've got three parts: The stem body itself, a surface that's designed to reinforce the threaded portions of the faceplate bolt holes (this is mostly hidden inside the stem body, but you can see its border still), and the faceplate itself. 

From this, I export three separate OBJ files and import the into nTopology Element. There, I generate simple surface lattices: each edge in the OBJ is turned into a beam in the new lattices.

Next, I create a set of attractors that I'll use to control the thickness of my lattice. The locations of these attractors were taken directly from Inventor; I know the XYZ locations of the general areas that I want to thicken, and so put the attractors right where I want them. Then I control each attractor's size and falloff curve to thicken just the areas I want. In the shots below I have every attractor on a cosine falloff; the bolt attractors are 12mm in size, and the clamp cylinder attractors are just a few mm bigger than the diameter of the cylinder.

Once I've got the attractors set up, I go through each part and thicken the lattice. The grey appearance is just where nTopology is showing me a wireframe, and the density of the mesh is really high:

You can see here that each part has some degree of variation in its beam sizes. In the bolt areas the mesh is dense and the beams are thick; in the middle of the stem body the mesh is sparse and the beams are thin.

At this point, I export each of the three lattices and bring them back into MeshMixer. Here you can see them overlaid on the original meshes:

Now, I import meshes that correspond with the mechanical features I want to preserve in the part. I've taken these directly from Inventor: I created an assembly file containing the original IPT and then created a new IPT that refers directly to the mechanical features. I export that as an STL, bring it into MeshMixer, and then select it and flip all of its normals so that it's inside out. Here you can see those boolean parts - first as red bodies in Inventor, then as meshes in MeshMixer, then as inside-out meshes:

Now I select the three lattice objects, combine them into one, and run the inspector tool and fix all of the mesh problems. Then I run "Make Solid" on the whole object. I run this in "Accurate" mode and turn the "Solid Accuracy" and "Mesh Density" settings *way* up in order to keep the whole thing smooth:

Now I've got a single lattice object that's fully solid and ready to have its mechanical features taken back out. Pretty rad. I combine the lattice and the mechanical features into one object and run "Make Solid" again, again at high density and accuracy:

I select the result, run the Inspector tool, and fix any errors. Then I look around the lattice and evaluate it. Inevitably there are a bunch of areas that are cut off, thin, or chunky - places where the lattice was thin once the mechanical features were removed, and the meshing operation rounded over the resulting isthmus. Unfortunately, that's not something that I can go back and fix; I need to move individual nodes back in my original lattice in MeshMixer. But at least I know that now, and going back through the workflow actually isn't as painful as it sounds. And anyway, the part that I have now is actually pretty good:

I should note here that I got a *lot* of help on the Boolean operations from Ryan Schmidt. Ryan also recorded a full video showing how to reintroduce the mechanical features even if you didn't have the ability to create them in Inventor. Although I went a slightly different route, there's a lot here that's super useful - and it shows the really powerful features that are built into MeshMixer:

Now that I've gone through the full process from start to finish, I see a few aspects of my design that still need some work. I also know that I still need to reduce the number of overhanging features in my design (which will probably be built on its end, with the handlebar side up). I'm also excited to test out the lattice utilities that are built into the most recent build of nTopology Element - especially in the area where the handlebar bolt reinforcements interface with the rest of the stem body. Bradley describes the process here:

I also, for what it's worth, need to do some actual FEA on my part. But by focusing on a repeatable workflow for even designing parts like this - and keeping a mind towards some basic manufacturability constraints - I've got something here that shows some promise. More soon :)

More workflow details

Added on by Spencer Wright.

The other day I got a nice email from Xavier Alexandre, which included a few good questions about my update from last week. His questions are here, along with my answers:

XA: It isn't entirely clear for me what guides your remeshing from a mechanical/strength optimization point of view. I get that you are trying to optimize for stiffness so you're trying to maximize the stem virtual hull volume. But this global shape is set at the beginning of your workflow in Inventor. Then you're trying to have an higher lattice density around the mechanical features but how did you set on edges length or thickness. Is it based on gut feeling? If so, do you feel that there will still be a lot of room for weight/mechanical properties optimization?

Yeah - you could definitely call my process "emergent." I know that my minimum practical beam size is going to be something greater than .6mm (the exact number is unclear and will require testing). I know that I want to minimize overhanging features, and that it'll probably be appealing (from a cost perspective) to build the main stem body on its end, so that I can pack more of them into a build plate. I also know that the clamp areas will need some significant surface area in order to not, for instance, damage a carbon fiber part that they might be clamped to. I also know that the threaded bolt holes (which will be M4, but which Inventor exports as 3.2mm diameter smooth holes) will need a minimum wall thickness of about 1mm, and will really want more than that. And I know that the heads of the bolts will similarly need a bearing surface of about 1mm, and that both the bearing surface and the threaded hole will need to be reinforced back to the rest of the structure in order to distribute the clamping load on the part.

In short: Yeah, it's mostly gut at the moment. But to be honest the biggest constraint right now is manufacturability; I need the lattice to be oriented so that it won't require support structures *everywhere*, and am focusing mostly on that at the moment. Once I've got that (and basic mass distribution in areas that I *know* will need it, e.g. bolt holes) mostly solved, then I'll move on to FEA. nTopology Element has an FEA solver built in, and you can feed the results back into the design so that overstressed areas get reinforced. I'm definitely excited to get there, but for now I'm focusing on making something that a job shop will be willing to make in the first place :)

XA: I didn't get the part with the interior Oct-Tet volume lattice at all. Is it gonna be merged with the exterior lattice? A lot of these beams will be surprisingly useful once the whole part is put together Huh?

Exactly - the volume lattice (which is an oct-tet topology - see this paper for a better description than I could ever give you) will be booleaned with the surface lattices to create one structure. If you look at that volume lattice on its own,  you'll notice that there are some stray beams that don't appear to be doing anything - they stick out into the middle of nowhere, and don't appear to be taking any load. But when you merge the volume with the surfaces, the situation changes, and those beams might be more useful than you would have thought.

As it happens, I've been focusing more and more on surface lattices in the past few days, as they're a bit easier to control explicitly - and the changes that I make are easier to immediately grasp the effects of. The "generate multiple individual lattices and then merge them at the end" workflow really isn't optimal for this reason: it takes way too long to understand what the finished structure will work like.

XA: You won't have skins in your design. I guess that for the stem to fit handlebars and steerer tubes you'll need the contacting beams to match the tubes curvature. Did you plan to design the beam shape for this or is it something you'll let for post processing. If so, do you plan to make those beams sturdier to account for grinding?

I'd *love* to bend the beams around the clamp area, actually. Right now I don't have a convenient way of doing that, but I'm looking into it. Either way I'll boolean out the clamp regions before printing, so I shouldn't need to grind away much. 

As you might expect, my thoughts on this workflow are changing as I use it more. It's a rather finicky process, and I'm eager to industrialize it a bit - and improve the areas that are most difficult to reproduce.

More soon!

The beginning of a workflow

Added on by Spencer Wright.

Note: Special thanks to Bradley Rothenberg (of nTopology) and Ryan Schmidt (of MeshMixer/Autodesk) for their continued help on this workflow. Also, both of them make awesome (and very weird ;) software that you should check out.

A scenario: You've got a part that you want to manufacture with metal powder bed fusion. You've got a few mechanical features that you know you need (to mate up with other parts in an assembly) and a general sense of the design space that's available for the part you're designing. You know the mechanical properties you need (via an ISO test that the part needs to pass) and you've got a target mass (which is basically "less than the competition"), and a target cost (which is basically "similar to the competition, taking into account a ~35% margin for me").

I've spent a lot of the past week going back and forth between Inventor, MeshMixer, and nTopology Element, trying to make a 3D lattice structures that are both mechanically effective and easy to manufacture. My workflow has been decidedly emergent, and it's also been counterintuitive at times; I've often found myself working backwards (away from my final design intent) in order to create the conditions where I can make progress down the line. My end goal is to design a bike stem that's sub 125g and which has minimal post-processing costs and requires minimal support structures (I'll deal with the actual dollar cost later, as it'll depend on a bunch of factors that aren't under my direct control).

I've got 27.7 cubic centimeters of titanium to play with. Where do I put it?

I began in Inventor. Setting up a design space is, counterintuitively, kind of a hard thing to do. Very few parts that I've designed have hard and fast design space boundaries; most of them could always be a little bigger, or a little smaller, and the rest of the assembly would stretch or squish to accommodate it. Nevertheless, I need to start somewhere, so I created a T-spline form that was close to what I thought I'd want:

I export it as an STL at low resolution (where we're going, resolution doesn't matter :) and bring it into MeshMixer:

From here, things start to get complicated. The way I see it, this part essentially has three components: 

  1. The mechanical features. This includes the two clamp cylinders (one, the handlebar clamp, is 31.8mm in diameter and split; the other, the steer tube, is 28.6mm and slit along the back side) and the four bolt holes (all M5, and all with one counterbored part and one threaded part) that do the clamping.
  2. The design space's exterior surface. In general, the stiffness of the part will be determined by how much volume it takes up, and I should generally make the part as stiff as possible. Therefore the exterior surface of the part is going to be made up of a big non-Euclidian 2D lattice.
  3. The volume of space between the mechanical features and the exterior surface. I'll want some bracing here to tie the whole part together and transfer loads from the mechanical parts over to the exterior lattice.

For this design, I'm using lattice structures throughout the part. I won't design any skins (I'm generally anti-skin, unless you've got fluid separation requirements in your design), instead opting to let the lattices vary in density from zero (in the middle of the part) to 100% (in areas like the threaded and counterbored bolt holes). 

Because the different surface regions of the part (the mechanical features and the exterior surface) will have different mechanical requirements, I begin by duplicating my lattice in MeshMixer and isolating each of them in its own object:

I then go through each region and remesh it in MeshMixer. A few notes here:

  • I generally begin by remeshing the entire object at a medium-high resolution, just to get rid of the dense lattices that Inventor creates at edges and small fillets. 
  • I then choose the area that I want to be at the highest resolution (which is almost always lower than the one I chose in the first step) and remesh it. On the part's exterior, that was the bolt counterbores.
  • Then I work my way down to the lowest resolution areas. On the part's exterior, I targeted edges in the 15mm range, but I play around with the remesh settings a *lot* until I get something I like.
  • Then I'll go back and find areas that are still a bit high-res and remesh them again until they look good. There's a bit of back and forth here, and I haven't really figured out a one-size-fits-all workflow yet.

I DON'T worry about geometric accuracy much during this process; I assume that I'll need to clean up the geometry at the end (after I've generated the full lattice structure - more on this in a future post) anyway.

Then I export the lattices as OBJs, bring them into nTopology Element, and see what they look like:

At this point, I decided that I really wanted to stretch the entire exterior lattice out so that more of the beams would be horizontal. The part will probably be built on its end, so these will be easier to build as a result. So I go back into MeshMixer, transform the part down (it happens to be the Z axis here) by 50%, and remesh the outer skin. Then I transform it back up to 100%, stretching everything out.

As you can see in the last few shots, the lattice has been stretched significantly. I've also remeshed a few of the higher resolution areas individually, evening them out a bit. Back in nTopology Element, you can see the difference between the old lattice (the last shot below) and the new one:

Meanwhile, I've used nTopology element to create (and warp) an Oct-Tet volume lattice for the interior of the part. This may look odd (and to be sure it needs some work) but a lot of these beams will be surprisingly useful once the whole part is put together. The red stuff here is a zero-thickness representation of the mechanical features' lattice structures; the white/yellow structure is the volume lattice:

When you put the whole thing together, it starts looking pretty good:

Now, there's still a lot wrong with this. There are a *lot* of overhanging faces. The threaded bolt holes aren't very well connected to the outer mesh, and there's probably too much material on all of the flat faces (where the slits/slots are). I'm also over my mass target - my total is 34.1 cubic centimeters, and my target was 27.7.

But there's a lot right with the design, too. My beams are about the right size throughout, and I've been able to (more or less) distribute my mass where it will matter most. And while the aesthetics of the part aren't exactly what I'd like them to be, they're not far off either. 

So, a few things I need to work on:

  • First, I need to make overhanging faces easier to eliminate. Some part of this *needs* to be happen when I remesh a surface (assuming I'm using the surface topology to determine the lattice topology). Ditto with volumes - I need to be able to stretch the lattice out so that it isn't horizontals all over the place.
  • I also need to be more careful about directing my volume lattice where it'll be more effective. It's possible I should break it up into a few regions - some near the mechanical features, and one in the middle of the part - but I'm concerned that if I do that, I'll never get the two to tie together. Either way I need a denser volume lattice at the bolt holes, and I need to be able to tie the volume lattice beams up to the other regions of the part.
  • I should probably play with modifying my mechanical features back in Inventor to make them more conducive to lattices. This might involve warping the clamp cylinders somewhat to reduce overhanging faces... or drilling the threaded holes through the part so that they connect to the exterior surfaces... or puncturing the flat faces so that they aren't as massive as they are in the current design.

Clearly, there's a lot to do here still. But I'm beginning to get the hang of this workflow, and hoping to have some printable (and extremely lightweight) designs to make soon :)


Added on by Spencer Wright.

I get the feeling I'll be doing a *lot* of this in the coming month:

Here I've taken an STL from Inventor and brought it into MeshMixer, where I'm remeshing the outside skin. I'm doing this so that I can then create a surface (as opposed to a volume) lattice in nTopology Element. If I tried to create the mesh directly from Inventor's STL, it would be much to fine and have a bunch of artifacts from the way that Inventor processes T-Spline surfaces (Inventor breaks the surface up into panels, and then subdivides each one individually - you can see the panel boundaries in the beginning of the gif), and would also be *way* too fine to be used as a scaffold for a surface lattice. By remeshing at a lower resolution - and playing with MeshMixer's remeshing settings a bit - I can get to a topology that's way better.

The design that I'm pointing towards here still isn't manufacturable - and is missing a bunch of mechanical features that the end part will need too - but it's starting to come together a lot better:

Special thanks to Ryan Schmidt (of Autodesk/Meshmixer) and Bradley Rothenberg (of nTopology) for pointing me in this direction - and for helping me out with the even cooler stuff I hope to do in the next week :)