05-21-2025, 12:44 PM
It is highly recommended to use as few boolean operations as possible. This would work much faster and produce results with fewer triangles.
You can combine multiple transformations by using WPF's Transform3DGroup object, for example:
Then you can pass the transform3DGroup to the MeshUtils.TransformMeshGeometry3D.
Note that the order of transformation is important. First, you need to add scale, then rotate and then translate. Scale and Rotation happen from (0, 0, 0). So if your mesh is centered at (0, 0, 0), then scale and rotate will also around object's center. But if you first translate the model, then the scale and rotation would have a different effect (still rotating around (0,0,0) but this is not the center of the mesh anymore).
You can combine multiple transformations by using WPF's Transform3DGroup object, for example:
Code:
var transform3DGroup = new Transform3DGroup();
transform3DGroup.Children.Add(new ScaleTransform3D(6, 1, 1));
transform3DGroup.Children.Add(new TranslateTransform3D(-3, 0, 3));Then you can pass the transform3DGroup to the MeshUtils.TransformMeshGeometry3D.
Note that the order of transformation is important. First, you need to add scale, then rotate and then translate. Scale and Rotation happen from (0, 0, 0). So if your mesh is centered at (0, 0, 0), then scale and rotate will also around object's center. But if you first translate the model, then the scale and rotation would have a different effect (still rotating around (0,0,0) but this is not the center of the mesh anymore).
Andrej Benedik

