[OpenSCAD] union flange with ellipse code help

Ronaldo Persiano rcmpersiano at gmail.com
Sun Oct 28 11:15:36 EDT 2018


There is many syntax error in your code. And tweenLoft is not defined.

Em dom, 28 de out de 2018 às 13:56, roland78 <davidroland78 at gmail.com>
escreveu:

> Hi. I need the help for this part of the code to be "union" with the
> flange.The flange to be in the both sides of it.
>
>
> p1= //EGG-SHAPE LEFT SIDE CONCAVE CODE
> ([[20,7.32] ,[18.81,6.93] ,[17.77,6.72] ,[16.72,6.34] ,[15.84,5.83]
> ,[15.01,5.12] ,[14.37,4.33] ,[13.82,3.4] ,[13.45,2.46] ,[13.17,1.42]
> ,[13.02,0.43],[13,0.5] ,[13.94,-0.51] ,[14.78,-1.09] ,[15.57,-1.72]
> ,[16.4,-2.51] ,[17.13,-3.35] ,[17.74,-4.17] ,[18.31,-5.1] ,[18.83,-6.14]
> ,[19.2,-7.1] ,[19.52,-8.13] ,[19.76,-9.24] ,[19.93,-10.44]
> ,[19.99,-11.47],[20,-11.54] ,[21.03,-11.79] ,[21.97,-11.23] ,[22.71,-10.49]
> ,[23.39,-9.59] ,[23.91,-8.7] ,[24.38,-7.77] ,[24.79,-6.83] ,[25.18,-5.78]
> ,[25.5,-4.83] ,[25.78,-3.85],[26,-3.06] ,[26.14,-1.96] ,[26.22,-0.84]
> ,[26.21,0.23] ,[26.12,1.25] ,[25.94,2.3] ,[25.62,3.34] ,[25.16,4.32]
> ,[24.53,5.21] ,[23.7,5.96] ,[22.8,6.47] ,[21.73,6.82] ,[20.69,6.97]]); //
> 49
> DB CODE --30%
>
>
> p4 = // ELLIPSE SHAPE
> ([[21,10] ,[22,9.95] ,
> [22.97,9.61] ,[23.84,9.06] ,[24.58,8.37] ,[25.23,7.57] ,[25.79,6.7] ,
> [26.33,5.66] ,[26.76,4.63] ,[27.16,3.46] ,[27.47,2.42] ,[27.75,1.26],
> [28,0] ,[27.97,-1.15] ,
> [27.87,-2.21] ,[27.68,-3.41] ,[27.4,-4.49] ,[27.06,-5.43] ,[26.58,-6.42] ,
> [25.93,-7.38] ,[25.23,-8.15] ,[24.4,-8.82] ,[23.46,-9.36] ,[22.51,-9.73] ,
> [21.48,-9.96],[21,-10] ,
> [19.98,-9.82] ,[19,-9.45] ,[18.07,-8.89] ,[17.29,-8.24] ,[16.61,-7.5] ,
> [15.95,-6.57] ,[15.43,-5.61] ,
> [15.04,-4.69] ,[14.68,-3.64] ,
> [14.38,-2.46] ,[14.19,-1.43] ,
> [14.03,-0.3],[14,0] ,
> [14.25,1.26] ,[14.53,2.42] ,[14.84,3.46] ,[15.16,4.41] ,[15.58,5.46] ,
> [16.03,6.37] ,[16.58,7.3] ,[17.23,8.17] ,
> [17.98,8.91] ,[18.86,9.52] ,[19.8,9.9] ,
> [20.8,10.02]]); // 51 PIECES OF CODE --32%
> ext = 0;
> /*
> Author: Ezra Reynolds
>             thingiverse at shadowwynd.com
> Function:
> Example. Tree stand, flag stand, wargame banner holder, etc.
> */
> use <tween_loft.scad> // Define all functions (this is the main file
> //with full documentation)
>
> // ------------------------Parameters
> //-------------------------------------//----------
>
> //  ELLIPSE SHAPE
>
> shape4 = p4;
> shape4Size = 2;
> shape4Rotation = 0;
> shape4Extension = ext;
> shape4Centroid = [10,10];
> shape4ExtensionAdjustment =0;
>
> shape1 = p1;
> shape1Size = 2;
> shape1Rotation = 0;
> shape1Extension = ext;
> shape1Centroid = [88,15];
> shape1ExtensionAdjustment =0;
>
>
> wallThickness = 2; // Wall Thickness - higher values add material but
> //will seal gaps
> // Thickness is added to the exterior diameter of tube, no effect on solids
> isHollow = 1; // If 1, create a tube.  If 0, create a solid.
>
> extrusionHeight = 10; //15 Height of the loft
>
> extrusionSlices = 160;
> sliceAdjustment =1; // Ensure the slices intersect by this amount,
> // needed if OpenSCAD is generating more than 2 volumes for an STL file
>
> sliceHeight = extrusionHeight * 9.0 / extrusionSlices; // Calculate
> //the height of each slice
>
> color("pink")
> { tweenLoft() // this is the down shape
>  (revert(shape4), shape4Size, shape4Rotation, shape4Centroid,
> shape4Extension,// ELLIPSE
> shape1, shape1Size, shape1Rotation, shape1Centroid, shape1Extension,
> shape1ExtensionAdjustment, extrusionSlices, sliceHeight, sliceAdjustment,
> wallThickness/2, isHollow);
> }
>
> translate([0,0,extrusionSlices*(sliceHeight)])
> function revert(p) = [for(i=[len(p)-1:-1:0]) p[i]];
>
>   // FLANGE
> module make_ring_of (radius, count)
>       for (a = [0: count - 1])
>         rotate(a * 360 /count)
>            translate ([radius, 0])
>                children ();
>
> module oval()
>    scale([2.5, 1])
>         circle(10);
>
> difference () {
>       cylinder (h=8, r=50); //big flange
>     $fn = 36;           // how fine to be the ellipse AND the holes
>     linear_extrude(height = 17, center = true)
>         offset(r = 0.15)
>             oval();
>
>     make_ring_of (radius = 30, count = 4)// outside small holes and how
> many
>         cylinder (r = 4, h = 17, center = true);// dimension of the outside
> holes
> }
>
> Thank you.
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20181028/e17b034c/attachment.html>


More information about the Discuss mailing list