discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Joining lists of points together

RW
Raymond West
Mon, Dec 13, 2021 12:53 PM

On 13/12/2021 09:38, Jose H wrote:

@Raymond West.
Thank you, I thought about that, but I wanted something that warranted
specific points in order to make it super clean and controlled when I
do boolean logic in 3D so no broken faces and so on.
I had problems in the past with 3d boolean logic and wanted to be
extra careful in 2d although your solution probably works very well.

Now that I have so many alternatives I will test them all and compare
and use the cleanest.

In the physical world, it is the same. You can not make a hole go
through a part when the depth of hole is exactly the same as the
thickness of the part. It is exactly the same in the 'theoretical world'
of openscad. You have to punch holes/whatever further than you think is
necessary, if going right through a part - see below.

Also, if you're printing a plastic tube to fit tightly over a metal
part, you will need to include tolerance values or similar, which may
vary depending on the plastic used and other factors, and I don't think
I'd have sharp angles, I'd round off the corners a bit (inside of the 90
deg bend in your example).

$fn=80;

difference(){  // gives 'z fighting', not pretty
cylinder (20,8,8,true);
cylinder (20,5,5,true);
}

translate ([20,0,0])
difference(){   // perfection personified !
cylinder (20,8,8,true);
    translate([0,0,-5])
cylinder (40,5,5,true);
}

Best wishes,

Ray

On 13/12/2021 09:38, Jose H wrote: > @Raymond West. > Thank you, I thought about that, but I wanted something that warranted > specific points in order to make it super clean and controlled when I > do boolean logic in 3D so no broken faces and so on. > I had problems in the past with 3d boolean logic and wanted to be > extra careful in 2d although your solution probably works very well. > > Now that I have so many alternatives I will test them all and compare > and use the cleanest. > In the physical world, it is the same. You can not make a hole go through a part when the depth of hole is exactly the same as the thickness of the part. It is exactly the same in the 'theoretical world' of openscad. You have to punch holes/whatever further than you think is necessary, if going right through a part - see below. Also, if you're printing a plastic tube to fit tightly over a metal part, you will need to include tolerance values or similar, which may vary depending on the plastic used and other factors, and I don't think I'd have sharp angles, I'd round off the corners a bit (inside of the 90 deg bend in your example). $fn=80; difference(){  // gives 'z fighting', not pretty cylinder (20,8,8,true); cylinder (20,5,5,true); } translate ([20,0,0]) difference(){   // perfection personified ! cylinder (20,8,8,true);     translate([0,0,-5]) cylinder (40,5,5,true); } Best wishes, Ray
JH
Jose H
Tue, Dec 14, 2021 9:03 AM

@Raymond. Thank you. About removing more material and tolerances I know. I
already have those connectors made in Freecad and CADQuery and have printed
and used those for years.
I know the actual tolerances the printers or CNC machines, or hot, or other
glues I use need.

The problem with the Freecad version is that adjusting the tolerances and
dimensions with spreadsheet values is quite "indirect"(the "code" is in
different places) and the expressions and input interfaces are quite
limited, and makes it lack elegance and most people find it hard to
understand and use it. Even myself(the creator) finds it hard to understand
what I did after a long time not using it.

I really like the CADQuery solution. Python is a very powerful language and
the 3D engine is also great. But right now the distribution(so other people
can use it) is problematic. It requires a complex installation method based
on "Anaconda" that I personally find hard to use and full of complexity.

Openscad is much more mature and very easy to install. It lacks the bells
and whistles CADQuery has but for simple shapes it is more than enough.

@Raymond. Thank you. About removing more material and tolerances I know. I already have those connectors made in Freecad and CADQuery and have printed and used those for years. I know the actual tolerances the printers or CNC machines, or hot, or other glues I use need. The problem with the Freecad version is that adjusting the tolerances and dimensions with spreadsheet values is quite "indirect"(the "code" is in different places) and the expressions and input interfaces are quite limited, and makes it lack elegance and most people find it hard to understand and use it. Even myself(the creator) finds it hard to understand what I did after a long time not using it. I really like the CADQuery solution. Python is a very powerful language and the 3D engine is also great. But right now the distribution(so other people can use it) is problematic. It requires a complex installation method based on "Anaconda" that I personally find hard to use and full of complexity. Openscad is much more mature and very easy to install. It lacks the bells and whistles CADQuery has but for simple shapes it is more than enough.
JH
Jose H
Tue, Dec 14, 2021 10:47 PM

Here is the sketch I designed for joining two aluminum profiles. I usually
use 20x10mm aluminum profiles with thickness of 1.5mms, but I can change
the parameters.

The preview does not work well, I suppose I have to be careful with the
order of the polygons. But looks it renders correctly.

Now I have to I will print it and debug it. Correct the preview issue and
maybe make use of the customizer and then publish the thing on youmagine,
Prusa Printers or whatever.

Without your help, it would have taken a long time.

Here is the sketch I designed for joining two aluminum profiles. I usually use 20x10mm aluminum profiles with thickness of 1.5mms, but I can change the parameters. The preview does not work well, I suppose I have to be careful with the order of the polygons. But looks it renders correctly. Now I have to I will print it and debug it. Correct the preview issue and maybe make use of the customizer and then publish the thing on youmagine, Prusa Printers or whatever. Without your help, it would have taken a long time.
JB
Jordan Brown
Tue, Dec 14, 2021 11:45 PM

On 12/14/2021 2:47 PM, Jose H wrote:

The preview does not work well, I suppose I have to be careful with
the order of the polygons. But looks it renders correctly.

Add the magic incantation ", convexity=10" to your linear_extrude calls.

On 12/14/2021 2:47 PM, Jose H wrote: > The preview does not work well, I suppose I have to be careful with > the order of the polygons. But looks it renders correctly. Add the magic incantation ", convexity=10" to your linear_extrude calls.
JH
Jose H
Wed, Dec 15, 2021 12:32 AM

@Jordan Brown

Absolutely magical!
Thank you.

@Jordan Brown Absolutely magical! Thank you.