discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

I'd like to do something similar to hull()

C
cmodyssey
Mon, Nov 16, 2020 9:29 AM

Hi,

I'd like to fill in all the area between these two objects.  When I use
hull, it fills in the area within the arc as well.

What I am after is something that looks a bit like a dam, if that makes
sense.

http://forum.openscad.org/file/t3018/H.jpg

Here is my code.  Does anybody have any ideas hoe I can join those shapes in
that way?

include <dotSCAD-master\src\rotate_p.scad>;
include <dotSCAD-master\src\polysections.scad>;
include <dotSCAD-master\src\path_extrude.scad>;
include <dotSCAD-master\src\bezier_curve.scad>;

no_steps=100;

t_step=1/no_steps;

shape_pts = [
[0, 0],
[2, 0],
[2,0.5],
[0,0.5],

];

bottom_path = [
[0,0,0],
[0,-20,0],
[20,-20,0],
[20,0,0],
];

top_path = [
[0,0,0],
[0,-25,0],
[25,-25,0],
[25,0,0],
];

bottom_path_pts = bezier_curve(t_step,bottom_path);
top_path_pts = bezier_curve(t_step,top_path);

path_extrude(shape_pts, bottom_path_pts, method = "EULER_ANGLE");

translate([-2.5,2,3]) path_extrude(shape_pts, top_path_pts, method =
"EULER_ANGLE");
*

--
Sent from: http://forum.openscad.org/

Hi, I'd like to fill in all the area between these two objects. When I use hull, it fills in the area within the arc as well. What I am after is something that looks a bit like a dam, if that makes sense. <http://forum.openscad.org/file/t3018/H.jpg> Here is my code. Does anybody have any ideas hoe I can join those shapes in that way? * include <dotSCAD-master\src\rotate_p.scad>; include <dotSCAD-master\src\polysections.scad>; include <dotSCAD-master\src\path_extrude.scad>; include <dotSCAD-master\src\bezier_curve.scad>; no_steps=100; t_step=1/no_steps; shape_pts = [ [0, 0], [2, 0], [2,0.5], [0,0.5], ]; bottom_path = [ [0,0,0], [0,-20,0], [20,-20,0], [20,0,0], ]; top_path = [ [0,0,0], [0,-25,0], [25,-25,0], [25,0,0], ]; bottom_path_pts = bezier_curve(t_step,bottom_path); top_path_pts = bezier_curve(t_step,top_path); path_extrude(shape_pts, bottom_path_pts, method = "EULER_ANGLE"); translate([-2.5,2,3]) path_extrude(shape_pts, top_path_pts, method = "EULER_ANGLE"); * -- Sent from: http://forum.openscad.org/
NH
nop head
Mon, Nov 16, 2020 9:34 AM

I would hull the outside paths and then difference with a hull of the
inside paths for that particular shape.

On Mon, 16 Nov 2020 at 09:30, cmodyssey richdthomas@gmail.com wrote:

Hi,

I'd like to fill in all the area between these two objects.  When I use
hull, it fills in the area within the arc as well.

What I am after is something that looks a bit like a dam, if that makes
sense.

http://forum.openscad.org/file/t3018/H.jpg

Here is my code.  Does anybody have any ideas hoe I can join those shapes
in
that way?

include <dotSCAD-master\src\rotate_p.scad>;
include <dotSCAD-master\src\polysections.scad>;
include <dotSCAD-master\src\path_extrude.scad>;
include <dotSCAD-master\src\bezier_curve.scad>;

no_steps=100;

t_step=1/no_steps;

shape_pts = [
[0, 0],
[2, 0],
[2,0.5],
[0,0.5],

];

bottom_path = [
[0,0,0],
[0,-20,0],
[20,-20,0],
[20,0,0],
];

top_path = [
[0,0,0],
[0,-25,0],
[25,-25,0],
[25,0,0],
];

bottom_path_pts = bezier_curve(t_step,bottom_path);
top_path_pts = bezier_curve(t_step,top_path);

path_extrude(shape_pts, bottom_path_pts, method = "EULER_ANGLE");

translate([-2.5,2,3]) path_extrude(shape_pts, top_path_pts, method =
"EULER_ANGLE");
*

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I would hull the outside paths and then difference with a hull of the inside paths for that particular shape. On Mon, 16 Nov 2020 at 09:30, cmodyssey <richdthomas@gmail.com> wrote: > Hi, > > I'd like to fill in all the area between these two objects. When I use > hull, it fills in the area within the arc as well. > > What I am after is something that looks a bit like a dam, if that makes > sense. > > <http://forum.openscad.org/file/t3018/H.jpg> > > Here is my code. Does anybody have any ideas hoe I can join those shapes > in > that way? > > * > include <dotSCAD-master\src\rotate_p.scad>; > include <dotSCAD-master\src\polysections.scad>; > include <dotSCAD-master\src\path_extrude.scad>; > include <dotSCAD-master\src\bezier_curve.scad>; > > > > > no_steps=100; > > t_step=1/no_steps; > > > > shape_pts = [ > [0, 0], > [2, 0], > [2,0.5], > [0,0.5], > > ]; > > > > > bottom_path = [ > [0,0,0], > [0,-20,0], > [20,-20,0], > [20,0,0], > ]; > > > > top_path = [ > [0,0,0], > [0,-25,0], > [25,-25,0], > [25,0,0], > ]; > > > > bottom_path_pts = bezier_curve(t_step,bottom_path); > top_path_pts = bezier_curve(t_step,top_path); > > > path_extrude(shape_pts, bottom_path_pts, method = "EULER_ANGLE"); > > translate([-2.5,2,3]) path_extrude(shape_pts, top_path_pts, method = > "EULER_ANGLE"); > * > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
CA
Carsten Arnholm
Mon, Nov 16, 2020 9:53 AM

On 16.11.2020 10:29, cmodyssey wrote:

Hi,

I'd like to fill in all the area between these two objects.  When I use
hull, it fills in the area within the arc as well.

What I am after is something that looks a bit like a dam, if that makes
sense.

http://forum.openscad.org/file/t3018/H.jpg

Here is my code.  Does anybody have any ideas hoe I can join those shapes in
that way?

It looks like you want something similar to a lofting function
https://en.wikipedia.org/wiki/Lofting

Probably your best guess is to create 2 solids, one based on the outer
curves  of top an bottom, another from the inner curves. Then subtract
inner from outer.

Carsten Arnholm

On 16.11.2020 10:29, cmodyssey wrote: > Hi, > > I'd like to fill in all the area between these two objects. When I use > hull, it fills in the area within the arc as well. > > What I am after is something that looks a bit like a dam, if that makes > sense. > > <http://forum.openscad.org/file/t3018/H.jpg> > > Here is my code. Does anybody have any ideas hoe I can join those shapes in > that way? It looks like you want something similar to a lofting function https://en.wikipedia.org/wiki/Lofting Probably your best guess is to create 2 solids, one based on the outer curves of top an bottom, another from the inner curves. Then subtract inner from outer. Carsten Arnholm
C
caterpillar
Mon, Nov 16, 2020 10:15 AM

You want this?

use <rotate_p.scad>;
use <polysections.scad>;
use <path_extrude.scad>;
use <bezier_curve.scad>;
use <shape_path_extend.scad>;
use <sweep.scad>;

no_steps=100;

t_step=1/no_steps;

bottom_path = [
[0,0,0],
[0,-20,0],
[20,-20,0],
[20,0,0],
];

top_path = [
[0,0,0],
[0,-25,0],
[25,-25,0],
[25,0,0],
];

bottom_path_pts = bezier_curve(t_step,bottom_path);
top_path_pts = bezier_curve(t_step,top_path);

stroke = [[0, 0], [2, 0]];
shape1 = shape_path_extend(stroke, bottom_path_pts);
shape2 = shape_path_extend(stroke, top_path_pts);

sweep([
[for(p = shape1) [p[0], p[1], 0]],
[for(p = shape2) [p[0], p[1], 0] + [-2.5,2,3]]
]);

http://forum.openscad.org/file/t1825/1.jpg


https://openhome.cc

Sent from: http://forum.openscad.org/

You want this? use <rotate_p.scad>; use <polysections.scad>; use <path_extrude.scad>; use <bezier_curve.scad>; use <shape_path_extend.scad>; use <sweep.scad>; no_steps=100; t_step=1/no_steps; bottom_path = [ [0,0,0], [0,-20,0], [20,-20,0], [20,0,0], ]; top_path = [ [0,0,0], [0,-25,0], [25,-25,0], [25,0,0], ]; bottom_path_pts = bezier_curve(t_step,bottom_path); top_path_pts = bezier_curve(t_step,top_path); stroke = [[0, 0], [2, 0]]; shape1 = shape_path_extend(stroke, bottom_path_pts); shape2 = shape_path_extend(stroke, top_path_pts); sweep([ [for(p = shape1) [p[0], p[1], 0]], [for(p = shape2) [p[0], p[1], 0] + [-2.5,2,3]] ]); <http://forum.openscad.org/file/t1825/1.jpg> ----- https://openhome.cc -- Sent from: http://forum.openscad.org/
C
cmodyssey
Mon, Nov 16, 2020 1:08 PM

Hi,

Wow, so many great answers, thanks!

I've tried both nophead and caterpillar's suggestions and got what I wanted
out of both.

It was good to do both, as it means I learn more!

Thanks so much, that has got me going now.

--
Sent from: http://forum.openscad.org/

Hi, Wow, so many great answers, thanks! I've tried both nophead and caterpillar's suggestions and got what I wanted out of both. It was good to do both, as it means I learn more! Thanks so much, that has got me going now. -- Sent from: http://forum.openscad.org/