From d430e23822d8d7216c00b9251e0187aaaff4e44d Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sat, 7 Dec 2024 13:00:26 -0500 Subject: [PATCH 1/7] add getter for regenerate method --- src/main/java/eu/mihosoft/vrl/v3d/CSG.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java index 51581c72..00df0c21 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java @@ -2573,6 +2573,9 @@ public CSG setRegenerate(IRegenerate function) { regenerate = function; return this; } + public IRegenerate getRegenerate() { + return regenerate ; + } public CSG regenerate() { this.markForRegeneration = false; From f52b6c326295f966989437a53b6544d765df899b Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sun, 8 Dec 2024 12:38:11 -0500 Subject: [PATCH 2/7] Merge branch 'development' of git@github.com:NeuronRobotics/JCSG.git into development --- src/main/java/eu/mihosoft/vrl/v3d/CSG.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java index 37504bb7..a13f7a16 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java @@ -3154,6 +3154,7 @@ public boolean isHole() { public CSG syncProperties(CSG dying) { getStorage().syncProperties(dying.getStorage()); + regenerate=dying.regenerate; return this; } From 4cdd9aefe82113bfb9e1246da436e5532a018643 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sat, 14 Dec 2024 12:43:34 -0500 Subject: [PATCH 3/7] ArrayList elements need to be copied over in additiona to the other raw objects --- src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java b/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java index 150bdaa5..0432f857 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java @@ -33,12 +33,15 @@ */ package eu.mihosoft.vrl.v3d; +import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Optional; import java.util.Set; +import com.sun.xml.internal.bind.v2.schemagen.xmlschema.List; + import javafx.scene.paint.Color; /** @@ -122,6 +125,11 @@ public void syncProperties(PropertyStorage dying) { HashSet clonedSet = new HashSet(); clonedSet.addAll((HashSet)property); property=clonedSet; + } + if(ArrayList.class.isInstance(property)) { + ArrayList clonedSet = new ArrayList(); + clonedSet.addAll((ArrayList)property); + property=clonedSet; } set(o,property); } From a76d5c496c689f4e9180903da50cb215e9350da9 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sat, 14 Dec 2024 12:47:58 -0500 Subject: [PATCH 4/7] remove junk import --- src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java b/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java index 0432f857..004da8dc 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java @@ -40,8 +40,6 @@ import java.util.Optional; import java.util.Set; -import com.sun.xml.internal.bind.v2.schemagen.xmlschema.List; - import javafx.scene.paint.Color; /** From ab1826c812f83e15f6994a52d9564a83fec29e81 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sat, 14 Dec 2024 13:34:27 -0500 Subject: [PATCH 5/7] Checked the development banch with these parameters: https://github.com/NeuronRobotics/JCSG/pull/63 --- src/test/java/eu/mihosoft/vrl/v3d/StlExportTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/eu/mihosoft/vrl/v3d/StlExportTest.java b/src/test/java/eu/mihosoft/vrl/v3d/StlExportTest.java index f536fe15..df9f22be 100644 --- a/src/test/java/eu/mihosoft/vrl/v3d/StlExportTest.java +++ b/src/test/java/eu/mihosoft/vrl/v3d/StlExportTest.java @@ -12,8 +12,8 @@ public class StlExportTest { @Test public void makeBadSTL() throws IOException { - //Plane.setEPSILON(1.0e-11); - //Vector3d.setEXPORTEPSILON(10); + Plane.setEPSILON(1.0e-12); + Vector3d.setEXPORTEPSILON(1.0e-11); CSG.setUseGPU(false); CSG.setPreventNonManifoldTriangles(true); CSG badExport2 = CSG.text(" A QUICK BROWN FOX JUMPS OVER THE LAZY DOG", 10,30,"Serif Regular").movey(30); From a6da0ff3d24e5df9446231675c1d8e8aa9aee058 Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sat, 14 Dec 2024 13:34:50 -0500 Subject: [PATCH 6/7] Copy over lists when syncing lists --- src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java b/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java index 004da8dc..ed0d2740 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/PropertyStorage.java @@ -125,9 +125,10 @@ public void syncProperties(PropertyStorage dying) { property=clonedSet; } if(ArrayList.class.isInstance(property)) { - ArrayList clonedSet = new ArrayList(); - clonedSet.addAll((ArrayList)property); - property=clonedSet; + Object clonedSet = map.get(o); + ArrayList newList = clonedSet==null?new ArrayList():(ArrayList)clonedSet; + newList.addAll((ArrayList)property); + property=newList; } set(o,property); } From cf25ced1910a869162dd686a93736b9f596aff4b Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sun, 15 Dec 2024 09:44:07 -0500 Subject: [PATCH 7/7] setting both the plane and export epsilons --- src/test/java/eu/mihosoft/vrl/v3d/StlExportTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/eu/mihosoft/vrl/v3d/StlExportTest.java b/src/test/java/eu/mihosoft/vrl/v3d/StlExportTest.java index df9f22be..a7f6954b 100644 --- a/src/test/java/eu/mihosoft/vrl/v3d/StlExportTest.java +++ b/src/test/java/eu/mihosoft/vrl/v3d/StlExportTest.java @@ -13,7 +13,7 @@ public class StlExportTest { @Test public void makeBadSTL() throws IOException { Plane.setEPSILON(1.0e-12); - Vector3d.setEXPORTEPSILON(1.0e-11); + Vector3d.setEXPORTEPSILON(1.0e-9); CSG.setUseGPU(false); CSG.setPreventNonManifoldTriangles(true); CSG badExport2 = CSG.text(" A QUICK BROWN FOX JUMPS OVER THE LAZY DOG", 10,30,"Serif Regular").movey(30);