[OpenSCAD] avoiding assertion violation

nop head nop.head at gmail.com
Wed Jul 17 08:43:01 EDT 2019


This isn't about crossing the Y axis, it is about touching it at a single
point.

On Wed, 17 Jul 2019 at 13:16, Parkinbot <rudolf at digitaldocument.de> wrote:

> Ronaldo wrote
> >  In some sense this is a bug of rotate_extrude(). OpenScad complains when
> > some edge of the polygon crosses the Y Axis because that would generate a
> > self-intersection 3D object. The current case is a limit case of the
> > forbiden crossing and OpenScad should issue an error as well.
>
> It would be a progress to have a procrusting rotate_extrude() which
> performs
> an (internal) intersection with the positive y-half of the XY plane on its
> operands. This would eliminate at least some of the strange
> rotate_extrude()
> issues.
> Another (natural) semantics would be to cut the operand into two halfs,
> rotate them separately, and union the results.
>
> Here an implementation which I meanwhile use in my shortcuts.scad library:
>
> Re() polygon([ [0,2], [-10,1.3],[2.5,0],[3,3], [2,4]]);
> // Re2() polygon([ [0,2], [-10,1.3],[2.5,0],[3,3], [2,4]]);
> cube();
>
>
> module Re(angle = 360) // procrust operand to half XY-plane
> {
>   rotate_extrude(angle = angle)
>   intersection()
>   {
>     translate([0, -1e5])square([1e5, 2e5]);
>     children();
>   }
> }
>
> module Re2(angle = 360)  // allow for all operands
> {
>   rotate_extrude(angle = angle)
>   intersection()
>   {
>     translate([1e10, 0])square([2e10, 1e10], center = true);
>     children();
>   }
>   rotate_extrude(angle = angle)
>   intersection()
>   {
>     translate([-1e10, 0])square([2e10, 1e10], center = true);
>     children();
>   }
> }
>
>
>
> --
> 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/20190717/e90cc8f0/attachment.html>


More information about the Discuss mailing list