discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Fwd: missing parts on review (f5), but correct on render (f6)

RW
Raymond West
Wed, Nov 30, 2022 2:12 PM

Hi Kornelis,

If you want it to look right in f5, then extrude it from 2d in one hit.

(I've commented out your 3d code, below)

///////////////////////////////////////////////////

$fn=64;
polygon_points
=[[-38,-35],[-35,-38],[-21,-38],[-20,-37],[-9,-37],[-9,-35],[-10,-35],[-10,-34],[-1,-34],[-1,-37],[1,-37],[1,-34],[10,-34],[10,-35],[9,-35],[9,-37],[20,-37],[21,-38],[35,-38],[38,-35],[38,-22.5],[-38,-22.5],[-38,-35]];
module
upright_side(){linear_extrude(56)polygon(polygon_points,convexity=20);
}
/*
difference(){union(){
upright_side();
rotate([0,0,180])upright_side();
rotate([0,0,90])upright_side();
rotate([0,0,270])upright_side();
}
translate([0,0,-10])cylinder(h=80,d=60);
}
*/
module shape(){
   polygon(polygon_points,convexity=20);
}

module base(){  // make solid profile
difference(){
  union(){
    shape();
    rotate([0,0,180])shape();
    rotate([0,0,90])shape();
    rotate([0,0,270])shape();
    square(53,true); // fill in centre
         }
    circle(d=65);
            }
}

linear_extrude(56)
base();

/////////////////////////////////////////////////////

imported stls, often are not watertight and other problems. openscad is
fussy about that, some slicers, etc., are not.

hth

On 30/11/2022 12:43, kornelis bijker wrote:

Hi there,
I have constructed a polygon, which I extrude and then a build an
object from it by rotation. I then difference a cylinder to construct
a pneumatic cylinder body.
Upon f5, it leaves out weird surfaces all over the place, but on f6 it
is a solid.
I tried convexity, but it seems to do nothing, or maybe I used it in
the wrong place(s).

Anybody, can this be resolved since it is a pain in the neck when you
are constructing visually to see if things will fit, but you have to
render every time? Can take very long with large part counts.
my code:
$fn=64;
polygon_points
=[[-38,-35],[-35,-38],[-21,-38],[-20,-37],[-9,-37],[-9,-35],[-10,-35],[-10,-34],[-1,-34],[-1,-37],[1,-37],[1,-34],[10,-34],[10,-35],[9,-35],[9,-37],[20,-37],[21,-38],[35,-38],[38,-35],[38,-22.5],[-38,-22.5],[-38,-35]];
module
upright_side(){linear_extrude(56)polygon(polygon_points,convexity=20);
}
difference(){union(){
upright_side();
rotate([0,0,180])upright_side();
rotate([0,0,90])upright_side();
rotate([0,0,270])upright_side();
}
translate([0,0,-0.5])cylinder(h=57,d=65);
}

I would like some of the longer standing members to have a look, and
explain to me how to improve on this. I also noticed this with certain
imported stl files. Convexity can sort most of them but sometimes
after a difference the whole import stl disappears, also annoying and
I have some feeling it has to do with the same issue.

Kind regards and thanks,
Kees "3dcase" Bijker


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

Hi Kornelis, If you want it to look right in f5, then extrude it from 2d in one hit. (I've commented out your 3d code, below) /////////////////////////////////////////////////// $fn=64; polygon_points =[[-38,-35],[-35,-38],[-21,-38],[-20,-37],[-9,-37],[-9,-35],[-10,-35],[-10,-34],[-1,-34],[-1,-37],[1,-37],[1,-34],[10,-34],[10,-35],[9,-35],[9,-37],[20,-37],[21,-38],[35,-38],[38,-35],[38,-22.5],[-38,-22.5],[-38,-35]]; module upright_side(){linear_extrude(56)polygon(polygon_points,convexity=20); } /* difference(){union(){ upright_side(); rotate([0,0,180])upright_side(); rotate([0,0,90])upright_side(); rotate([0,0,270])upright_side(); } translate([0,0,-10])cylinder(h=80,d=60); } */ module shape(){    polygon(polygon_points,convexity=20); } module base(){  // make solid profile difference(){   union(){     shape();     rotate([0,0,180])shape();     rotate([0,0,90])shape();     rotate([0,0,270])shape();     square(53,true); // fill in centre          }     circle(d=65);             } } linear_extrude(56) base(); ///////////////////////////////////////////////////// imported stls, often are not watertight and other problems. openscad is fussy about that, some slicers, etc., are not. hth On 30/11/2022 12:43, kornelis bijker wrote: > Hi there, > I have constructed a polygon, which I extrude and then a build an > object from it by rotation. I then difference a cylinder to construct > a pneumatic cylinder body. > Upon f5, it leaves out weird surfaces all over the place, but on f6 it > is a solid. > I tried convexity, but it seems to do nothing, or maybe I used it in > the wrong place(s). > > Anybody, can this be resolved since it is a pain in the neck when you > are constructing visually to see if things will fit, but you have to > render every time? Can take very long with large part counts. > my code: > $fn=64; > polygon_points > =[[-38,-35],[-35,-38],[-21,-38],[-20,-37],[-9,-37],[-9,-35],[-10,-35],[-10,-34],[-1,-34],[-1,-37],[1,-37],[1,-34],[10,-34],[10,-35],[9,-35],[9,-37],[20,-37],[21,-38],[35,-38],[38,-35],[38,-22.5],[-38,-22.5],[-38,-35]]; > module > upright_side(){linear_extrude(56)polygon(polygon_points,convexity=20); > } > difference(){union(){ > upright_side(); > rotate([0,0,180])upright_side(); > rotate([0,0,90])upright_side(); > rotate([0,0,270])upright_side(); > } > translate([0,0,-0.5])cylinder(h=57,d=65); > } > > I would like some of the longer standing members to have a look, and > explain to me how to improve on this. I also noticed this with certain > imported stl files. Convexity can sort most of them but sometimes > after a difference the whole import stl disappears, also annoying and > I have some feeling it has to do with the same issue. > > Kind regards and thanks, > Kees "3dcase" Bijker > > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org