//---------------------------------------------------------------------------------- private static IPointCollection MaakRingPointCollection() { IPointCollection RingPointCollection = new RingClass(); int vertexaantal = ImportInArcscene.binReader.ReadInt32(); for (int j = 0; j < vertexaantal; j++) { double ptx = ImportInArcscene.binReader.ReadSingle(); double pty = ImportInArcscene.binReader.ReadSingle(); double ptz = ImportInArcscene.binReader.ReadSingle(); RingPointCollection.AddPoint(PuntTransformatie(ptx, pty, ptz), ref _missing, ref _missing); } RingPointCollection.AddPoint(RingPointCollection.get_Point(0), ref _missing, ref _missing); return(RingPointCollection); }
/// <summary> /// 创建面实体 /// </summary> /// <param name="pITable">数据表对象</param> /// <param name="entinyNode">VCT空间实体节点</param> public override void CreateFeature(ITable pITable, EntityNode entinyNode) { PolygonNode pPolygonNode = entinyNode as PolygonNode; if (pPolygonNode != null) { IFeatureClass pFeatureCls = pITable as IFeatureClass; this.Feature = pFeatureCls.CreateFeature(); ///标识码赋值 int dBSMIndex = -1; dBSMIndex = this.Feature.Fields.FindField(m_strEntityIDFiled); if (dBSMIndex != -1) this.Feature.set_Value(dBSMIndex, pPolygonNode.EntityID); ///要素代码赋值 int dSYDMIndex = -1; dSYDMIndex = this.Feature.Fields.FindField(m_strYSDMField); if (dSYDMIndex != -1) this.Feature.set_Value(dSYDMIndex, pPolygonNode.FeatureCode); //根据面特征类型构面 bool bGetGeometry = false;///指示是否获取图形数据 ///从配置表获取面的类型InDireCoordinatePolygon表示间接坐标构面 if (Metadata.MetaDataFile.GraphConfig.GetGraphMark("POLYGONFEATURETYPE", pPolygonNode.PolygonType.ToString()) == "InDireCoordinatePolygon") { IGeometryCollection pGeoCollection = new PolygonClass(); IPointCollection pPtCollection = new RingClass(); ///采用间接构面的方式LineStructPolygon表示引用线构面 if (Metadata.MetaDataFile.GraphConfig.GetGraphMark("POLYGONTYPE", pPolygonNode.ComposeType.ToString()) == "LineStructPolygon") { for (int i = 0; i < pPolygonNode.LineNodes.Count; i++) { LineNodeEx pLineNodeEx = pPolygonNode.LineNodes[i]; if (pLineNodeEx == null) continue; ///标识码为0表示对象分割标识 if (pLineNodeEx.EntityID != 0) { IPoint pPrePoint=null; if (pPtCollection.PointCount > 0) pPrePoint = pPtCollection.get_Point(pPtCollection.PointCount-1); IPointCollection pPointCollection=GetPointCollection(pLineNodeEx, pPrePoint); if (pPointCollection != null) pPtCollection.AddPointCollection(pPointCollection); if (i == pPolygonNode.LineNodes.Count - 1) { IRing pRing = pPtCollection as IRing; pRing.Close();///闭合当前环 object oTypeMissing = Type.Missing; pGeoCollection.AddGeometry(pRing as IGeometry, ref oTypeMissing, ref oTypeMissing); bGetGeometry = true; pPtCollection = new RingClass();///清空点集数据 } } else///独到标识码为0时闭合图形 { IRing pRing = pPtCollection as IRing; pRing.Close();///闭合当前环 object oTypeMissing = Type.Missing; pGeoCollection.AddGeometry(pRing as IGeometry, ref oTypeMissing, ref oTypeMissing); bGetGeometry = true; pPtCollection = new RingClass();///清空点集数据 } } if (bGetGeometry) { (this.Feature as IFeature).Shape = pGeoCollection as IGeometry; } } } else if (pPolygonNode.PolygonType == 1) { } this.Feature.Store(); } }
public static IGeometry GetExample3() { //Composite: House Composed Of 7 Ring, 1 TriangleStrip, And 1 Triangles Parts IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass(); IMultiPatch multiPatch = multiPatchGeometryCollection as IMultiPatch; //Base (Exterior Ring) IPointCollection basePointCollection = new RingClass(); basePointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 0), ref _missing, ref _missing); basePointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 0), ref _missing, ref _missing); basePointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 0), ref _missing, ref _missing); basePointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 0), ref _missing, ref _missing); basePointCollection.AddPoint(basePointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(basePointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(basePointCollection as IRing, esriMultiPatchRingType.esriMultiPatchOuterRing); //Front With Cutaway For Door (Exterior Ring) IPointCollection frontPointCollection = new RingClass(); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 6), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 0), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 1, 0), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 1, 4), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -1, 4), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -1, 0), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 0), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 6), ref _missing, ref _missing); frontPointCollection.AddPoint(frontPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(frontPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(frontPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchOuterRing); //Back (Exterior Ring) IPointCollection backPointCollection = new RingClass(); backPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 6), ref _missing, ref _missing); backPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 6), ref _missing, ref _missing); backPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 0), ref _missing, ref _missing); backPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 0), ref _missing, ref _missing); backPointCollection.AddPoint(backPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(backPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(backPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchOuterRing); //Right Side (Ring Group) //Exterior Ring IPointCollection rightSideExteriorPointCollection = new RingClass(); rightSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 6), ref _missing, ref _missing); rightSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 6), ref _missing, ref _missing); rightSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 0), ref _missing, ref _missing); rightSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 0), ref _missing, ref _missing); rightSideExteriorPointCollection.AddPoint(rightSideExteriorPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(rightSideExteriorPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(rightSideExteriorPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchOuterRing); //Interior Ring IPointCollection rightSideInteriorPointCollection = new RingClass(); rightSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(1, 4, 4), ref _missing, ref _missing); rightSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(1, 4, 2), ref _missing, ref _missing); rightSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-1, 4, 2), ref _missing, ref _missing); rightSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-1, 4, 4), ref _missing, ref _missing); rightSideInteriorPointCollection.AddPoint(rightSideInteriorPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(rightSideInteriorPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(rightSideInteriorPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchInnerRing); //Left Side (Ring Group) //Exterior Ring IPointCollection leftSideExteriorPointCollection = new RingClass(); leftSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 6), ref _missing, ref _missing); leftSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 0), ref _missing, ref _missing); leftSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 0), ref _missing, ref _missing); leftSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 6), ref _missing, ref _missing); leftSideExteriorPointCollection.AddPoint(leftSideExteriorPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(leftSideExteriorPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(leftSideExteriorPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchOuterRing); //Interior Ring IPointCollection leftSideInteriorPointCollection = new RingClass(); leftSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(1, -4, 4), ref _missing, ref _missing); leftSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-1, -4, 4), ref _missing, ref _missing); leftSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-1, -4, 2), ref _missing, ref _missing); leftSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(1, -4, 2), ref _missing, ref _missing); leftSideInteriorPointCollection.AddPoint(leftSideInteriorPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(leftSideInteriorPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(leftSideInteriorPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchInnerRing); //Roof IPointCollection roofPointCollection = new TriangleStripClass(); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 6), ref _missing, ref _missing); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 6), ref _missing, ref _missing); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 0, 9), ref _missing, ref _missing); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 0, 9), ref _missing, ref _missing); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 6), ref _missing, ref _missing); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 6), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(roofPointCollection as IGeometry, ref _missing, ref _missing); //Triangular Area Between Roof And Front/Back IPointCollection triangularAreaPointCollection = new TrianglesClass(); //Area Between Roof And Front triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 0, 9), ref _missing, ref _missing); triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 6), ref _missing, ref _missing); triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 6), ref _missing, ref _missing); //Area Between Roof And Back triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 0, 9), ref _missing, ref _missing); triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 6), ref _missing, ref _missing); triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 6), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(triangularAreaPointCollection as IGeometry, ref _missing, ref _missing); return multiPatchGeometryCollection as IGeometry; }
/// <summary> /// ������ʵ�� /// </summary> /// <param name="pITable">���ݱ����</param> /// <param name="entinyNode">VCT�ռ�ʵ��ڵ�</param> public override void CreateFeature(ITable pITable, EntityNode entinyNode) { PolygonNode pPolygonNode = entinyNode as PolygonNode; if (pPolygonNode != null) { IFeatureClass pFeatureCls = pITable as IFeatureClass; this.Feature = pFeatureCls.CreateFeature(); ///��ʶ�븳ֵ int dBSMIndex = -1; dBSMIndex = this.Feature.Fields.FindField(m_strEntityIDFiled); if (dBSMIndex != -1) this.Feature.set_Value(dBSMIndex, pPolygonNode.EntityID); ///Ҫ�ش��븳ֵ int dSYDMIndex = -1; dSYDMIndex = this.Feature.Fields.FindField(m_strYSDMField); if (dSYDMIndex != -1) this.Feature.set_Value(dSYDMIndex, pPolygonNode.FeatureCode); //���������������� bool bGetGeometry = false;///ָʾ�Ƿ��ȡͼ������ ///�����ñ��ȡ�������InDireCoordinatePolygon��ʾ������깹�� if (Metadata.MetaDataFile.GraphConfig.GetGraphMark("POLYGONFEATURETYPE", pPolygonNode.PolygonType.ToString()) == "InDireCoordinatePolygon") { IGeometryCollection pGeoCollection = new PolygonClass(); IPointCollection pPtCollection = new RingClass(); ///���ü�ӹ���ķ�ʽLineStructPolygon��ʾ�����߹��� if (Metadata.MetaDataFile.GraphConfig.GetGraphMark("POLYGONTYPE", pPolygonNode.ComposeType.ToString()) == "LineStructPolygon") { for (int i = 0; i < pPolygonNode.LineNodes.Count; i++) { LineNodeEx pLineNodeEx = pPolygonNode.LineNodes[i]; if (pLineNodeEx == null) continue; ///��ʶ��Ϊ0��ʾ����ָ��ʶ if (pLineNodeEx.EntityID != 0) { IPoint pPrePoint=null; if (pPtCollection.PointCount > 0) pPrePoint = pPtCollection.get_Point(pPtCollection.PointCount-1); IPointCollection pPointCollection=GetPointCollection(pLineNodeEx, pPrePoint); if (pPointCollection != null) pPtCollection.AddPointCollection(pPointCollection); if (i == pPolygonNode.LineNodes.Count - 1) { IRing pRing = pPtCollection as IRing; pRing.Close();///�պϵ�ǰ�� object oTypeMissing = Type.Missing; pGeoCollection.AddGeometry(pRing as IGeometry, ref oTypeMissing, ref oTypeMissing); bGetGeometry = true; pPtCollection = new RingClass();///��յ㼯���� } } else///������ʶ��Ϊ0ʱ�պ�ͼ�� { IRing pRing = pPtCollection as IRing; pRing.Close();///�պϵ�ǰ�� object oTypeMissing = Type.Missing; pGeoCollection.AddGeometry(pRing as IGeometry, ref oTypeMissing, ref oTypeMissing); bGetGeometry = true; pPtCollection = new RingClass();///��յ㼯���� } } if (bGetGeometry) { (this.Feature as IFeature).Shape = pGeoCollection as IGeometry; } } } else if (pPolygonNode.PolygonType == 1) { } this.Feature.Store(); } }
public static IGeometry GetExample3() { //Composite: House Composed Of 7 Ring, 1 TriangleStrip, And 1 Triangles Parts IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass(); IMultiPatch multiPatch = multiPatchGeometryCollection as IMultiPatch; //Base (Exterior Ring) IPointCollection basePointCollection = new RingClass(); basePointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 0), ref _missing, ref _missing); basePointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 0), ref _missing, ref _missing); basePointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 0), ref _missing, ref _missing); basePointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 0), ref _missing, ref _missing); basePointCollection.AddPoint(basePointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(basePointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(basePointCollection as IRing, esriMultiPatchRingType.esriMultiPatchOuterRing); //Front With Cutaway For Door (Exterior Ring) IPointCollection frontPointCollection = new RingClass(); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 6), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 0), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 1, 0), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 1, 4), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -1, 4), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -1, 0), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 0), ref _missing, ref _missing); frontPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 6), ref _missing, ref _missing); frontPointCollection.AddPoint(frontPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(frontPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(frontPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchOuterRing); //Back (Exterior Ring) IPointCollection backPointCollection = new RingClass(); backPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 6), ref _missing, ref _missing); backPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 6), ref _missing, ref _missing); backPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 0), ref _missing, ref _missing); backPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 0), ref _missing, ref _missing); backPointCollection.AddPoint(backPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(backPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(backPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchOuterRing); //Right Side (Ring Group) //Exterior Ring IPointCollection rightSideExteriorPointCollection = new RingClass(); rightSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 6), ref _missing, ref _missing); rightSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 6), ref _missing, ref _missing); rightSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 0), ref _missing, ref _missing); rightSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 0), ref _missing, ref _missing); rightSideExteriorPointCollection.AddPoint(rightSideExteriorPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(rightSideExteriorPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(rightSideExteriorPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchOuterRing); //Interior Ring IPointCollection rightSideInteriorPointCollection = new RingClass(); rightSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(1, 4, 4), ref _missing, ref _missing); rightSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(1, 4, 2), ref _missing, ref _missing); rightSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-1, 4, 2), ref _missing, ref _missing); rightSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-1, 4, 4), ref _missing, ref _missing); rightSideInteriorPointCollection.AddPoint(rightSideInteriorPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(rightSideInteriorPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(rightSideInteriorPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchInnerRing); //Left Side (Ring Group) //Exterior Ring IPointCollection leftSideExteriorPointCollection = new RingClass(); leftSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 6), ref _missing, ref _missing); leftSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 0), ref _missing, ref _missing); leftSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 0), ref _missing, ref _missing); leftSideExteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 6), ref _missing, ref _missing); leftSideExteriorPointCollection.AddPoint(leftSideExteriorPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(leftSideExteriorPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(leftSideExteriorPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchOuterRing); //Interior Ring IPointCollection leftSideInteriorPointCollection = new RingClass(); leftSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(1, -4, 4), ref _missing, ref _missing); leftSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-1, -4, 4), ref _missing, ref _missing); leftSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-1, -4, 2), ref _missing, ref _missing); leftSideInteriorPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(1, -4, 2), ref _missing, ref _missing); leftSideInteriorPointCollection.AddPoint(leftSideInteriorPointCollection.get_Point(0), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(leftSideInteriorPointCollection as IGeometry, ref _missing, ref _missing); multiPatch.PutRingType(leftSideInteriorPointCollection as IRing, esriMultiPatchRingType.esriMultiPatchInnerRing); //Roof IPointCollection roofPointCollection = new TriangleStripClass(); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 6), ref _missing, ref _missing); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 6), ref _missing, ref _missing); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 0, 9), ref _missing, ref _missing); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 0, 9), ref _missing, ref _missing); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 6), ref _missing, ref _missing); roofPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 6), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(roofPointCollection as IGeometry, ref _missing, ref _missing); //Triangular Area Between Roof And Front/Back IPointCollection triangularAreaPointCollection = new TrianglesClass(); //Area Between Roof And Front triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 0, 9), ref _missing, ref _missing); triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, 4, 6), ref _missing, ref _missing); triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(5, -4, 6), ref _missing, ref _missing); //Area Between Roof And Back triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 0, 9), ref _missing, ref _missing); triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, -4, 6), ref _missing, ref _missing); triangularAreaPointCollection.AddPoint(GeometryUtilities.ConstructPoint3D(-5, 4, 6), ref _missing, ref _missing); multiPatchGeometryCollection.AddGeometry(triangularAreaPointCollection as IGeometry, ref _missing, ref _missing); return(multiPatchGeometryCollection as IGeometry); }