A SOLIDWORKS face mask with Surfacing

A request was posted in the Questions section asking that an STL file be converted to a proper CAD format. I completed the conversion, and received some requests for older versions of the file, or instructions on how to make it. SOLIDWORKS does not do backwards compatibility very well, so here are the steps I took to make this face mask.

A SOLIDWORKS 2020 model and Step file can be downloaded here: Coronavirus - COVID-19 - Mask Request

  1. Step 1: Original STL File

    The original face mask (STL file) is available here: https://grabcad.com/library/face-mask-with-replaceable-filter-element-1

    SOLIDWORKS will import STL files, but SOLIDWORKS is bad at working with mesh models, especially when the mesh is very dense. The mask STL file has a face count of 346,464. My first step was cutting the face piece in half since it is symmetrical. That’s better, but not low enough.

    The next step is decimation. The results can be seen below. The model on the right has only 6,500 faces.

    Now import the STL file into SOLIDWORKS. I prefer to import as a solid body, adjust the default import settings to your preference. You can also choose from a Surface, or a Graphics Body.

    If your computer can’t render all the model edges at once, turn off the option for displaying shaded edges. You’ll likely want to turn off the option for dynamic highlighting too.

    If you need additional details when working with STL files, I have a separate tutorial on that topic: https://grabcad.com/tutorials/convert-stl-or-obj-mesh-to-solidworks-model-nurbs

  2. Step 2: Import to SOLIDWORKS

    Here’s my first mistake when making this model. I exported the decimated part in inches. But I opened it in SOLIDWORKS as a mm part. My first feature is a Scale feature to increase the size 25.4 times. Otherwise I could have started over and imported with the correct units.


    My next features are the Move/Copy tool. I want the sliced end of the face mask to line up with the right reference plane. I also want the mask in a better orientation so “up” is up. Otherwise I’ll spend a lot of time rotating the model. Here’s an image of the part as it imported, and how I want it (on the right). You could skip this step by rotating the model while slicing and decimating the STL file, but SW handles X,Y,Z axes differently than many programs, so it takes some practice to get it right.

  3. Step 3: Reference Plane

    My first real feature is a reference plane. The Front plane is on the left side of the image, it aligns with the flat, “front” flat face of the model. My new reference plane is on the right of the image. It defines the “depth” of the mask.

  4. Step 4: First Sketch (nose and chin profiles)

    The first sketch is on the Right plane (aligned with the sectioned face of the mask). It is made of two Splines and some construction geometry.

    The important things are:

    • Only using two points to define the Splines, any more and you’ll get unwanted wiggles
    • Extending the splines beyond the model, we’ll cut the unwanted parts away later
    • Keep adjusting the Splines until their curvature is close to that of the imported STL file.

    Splines can be tricky to work with. I have another tutorial on splines if you need additional advice: https://grabcad.com/tutorials/some-tips-for-dealing-with-splines

  5. Step 5: Guide Sketch

    The next sketch is going to help our future surface feature to make this shape. It is drawn on the Top plane. The top plane is basically in the “middle” of the part, and is lined up the rectangular opening is centered on the Top plane and the Right plane. This is another two point spline. If you need more than two points to make a spline, use a Style Spline.

    You might note the spline does not match the curvature exactly, more on that later.

  6. Step 6: Face Sketch

    This next sketch defines the overall shape of the mask as it contacts the face. It is created on the reference plane made earlier that defined the “depth” of the mask. This is a STYLE Spline.

    A regular Spline becomes a mess with multiple control points. The Style Spline maintains a smooth profile (indicated by the curvature lines).

    Make the ends of the Spline tangent where they cross the sectioned face of the model. Otherwise you’ll have weird seams after mirroring the part. You might note the spline does not match the curvature exactly, more on that later.

    Splines can be tricky to work with. I have another tutorial on splines if you need additional advice: https://grabcad.com/tutorials/some-tips-for-dealing-with-splines

  7. Step 7: Nose Sketch

    The next sketch is drawn on the Front reference plane. The Front plane is coincident with the flat face of the mask.

    This is another Style spline. Make the ends of the Spline tangent where they cross the sectioned face of the model. Otherwise you’ll have weird seams after mirroring the part.

  8. Step 8: All the Layout Sketches

    Here are what all the sketches look like.

    • Face profile (pink)
    • Nose profile (blue)
    • Guide (green)
    • One sketch used to define the shape of the nose and chin (red)

    I’ve indicated with arrows six points where the sketches are attached to each other with Pierce constraints.

    Don’t make sloppy sketches, don’t leave gaps.

  9. Step 9: Boundary Surface

    Finally, we get to make something with a Boundary Surface. Loft would also most likely work here, but Boundary surfaces generally make better models. If you’ve never used a Boundary feature, start smaller, read the help file, and practice a bit. There’s a lot going on:

    • Direction 1 curves are the face (pink) and nose (blue) profiles from the last step.
    • Direction 2 curves are the guide (green), and the two splines making up the (red) nose/chin sketch.

    To select individual line segments instead of an entire sketch, right click and use the Selection Manager.

    It is important to make the “nose” and “chin” guides in direction 2 tangent as they cross the mid-plane of the part. Otherwise there will be weird seams after mirroring.

  10. Step 10: Evaluate

    Now evaluate the surface. Does it closely follow the shape of the imported STL? If it doesn’t, go back in and fine tune the splines. This is why some of my splines above do not exactly match the profile of the part. Trial and error.

  11. Step 11: Trim - Sketch

    The surface extends beyond the limit of the STL file. To cut the excess away a new sketch is created.

    I wanted to use the Style Spline here, but it was taking too long to create. Instead I used three separate splines. It is important to use two points to control each spline. It is also important to make sure each Spline is tangent to its neighbor. Once the Sketch is complete, use the surfacing tool Trim to remove the unwanted portion.

  12. Step 12: Trim - Plane

    Next is another Trim to remove the front of the mask to make space for the Flat face. I could have likely done this in the above step, but instead used a separate Trim feature, this time using the Front plane as the trim tool.

  13. Step 13: Curve Through Points

    Let’s close off some of this model by filling in some missing faces. My next feature is a Curve Through Reference Points. A sketch would work as well.

  14. Step 14: Planar Surface & Knit

    A Planar surface is added to fill the void between the Curve and the mask. After the Planar surface is made, the Knit tool is used to join the two surfaces together.

  15. Step 15: Trim - Sketch

    Next is the opening in the flat face. It can be added now, or later as a traditional Cut Extrude after the part is a solid. It does not matter. I added it now with the Trim Surface command and a simple sketch.

  16. Step 16: Reference Plane for Protrusions

    Now a reference plane is made based on the location/angle of the bosses that the straps will attach to. I selected three vertices to make the sketch. Picking a facet to sketch on might work, but you are at the mercy of whatever random angle the facet might sit at.

  17. Step 17: Boss Extrude

    A simple trapezoid is sketched and extruded (orange). Don’t worry about extruding up to a surface, just extrude it, we'll clean it up later.

  18. Step 18: Chamfer(s)

    Two Chamfers are added to match the sloped faces in the STL file. Trial and error gets them close.

  19. Step 19: Strap Holes

    Next is cutting a hole for the headband. This was tricky because it is at a bit of an odd angle compared the model face/plane the sketch is placed on.

    The screenshot shows the cutting sketch (oval) in blue.

    A separate sketch (orange) is created on the chamfered face. This orange sketch defines the vector the Cut Extrude follows. A Sweep would also work, but an extrusion is the better/simpler option.

    The previous three steps are repeated to create the 2nd protrusion for the headband.

  20. Step 20: Surface Fillet

    A Fillet (blue) is added to the “Front” of the mask.

    I’d normally apply fillets last, but in this case I’ll be thickening the surface, and don’t want to risk the outside fillet not corresponding with the inside fillet.

    This could be resolved later with an equation based on the thickness of the model, but that’s too much work for a “quick” model.

  21. Step 21: Cut with Surface

    Cut with Surface is the next command. It trims away the two solid bodies that are much too large.

  22. Step 22: Thicken & Merge

    Thicken gives the surface thickness and converts it to a solid body. I also enabled the Merge option so the orange and yellow protrusions are merged making a single solid body.

    I half expected this not to merge due to the complexity of the intersection between the bodies. If it did not work I'd have extended the "length" of the protrusions lightly (maybe with the Move Face tool). Then used the Combine tool to Add the bodies together.

  23. Step 23: Fillets

    Fillets are one of the last features added to a model. Start with the larger ones, move on to the smaller ones.

  24. Step 24: Mirror & Evaluate

    Use the Mirror command to complete the mask. Mirror the entire body, don't try to mirror features, or faces.

    Now evaluate the model.

    • Any weird faces or holes?
    • Do the Zebra Stripes transition over all the curves smoothly without breaking?

    This is why we carefully added tangency constraints to the Splines, and Boundary feature.

  25. Step 25: Evaluate & Delete Body (STL)

    Unhide the STL body one last time and review the model to make sure the new model is “close enough” to the desired shape.

    How close is “close enough”? It depends on the project. A flexible face mask can likely be within .03” (1mm) and be fine. Other parts may need to be within .002” (.05mm).

    It is also a good practice to delete the STL body with the Delete Body command. Leaving it there can cause some problems later if someone exports the model. I’ve seen hidden bodies sometimes go along with the export, so delete it to be safe.