revarbat / BOSL

The Belfry OpenScad Library - A library of tools, shapes, and helpers to make OpenScad easier to use.
https://github.com/revarbat/BOSL/wiki
BSD 2-Clause "Simplified" License
557 stars 62 forks source link

[BUG] trying to merge half_joiner2 with object cannot render #64

Closed benjamind2330 closed 4 years ago

benjamind2330 commented 4 years ago

Describe the bug You can render in openscad the half_joiner2, i have even exported to stl and printed one. But when attempting to combine it with other things, you cannot render it. You also cannot render the joiner at all.

You get the error:

ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion violation! Expr: e_below != SHalfedge_handle() File: /usr/include/CGAL/Nef_3/SNC_FM_decorator.h Line: 426

Code To Reproduce Bug

include <BOSL/constants.scad>
use <BOSL/transforms.scad>
use <BOSL/joiners.scad>
joiner();

Then use F6 to render.

Expected behavior I expect to be able to render this simple combination of joiner and shape.

Additional context Add any other context about the problem here.

revarbat commented 4 years ago

This can be reproduced with just a half_joiner() and a cube:

include <BOSL/constants.scad>
use <BOSL/transforms.scad>
use <BOSL/joiners.scad>

up(10) half_joiner(h=20);
cube();

As the half joiner is constructed purely from geometry and is NOT assembled using polyhedron(), this is some sort of bug in OpenSCAD itself. I'll see if I can work around it.

revarbat commented 4 years ago

Fixed this by removing calls to render() from joiners.scad. 6f8d489d2cb7c00c42cf236626922ebe73e63ff4

engelchrisi commented 3 years ago

Would you mind fixing this also in BOSL2. A first test looked promising. Thanks