diff --git a/VRL/VRL-UI/InstrumentationMain.groovy b/VRL/VRL-UI/InstrumentationMain.groovy index 07528ba8..2a6811e1 100644 --- a/VRL/VRL-UI/InstrumentationMain.groovy +++ b/VRL/VRL-UI/InstrumentationMain.groovy @@ -1,6 +1,7 @@ package my.testpackage; public class MainCSG { + public static eu.mihosoft.vrl.v3d.jcsg.CSG createSphere(double radius) { eu.mihosoft.vrl.v3d.jcsg.Sphere sphere; sphere = (new eu.mihosoft.vrl.v3d.jcsg.Sphere(radius)); @@ -11,27 +12,26 @@ public class MainCSG { cube = (new eu.mihosoft.vrl.v3d.jcsg.Cube(dimensions)); return cube.toCSG(); } - public static void main(String[] args) { + public static eu.mihosoft.vrl.v3d.jcsg.CSG createDiff(double r1, double r2) { eu.mihosoft.vrl.v3d.jcsg.CSG cube; - cube = (createCube(12)); + cube = (createCube(r1)); eu.mihosoft.vrl.v3d.jcsg.CSG sphere; - sphere = (createSphere(8)); - cube.difference(sphere); + sphere = (createSphere(r2)); + return cube.difference(sphere); + } + public static void main(String[] args) { + eu.mihosoft.vrl.v3d.jcsg.CSG res1; + res1 = (createDiff(13, 10)); + eu.mihosoft.vrl.v3d.jcsg.CSG res2; + res2 = (createDiff(13, 9)); + eu.mihosoft.vrl.v3d.jcsg.CSG res3; + res3 = (createDiff(13, 8)); + res3 = (createDiff(13, 7)); } } // /* - - Script:my.testpackage.MainCSG:main:inv:declare sphere - - 1093.6567990778933 - 120.79194497278216 - 200.0 - 150.0 - true - - Script:my.testpackage.MainCSG:createCube:inv:toCSG @@ -53,50 +53,50 @@ public class MainCSG { - Script:my.testpackage.MainCSG:main:inv:createSphere + Script:my.testpackage.MainCSG:createDiff:inv:op ASSIGN - 876.0799232696 - 360.04577973157296 - 517.5642044242567 - 369.8860082032038 + 778.6583681208228 + 282.9607836665687 + 200.0 + 150.0 true - Script:my.testpackage.MainCSG:main:inv:createCube + Script:my.testpackage.MainCSG:createCube - 310.10698283280624 - 108.09443401600679 - 488.2377051968422 - 278.07491704112647 + 50.056397579767946 + 492.77519139764064 + 793.6768012893114 + 486.0 true - Script:my.testpackage.MainCSG:main:inv:declare cube + Script:my.testpackage.MainCSG:createDiff:inv:declare sphere - 22.503024882923487 - 183.23891690380555 - 200.0 - 150.0 + 1080.516856242133 + 161.68077459428378 + 233.59146118164062 + 151.23339299368985 true - Script:my.testpackage.MainCSG:createCube + Script:my.testpackage.MainCSG:createSphere:inv:op ASSIGN - 65.07958804862845 - 427.67469936591175 - 793.6768012893114 - 486.0 + 733.5939538785191 + 181.91965160399423 + 200.0 + 150.0 true - Script:my.testpackage.MainCSG:createSphere:inv:op ASSIGN + Script:my.testpackage.MainCSG:createDiff:inv:difference - 733.5939538785191 - 181.91965160399423 + 1403.399693446297 + 799.1509080868534 200.0 150.0 true @@ -105,8 +105,8 @@ public class MainCSG { Script:my.testpackage.MainCSG:main:inv:op ASSIGN - 845.4707920298395 - 128.58871361670563 + 566.4963161067597 + 1.6689560767845872 200.0 150.0 true @@ -117,7 +117,7 @@ public class MainCSG { 522.3669779124697 7.735606423317017 - 389.83418456635667 + 432.4515142299233 150.0 true @@ -178,7 +178,7 @@ public class MainCSG { 0.0 0.0 1222.0 - 617.0 + 882.5198863636363 true @@ -192,16 +192,116 @@ public class MainCSG { true + + Script:my.testpackage.MainCSG:main:inv:declare res3 + + 1116.5568802350374 + 467.0322867143526 + 200.0 + 150.0 + true + + + + Script:my.testpackage.MainCSG:createDiff:inv:return + + 1834.454720192043 + 840.6634451049031 + 200.0 + 150.0 + true + + + + Script:my.testpackage.MainCSG:main:inv:declare res1 + + 256.460066901611 + 31.048915458907167 + 200.0 + 150.0 + true + + + + Script:my.testpackage.MainCSG:createDiff:inv:declare cube + + 306.3069870496926 + 62.77689172613738 + 200.0 + 150.0 + true + + + + Script:my.testpackage.MainCSG:main:inv:declare res2 + + 808.4949472405247 + 0.0 + 200.0 + 150.0 + true + + + + Script:my.testpackage.MainCSG:createDiff:inv:op ASSIGN:0 + + 1104.5081167036678 + 779.3899334342689 + 200.0 + 150.0 + true + + + + Script:my.testpackage.MainCSG:main:inv:createDiff:0 + + 551.625462306822 + 205.25132947795328 + 493.15194582875756 + 295.30203604145663 + true + + + + Script:my.testpackage.MainCSG:main:inv:createDiff:1 + + 0.10650187903385527 + 554.5654394940567 + 480.57934824687493 + 283.80791770063945 + true + + Script:my.testpackage.MainCSG:createSphere - 234.59702451258272 - 14.712528411963795 + 224.58156420000907 + 27.231853802680885 623.1296213580301 393.99326567216355 true + + Script:my.testpackage.MainCSG:createDiff:inv:createSphere + + 929.1160893655617 + 536.2494419313799 + 488.2100199662136 + 150.0 + true + + + + Script:my.testpackage.MainCSG:main:inv:createDiff:2 + + 548.3455411798705 + 559.1066960660496 + 497.83413869367007 + 289.32230214917354 + true + + Script:my.testpackage.MainCSG:inv:declare this @@ -212,6 +312,26 @@ public class MainCSG { true + + Script:my.testpackage.MainCSG:createDiff:inv:declare r2 + + 0.0 + 181.57893200268745 + 200.0 + 150.0 + true + + + + Script:my.testpackage.MainCSG:createDiff:inv:declare r1 + + 0.2909204568268864 + 0.0 + 200.0 + 150.0 + true + + Script:my.testpackage.MainCSG:createCube:inv:declare cube @@ -222,11 +342,21 @@ public class MainCSG { true + + Script:my.testpackage.MainCSG:createDiff + + 895.2632897885192 + 528.0275596552435 + 690.5866827119339 + 416.33920129170326 + true + + Script:my.testpackage.MainCSG:main:inv:declare args - 0.0 - 0.0 + 31.88528579575292 + 29.782459382122575 200.0 150.0 true @@ -235,9 +365,9 @@ public class MainCSG { Script:my.testpackage.MainCSG:main:inv:op ASSIGN:0 - 1002.0676377505234 - 808.0393261603588 - 362.3492563296877 + 1118.2005714456734 + 290.1396073605182 + 200.0 150.0 true @@ -248,7 +378,37 @@ public class MainCSG { 0.0 0.0 1197.9276094709583 - 557.5420834576643 + 797.9176169092005 + true + + + + Script:my.testpackage.MainCSG:main:inv:createDiff + + 0.0 + 208.8924407522298 + 480.15421239841635 + 291.66092328613877 + true + + + + Script:my.testpackage.MainCSG:main:inv:op ASSIGN:1 + + 139.9622118382441 + 916.4784169059851 + 200.0 + 150.0 + true + + + + Script:my.testpackage.MainCSG:main:inv:op ASSIGN:2 + + 1583.116561902281 + 1148.8623318074738 + 200.0 + 150.0 true @@ -265,23 +425,23 @@ public class MainCSG { Script:my.testpackage.MainCSG:main - 893.6949088188937 - 47.842725509509165 + 884.7068097898517 + 35.066389916636055 819.9814953017315 463.93939361829143 true - Script:my.testpackage.MainCSG:main:inv:difference + Script:my.testpackage.MainCSG:createDiff:inv:createCube - 1727.3554572117262 - 410.110932722536 - 568.6279256039497 - 403.96433012945477 + 302.2877135424976 + 289.52871155344764 + 383.0 + 150.0 true */ -// +// \ No newline at end of file diff --git a/VRL/VRL-UI/MainWithChainedInvocations.groovy b/VRL/VRL-UI/MainWithChainedInvocations.groovy index 526f0cc2..c38e8bb8 100644 --- a/VRL/VRL-UI/MainWithChainedInvocations.groovy +++ b/VRL/VRL-UI/MainWithChainedInvocations.groovy @@ -5,8 +5,9 @@ public class MainWithChainedInvocations { public my.testpackage.MainWithChainedInvocations m1() { return this; } - public static void main() { + public static void main(String[] args) { my.testpackage.MainWithChainedInvocations m; + m = (new my.testpackage.MainWithChainedInvocations()); m.m1().m1(); } } @@ -26,8 +27,8 @@ public class MainWithChainedInvocations { Script:my.testpackage.MainWithChainedInvocations:main:inv:declare m - 0.0 - 0.0 + 266.8778751141102 + 1.0848694110329684 200.0 150.0 true @@ -43,6 +44,16 @@ public class MainWithChainedInvocations { true + + Script:my.testpackage.MainWithChainedInvocations:main:inv:declare args + + 0.0 + 0.0 + 200.0 + 150.0 + true + + Script:my.testpackage.MainWithChainedInvocations:m1 @@ -53,11 +64,21 @@ public class MainWithChainedInvocations { true + + Script:my.testpackage.MainWithChainedInvocations:main:inv:<init> + + 2.159789134845204 + 215.4099405489691 + 493.0 + 150.0 + true + + Script:my.testpackage.MainWithChainedInvocations:main:inv:m1:0 - 418.17387133220683 - 360.09416698051143 + 667.8955288263747 + 413.66270958709157 200.0 150.0 true @@ -76,8 +97,8 @@ public class MainWithChainedInvocations { Script:my.testpackage.MainWithChainedInvocations:main:inv:m1 - 414.0950138440407 - 169.08879731964996 + 663.8166713382085 + 222.65733992622984 200.0 150.0 true @@ -103,6 +124,16 @@ public class MainWithChainedInvocations { true + + Script:my.testpackage.MainWithChainedInvocations:main:inv:op ASSIGN + + 663.852119072537 + 55.634031193006 + 200.0 + 150.0 + true + + */ // \ No newline at end of file