Reverse Engineering an STL File


What you'll learn

Learn how to design a custom electronics housing around imported STL components in Shapr3D. Starting from real circuit board and display models, you'll position components in 3D space and build a two-part enclosure around them — complete with port openings, a display cutout, mating lids, and mounting pins.

Tools and concepts you'll learn:

  • STL Import and Positioning: Import mesh files, center them on the origin, and use construction geometry and the Merge History option to clean up your steps before modeling.
  • Shell: Hollow out the housing body to a consistent wall thickness, with fillets applied before shelling so interior edges update automatically.
  • Split Body: Divide the housing into a top and bottom lid using a mid-plane construction plane.
  • Offset Edge and Subtract: Create fitted interlocking rims by offsetting sketch profiles and subtracting the result from the opposing half.
  • Variables: Define a single tolerance value and apply it across multiple face offset commands so the whole design updates from one place.
  • Extrude and Union: Build mounting pins and sockets for the PCB components directly from the housing face.
     

Transcript

00:00

Hello everybody, and welcome to this basic reverse engineering tutorial in which I'm going to show you how in Shapr3D we can import two STL models of two electronical elements, position them in 3D space. And then I will show you how step-by-step we can build the shells, top and bottom, including the mating parts.

00:27

and also the sockets. So we can then position all our electronical elements on those parts. I will run you through the whole process of how I started first by creating a basic rectangle, building a box, rounding certain edges increasingly, creating a shelling, and then step-by-step starting to add elements.

00:57

For example, the openings in the back, opening in the top, and then later adding all these sockets. We will finish everything by also giving some materials to this individual parts. Can, for example, do an exploded view. So it's much easier than to also see everything what we did. And this looks really great when we are in the visualized mode. And with all that said,

01:26

Let's do it. Let's get started. What you see here is the starter file. I already imported two STL models, named them Controller and Display, and then put them into a folder, Electronics, so I can very easily turn them on and off. The first step we really want to make sure is that when we want to design

01:53

this new housing around these two electronical elements that our electronical elements are perfectly positioned in 3D space. For this, I will go to Top View, rotate this and I can zoom in a little bit. Everything looks kind of like nicely positioned, but let's make a sketch. And then you see here from the origin, I can draw a line straight up.

02:21

And here I can draw a line straight down. From the origin, I draw a line to the left and to the right. And then I can select these pairs, so the two vertical lines and assign an equal constraint. And then I do the same with the two horizontal lines. If I zoom in and move this up a little bit and then zoom out and zoom down and zoom in, you see,

02:50

This actually matches really well. If I do move one point to the outside, because these lines are equal, you see the other point moves with it. We can see that along the Y axis, the controller STL body is a little bit not centered. I can exit the sketch, select now.

03:17

the mesh body, and then very gently move this over. When doing this, it really makes sense to turn off the snap to grid function, by the way. Zoom in a little bit more, maybe close this one. The more we can zoom in, the better we can eyeball the position. Very good. Beautiful. Now we can...

03:46

go to a side view and you see that the board really sits on the ground. All the pins are sticking through. That is not really ideal because in my CAD design, I would like to have their wall at the bottom sitting basically directly on the ground to the Y axis. So I moved this up a little bit. Also here, if I...

04:14

Zoom in, then I can use the grid, kind of like two eyeball the position. If I turn on the history again, you see now here, I have these move commands and the sketch and all that I don't really want to have in my design when I start the new CAD model. So we'll go to history, click on the pull-on triangle and then select.

04:44

Merge now, and that will basically apply everything what we did and then remove the features from the history and also the sketch. The sketch was only useful for basically aligning our design. So now we are actually ready to start our design. So we, because it's kind like a rectangular box, can first think about

05:13

and like how can we build nicely a box. So here I have the rectangle from center. I can draw kind of like a rectangle. Can also put this directly onto the origin since we positioned our mesh nicely along the origin. And then you see here, I can...

05:37

drag these around a little bit. The rectangle can rotate. So one edge we select and say horizontal, vertical, and then I can pull these corner points and basically think about how close do we need to get there yet.

05:59

So we have kind like a cube around it. Then I go to a side view, select this, and then I can extrude this one up and bring this to...

06:19

So this looks like 22.5 millimeters. So this display sticks out a little bit. That's all good. Beautiful. We can start shaping this a little bit. So we would like to have rounded corners. I will select the two front pieces, round this a little bit and there I see already, it starts to stick.

06:49

through the design. So maybe five millimeters for the rounding. Then I can select the bottom and top edge, round this also. This should be a medical, some sort of a device. So this should be nice and comfortable in your hands because we have the fillets and later also the Shell command. In the history, we can adjust everything.

07:19

So we will work slowly as towards how to perfectly build this design around it. I would like to shell this design. So I go to the tool selection. Here's the shell. I will select the body and then shell this to the inside. You saw I selected the body.

07:44

in the items list. So this way I'm not selecting a face to shell through. I select the whole body and core it out. We can select 1.5 millimeters for the material thickness. And now it's time to actually preview our work. So I click on section view, select this plane, then I can go into a side view.

08:13

look then into our model. And there we see, now the display logically sticks through. So here it intersects, that is to be expected, but also here, our housing is actually too small. When I go into a 3D view, then I can rotate this view and there we have the same. So with that in mind,

08:42

or that figured out, we can go to the sketch and then simply adjust the sketch. So I moved this a little bit in a diagonal way or now width wise and length wise.

08:58

Maybe this is now a moment where we turn on also snapping. So it's a little bit cleaner in the way how we do this movement. So here now we have a little bit of air for the moment. Is good. I will go back to the section view, exit the sketch. So I had the sketch selected.

09:22

That's the reason why the section view went to the sketch, then delete that view and make a new view there. We're pretty tight there. So we, at this point, can start adding dimensions. Can make this 60 white. And then this we make...

09:52

74. So we add a little bit of space. Now we have these fillets. We can increase these fillets.

10:11

And then I can increase these. Let's you see this way, I can round everything nicer. This will later feel much, much better on our hand. I go to a section view one more time. Now there you see, this actually starts to intersect there one more time. Then I can go to this view. This does look actually really good. I'll go back to the side view.

10:41

I have also here my part, we might later want to move this wall a little bit further inwards. And because it is slightly intersecting there, I will make this now a little bit.

11:00

wider, so 76. And here we will run slowly into the problem that this is a too big gap. I will show you how to fix this. Very good. Beautiful. So at this point, we can go ahead and say, this all looks pretty good. I would like to round this edge too. So

11:29

It is nice and comfortable, but I will put this fillet and the history above the Shell command. So when we adjust this value, you will see that then the shell automatically updates this. See here, now we have the inner rounding, for example. We can go onto this face.

11:59

And then we will create a sketch. I will hide this body because now I would like to see where my individual ports are.

12:10

So.

12:14

with just a rectangle tool. I can start sketching this. And if we turn on the section view, you see, for example, where it perfectly cuts that one through. So there we can really nicely, in this case, see where we have to draw everything. Also here to make sure nothing

12:43

rotates one edge, I will select if this is nice.

12:51

a horizontal vertical constraint, then I can pull these closer in. Now this is important here to understand how tight you only want to get because of tolerances, also with 3D printing, et cetera. What we could do is we get this really super tight. There we are. And one more. And then we could select and...

13:21

Offset command and then do an offset. So we give this a tolerance of 0.5 millimeters or 0.25 millimeters. And then these inside lines, I will turn it to your construction line. So they were only helping me to trace the outline there. Beautiful.

13:51

So that one, for example, works. Also, later we see here, there is a pin. So I have to accommodate this actually based on where my shell is. So I will add here another set of a few lines, make sure this is horizontal vertical. And then here I will do

14:20

this trick of one center line straight down, and then this line will be a construction. This helps making sure these, as you can see, are symmetrical. And then we make those horizontal vertical. We can also dimension those. I went at the beginning, not dimension too much because when we move things around, it's good just to work without dimensions.

14:50

And then later we can lock them down. I show all the dimensions, so you can see what we have dimensions. Now we need to think about this port here in the back. And there is now this issue of, as you can see, the Ethernet port.

15:16

Sorry, the USB port intersects with the wall. That is fine, but our power supply port is way inside. So what do we have discovered now is that if we look at this, we could use this and punch a hole through. Let's use both profiles.

15:46

There we are. Now you see it cut through. So that works, but the other one does not. No. How do we fix this? This is something I brought up first. We could adjust this dimension, but then remove the center position. Or what we could do is I go now.

16:16

Right click, insert break point. I switched time wise before I made the sketch. And actually I will go before the shell even, select this face, and then I pull this back. You see it, there it starts to slowly stick out. We can fine tune this by 1.8.

16:53

or 1.97. Now we will get very close. And then when I remove this marker, there we are. The sketch did get moved. So in case something like this happens, we can select Edit.

17:15

Then we select this face and it's being reprojected onto that face. When I then change this offset, you see how the sketch follows it. So this means basically now we can go back to the sketch and also here turn Section view on one more time. And then essentially I will do

17:45

The same thing. So there is the part.

17:51

Snap it to that corner. Snap it to that corner. I do not want those to change, so I also lock them. Then this will be a horizontal one.

18:11

We have here an offset of 0.25. I could do the same, or I could also do this with...

18:25

the direct modeling, which is what I'm going to show you.

18:32

We have now basically this piece, we could cut this open because we have this extrusion. We can just go ahead and say, well, add this face to it to make a cut. We are. And since this is now very tight, we can add this tolerance or offset basically this way. Now just open this a little bit.

19:03

to five millimeters. So you see, you can do this directly inside the sketch if you want to, or you solve this as a modeling comment. Ideally, as a tip, select one version and stick with it.

19:19

Beautiful. We need now to also create an opening for our display. So let's show the display. We can go here to the top face. We will make our sketch and then I will zoom in from this corner. So I have kind of like...

19:47

0.1 millimeter. So I guess I'm more here, there, this lights up and there. You see the display, for example, is not perfectly centered. So if you do not center those STLs as good as you should, then later you can go back to it or you have to adjust your sketch or you increase your tolerance a little bit, which is what I will do.

20:17

Here, I will do this cut. There we are. Beautiful. I do think maybe here, this is getting a little bit too tight in my version. So this fillet, I will make a little bit less big. There we are. Now there is more of a space. That is very good. And I have also here this face offset.

20:50

What I can do now is the following. I go to the plus and I say variable. I say offset or tolerance, give this a good name and I name and then I enter the value of 0.025. I create this variable, which I have up here and check this out now. So I can select these

21:18

two faces. We are. And then adjust all four faces, which at the end I selected by using this offset value from the variable.

21:35

I can also go to here, remove this handwritten value and then replace it with the offset value from the variable. Because this means if I now adjust this value up there one time, all my commands that create this offset are doing that automatically for me. So I don't have to

22:04

go into these individual commands and do this one by one.

22:10

This is actually a really nice saver because I have two times and face offset command to create this tolerance. And I could have also made only one command that then moves all eight faces, but then you're really starting to nest everything. And here there's a very clean flow in how everything was built and when with all the individual steps.

22:42

We do have here very sharp edges. The display has a little bit of a rounded edge and we can round this a little bit to match it.

23:04

With this done, we can now talk about how to split this part into two pieces. So we have a top and a bottom lid. Then we can think about how to create the connectors, and then we create the lips. So these pieces basically intersect. We would like to find the midpoint. So kind like on this edge, horizontally, I select the top and the bottom.

23:34

outer face, and then I should be able, I am not, I'm sorry. Oh, there it was. I was blind. There it is, the Plane, Midplane command. So when you click on this one, then it creates a construction plane right at the center. When I double click my body and then Shift click the plane, I can split the body.

24:05

Display, now I can hide. It's actually a good practice to select all your construction elements, sketches and planes, put them into a folder and...

24:17

This way we can very often show all or hide all. It's just a nice way to do it that way.

24:28

And then we have the top and now the bottom. Since we're working on that, let's create the mating parts. This is very easy to do. I will select this surface here. Then I can create a sketch right on it. I will select the...

24:58

Offset command from single and do here my offset. Now you see how I'm adjusting everything. There we are. And there.

25:18

You can also, as you see, select multiple at the same time. So one, two, and three, four, and five, and six, and seven. I'm now selecting all those. And then I think with this one, this one doesn't work now because it's not connected. Say 0.5. Here, I do this 0.52 for

25:48

This type of an offset also here, we could create a variable too.

25:56

So exit variable and there we are.

26:12

Now I have it created. When I go back to my sketch.

26:24

There's that one and we can assign this one to there. There is the other one that was a little bit hidden. Very good. And also you see it now inside the sketch, if I adjust this,

26:41

then everything inside the sketch will be updated, which is really good. I will select the two inside profile and then simply extrude those up by 1.25 millimeters. We are. 2 millimeters is really based on how much space you have. Then I have the upper part.

27:09

If I rotate around, I can see I easily have plenty of material, so I can make this nice and stable, two millimeters. And then from the top, I will subtract the bottom part, select both bodies, call the subtract command, make sure we keep the tool, click OK. And there, now you see, this is our...

27:39

piece we build manually. And then here, there, we just subtracted that value from it. Super easy. And again, just as a demo, if we then adjust these values, all our design is being updated. Beautiful. To the last part, we would like to build our elements to secure everything.

28:08

on the logic board, secure the logic board onto the housing. I have here the section view still turned on. So I turn it off, go into a top view and I need to sketch somewhere kind of like positioned, ideally, maybe roughly here. So I will select this face.

28:37

Then I will create a sketch on this face. And then let's say I create one, two, three and four circles. The body part, now I can hide. And I selected the face of the geometry. So when we change the shelling, the sketch will move up and down with it.

29:07

And now I can show my controller part.

29:13

and moved all those into position. So now that's what's important now.

29:25

When you have a caliper, you can measure the distance or diameter, or you look into your technical document. Or if you do not like in my case, for example, this is an STL file. I can measure this right now. We can then simply try to approximate it. So we'll turn off the grid. So it is much easier again to...

29:51

kind of like position the circle, center it, and then by moving it around, zooming in a little bit more and there.

30:06

Trying to see. So it looks like 3.5 is the opening.

30:19

So that means perfectly all these others are the same. I select all three circle profiles, then Shift, left mouse button, click the last one. And then I add an equal constraint to that. And all I have to do is say here, you're roughly there. And this step here is really important now that you do this as close as possible.

30:47

when you want to make later the element also stick on it. We can also call the Move command, move things around this way if you want to. There are a few more snapping elements turned on. In such situations, it's really useful to fully turn this off. So they never snapped you kind of like anything from before. Now we can turn them all back.

31:19

There we are. And in case this is too tight, now you can do a 3D print and test it. We can then also in direct modeling, make these pins a little bit less white. So that is actually perfect. I can now select these profiles. There we are.

31:48

I would like to see where they are inside there. We can see this is inside the body. So that is fine. Then I will do an extrude up. You will then see, oh, there are holes. That is okay, because we simply say Union. So we extrude out from the inside of the casing.

32:17

these new pins where everything is positioned. They also do not start outside. Otherwise we would simply have to delete them. And the next step we have to do is just to make sure we extrude them high enough so they are right under it. So it looks like 3.5 millimeters. Then,

32:47

We clicked okay. I select these for sketch profiles one more time. Now I call the extrude command and then this is a simplified pin. Now we can just move this up a little bit or make this perfectly flush. This is then how you can design also these pins to be simple pins you push on or for pressure lock or other elements. I make...

33:15

new body. You might ask yourself, why did I make a new body? This is inside the hole and these should be small sockets for it to rest on. So I will make this a little bit wider.

33:38

by one millimeter. There, now you see it can then rest on it. In all these pieces, I can select Union. Now it's now one part. So if this is 3D printed, now I can take my logic board, slide it down, and then it will basically sit in there.

34:06

Now we have to do exactly the same on the top. So the controller height, this one I can hide. There is that.

34:20

So I do exactly the same process here. Again, I select this face, then I make a sketch. It is important then not to hide the body, just do your first sketch elements. Otherwise it might not be connected onto that sketch, that geometry face. You might remember when I shortened my controller housing, the sketch didn't move with it.

34:50

That's because that happened. And I will go here to one hole, try to figure out.

35:05

I mentioned this looks like.

35:09

2.5 millimeters. And then we do exactly the same, not because I realized, oh, this is rectangular. So we can select this one. Then we call the Pattern tool, pattern this out, but only with two pieces.

35:37

there and then one time down also with a quantity of two.

35:47

So let me zoom in.

35:51

position that, make sure here this is positioned. Is very good because this is kind like, as you can see, really a square arrangement. The Pattern tool actually worked out really, really well for that. And then we do exactly the same.

36:15

They are all sitting on flat surfaces. That makes it very easy. And then extrude this one up.

36:28

zoom in a little bit and try to get this as close as possible. Oh, looks like now 1.1. There we are. Click somewhere else. So the command is done. And then we select those surfaces, call the Extrude command one more time, move this one up and then say New Body.

36:57

hide the controller, then we can now select these bases.

37:07

And we used one millimeter. You see there again, this is a good situation maybe to make another variable so we can drive all those individually. And so we can drive all those automatically by only using one variable. And then select everything, click Union. There it's together.

37:36

These sketches now, I move all into the sketch folder. They're all called Sketch 06.5.4. Nobody has an idea later what this means. So really get into the habit of naming your sketches. So, and this is for example, you could say this is the housing.

38:03

This is opening back.

38:07

This is the opening top. This really makes sense to clean these things up really well. So that later you really have a good understanding of it. And also here, offset 2, maybe we rename this one offset lip.

38:30

so that when you see these names, you know exactly what they are doing.

38:37

We can rename this one.

38:46

Shell bottom, and this is Shell top. This all looks pretty good. We can do a quick fitting, maybe when we turn on the visualized mode. There we see how everything works. Turn this one off. There we see all the stuff with the visualization mode here, visualized. You see drop shadows and everything is a little bit...

39:16

easier to see with the contrast. This is all really nice. One last finish to do would be to work on the edge rounding.

39:33

We would like to have this a little bit softer. These edges could be filleted, these edges or those. I will go ahead, go to here and click and drag, and then use the Tab key.

39:56

So I only select the edges.

40:01

And I would like here to have a very tiny fillet. 0.1

40:08

Then I have this fillet here and click, I can click on edit the selection, click and select that edge. I click the same position and then I select the other edge. You see how I added those two to the selection. So we go to kind of like a visualize mode. Now you see there is a nice separation line now. For presentation purpose, it's really good.

40:36

to give objects some good colors. I have here the controller, if I select it, let's make this orange. The orange material goes also onto the display. So this is already, now if you present this to somebody, so much easier to read. The top shell can be a nice glossy material, maybe white. This is...

41:05

maybe a medical product. Let's make the bottom one slightly rubbery so it doesn't slide. And maybe a of like a clinical, nice and cold blue there for the environment. Maybe we go with the gradient. We can just darken this a little bit.

41:35

There we are. Beautiful. Now, we then select our parts and...

41:45

move them all a little bit apart. We can also do a nice exploded view presentation. Look at that. And that's it. This is how easy it is to import STL models, position them, and then through an iterative process, starting really with simple shapes,

42:13

and basic modeling commands, step by step, work yourself towards a housing that could then be 3D printed or manufactured. And then you can put your electronical elements into it.

 

Try it yourself

modeling-projects-reverse-engineering-stl.png
Electronics casing
Download

 

About the instructor

Instructor-Claas-Kuhnen.png

Claas Kuhnen is a German 3D designer known for his strong interdisciplinary background in product, space, and animation design. He holds an undergraduate degree in Color Design for Interior and Product Design from the University of Applied Science and Art in Hildesheim, Germany. He further pursued his education and obtained a Masters in Fine Arts in 3D Studio Art with a focus on Jewelry Design and 3D Animation from Bowling Green State University.

As a designer, Claas Kuhnen is particularly interested in design-informed solutions and exploring the relationship between consumerism, products, and their impact on society. He engages in a wide range of projects, including furniture design, interior and exhibit design, consumer product design, and medical product design.

In his research and studio practice, Claas Kuhnen delves into the application of a modern multi-application and interdisciplinary workflow. His areas of investigation encompass parametric, generative, and subdivision surface modeling, as well as AR (Augmented Reality), VR (Virtual Reality), photogrammetry, and AI-powered tools. He collaborates with various national and international universities and companies on research and design projects, contributing his expertise and exploring innovative approaches.

Claas Kuhnen's design projects span diverse domains. For instance, he has designed exhibit artifacts for The Henry Ford Museum, developed medical devices for the Department of Pharmacy Practice, and undertaken interior design projects that serve the community. His work showcases a keen understanding of the intersections between design, technology, and societal impact.

In addition to his design practice, Claas Kuhnen is actively involved in teaching and sharing his knowledge with students. His classroom experience is strongly influenced by his diverse research background, providing students with a modern, interdisciplinary, and competitive education.

Furthermore, Claas Kuhnen's work and techniques have been featured in exhibitions such as Autodesk University, SIGGRAPH, SOFA, and SNAG. He actively engages in educational collaboration efforts with both national and international universities and serves as a Matter Expert for leading design software companies, contributing to the advancement of design tools and methodologies.

Return to top
Was this article helpful?
0 out of 0 found this helpful

Topics

See more