![]()  | 
| 
 GetPolygonPositions of an object created using MeshBooleanOperations.Union - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9) +--- Thread: GetPolygonPositions of an object created using MeshBooleanOperations.Union (/showthread.php?tid=4130)  | 
GetPolygonPositions of an object created using MeshBooleanOperations.Union - dub71ca - 04-10-2019 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. Code:        private void HighlightObject(GeometryModel3D hitBoxModel3D)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);Regards, Darren RE: GetPolygonPositions of an object created using MeshBooleanOperations.Union - abenedik - 04-10-2019 Using MeshUtils.GetPolygonPositions works only on models that have PolygonIndices property set. This is a custom property that is defined by the Ab3d.PowerToys library and defines the polygons that can also define the 3D model (all 3D models in WPF are defined by triangles that are needed for the graphics card - triangles are set by TriangleIndices; but some objects can be also created from polygons - for example box - and polygons better show the object when itis shown by the lines). Most of the 3D objects that are created by Ab3d.PowerToys library define the PolygonIndices. Also ReaderObj and Assimp importer set the PolygonIndices. See more in the online help (or in the Ab3d.PowerToys help file): https://www.ab4d.com/help/PowerToys/html/M_Ab3d_Utilities_MeshUtils_GetPolygonPositions.htm https://www.ab4d.com/help/PowerToys/html/F_Ab3d_Utilities_MeshUtils_PolygonIndicesProperty.htm But boolean objects do not have that, so you will need to get the triangles. To get triangles use the following code: Code: // Get local accessors to prevent calling DependecyProperty getters in a loop |