You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Main {
public static void main(String[] args) throws IOException {
CSG cube = STL.file(Paths.get("cube.stl"));
CSG union = cube;
for (int x = 0; x < 100; x++) {
union = union.union(cube.transformed(Transform.unity().translateX(x * 10)));
}
try {
FileUtil.write(Paths.get("sample.stl"), union.toStlString());
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
But after 26 unions i get this error:
Exception in thread "main" java.lang.StackOverflowError
at java.util.stream.AbstractPipeline.wrapSink(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.collect(Unknown Source)
at eu.mihosoft.jcsg.Node.build(Node.java:244)
at eu.mihosoft.jcsg.Node.build(Node.java:265)
I'm trying to combine multiple objects to one but unluckily i get this error :/
The text was updated successfully, but these errors were encountered:
I've written this code:
But after 26 unions i get this error:
I'm trying to combine multiple objects to one but unluckily i get this error :/
The text was updated successfully, but these errors were encountered: