Merge pull request #1821 from openscad/issue1803
#1803: Fixed regression - intersections with difference child failed to preview correctly
This commit is contained in:
commit
5cb40a2aee
6 changed files with 14 additions and 0 deletions
|
|
@ -181,6 +181,9 @@ void CSGProducts::import(shared_ptr<CSGNode> csgnode, OpenSCADOperator type, CSG
|
|||
else if (type == OPENSCAD_DIFFERENCE) {
|
||||
this->currentlist = &this->currentproduct->subtractions;
|
||||
}
|
||||
else if (type == OPENSCAD_INTERSECTION) {
|
||||
this->currentlist = &this->currentproduct->intersections;
|
||||
}
|
||||
this->currentlist->push_back(CSGChainObject(leaf, newflags));
|
||||
} else if (shared_ptr<CSGOperation> op = dynamic_pointer_cast<CSGOperation>(csgnode)) {
|
||||
assert(op->left() && op->right());
|
||||
|
|
|
|||
10
testdata/scad/bugs/issue1803.scad
vendored
Normal file
10
testdata/scad/bugs/issue1803.scad
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
$fn=32;
|
||||
|
||||
intersection(){
|
||||
difference(){
|
||||
cube(size=50, center=true);
|
||||
cylinder(d=30,h=80, center=true);
|
||||
}
|
||||
cylinder(d=65,h=80,center=true);
|
||||
rotate([90,0,0]) cylinder(d=65,h=80,center=true);
|
||||
}
|
||||
|
|
@ -1415,6 +1415,7 @@ list(APPEND BUGS_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue13.scad
|
|||
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue1580-import-back-to-back2.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue1580-zero-area-triangle.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue1580-import-zero-area-triangle.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue1803.scad
|
||||
)
|
||||
|
||||
# We know that we cannot import weakly manifold files into CGAL, so to make tests easier
|
||||
|
|
|
|||
BIN
tests/regression/cgalpngtest/issue1803-expected.png
Normal file
BIN
tests/regression/cgalpngtest/issue1803-expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
BIN
tests/regression/monotonepngtest/issue1803-expected.png
Normal file
BIN
tests/regression/monotonepngtest/issue1803-expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
BIN
tests/regression/opencsgtest/issue1803-expected.png
Normal file
BIN
tests/regression/opencsgtest/issue1803-expected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
Loading…
Reference in a new issue