[OpenSCAD] evenly cutting two curves to make surfaces

Peter Falke stempeldergeschichte at googlemail.com
Mon Sep 7 15:09:22 EDT 2015


Your wavy curve doesnt stick out much over the smooth curve.
So I scaled the smooth body by scale([.9,.9,1])

If you can cut your curve into concave sections, you can just chain-hull
while rotating around the z axis, scaling the wave curve while you rotate
around.



2015-09-07 19:22 GMT+02:00 runsun <runsun at gmail.com>:

> Hi Neon, it seems that your problem can be approached with simple
> interpolation, based on the observation that each line segment between two
> points is, or nearly is, a straight line.
>
> The following is the smooth_points[25] to [26] of your data (blue). Just
> increase the y by dy (set to 2.35 here) repeatedly (red horizontal lines),
> see if it gets larger than any given smooth_points[i].y. If yes, calc the
> slope between  smooth_points[i] and [j] (green). The interpolated point at
> that y can thus be obtained (I250, I251 and I261).
>
> <http://forum.openscad.org/file/n13729/interpolation_1597_Neon22.png>
>
> Here are the functions that generate the I250, I251 and I261 in the above
> graph:
>
>
> > function slope(pts,i)=
> >      (pts[i+1][1]-pts[i][1] ) / (pts[i+1][0]-pts[i][0] );
> >
> > function interpolate( pts, i, y=begY )=
> >      let( slope= slope( pts, i ) )
> >      [ pts[i][0]+ (y-pts[i][1])/slope, y ];
> >
> > I250= interpolate( smooth_points, 25);
> > I251= interpolate( smooth_points, 25, y=begY+dy);
> > I260= interpolate( smooth_points, 26, y=begY+dy*2);
>
> This is to answer your question in the first post. To reach your final
> destination, more manipulations are needed. But lets see how you will take
> it from here.
>
>
>
> -----
>
> $  Runsun Pan, PhD
>
> $ -- libs: doctest , faces ( git ), offliner ( git );
>
>  tips: hash( 1 , 2 ), sweep , var
>
> $ -- Linux Mint 17.1 Rebecca x64  + OpenSCAD 2015.03.15/2015.04.01.nightly
>
>
>
>
> --
> View this message in context:
> http://forum.openscad.org/evenly-cutting-two-curves-to-make-surfaces-tp13702p13729.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>



-- 
stempeldergeschichte at googlemail.com <karsten at rohrbach.de>

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20150907/d9c31fbc/attachment-0002.html>


More information about the Discuss mailing list