File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,14 @@ public static void Add<T> (T geometry)
4848 case BoundingBoxXYZ boundingBox :
4949 BoundingBoxVisualizationServer . AddGeometry ( boundingBox ) ;
5050 break ;
51+ case Outline outline :
52+ var bbox = new BoundingBoxXYZ
53+ {
54+ Min = outline . MinimumPoint ,
55+ Max = outline . MaximumPoint
56+ } ;
57+ BoundingBoxVisualizationServer . AddGeometry ( bbox ) ;
58+ break ;
5159 case Mesh mesh :
5260 MeshVisualizationServer . AddGeometry ( mesh ) ;
5361 break ;
@@ -80,6 +88,7 @@ public static void Add<T> (IEnumerable<T> geometries)
8088 return geometry switch
8189 {
8290 BoundingBoxXYZ => typeof ( BoundingBoxXYZ ) ,
91+ Outline => typeof ( Outline ) ,
8392 Mesh => typeof ( Mesh ) ,
8493 Solid => typeof ( Solid ) ,
8594 XYZ => typeof ( XYZ ) ,
@@ -101,6 +110,13 @@ public static void Add<T> (IEnumerable<T> geometries)
101110 case not null when geometryType == typeof ( BoundingBoxXYZ ) :
102111 BoundingBoxVisualizationServer . AddGeometries ( group . Cast < BoundingBoxXYZ > ( ) ) ;
103112 break ;
113+ case not null when geometryType == typeof ( Outline ) :
114+ BoundingBoxVisualizationServer . AddGeometries ( group . Cast < Outline > ( ) . Select ( outline =>
115+ new BoundingBoxXYZ {
116+ Min = outline . MinimumPoint ,
117+ Max = outline . MaximumPoint
118+ } ) ) ;
119+ break ;
104120 case not null when geometryType == typeof ( Mesh ) :
105121 MeshVisualizationServer . AddGeometries ( group . Cast < Mesh > ( ) ) ;
106122 break ;
You can’t perform that action at this time.
0 commit comments