How to reinforce junctions between parts

208 views
Skip to first unread message

Jérôme D

unread,
Jul 10, 2018, 7:04:59 AM7/10/18
to CadQuery
Hi guys,

First, I am still a very beginner using cadQuery (with an openScad background). So maybe what I am asking here has an obvious answer, but sadly, I didn't find any easy solution.

I am preparing a model for 3D printing. The piece will be screwed to a surface, and a pipe will be connected to it :


This is literally 6 lines using cadQuery, including the countersunk hole, which is really cool ! Way easier and more readable than it would be in OpenSCAD :-).

The difficulty is that inter-layer adhesion is not that strong on 3D prints, which makes this kind of model very weak at the 90° angle between the cylinder and the box. It needs to be reinforced.
I would like to add a kind of rounded reinforcement at the bottom of the cylinder, so that the adhesion surface between the box and the cylinder is increased, which should make it much stronger.

I found methods to chamfer or fillet edges, but nothing to add such elements (that I don't even know how to call in mechanical terms :-) ).
How would you do that ? Is there an easy method provided by CADQuery that I failed to spot, or a library that I could use for that (I took a look at CQParts but it does not seem to be the solution) ?

Thanks for your help !

Jerome

Jeremy Wright

unread,
Jul 10, 2018, 7:48:45 AM7/10/18
to CadQuery
Hi Jerome. So are you just wanting to add a fillet at the interface between the plate and the tube? Or are you wanting to add something like a gusset

Selecting that circular edge for a fillet could be a little tricky, but can probably be done. Would you be willing to post your code so that I can experiment with selecting that edge?

Dave Cowden

unread,
Jul 10, 2018, 7:55:44 AM7/10/18
to Jérôme D, CadQuery
I think what i'd do is to fillet that edge.  the tricky part is selecting it ( as Jeremy said).  



--
cadquery home: https://github.com/dcowden/cadquery
post issues at https://github.com/dcowden/cadquery/issues
run it at home at : https://github.com/jmwright/cadquery-freecad-module
see it in action at http://www.parametricparts.com
---
You received this message because you are subscribed to the Google Groups "CadQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cadquery+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cadquery/c6390074-3dde-41e8-af91-1881932ec36d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jérôme D

unread,
Jul 10, 2018, 8:10:19 AM7/10/18
to CadQuery
If a fillet can be added to such an edge, I guess it would do the job.
I most indeed thinking about a kind of circular gusset (thanks for the word :-) ).

So first track : find a way to select this edge. I'll try to achieve that :-).

Jeremy Wright

unread,
Jul 10, 2018, 8:28:33 AM7/10/18
to CadQuery
So it's a little more convoluted than we like things to be with CadQuery, but the following code works. The object that I created only has the essential features from your design to demonstrate the selector. The second faces() call is where the real work begins. We don't have a string selector for NearestToPointSelector, so you have to instantiate the selector manually.

The CadQuery selector documentation is here.

import cadquery as cq

from cadquery import selectors

result = cq.Workplane('XY').rect(10.0, 10.0).extrude(2.0) \

                           .faces('>Z').circle(2.0).extrude(5.0) \

                           .faces('<Z[1]').edges(selectors.NearestToPointSelector((0.0, 0.0))) \

                           .fillet(0.1)

show_object(result)

Adam Urbanczyk

unread,
Jul 10, 2018, 3:13:05 PM7/10/18
to CadQuery
How about using a type selector? I think it is slightly more readable (though yours is more universal)


import cadquery as cq

result
= cq.Workplane('XY').rect(10.0, 10.0).extrude(2.0)\
   
.faces('>Z').circle(2.0).extrude(5.0)\
   
.faces('<Z[1]').edges('%Circle')\
   
.chamfer(0.5,1)

show_object
(result)

Jeremy Wright

unread,
Jul 10, 2018, 3:25:55 PM7/10/18
to CadQuery
Interesting, I don't think I've ever used the type selector for a circle before. I like working with string selectors better than selector objects, so I like your solution better than mine. It's definitely cleaner for this use case.

Jérôme D

unread,
Jul 11, 2018, 4:55:44 AM7/11/18
to CadQuery
Thanks Jeremy and Adam !

The more I dive in CadQuery, the more I think that the most important thing I have to learn is how to use the selectors to "navigate" in my models.
Thanks a lot for your help, I am now a little bit better at playing with those :-).

Dan Christian

unread,
Jul 16, 2018, 11:47:00 AM7/16/18
to CadQuery
I think this case would make a good addition to the online documentation.  

It shows a real world and non-trivial selector use case with two different solutions.

Dan

--
cadquery home: https://github.com/dcowden/cadquery
post issues at https://github.com/dcowden/cadquery/issues
run it at home at : https://github.com/jmwright/cadquery-freecad-module
see it in action at http://www.parametricparts.com
---
You received this message because you are subscribed to the Google Groups "CadQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cadquery+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cadquery/9a334150-1987-44b9-b40a-c10f671587aa%40googlegroups.com.

thebluedirt

unread,
Jul 16, 2018, 1:12:31 PM7/16/18
to CadQuery
I definitely agree.
@Jerome, when you get your example working as you like, would you mind if we add this example to the online examples collection?

If you're feeling productive, we would happily accept a PR for an addition here:


If you were interested in featuring it in the documentation ( which would be great), we'd also add it here:



On Monday, July 16, 2018 at 11:47:00 AM UTC-4, Dan Christian wrote:
I think this case would make a good addition to the online documentation.  

It shows a real world and non-trivial selector use case with two different solutions.

Dan
Thanks Jeremy and Adam !

The more I dive in CadQuery, the more I think that the most important thing I have to learn is how to use the selectors to "navigate" in my models.
Thanks a lot for your help, I am now a little bit better at playing with those :-).

--
cadquery home: https://github.com/dcowden/cadquery
post issues at https://github.com/dcowden/cadquery/issues
run it at home at : https://github.com/jmwright/cadquery-freecad-module
see it in action at http://www.parametricparts.com
---
You received this message because you are subscribed to the Google Groups "CadQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cadquery+unsubscribe@googlegroups.com.

Jérôme D

unread,
Jul 17, 2018, 5:22:37 AM7/17/18
to CadQuery
I'll do that in the days to come :-).

Jérôme D

unread,
Jul 17, 2018, 9:21:44 AM7/17/18
to CadQuery
I ended up having time to do that during the day.

Note though that I did not focus that much on selectors : I played a bit more with them to prepare the exemples, and I am still not sure I understand them fully. So I don't feel legit to write exemples on them.

One of the question that arrises while playing with the type selector, notably, is that on my exemple, I have 4 circles on a place. If I use the "%Circle" selector, it returns them all. If I try to select the first one, it is mostly random.
This random behavior confuses me.

Jeremy Wright

unread,
Jul 17, 2018, 9:29:51 AM7/17/18
to CadQuery
I've run into the seemingly random selection problem before, and I think it's because FreeCAD builds the parts of the geometry in different orders each time a model is generated. If you have multiple circles, it would probably be best to go back to the NearestToPointSelector that I posted earlier. That should allow you to select specific circles. Unfortunately, I don't think there's any way to get around the FreeCAD geometry ordering problem. I know that Dave has high hopes for the PythonOCC implementation in addressing issues like this.

Jérôme D

unread,
Jul 17, 2018, 9:39:42 AM7/17/18
to CadQuery
In the pull request, I used the NearestToPointSelector, indeed.
Reply all
Reply to author
Forward
0 new messages