Folks, I have fixed all the problems that Marius & the others pointed out. Still no joy. I have greatly simplified the code down to the snippet you see below. My writing style is still as obscure as William pointed out but there ya go. This time, I entirely cover the point about which the rotate_extrude revolves. This was Marius's concern. And it appears to have been right as I no longer find the bug he mentioned. But I find another much later on in the process. Indeed, it is in the Gcode file generated by the stl & so may not be an OpenSCAD problem at all. But I suspect it is. Let me give you my reasoning. The object being rotated now starts out as just an offset rectangle which entirely covers the point of origin. Rotate into 3D & it looks like the 5 sided object that is intended. Then convert to stl & I leave OpenSCAD in favor of skeinforge. Then I use a skeinforge model in which fill is turned off. Such a model should produce a single bead of plastic around the object with no top or bottom. This is what was intended. And this is what has happened in the past. But not this time. This time the desired object contains a shadow object entirely within it. It has the same 5 fold symmetry as the correct object with straight walls & 180 out of phase. My best guess is that it is the rear end of the original rectangle I used to cover the point of Marius's concern. It would not show up on inspection in OpenSCAD as it is entirely in the interior of the correct object. It is conceivable that it is a skeinforge problem but I don't see how. After all, were it not in the stl, skeinforge would have no information available to create it in the first place. I, therefore, conclude that OpenSCAD included some sort of information in the stl output about what can only be described as a false interior boundary or surface. And skeinforge used that information (together with my no fill settings) to manufacture another shadow object within the intended object. Once again, I am at something of a loss as to how to proceed. I hope the collective wisdom out there has some idea of how to solve this problem. Please let me know. BTW, I told a friend of mine that if this 4year old only knew how much time & how many clever people were involved in the effort to teach him how to multiply... Thanks again all, Dan module unitCircle() circle(1,$fn=400); module unitSquare() square([1,1],center=true); scale([25,25,25*sqrt(2)]) rotate_extrude(convexity=1,$fn=5) translate([1/2,0,0]) scale([2,sqrt(2),1]) unitSquare(); 
On Wed, Nov 2, 2011 at 10:21 PM, Dan Zuras 3D <[hidden email]> wrote:
> I, therefore, conclude that OpenSCAD included some sort > of information in the stl output about what can only be > described as a false interior boundary or surface. And > skeinforge used that information (together with my no > fill settings) to manufacture another shadow object > within the intended object. that's exactly what I'd expect it to do if you rotate a selfoverlapping shape. CGAL (from what I can tell) does not check shapes for selfoverlapping. it only checks the various meshes against each other when doing boolean ops. SO, in order to get the behaviour you want, you may need to booleanop a bunch of 3D meshes together, or describe your shape as a single polygon and extrude it. 
> Date: Wed, 2 Nov 2011 22:32:00 +1100
> Subject: Re: [OpenSCAD] Still lost on my journey... > From: Triffid Hunter <[hidden email]> > To: Dan Zuras 3D <[hidden email]>, [hidden email] > > On Wed, Nov 2, 2011 at 10:21 PM, Dan Zuras 3D <[hidden email]> wro= > te: > > I, therefore, conclude that OpenSCAD included some sort > > of information in the stl output about what can only be > > described as a false interior boundary or surface. And > > skeinforge used that information (together with my no > > fill settings) to manufacture another shadow object > > within the intended object. > > that's exactly what I'd expect it to do if you rotate a selfoverlapping > shape. That is indeed what is happening. Although why that should be the expected behavior is quite beyond me. > > CGAL (from what I can tell) does not check shapes for > selfoverlapping. it only checks the various meshes against each other > when doing boolean ops. SO, in order to get the behaviour you want, > you may need to booleanop a bunch of 3D meshes together, or describe > your shape as a single polygon and extrude it. The actual shape (having parts of circles) is not polygonal. And I would have thought that self overlapping was a flavor of the OR or union operation. But let's pass on that for now. Alas, Marius has prevented me from extruding NONoverlapping shapes on the grounds that there is an OpenSCAD bug involving shapes that end at the rotation axis. So Marius tells me I cannot use shapes that extend only to the rotation axis. And you tell me that I cannot use shapes that extend beyond it. Coming up short is out as that would result in a REAL boundary there. And shapes symmetric about the rotation axis are out due to the need to have an odd number of facets. It seems to me that you are all telling me that I cannot use rotate_extrude at all. Is that the correct conclusion? Very well. If I must assemble, say, 5 sections to make the complete 5 fold object, so be it. But color me unsurprised if it turns out that ORing those objects together results in another complaint about touching objects. Is there no other way? Can it really be that no one has been here before? It seems unlikely to me. Any other observations/suggestions from anyone? Thanks, Dan 
On Thu, Nov 3, 2011 at 12:39 AM, Dan Zuras 3D <[hidden email]> wrote:
> Is there no other way? can you leave the hole in the center of your 2D shape, then extrude to 3D, then union with a cylinder or something to fill the middle hole? 
> Date: Thu, 3 Nov 2011 01:26:45 +1100
> Subject: Re: [OpenSCAD] Still lost on my journey... > From: Triffid Hunter <[hidden email]> > To: Dan Zuras 3D <[hidden email]> > Cc: [hidden email] > > On Thu, Nov 3, 2011 at 12:39 AM, Dan Zuras 3D <[hidden email]> wro= > te: > > Is there no other way? > > can you leave the hole in the center of your 2D shape, then extrude to > 3D, then union with a cylinder or something to fill the middle hole? I could. However, given that the failure mode is the introduction of interior boundaries where none actually exist, what reason would I have to believe that this procedure would not add yet another shadow object into the mix?  Dan 
On Thu, Nov 3, 2011 at 1:46 AM, Dan Zuras 3D <[hidden email]> wrote:
> I could. However, given that the failure mode is the > introduction of interior boundaries where none actually > exist, what reason would I have to believe that this > procedure would not add yet another shadow object into > the mix?  Dan in my experience CGAL is at least relatively competent at boolean ops between two meshes, it just fails in the exact way we're discussing if a single mesh has internal faces or selfintersects, so if you can stop your mesh from selfintersecting, then unioning with a cylinder (or any other mesh) should block the hole without creating any internal faces. let me know how you go! 
In reply to this post by Dan Zuras 3D
Hey Dan,
You can work around the problem by intersectionmasking the two parts of the 2D shape at the yaxis and unioning the rotate_extruded parts. Here's how I'd tackle it with an "operator" module: snip module unitCircle() circle(1,$fn=400); module unitSquare() square([1,1],center=true); module rotate_extrude_masked(mask_window_l=4,convexity=1,fn=5) { union() for(i=[0:$children1]) { rotate_extrude(convexity=convexity,$fn=fn) render() intersection() { child(i); translate([0,mask_window_l/2]) square([mask_window_l,mask_window_l],center=false); } rotate_extrude(convexity=convexity,$fn=fn) render() intersection() { child(i); mirror([0,1]) translate([0,mask_window_l/2]) square([mask_window_l,mask_window_l],center=false); } } } translate([0,0,25]) scale([25,25,25*sqrt(2)]) rotate_extrude_masked(mask_window_l=4,convexity=1,fn=5) translate([1/2,0]) scale([2,sqrt(2)]) unitSquare(); endsnip Just set the "mask_window_l" variable to be "sufficiently large" to enclose all your preextruded 2D shapes. Aside: Out of habit, I limit my 2D operations (like translate(), scale(), rotate(), etc) to 2D so I can keep track of when I'm in 2D vs 3D operation space. Andrew. On 20111102, at 9:39 AM, Dan Zuras 3D wrote: >> Date: Wed, 2 Nov 2011 22:32:00 +1100 >> Subject: Re: [OpenSCAD] Still lost on my journey... >> From: Triffid Hunter <[hidden email]> >> To: Dan Zuras 3D <[hidden email]>, [hidden email] >> >> On Wed, Nov 2, 2011 at 10:21 PM, Dan Zuras 3D <[hidden email]> wro= >> te: >>> I, therefore, conclude that OpenSCAD included some sort >>> of information in the stl output about what can only be >>> described as a false interior boundary or surface. And >>> skeinforge used that information (together with my no >>> fill settings) to manufacture another shadow object >>> within the intended object. >> >> that's exactly what I'd expect it to do if you rotate a selfoverlapping >> shape. > > That is indeed what is happening. > Although why that should be the expected behavior is quite > beyond me. > >> >> CGAL (from what I can tell) does not check shapes for >> selfoverlapping. it only checks the various meshes against each other >> when doing boolean ops. SO, in order to get the behaviour you want, >> you may need to booleanop a bunch of 3D meshes together, or describe >> your shape as a single polygon and extrude it. > > The actual shape (having parts of circles) is not polygonal. > And I would have thought that self overlapping was a flavor > of the OR or union operation. But let's pass on that for now. > > Alas, Marius has prevented me from extruding NONoverlapping > shapes on the grounds that there is an OpenSCAD bug involving > shapes that end at the rotation axis. > > So Marius tells me I cannot use shapes that extend only to > the rotation axis. And you tell me that I cannot use shapes > that extend beyond it. Coming up short is out as that would > result in a REAL boundary there. And shapes symmetric about > the rotation axis are out due to the need to have an odd > number of facets. > > It seems to me that you are all telling me that I cannot use > rotate_extrude at all. Is that the correct conclusion? > > Very well. If I must assemble, say, 5 sections to make the > complete 5 fold object, so be it. But color me unsurprised > if it turns out that ORing those objects together results > in another complaint about touching objects. > > Is there no other way? > > Can it really be that no one has been here before? > > It seems unlikely to me. > > Any other observations/suggestions from anyone? > > Thanks, > > Dan > _______________________________________________ > OpenSCAD mailing list > [hidden email] > http://rocklinux.net/mailman/listinfo/openscad  "The future is already here. It's just not very evenly distributed"  William Gibson Me: http://clothbot.com/wiki/ 
Administrator

In reply to this post by Dan Zuras 3D
On Nov 2, 2011, at 14:39 PM, Dan Zuras 3D wrote:
> Very well. If I must assemble, say, 5 sections to make the > complete 5 fold object, so be it. But color me unsurprised > if it turns out that ORing those objects together results > in another complaint about touching objects. > > Is there no other way? > Can it really be that no one has been here before? > Just to clarify why it is like this: The rotate_extrude() function is merely a piece of code which manually stitches together the polygons to create a revolution volume. It doesn't try to do any smart analysis of the object, nor does it try to do any CSG operations. It surprises me that CGAL doesn't complain though. It could be possible to implement this function using some smart CGAL tricks (e.g. glide a 2D object over a 3D curve). I believe Giles has been playing around with something similar in RapCad. This is something to look into for future improvements. Marius 
> It surprises me that CGAL doesn't complain though.
If it created an inner void inside the solid then isn't it still a legal solid? E.g. you can create a hollow box by subtracting a small cube from a bigger one. That is a perfectly legal manifold shape. SF would slice it correctly but if you turned off infill you would have the inner walls floating in space.
On 2 November 2011 15:01, Marius Kintel <[hidden email]> wrote:

Free forum by Nabble  Edit this page 