04-10-2019, 02:48 PM
Hello Andrej,
Thank you so much for your help so far. I am finding my way around your excellent tool. I am using the following code to highlight objects on the MouseMove event.
It works great until the object is one generated using the MeshBooleanOperations.Union
Before I used Union to join the 2, the individual TubeMesh objects were outlined with their yellow wire frame. Once I used Union to create a single object MeshUtils.GetPolygonPositions(hitBoxModel3D) now returns null. Is this expected? Am I doing something wrong? Can I make it work?
Regards,
Darren
Thank you so much for your help so far. I am finding my way around your excellent tool. I am using the following code to highlight objects on the MouseMove event.
Code:
private void HighlightObject(GeometryModel3D hitBoxModel3D)
{
Point3DCollection polyPositions = MeshUtils.GetPolygonPositions(hitBoxModel3D);
_multiLineVisual3D = new MultiLineVisual3D
{
Positions = polyPositions,
LineColor = Colors.Yellow,
LineThickness = 5
};
wireFrame3D.Children.Add(_multiLineVisual3D);
}It works great until the object is one generated using the MeshBooleanOperations.Union
Code:
var testCore3D = new Ab3d.Meshes.TubeMesh3D(new Point3D(xpos + 26, ypos, zpos), new Vector3D(1, 0, 0), 6, 0, 3, 0, 13, 30);
var conetest1 = testCore3D.Geometry;
testCore3D = new Ab3d.Meshes.TubeMesh3D(new Point3D(xpos + 36, ypos, zpos), new Vector3D(1, 0, 0), 3, 0, 6, 0, 7, 30);
var conetest2 = testCore3D.Geometry;
//Lets try union to make core a single object
var someOtherCore = Ab3d.Utilities.MeshBooleanOperations.Union(conetest1, conetest2);
var modeltest3D = new GeometryModel3D(someOtherCore, material);
modeltest3D.BackMaterial = material;
_model3DGroup.Children.Add(modeltest3D);Regards,
Darren

