@@ -4,12 +4,22 @@ import org.apache.commons.io.IOUtils;
4
4
import com.neuronrobotics.bowlerstudio.vitamins.* ;
5
5
import java.nio.file.Paths ;
6
6
import eu.mihosoft.vrl.v3d.FileUtil ;
7
- import javafx.scene.transform.* ;
7
+ import eu.mihosoft.vrl.v3d.Transform ;
8
+ import javafx.scene.transform.Affine ;
9
+ import com.neuronrobotics.bowlerstudio.physics.TransformFactory ;
8
10
println " Loading STL file"
9
11
// Load an STL file from a git repo
10
12
// Loading a local file also works here
11
13
12
14
return new ICadGenerator (){
15
+
16
+ private CSG moveDHValues (CSG incoming ,DHLink dh ){
17
+ TransformNR step = new TransformNR (dh.DhStep (0 )). inverse()
18
+ Transform move = TransformFactory . nrToCSG(step)
19
+ return incoming. transformed(move)
20
+
21
+ }
22
+
13
23
@Override
14
24
public ArrayList<CSG> generateCad (DHParameterKinematics d , int linkIndex ) {
15
25
File legFile = null
@@ -44,7 +54,7 @@ return new ICadGenerator(){
44
54
45
55
ArrayList<CSG> allCad= new ArrayList<> ();
46
56
// Load the .CSG from the disk and cache it in memory
47
- CSG body = Vitamins . get(legFile)
57
+ CSG body = moveDHValues( Vitamins . get(legFile),dh )
48
58
49
59
body. setManipulator(manipulator);
50
60
body. setColor(javafx.scene.paint.Color . WHITE )
@@ -61,7 +71,7 @@ return new ICadGenerator(){
61
71
62
72
File mainBodyFile = ScriptingEngine . fileFromGit(
63
73
" https://github.com/keionbis/SmallKat.git" ,
64
- " STLs/Body .STL" );
74
+ " STLs/BodyV2 .STL" );
65
75
66
76
// Load the .CSG from the disk and cache it in memory
67
77
CSG body = Vitamins . get(mainBodyFile)
0 commit comments