Asking for a tutorial: Snap-fit electronics enclosure

A place to share learning material: written tutorials, videos, etc.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
probono
Posts: 42
Joined: Wed Dec 28, 2016 10:16 pm

Re: Asking for a tutorial: Snap-fit electronics enclosure

Post by probono »

I think it's very useful to make such an exercise in 0.17-dev. From this experience, I plan on creating at least 2 feature requests as well as 2 bug reports on the bug tracker.
Glad to hear that this is a worthwhile exercise. So my initial instinct of being intimidated by FreeCAD when it seems all so easy in Fusion 360 wasn't entirely wrong after all? ;)
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Asking for a tutorial: Snap-fit electronics enclosure

Post by NormandC »

Please remember that I did say that 0.17 is *not yet* finalized. I would not have encountered these bugs in 0.16. It is perfectly capable of making this electronics enclosure, but it would require using the Part workbench and possibly Draft.

And the usual reminder applies here: if you're expecting FreeCAD, an open-source project lead by a handful of volunteers in their spare time, to be as "easy" and complete as software developed by a billion dollar company, I think you should save yourself some time and grief and just go with Fusion 360.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Asking for a tutorial: Snap-fit electronics enclosure

Post by NormandC »

NormandC wrote: Sun Aug 06, 2017 7:37 pmI plan on creating at least 2 feature requests as well as 2 bug reports on the bug tracker.
Well I won't need to report the two bugs! :D

kkremitzki created a pull request that fixes Loft/Pipe tools claiming other features as children.

And in his GSoC blog he mentions he's looking into the other issue.
kkremitzki wrote: I also spent some time looking at few outstanding bugs in C++-land.

Particularly,
  • (new) Pipe fails when its path is a loop. For example, a Pipe with a circle as a base and a larger, orthogonal circle passing through the base should become a torus. Currently, it fails with the wonderfully verbose error message 'TopoDS::Shell'.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Asking for a tutorial: Snap-fit electronics enclosure

Post by NormandC »

@peterl94

I noticed you posted your enclosure file in another topic: https://forum.freecadweb.org/viewtopic. ... 81#p185481

I was wondering if you tried to model the live hinge, and to create a PartDesign Boolean to fuse one Body to the other?

Since the top cover was rotated and moved, I figured that logically the bottom cover should be the one to host the PD Boolean feature. Problem is, when creating the Boolean, the top cover Body returns to its original global coordinates on top of the bottom cover. :?

So it seems that for now, the only choice is to switch to the Part workbench and to create a good old Part Union, as it lets the top cover body remain in his rotated & translated location. But this puts the Fusion object outside of the Part container. :D (Drag & drop over the Part container seems to fix it)

Still some way to go for me to complete the 3 tutorials...

P.S. About the offset sketches, I tried using the new Part Offset 2D tool. Unfortunately it cannot be included in a PD Body, which is a pity. I also thought of Draft Offset. I know for a fact that Draft objects can be added to a Body (drag & drop over a body, use Part Attachment utility to attach it to one of the Body's plane). But it produces a simple Part object that cannot be included in a Body.
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: Asking for a tutorial: Snap-fit electronics enclosure

Post by peterl94 »

NormandC wrote: Mon Aug 07, 2017 10:04 pm I was wondering if you tried to model the live hinge, and to create a PartDesign Boolean to fuse one Body to the other?
No, I ran out of time before I got that far. I tried it this evening after seeing your post, but I couldn't find any other way than what you mentioned. I imagine realthunder's Link feature would work for this situation, but I haven't tried it yet.
NormandC wrote: Mon Aug 07, 2017 10:04 pm I tried using the new Part Offset 2D tool. Unfortunately it cannot be included in a PD Body, which is a pity.
Yeah, that is unfortunate. I'm thinking about creating a feature request on the tracker for a PD offset sketch command (I didn't find any others). I just haven't decided exactly how I would want it to function. I think it would be more useful if it was a constraint, instead of a separate object like Part 2d offset, but I'm sure that would be much harder to implement.

Speaking about sketcher feature requests, another thing I really missed when creating this enclosure was a "project edge" command. It would work like the "external reference" command, but it would create actual geometry instead of just reference geometry and any edge that was not in the same plane as the sketch would be projected on to it.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Asking for a tutorial: Snap-fit electronics enclosure

Post by ickby »

Hello,

nice to see the work in PartDesign with the new features! This seems to be a good test.

I did not read the full thread or looked at all models, but for a different Issue I looked at peterl94's model of this enclosure. I noticed that he mad pockets from a sketch in different bodies. Meaning the sketch is in a certain body, and it was selected and used for pad from annother one. I justlike to note that this will not work anymore in a few days. Than one should use shapebinder to make a datum of that shape in the other body and make a pad from that shapebinder.

I know that for the pad one currently still needs to select the face in 3d, and it does not work with selecting the shapebinder in the tree. This will also change, hopefully soon.
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: Asking for a tutorial: Snap-fit electronics enclosure

Post by peterl94 »

ickby wrote: Tue Aug 08, 2017 6:34 am Than one should use shapebinder to make a datum of that shape in the other body and make a pad from that shapebinder.
That is what I tried first, but not knowing the trick, I didn't think it was possible.

Also, for this model we need to be able to create a new body from the fusion of other bodies taking into account their transformation. Any plans for this?
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Asking for a tutorial: Snap-fit electronics enclosure

Post by easyw-fc »

peterl94 wrote: Tue Aug 08, 2017 11:16 am
ickby wrote: Tue Aug 08, 2017 6:34 am Than one should use shapebinder to make a datum of that shape in the other body and make a pad from that shapebinder.
That is what I tried first, but not knowing the trick, I didn't think it was possible.

Also, for this model we need to be able to create a new body from the fusion of other bodies taking into account their transformation. Any plans for this?
That is an other need for a Body simple copy I asked some time ago... Useful to i.e. export the model for 3d printing
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Asking for a tutorial: Snap-fit electronics enclosure

Post by NormandC »

Thanks for replying in this topic ickby!
ickby wrote: Tue Aug 08, 2017 6:34 am Than one should use shapebinder to make a datum of that shape in the other body and make a pad from that shapebinder.

I know that for the pad one currently still needs to select the face in 3d
Now that is unnerving. I was sure that I tried to select the ShapeBinder face in the 3D view and that it didn't work.

But now I tried it again, and again in a new file, and again in another new file, and it works! :?

WTF I must be going crazy :D Anyway thanks for the pointer, I will now revise how to make the second Body, and try to be on the lookout for bugs related to it. :)

I'm even wondering now if I should go back to a straight edge sketch and 3D fillets features, to better match the 3D Hubs tutorial. Maybe a video should demonstrate both methods and explain the advantages/disadvantages of either.

peterl94 wrote: Tue Aug 08, 2017 2:22 am Speaking about sketcher feature requests, another thing I really missed when creating this enclosure was a "project edge" command. It would work like the "external reference" command, but it would create actual geometry instead of just reference geometry and any edge that was not in the same plane as the sketch would be projected on to it.
I will be blunt, I have never been satisfied with the External Geometry tool. The fact that it only creates reference geometry seriously hampers its usefulness and the Sketcher's general work flow. Quite often you want to use this external geometry directly but you can't, so you have to sketch new geometry and constrain/superimpose it over the external geometry. IMHO any tool that forces you to create overlapping geometry is wrong. The "project edge" command you mention is what External geometry should have been right from the start. It is how it works in the 2 mid-range parametric CAD programs I'm familiar with. I will go further: it should allow to project a single edge or a chain of edges. It should allow to constrain projected edges and even trim them against "regular" sketched geometry.

With a "project edge" command there would actually be no further need for the external geometry command, because you could just turn projected geometry into construction geometry.

But such a tool may also allow to enter an offset value from the external edges... Actually, the more I think about it, maybe a forum topic should be created to discuss the scope and feasibility of such a tool before creating a feature request?

easyw-fc wrote: Tue Aug 08, 2017 1:21 pm That is an other need for a Body simple copy I asked some time ago...
By simple copy do you mean an unlinked copy or a linked (parametric) one? I asked something similar to ickby, and we discussed about the possibility of turning a ShapeBinder volume into a base solid. So you would create a new Body, select another body and create a shapebinder from it, then set a parameter to switch the shapebinder from a reference shape to a base solid. I believe this could work for your purpose?

Now I'm not sure what ickby has decided about it.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Asking for a tutorial: Snap-fit electronics enclosure

Post by easyw-fc »

NormandC wrote: Tue Aug 08, 2017 7:20 pm
easyw-fc wrote: Tue Aug 08, 2017 1:21 pm That is an other need for a Body simple copy I asked some time ago...
By simple copy do you mean an unlinked copy or a linked (parametric) one?
I was thinking something similar to Part simple copy... Unlinked would be enough, but linked would be better :)

https://www.freecadweb.org/tracker/view.php?id=2905
Post Reply