<commit_before>
use <../../../../shapes/open-cylinder/open-cylinder.scad>

use <../../lamp-shade.scad>

module legLampShade(squareLength, 
                    outerRadius,
                    xScale,
                    yScale)
{
    bottomHeight = 5;

    union(outerRadius)
    {
        translate([0, 0, bottomHeight])
        legLamp_shade_top(squareLength = squareLength, 
                          outerRadius = outerRadius,
                          xScale = xScale,
                          yScale = yScale);

        color("purple")
        legLamp_shade_bottom(height = bottomHeight, outerRadius = outerRadius * 2);
    }
}

module legLamp_shade_bottom(height, outerRadius)
{
    innerRadius = outerRadius - 1;

    openCylinder(height = height,
                 innerRadius = innerRadius,
                 outerRadius = outerRadius);
}

module legLamp_shade_top(squareLength, outerRadius, xScale, yScale)
{
    zTranslate = outerRadius * 0.7;   // 2.0 ;// + ( 10 / 2.0 );

    translate([0, 0, zTranslate])
    lampShade(outerRadius = outerRadius,
            squareLength = squareLength,
            xScale = 0.3,
            yScale = 0.7);
}
<commit_msg>parameterize the x and y scale<commit_after>
use <../../../../shapes/open-cylinder/open-cylinder.scad>

use <../../lamp-shade.scad>

module legLampShade(squareLength, 
                    outerRadius,
                    xScale,
                    yScale)
{
    bottomHeight = 5;

    union(outerRadius)
    {
        translate([0, 0, bottomHeight])
        legLamp_shade_top(squareLength = squareLength, 
                          outerRadius = outerRadius,
                          xScale = xScale,
                          yScale = yScale);

        color("purple")
        legLamp_shade_bottom(height = bottomHeight, outerRadius = outerRadius * 2);
    }
}

module legLamp_shade_bottom(height, outerRadius)
{
    innerRadius = outerRadius - 1;

    openCylinder(height = height,
                 innerRadius = innerRadius,
                 outerRadius = outerRadius);
}

module legLamp_shade_top(squareLength, outerRadius, xScale, yScale)
{
    zTranslate = outerRadius * yScale;

    translate([0, 0, zTranslate])
    lampShade(outerRadius = outerRadius,
            squareLength = squareLength,
            xScale = xScale,
            yScale = yScale);
}

{'fraction_non_alphanumeric': 0.10415773681954565, 'fraction_numerical': 0.011144449207029576, 'mean_word_length': 1.8222490931076178, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1095436', 'n_tokens_mistral': 718, 'n_tokens_neox': 684, 'n_words': 130}