// first multipatch IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass(); IPointCollection triangleFanPointCollection = new TriangleFanClass(); triangleFanPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(596350, 4115350, 500), ref _missing, ref _missing); triangleFanPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(596500, 4115500, 200), ref _missing, ref _missing); triangleFanPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(596500, 4115200, 200), ref _missing, ref _missing); triangleFanPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(596200, 4115200, 200), ref _missing, ref _missing); triangleFanPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(596200, 4115500, 200), ref _missing, ref _missing); triangleFanPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(596500, 4115500, 200), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(triangleFanPointCollection as IGeometry, ref _missing, ref _missing); // second multipatch IGeometryCollection multiPatchGeometryCollectionSmall = new MultiPatchClass(); IPointCollection triangleFanPointCollectionSmall = new TriangleFanClass(); triangleFanPointCollectionSmall.AddPoint(GeometryUtilities.ConstructPoint3D(596350, 4115350, 300), ref _missing, ref _missing); triangleFanPointCollectionSmall.AddPoint(GeometryUtilities.ConstructPoint3D(596500, 4115500, 200), ref _missing, ref _missing); triangleFanPointCollectionSmall.AddPoint(GeometryUtilities.ConstructPoint3D(596500, 4115200, 200), ref _missing, ref _missing); triangleFanPointCollectionSmall.AddPoint(GeometryUtilities.ConstructPoint3D(596200, 4115200, 200), ref _missing, ref _missing); triangleFanPointCollectionSmall.AddPoint(GeometryUtilities.ConstructPoint3D(596200, 4115500, 200), ref _missing, ref _missing); triangleFanPointCollectionSmall.AddPoint(GeometryUtilities.ConstructPoint3D(596500, 4115500, 200), ref _missing, ref _missing); multiPatchGeometryCollectionSmall.AddGeometry(triangleFanPointCollectionSmall as IGeometry, ref _missing, ref _missing); // cast en multipatch IMultiPatch multipatch = multiPatchGeometryCollection as IMultiPatch; IMultiPatch multipatchSmall = multiPatchGeometryCollectionSmall as IMultiPatch;
IGeometryCollection multiPatchGeometryCollectionCube = new MultiPatchClass(); IPointCollection triangleStripPointCollection = new TriangleStripClass(); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(0.5, 0.5, 0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-0.5, 0.5, 0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(0.5, -0.5, 0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-0.5, -0.5, 0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-0.5, -0.5, -0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-0.5, 0.5, 0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-0.5, 0.5, -0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(0.5, 0.5, 0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(0.5, 0.5, -0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(0.5, -0.5, 0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(0.5, -0.5, -0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-0.5, -0.5, -0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(0.5, 0.5, -0.5), ref _missing, ref _missing); triangleStripPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-0.5, 0.5, -0.5), ref _missing, ref _missing); multiPatchGeometryCollectionCube.AddGeometry(triangleStripPointCollection as IGeometry, ref _missing, ref _missing);
Geoprocessor gp = new Geoprocessor(); Intersect3D analys = new ESRI.ArcGIS.Analyst3DTools.Intersect3D(); analys.in_feature_class_1 = @"D:\3_DATA\TEMP\TestOutPutMultiPatchCUBE.shp"; analys.in_feature_class_2 = @"D:\3_DATA\TEMP\TestOutPutMultiPatchCUBE2.shp"; analys.out_feature_class = @"D:\3_DATA\TEMP\outputTest.shp"; gp.Execute(analys, null);