See javadoc of javafx.scene.Node for:
Transform Node.getLocalToSceneTransform()
"An affine transform that holds the computed local-to-scene transform. This is the concatenation of all transforms in this node's parents and in this node, including all of the convenience transforms.""
See javadoc of javafx.scene.transform.Transform for:
Point3D transform(Point3D point)
"Transforms the specified point by this transform."
- Get the 'LocalToSceneTransform' from the TriangleMesh's Shape3D node
- Apply the transform-method to the three Point3Ds of each triangle
- Convert the Point3Ds from JavaFX 3D coordinate system to one of STL by flipping the y- and z-values
- Use the transformed and converted three Point3Ds to calculate the face/triangle normal