KeithSloan / OpenSCAD_Alt_Import

Inprocess : Installable version of FreeCAD OpenSCAD workbench
Other
10 stars 6 forks source link

Hull of multmatrix #2

Open KeithSloan opened 3 years ago

KeithSloan commented 3 years ago

The following file fails

hull() {
    multmatrix([[0, 0, 1, 0], [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
        multmatrix([[1, 0, 0, -75], [0, 1, 0, 26.5], [0, 0, 1, -31], [0, 0, 0, 1]]) {
            group() {
                multmatrix([[1, 0, 0, -23], [0, 1, 0, -3.5], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                    cube(size = [46, 7, 1], center = false);
                }
            }
        }
        multmatrix([[1, 0, 0, -60], [0, 1, 0, 21.5], [0, 0, 1, 993], [0, 0, 0, 1]]) {
            group() {
                multmatrix([[1, 0, 0, -18], [0, 1, 0, -3.5], [0, 0, 1, 0], [0, 0, 0, 1]]) {
                    cube(size = [36, 7, 1], center = false);
                }
            }
        }
    }
}

The problem is that the multmatrix performs a fuse if it contains more than one object, the result in the above example is that hull request only finds one object on the stack.

Look at changing multmatrix which find more than one object not to fuse before application but to apply the multmatrix to each item