I just held a real strip up to my monitor and can see it quite different at the extremes, so yes I would be interested to see your minimum energy solution please Ronaldo. On 19 December 2017 at 22:19, nop head <[hidden email]> wrote:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
In reply to this post by nophead
As a longtime happy builder/user of a Mendel90, I must say I love seeing these sneak peeks at what you're cooking up next, and it continually impresses me how thorough you are with your OpenSCAD designs! Cheers,On 20 December 2017 at 11:19, nop head <[hidden email]> wrote:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
Administrator

In reply to this post by nophead
Good to see foldback clips are still stateoftheart for printing plate
attachment.  Admin  PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!  Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Admin  PM me if you need anything,
or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! 
nah print on masking tape, with gobs of that holding down my plate who
needs clips! On 20/12/17 04:30, MichaelAtOz wrote: > foldback clips _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
In reply to this post by nophead
Unfortunately, I am away home and haven't took my notebook with me. You will have to wait till after Christmas... I can tell you the general principles, though. The energy expression of a curve was taken proportional to the integral of its second parametric derivative. Using Maxima, I found the energy of a cubic arc may be computed by:
where d0 and d1 are the second parametric derivatives at the ends of the arc. In order to change the arc to minimize its energy, I have used the following adjustment:
where s is a real parameter in [0,1]. The parameter s changes the balance between the two end derivatives of the arc. In special, adjust2(bz, 0.5) == bz. Plotting the energy of an adjusted arc as a function of s in [0,1], I found that it has no other local minimum besides the global minimum. The energy minimizing process is a recursive algorithm that starts with an interval of s values (s0, s1) that contains the minimum s, finds an approximation of the minimum and a narrower interval to recur. To find an approximation, I interpolate a quadratic polynomial to the points s0, (s0+s1)/2 and s1 and find its minimum. For each s whose energy is needed, the arc is adjusted to the proper length by AdujstBezier. 20171219 20:39 GMT02:00 nop head <[hidden email]>:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
In reply to this post by nophead
Yes, the original Oskar Linde´s sweep may generate very wild twists in some vertical path segments. You may find useful a version I wrote based on Oskar Linde's suggestions that have never being included in his original code. It can be found in https://github.com/RonaldoCMP/listcomprehensiondemos/blob/master/sweep.scad. It works fine and better than Frenet frames. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
Thanks I will have a dabble with that if I have time over Christmas. I have been working on this project for more than a year and tend to do it while on holiday so there really is no urgency! On 20 December 2017 at 18:02, Ronaldo Persiano <[hidden email]> wrote:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
I ran into that issue with vertical sections of my sweeps as well. I fixed it by changing my code to use quaternions instead of Euler angles.  Revar
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
The sweep.scad code doesn't compute rotations from angles. The rotation unstability on vertical segments results from computing the section rotations globally. The alternative code instead computes the global section rotation by composing small local rotations from one path point to the next. 20171220 17:53 GMT02:00 Revar Desmera <[hidden email]>:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
>The energy expression of a curve was taken proportional to the integral of its second parametric derivative I don't think this is right. I think the energy is proportional to the integral of the square of curvature. This is because the potential energy in a spring is a square law due to the force increasing as you bend it.On 20 December 2017 at 20:07, Ronaldo Persiano <[hidden email]> wrote:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
In reply to this post by Ronaldo
I just wish we could add these lofting and sweeps to the base
distro  with docs :) On 12/21/2017 7:02 AM, Ronaldo Persiano
wrote:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
On 22.12.2017 21:34, Mark Schafer wrote:
> I just wish we could add these lofting and sweeps to the base > distro  with docs :) > I'm sure pretty much everyone can agree on that. I'd love to help with that, but my math knowledge is not nearly good enough to do that. Are there any pointers to tutorials that would help understand what's needed? So far I only found basic 3d tutorials or scientific papers that are not comprehensible to me. Somehow the path from basic stuff to the more advanced topics has a huge gap with not much explanation on how to get to the other side. ciao, Torsten. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
 Torsten

Are we taking about sweeps and lofts or modelling a strip with minimum bend energy? I find the former easy enough to understand but the latter is the stuff of scientific papers that go over my head. I was disappointed to find it doesn't have a simple formula like a catenary does.On 22 December 2017 at 21:21, Torsten Paul <[hidden email]> wrote: On 22.12.2017 21:34, Mark Schafer wrote: _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
In reply to this post by tp3
IMHO OpenSCAD is missing a line primitive which could enable a lot of this.
The line would be a set of edges pointing to vertices. much like polygon() Then sweep, loft, objects of revolution, etc could use this "line" as input. Likewise you could slice (projection()) an object to generate a line for internal use. To close the circle as it were. Line() could generate a solid object in much the same way polyhedron and linear_extrude() do if used on its own. On 12/23/2017 10:21 AM, Torsten Paul wrote: > On 22.12.2017 21:34, Mark Schafer wrote: >> I just wish we could add these lofting and sweeps to the base >> distro  with docs :) >> > I'm sure pretty much everyone can agree on that. > > I'd love to help with that, but my math knowledge is not nearly > good enough to do that. Are there any pointers to tutorials that > would help understand what's needed? > > So far I only found basic 3d tutorials or scientific papers that > are not comprehensible to me. Somehow the path from basic stuff > to the more advanced topics has a huge gap with not much > explanation on how to get to the other side. > > ciao, > Torsten. > > _______________________________________________ > OpenSCAD mailing list > [hidden email] > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >  > This email has been checked for viruses by AVG. > http://www.avg.com > > _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
I don't know if this has a mathematical validity but simple keeping the two inner control points level with each other seems to produce a curve that matches a strip held against the screen fairly well. The length of the strip is only 9mm longer compared to the version with the control points equidistant below the end points. On 22 December 2017 at 22:03, Mark Schafer <[hidden email]> wrote: IMHO OpenSCAD is missing a line primitive which could enable a lot of this. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
@nophead,
I'm afraid you will need a proper differential equation system to describe (and solve) your problem in a generic way. The solution will be reigned by the viscoelastic stiffness (elasticty + damping) and also the weight of your strip will play a nonnegligible role. Imagine the case that both ends stay at the same level. Without gravity, your solution at least with *distance of ends < dip of fixedlength strip @ vertical egress on both ends* will look like the projection of a light bulb, as the minimum energy condition will try to minimize bending at each point. Gravity tends to distort this solution with a catenary function defined as tradeoff between elastic and gravitational forces. Furtheron a damping term with introduce some hysteresis ... I severly doubt that this can have a trival solution. @Neon22 If I understand your line primitive well, it is easy to implement and could be encapsulated into a lib. Visualization can be done on the basis of sweep() with a polyline (i.e. list of 3Dpoints with min length 2) and a radius argument. It will then extrude a circle (ngon) along this line. There are solutions for this in thingiverse. If I remember well also Caterpillar published some code for this. BUT: As selfintersection is possible, I severly doubt that sweep will ever find its way into the language. It will stay a lib function. If you are interested I can implement an adapter function for the sweep() that comes with my Naca_sweep.scad library. BTW I use a similar 'extension' to visualize faces defined by polygons already placed in 3D space. While it also works to visualize noplanar polygons, the trigonalization is a bit rough and does not show the minimal surface, as one likely might expect. use <Naca_sweep.scad> // https://www.thingiverse.com/thing:900137 poly(T_(15,20, 10, Ry_(60, circle2D()))); poly(T_(10,10, 10, Ry_(30, chip()))); function circle2D(r=10, N=100) = [for (i=[0:N]) let(w=360/N*i) r*[sin(w), cos(w), 0]]; function chip(r = 10, N = 100) = // polygon for cross section [for (i=[0:N]) let(w = 360/N*i) r*[sin(w), cos(w), 0.1*cos(3*w)]]; module poly(p) { face = [for(i=[0:len(p)]) i]; p_ = len(p[0]) == 3?p:vec3D(p); polyhedron(p_, [face]); }  Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
> I severely doubt that this can have a trivial solution. Yes for a general strip that is certainly true. In my case the weight of the strip is negligible compared to its stiffness so gravity doesn't play a part. I can turn it upside down and its shape doesn't change noticeably. On 23 December 2017 at 15:35, Parkinbot <[hidden email]> wrote: @nophead, _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
I may not be understanding the problem correctly, but could you solve self intersection by creating each loop of the sweep as a separate object and union them?  Revar
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
You can visualize a polyline segment by hulling two spheres. Unioning a
sequence of such segments will do the job regardless of selfintersection. You are right in this point. But rendering will be very very slow as soon as many segments have to be rendered. RevarBat wrote > I may not be understanding the problem correctly, but could you solve self > intersection by creating each loop of the sweep as a separate object and > union them?  Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
In reply to this post by nophead
You are right. The expression of the energy I've been using is an approximation of the bending energy valid only under some strict conditions. As its integral is easily evaluated it is the usual energy expression in the context of geometric modeling. You need a physical bending energy though and that may be computed with a little more effort applying the expression of curvature found in https://en.wikipedia.org/wiki/Curvature#Curvature_of_space_curves to a suitable subdivision refinement of the curve. I believe the energy minimizing strategy I devised may still work with the bending energy based on curvature. However, I don't believe the shape of a bent physical strip in a general setting may be modeled by a cubic arc. 20171222 17:51 GMT02:00 nop head <[hidden email]>:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
Free forum by Nabble  Edit this page 