02-15-2021, 03:18 PM
Hi.
Is it possible to create a Wireframe using a GeometryModel3D created with meshes joined or substracted with the MeshBooleanOperations?
I am able to create a Wireframe using a pre defined by the library GeometryModel3D for example: Boxes, Cones etc..
But I fail with this code below which seems at first glance to be correct:
Is it possible to create a Wireframe using a GeometryModel3D created with meshes joined or substracted with the MeshBooleanOperations?
I am able to create a Wireframe using a pre defined by the library GeometryModel3D for example: Boxes, Cones etc..
But I fail with this code below which seems at first glance to be correct:
Code:
var boxMesh = new Ab3d.Meshes.BoxMesh3D(new Point3D(0, 0, 0), new Size3D(50, 50, 50), 1, 1, 1).Geometry;
var boxMesh2 = new Ab3d.Meshes.BoxMesh3D(new Point3D(0, 15, 0), new Size3D(25, 25, 25), 1, 1, 1).Geometry;
var joinedBoxesMesh = Ab3d.Utilities.MeshBooleanOperations.Union(boxMesh, boxMesh2);
var brush = new SolidColorBrush() { Opacity = 0.4, Color = Colors.SlateBlue };
var material = new DiffuseMaterial(brush);
var geometryModel = new GeometryModel3D(joinedBoxesMesh, material)
Ab3d.Utilities.MeshUtils.CreatePolygonIndicesByDefault = true;
WireframeVisual1.ShowPolygonLines = true;
WireframeVisual1.OriginalModel = geometryModel ;
WireframeVisual1.RecreateWireframeModel();
