[OpenSCAD] union flange with ellipse code help

Ronaldo Persiano rcmpersiano at gmail.com
Tue Oct 30 14:39:17 EDT 2018


We can't stll run it without the definition of TweenLoft.

Em 29/10/2018 6:36 da tarde, "roland78" <davidroland78 at gmail.com> escreveu:

Hi . I fixed the syntax errors . here is the working code :

p1=([[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;


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( shape4, shape4Size, shape4Rotation, shape4Centroid,

shape4Extension,// ELLIPSE
shape1, shape1Size, shape1Rotation, shape1Centroid, shape1Extension,
shape1ExtensionAdjustment, extrusionSlices, sliceHeight, sliceAdjustment,
wallThickness/2, isHollow);
}

translate([0,0,extrusionSlices*(sliceHeight)]);

<http://forum.openscad.org/file/t1725/Screenshot_%2812%29.png>

maybe now is better. if any question ,let me know.

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/20181030/dfda7a28/attachment.html>


More information about the Discuss mailing list