mirror of https://github.com/vitalif/openscad
hull-of-hull bug: bugxi and test for exposing it
parent
dc8da819da
commit
acace4606b
|
@ -54,16 +54,16 @@ shared_ptr<const Geometry> GeometryEvaluator::evaluateGeometry(const AbstractNod
|
|||
// If not found in any caches, we need to evaluate the geometry
|
||||
if (N) {
|
||||
this->root = N;
|
||||
}
|
||||
else {
|
||||
}
|
||||
else {
|
||||
Traverser trav(*this, node, Traverser::PRE_AND_POSTFIX);
|
||||
trav.execute();
|
||||
}
|
||||
|
||||
if (!allownef) {
|
||||
if (shared_ptr<const CGAL_Nef_polyhedron> N = dynamic_pointer_cast<const CGAL_Nef_polyhedron>(this->root)) {
|
||||
this->root.reset(N->convertToPolyset());
|
||||
smartCache(node, this->root);
|
||||
}
|
||||
if (!allownef) {
|
||||
if (shared_ptr<const CGAL_Nef_polyhedron> N = dynamic_pointer_cast<const CGAL_Nef_polyhedron>(this->root)) {
|
||||
this->root.reset(N->convertToPolyset());
|
||||
smartCache(node, this->root);
|
||||
}
|
||||
}
|
||||
return this->root;
|
||||
|
|
|
@ -3,12 +3,18 @@ hull();
|
|||
// No children
|
||||
hull() { }
|
||||
|
||||
hull() {
|
||||
cylinder(r=10, h=1);
|
||||
translate([0,0,10]) cube([5,5,5], center=true);
|
||||
}
|
||||
// Hull of hull (forces internal cache to be initialized; this has caused a crash earlier)
|
||||
translate([25,0,0]) hull() hull3test();
|
||||
|
||||
translate([25,0,0]) hull() {
|
||||
module hull3test() {
|
||||
hull() {
|
||||
cylinder(r=10, h=1);
|
||||
translate([0,0,10]) cube([5,5,5], center=true);
|
||||
}
|
||||
}
|
||||
hull3test();
|
||||
|
||||
translate([50,0,0]) hull() {
|
||||
translate([0,0,10]) cylinder(r=3);
|
||||
difference() {
|
||||
cylinder(r=10, h=4, center=true);
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,13 +1,27 @@
|
|||
group() {
|
||||
hull();
|
||||
hull();
|
||||
hull() {
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 10, r2 = 10, center = false);
|
||||
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10], [0, 0, 0, 1]]) {
|
||||
cube(size = [5, 5, 5], center = true);
|
||||
multmatrix([[1, 0, 0, 25], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
hull() {
|
||||
group() {
|
||||
hull() {
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 10, r2 = 10, center = false);
|
||||
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10], [0, 0, 0, 1]]) {
|
||||
cube(size = [5, 5, 5], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
multmatrix([[1, 0, 0, 25], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
group() {
|
||||
hull() {
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 10, r2 = 10, center = false);
|
||||
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10], [0, 0, 0, 1]]) {
|
||||
cube(size = [5, 5, 5], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
hull() {
|
||||
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10], [0, 0, 0, 1]]) {
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 3, r2 = 3, center = false);
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue