WireFrameVisual from GeometryModel3D created with MeshBooleanOperations
#1
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:

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();
  


Messages In This Thread
WireFrameVisual from GeometryModel3D created with MeshBooleanOperations - by ktoschris - 02-15-2021, 03:18 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)