Interface IConstructMultiPatch
Provides access to members that can be used to construct MultiPatches.
[Guid("51CDE393-03B4-11D4-9F56-00C04F6BDF0D")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IConstructMultiPatch
Remarks
To Extrude Points and Multipoints to create Polylines, use IExtrude.
Methods
ConstructExtrude(double, IGeometry)
Construct a MultiPatch by using an input (non-point) geometry as one base and offsetting the Zs already set on the input geometry to get the second base.
void ConstructExtrude(double OffsetZ, IGeometry baseGeom)
Parameters
Remarks
All non-linear segments are treated as linear segments when extrusion is performed. Only Polylines, Polygons, and Envelopes are allowed as input geometries.


private static object _missing = Type.Missing;
public static IGeometry GetMultiPatchGeometry()
{
const int DensificationDivisions = 20;
const double MaxDeviation = 0.1;
const double BaseZ = 0;
const double OffsetZ = -7;
//Extrusion: 3D Polyline Having Vertices With Varying Z Values, Extruded Relative To Existing
// Vertex Z Values Via ConstructExtrude()
IPointCollection polylinePointCollection = new PolylineClass();
polylinePointCollection.AddPoint(ConstructPoint2D(-10, -10), ref _missing, ref _missing);
polylinePointCollection.AddPoint(ConstructPoint2D(0, -5), ref _missing, ref _missing);
polylinePointCollection.AddPoint(ConstructPoint2D(0, 5), ref _missing, ref _missing);
polylinePointCollection.AddPoint(ConstructPoint2D(10, 10), ref _missing, ref _missing);
IPolyline polyline = polylinePointCollection as IPolyline;
polyline.Densify(polyline.Length / DensificationDivisions, MaxDeviation);
IGeometry polylineGeometry = polyline as IGeometry;
MakeZAware(polylineGeometry);
Random random = new Random();
for (int i = 0; i < polylinePointCollection.PointCount; i++)
{
IPoint polylinePoint = polylinePointCollection.get_Point(i);
polylinePointCollection.UpdatePoint(i, ConstructPoint3D(polylinePoint.X, polylinePoint.Y, BaseZ - 2 * Math.Sin(random.NextDouble())));
}
ITopologicalOperator topologicalOperator = polylineGeometry as ITopologicalOperator;
topologicalOperator.Simplify();
IConstructMultiPatch constructMultiPatch = new MultiPatchClass();
constructMultiPatch.ConstructExtrude(OffsetZ, polylineGeometry);
return constructMultiPatch as IGeometry;
}
private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)
{
IVector3D vector3D = new Vector3DClass();
vector3D.SetComponents(xComponent, yComponent, zComponent);
return vector3D;
}
private static double GetRadians(double decimalDegrees)
{
return decimalDegrees * (Math.PI / 180);
}
private static IPoint ConstructPoint3D(double x, double y, double z)
{
IPoint point = ConstructPoint2D(x, y);
point.Z = z;
return point;
}
private static IPoint ConstructPoint2D(double x, double y)
{
IPoint point = new PointClass();
point.PutCoords(x, y);
return point;
}
private static void MakeZAware(IGeometry geometry)
{
IZAware zAware = geometry as IZAware;
zAware.ZAware = true;
}
ConstructExtrudeAbsolute(double, IGeometry)
Construct a MultiPatch by extruding a (non-point) geometry using its initial Zs for one base, and a uniform input Z for the other.
void ConstructExtrudeAbsolute(double toZ, IGeometry baseGeom)
Parameters
Remarks
All non-linear segments are treated as linear segments when extrusion is performed. Only Polylines, Polygons, and Envelopes are allowed as input geometries.


private static object _missing = Type.Missing;
public static IGeometry GetMultiPatchGeometry()
{
const int DensificationDivisions = 20;
const double MaxDeviation = 0.1;
const double BaseZ = 0;
const double ToZ = -10;
//Extrusion: 3D Polyline Having Vertices With Varying Z Values, Extruded To Specified Z Value
// Via ConstructExtrudeAbsolute()
IPointCollection polylinePointCollection = new PolylineClass();
polylinePointCollection.AddPoint(ConstructPoint2D(-10, -10), ref _missing, ref _missing);
polylinePointCollection.AddPoint(ConstructPoint2D(0, -5), ref _missing, ref _missing);
polylinePointCollection.AddPoint(ConstructPoint2D(0, 5), ref _missing, ref _missing);
polylinePointCollection.AddPoint(ConstructPoint2D(10, 10), ref _missing, ref _missing);
IPolyline polyline = polylinePointCollection as IPolyline;
polyline.Densify(polyline.Length / DensificationDivisions, MaxDeviation);
IGeometry polylineGeometry = polyline as IGeometry;
MakeZAware(polylineGeometry);
Random random = new Random();
for (int i = 0; i < polylinePointCollection.PointCount; i++)
{
IPoint polylinePoint = polylinePointCollection.get_Point(i);
polylinePointCollection.UpdatePoint(i, ConstructPoint3D(polylinePoint.X, polylinePoint.Y, BaseZ - 2 * Math.Sin(random.NextDouble())));
}
ITopologicalOperator topologicalOperator = polylineGeometry as ITopologicalOperator;
topologicalOperator.Simplify();
IConstructMultiPatch constructMultiPatch = new MultiPatchClass();
constructMultiPatch.ConstructExtrudeAbsolute(ToZ, polylineGeometry);
return constructMultiPatch as IGeometry;
}
public static IPoint ConstructPoint2D(double x, double y)
{
IPoint point = new PointClass();
point.PutCoords(x, y);
return point;
}
private static void MakeZAware(IGeometry geometry)
{
IZAware zAware = geometry as IZAware;
zAware.ZAware = true;
}
ConstructExtrudeAlongLine(ILine, IGeometry)
Construct a MultiPatch by extruding a (non-point) geometry along a specified line, using the Zs on the two ends of the line to set Zs on the top and bottom.
void ConstructExtrudeAlongLine(ILine extrusionLine, IGeometry baseGeom)
Parameters
Remarks
All non-linear segments are treated as linear segments when extrusion is performed. Only Polylines, Polygons, and Envelopes are allowed as input geometries.


private static object _missing = Type.Missing;
public static IGeometry GetExample10()
{
const double CircleDegrees = 360.0;
const int CircleDivisions = 36;
const double VectorComponentOffset = 0.0000001;
const double CircleRadius = 3.0;
const double BaseZ = 0.0;
//Extrusion: 3D Circle Polygon Extruded Along 3D Line Via ConstructExtrudeAlongLine()
IPointCollection polygonPointCollection = new PolygonClass();
IGeometry polygonGeometry = polygonPointCollection as IGeometry;
MakeZAware(polygonGeometry);
IPoint originPoint = ConstructPoint3D(0, 0, 0);
IVector3D upperAxisVector3D = ConstructVector3D(0, 0, 10);
IVector3D lowerAxisVector3D = ConstructVector3D(0, 0, -10);
lowerAxisVector3D.XComponent += VectorComponentOffset;
IVector3D normalVector3D = upperAxisVector3D.CrossProduct(lowerAxisVector3D) as IVector3D;
normalVector3D.Magnitude = CircleRadius;
double rotationAngleInRadians = GetRadians(CircleDegrees / CircleDivisions);
for (int i = 0; i < CircleDivisions; i++)
{
normalVector3D.Rotate(-1 * rotationAngleInRadians, upperAxisVector3D);
IPoint vertexPoint = ConstructPoint3D(originPoint.X + normalVector3D.XComponent,
originPoint.Y + normalVector3D.YComponent,
BaseZ);
polygonPointCollection.AddPoint(vertexPoint, ref _missing, ref _missing);
}
polygonPointCollection.AddPoint(polygonPointCollection.get_Point(0), ref _missing, ref _missing);
ITopologicalOperator topologicalOperator = polygonGeometry as ITopologicalOperator;
topologicalOperator.Simplify();
//Define Line To Extrude Along
ILine extrusionLine = new LineClass();
extrusionLine.FromPoint = ConstructPoint3D(-4, -4, -5);
extrusionLine.ToPoint = ConstructPoint3D(4, 4, 5);
//Perform Extrusion
IConstructMultiPatch constructMultiPatch = new MultiPatchClass();
constructMultiPatch.ConstructExtrudeAlongLine(extrusionLine, polygonGeometry);
//Transform Extrusion Result
IArea area = polygonGeometry as IArea;
ITransform2D transform2D = constructMultiPatch as ITransform2D;
transform2D.Move(extrusionLine.FromPoint.X - area.Centroid.X, extrusionLine.FromPoint.Y - area.Centroid.Y);
return constructMultiPatch as IGeometry;
}
private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)
{
IVector3D vector3D = new Vector3DClass();
vector3D.SetComponents(xComponent, yComponent, zComponent);
return vector3D;
}
private static double GetRadians(double decimalDegrees)
{
return decimalDegrees * (Math.PI / 180);
}
private static IPoint ConstructPoint3D(double x, double y, double z)
{
IPoint point = ConstructPoint2D(x, y);
point.Z = z;
return point;
}
private static IPoint ConstructPoint2D(double x, double y)
{
IPoint point = new PointClass();
point.PutCoords(x, y);
return point;
}
private static void MakeZAware(IGeometry geometry)
{
IZAware zAware = geometry as IZAware;
zAware.ZAware = true;
}
ConstructExtrudeBetween(IFunctionalSurface, IFunctionalSurface, IGeometry)
Construct a MultiPatch by extruding a (non-point) geometry between two functional surfaces.
void ConstructExtrudeBetween(IFunctionalSurface fromSurface, IFunctionalSurface toSurface, IGeometry baseGeom)
Parameters
fromSurfaceIFunctionalSurfacetoSurfaceIFunctionalSurfacebaseGeomIGeometry
Remarks
All non-linear segments are treated as linear segments when extrusion is performed. Only Polylines, Polygons, and Envelopes are allowed as input geometries. Z values from the FunctionalSurfaces are only calculated at Points in the input Geometry. If the input Geometry extents exceed the extents of the Functional Surfaces then an output Oeometry with NaNs will be produced. Currently not implemented for RasterSurfaces.


private static object _missing = Type.Missing;
public static IGeometry GetMultiPatchGeometry()
{
const double CircleDegrees = 360.0;
const int CircleDivisions = 36;
const double VectorComponentOffset = 0.0000001;
const double CircleRadius = 9.5;
const int PointCount = 100;
const double UpperZMin = 7;
const double UpperZMax = 10;
const double LowerZMin = 0;
const double LowerZMax = 3;
//Extrusion: Circle Shaped Base Geometry Extruded Between Two Different TIN-Based Functional Surfaces
IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass();
//Base Geometry
IPointCollection polygonPointCollection = new PolygonClass();
IPoint originPoint = ConstructPoint3D(0, 0, 0);
IVector3D upperAxisVector3D = ConstructVector3D(0, 0, 10);
IVector3D lowerAxisVector3D = ConstructVector3D(0, 0, -10);
lowerAxisVector3D.XComponent += VectorComponentOffset;
IVector3D normalVector3D = upperAxisVector3D.CrossProduct(lowerAxisVector3D) as IVector3D;
normalVector3D.Magnitude = CircleRadius;
double rotationAngleInRadians = GetRadians(CircleDegrees / CircleDivisions);
for (int i = 0; i < CircleDivisions; i++)
{
normalVector3D.Rotate(-1 * rotationAngleInRadians, upperAxisVector3D);
IPoint vertexPoint = ConstructPoint2D(originPoint.X + normalVector3D.XComponent,
originPoint.Y + normalVector3D.YComponent);
polygonPointCollection.AddPoint(vertexPoint, ref _missing, ref _missing);
}
IPolygon polygon = polygonPointCollection as IPolygon;
polygon.Close();
IGeometry baseGeometry = polygon as IGeometry;
ITopologicalOperator topologicalOperator = polygon as ITopologicalOperator;
topologicalOperator.Simplify();
//Functional Surfaces
IEnvelope envelope = new EnvelopeClass();
envelope.XMin = -10;
envelope.XMax = 10;
envelope.YMin = -10;
envelope.YMax = 10;
Random random = new Random();
//Upper Functional Surface
ITinEdit upperTinEdit = new TinClass();
upperTinEdit.InitNew(envelope);
for (int i = 0; i < PointCount; i++)
{
double x = envelope.XMin + (envelope.XMax - envelope.XMin) * random.NextDouble();
double y = envelope.YMin + (envelope.YMax - envelope.YMin) * random.NextDouble();
double z = UpperZMin + (UpperZMax - UpperZMin) * random.NextDouble();
IPoint point = ConstructPoint3D(x, y, z);
upperTinEdit.AddPointZ(point, 0);
}
IFunctionalSurface upperFunctionalSurface = upperTinEdit as IFunctionalSurface;
//Lower Functional Surface
ITinEdit lowerTinEdit = new TinClass();
lowerTinEdit.InitNew(envelope);
for (int i = 0; i < PointCount; i++)
{
double x = envelope.XMin + (envelope.XMax - envelope.XMin) * random.NextDouble();
double y = envelope.YMin + (envelope.YMax - envelope.YMin) * random.NextDouble();
double z = LowerZMin + (LowerZMax - LowerZMin) * random.NextDouble();
IPoint point = ConstructPoint3D(x, y, z);
lowerTinEdit.AddPointZ(point, 0);
}
IFunctionalSurface lowerFunctionalSurface = lowerTinEdit as IFunctionalSurface;
IConstructMultiPatch constructMultiPatch = new MultiPatchClass();
constructMultiPatch.ConstructExtrudeBetween(upperFunctionalSurface, lowerFunctionalSurface, baseGeometry);
return constructMultiPatch as IGeometry;
}
private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)
{
IVector3D vector3D = new Vector3DClass();
vector3D.SetComponents(xComponent, yComponent, zComponent);
return vector3D;
}
private static double GetRadians(double decimalDegrees)
{
return decimalDegrees * (Math.PI / 180);
}
private static IPoint ConstructPoint3D(double x, double y, double z)
{
IPoint point = ConstructPoint2D(x, y);
point.Z = z;
return point;
}
private static IPoint ConstructPoint2D(double x, double y)
{
IPoint point = new PointClass();
point.PutCoords(x, y);
return point;
}
ConstructExtrudeFromTo(double, double, IGeometry)
Construct a MultiPatch by extruding a (non-point) geometry between two specified Z values.
void ConstructExtrudeFromTo(double fromZ, double toZ, IGeometry baseGeom)
Parameters
Remarks
All non-linear segments are treated as linear segments when extrusion is performed. Only Polylines, Polygons, and Envelopes are allowed as input geometries.


private static object _missing = Type.Missing;
public static IGeometry GetMultiPatchGeometry()
{
const double FromZ = 0;
const double ToZ = 8.5;
//Extrusion: 2D Polygon Composed Of Multiple Square Shaped Exterior Rings And Corresponding Interior Rings,
// Extruded To Generate Multiple 3D Buildings With Hollow Interiors Via ConstructExtrudeFromTo()
IPolygon polygon = new PolygonClass();
IGeometryCollection geometryCollection = polygon as IGeometryCollection;
//Exterior Ring 1
IPointCollection exteriorRing1PointCollection = new RingClass();
exteriorRing1PointCollection.AddPoint(ConstructPoint2D(1, 1), ref _missing, ref _missing);
exteriorRing1PointCollection.AddPoint(ConstructPoint2D(1, 4), ref _missing, ref _missing);
exteriorRing1PointCollection.AddPoint(ConstructPoint2D(4, 4), ref _missing, ref _missing);
exteriorRing1PointCollection.AddPoint(ConstructPoint2D(4, 1), ref _missing, ref _missing);
IRing exteriorRing1 = exteriorRing1PointCollection as IRing;
exteriorRing1.Close();
geometryCollection.AddGeometry(exteriorRing1 as IGeometry, ref _missing, ref _missing);
//Interior Ring 1
IPointCollection interiorRing1PointCollection = new RingClass();
interiorRing1PointCollection.AddPoint(ConstructPoint2D(1.5, 1.5), ref _missing, ref _missing);
interiorRing1PointCollection.AddPoint(ConstructPoint2D(1.5, 3.5), ref _missing, ref _missing);
interiorRing1PointCollection.AddPoint(ConstructPoint2D(3.5, 3.5), ref _missing, ref _missing);
interiorRing1PointCollection.AddPoint(ConstructPoint2D(3.5, 1.5), ref _missing, ref _missing);
IRing interiorRing1 = interiorRing1PointCollection as IRing;
interiorRing1.Close();
geometryCollection.AddGeometry(interiorRing1 as IGeometry, ref _missing, ref _missing);
//Exterior Ring 2
IPointCollection exteriorRing2PointCollection = new RingClass();
exteriorRing2PointCollection.AddPoint(ConstructPoint2D(1, -1), ref _missing, ref _missing);
exteriorRing2PointCollection.AddPoint(ConstructPoint2D(4, -1), ref _missing, ref _missing);
exteriorRing2PointCollection.AddPoint(ConstructPoint2D(4, -4), ref _missing, ref _missing);
exteriorRing2PointCollection.AddPoint(ConstructPoint2D(1, -4), ref _missing, ref _missing);
IRing exteriorRing2 = exteriorRing2PointCollection as IRing;
exteriorRing2.Close();
geometryCollection.AddGeometry(exteriorRing2 as IGeometry, ref _missing, ref _missing);
//Interior Ring 2
IPointCollection interiorRing2PointCollection = new RingClass();
interiorRing2PointCollection.AddPoint(ConstructPoint2D(1.5, -1.5), ref _missing, ref _missing);
interiorRing2PointCollection.AddPoint(ConstructPoint2D(3.5, -1.5), ref _missing, ref _missing);
interiorRing2PointCollection.AddPoint(ConstructPoint2D(3.5, -3.5), ref _missing, ref _missing);
interiorRing2PointCollection.AddPoint(ConstructPoint2D(1.5, -3.5), ref _missing, ref _missing);
IRing interiorRing2 = interiorRing2PointCollection as IRing;
interiorRing2.Close();
geometryCollection.AddGeometry(interiorRing2 as IGeometry, ref _missing, ref _missing);
//Exterior Ring 3
IPointCollection exteriorRing3PointCollection = new RingClass();
exteriorRing3PointCollection.AddPoint(ConstructPoint2D(-1, 1), ref _missing, ref _missing);
exteriorRing3PointCollection.AddPoint(ConstructPoint2D(-4, 1), ref _missing, ref _missing);
exteriorRing3PointCollection.AddPoint(ConstructPoint2D(-4, 4), ref _missing, ref _missing);
exteriorRing3PointCollection.AddPoint(ConstructPoint2D(-1, 4), ref _missing, ref _missing);
IRing exteriorRing3 = exteriorRing3PointCollection as IRing;
exteriorRing3.Close();
geometryCollection.AddGeometry(exteriorRing3 as IGeometry, ref _missing, ref _missing);
//Interior Ring 3
IPointCollection interiorRing3PointCollection = new RingClass();
interiorRing3PointCollection.AddPoint(ConstructPoint2D(-1.5, 1.5), ref _missing, ref _missing);
interiorRing3PointCollection.AddPoint(ConstructPoint2D(-3.5, 1.5), ref _missing, ref _missing);
interiorRing3PointCollection.AddPoint(ConstructPoint2D(-3.5, 3.5), ref _missing, ref _missing);
interiorRing3PointCollection.AddPoint(ConstructPoint2D(-1.5, 3.5), ref _missing, ref _missing);
IRing interiorRing3 = interiorRing3PointCollection as IRing;
interiorRing3.Close();
geometryCollection.AddGeometry(interiorRing3 as IGeometry, ref _missing, ref _missing);
//Exterior Ring 4
IPointCollection exteriorRing4PointCollection = new RingClass();
exteriorRing4PointCollection.AddPoint(ConstructPoint2D(-1, -1), ref _missing, ref _missing);
exteriorRing4PointCollection.AddPoint(ConstructPoint2D(-1, -4), ref _missing, ref _missing);
exteriorRing4PointCollection.AddPoint(ConstructPoint2D(-4, -4), ref _missing, ref _missing);
exteriorRing4PointCollection.AddPoint(ConstructPoint2D(-4, -1), ref _missing, ref _missing);
IRing exteriorRing4 = exteriorRing4PointCollection as IRing;
exteriorRing4.Close();
geometryCollection.AddGeometry(exteriorRing4 as IGeometry, ref _missing, ref _missing);
//Interior Ring 5
IPointCollection interiorRing4PointCollection = new RingClass();
interiorRing4PointCollection.AddPoint(ConstructPoint2D(-1.5, -1.5), ref _missing, ref _missing);
interiorRing4PointCollection.AddPoint(ConstructPoint2D(-1.5, -3.5), ref _missing, ref _missing);
interiorRing4PointCollection.AddPoint(ConstructPoint2D(-3.5, -3.5), ref _missing, ref _missing);
interiorRing4PointCollection.AddPoint(ConstructPoint2D(-3.5, -1.5), ref _missing, ref _missing);
IRing interiorRing4 = interiorRing4PointCollection as IRing;
interiorRing4.Close();
geometryCollection.AddGeometry(interiorRing4 as IGeometry, ref _missing, ref _missing);
IGeometry polygonGeometry = polygon as IGeometry;
ITopologicalOperator topologicalOperator = polygonGeometry as ITopologicalOperator;
topologicalOperator.Simplify();
IConstructMultiPatch constructMultiPatch = new MultiPatchClass();
constructMultiPatch.ConstructExtrudeFromTo(FromZ, ToZ, polygonGeometry);
return constructMultiPatch as IGeometry;
}
public static IPoint ConstructPoint2D(double x, double y)
{
IPoint point = new PointClass();
point.PutCoords(x, y);
return point;
}
ConstructExtrudeRelative(IVector3D, IGeometry)
Construct a MultiPatch by extruding a (non-point) geometry along a specified vector, using Zs already set on the input geometry.
void ConstructExtrudeRelative(IVector3D extrusionVector, IGeometry baseGeom)
Parameters
Remarks
All non-linear segments are treated as linear segments when extrusion is performed. Only Polylines, Polygons, and Envelopes are allowed as input geometries.


private static object _missing = Type.Missing;
public static IGeometry GetMultiPatchGeometry()
{
const double CircleDegrees = 360.0;
const int CircleDivisions = 36;
const double VectorComponentOffset = 0.0000001;
const double CircleRadius = 3.0;
const double BaseZ = 0.0;
const double RotationAngleInDegrees = 89.9;
//Extrusion: 3D Circle Polygon Extruded Along 3D Vector Via ConstructExtrudeRelative()
IPointCollection pathPointCollection = new PathClass();
IGeometry pathGeometry = pathPointCollection as IGeometry;
MakeZAware(pathGeometry);
IPoint originPoint = ConstructPoint3D(0, 0, 0);
IVector3D upperAxisVector3D = ConstructVector3D(0, 0, 10);
IVector3D lowerAxisVector3D = ConstructVector3D(0, 0, -10);
lowerAxisVector3D.XComponent += VectorComponentOffset;
IVector3D normalVector3D = upperAxisVector3D.CrossProduct(lowerAxisVector3D) as IVector3D;
normalVector3D.Magnitude = CircleRadius;
double rotationAngleInRadians = GetRadians(CircleDegrees / CircleDivisions);
for (int i = 0; i < CircleDivisions; i++)
{
normalVector3D.Rotate(-1 * rotationAngleInRadians, upperAxisVector3D);
IPoint vertexPoint = ConstructPoint3D(originPoint.X + normalVector3D.XComponent,
originPoint.Y + normalVector3D.YComponent,
BaseZ);
pathPointCollection.AddPoint(vertexPoint, ref _missing, ref _missing);
}
pathPointCollection.AddPoint(pathPointCollection.get_Point(0), ref _missing, ref _missing);
//Rotate Geometry
IVector3D rotationAxisVector3D = ConstructVector3D(0, 10, 0);
ITransform3D transform3D = pathGeometry as ITransform3D;
transform3D.RotateVector3D(rotationAxisVector3D, GetRadians(RotationAngleInDegrees));
//Construct Polygon From Path Vertices
IGeometry polygonGeometry = new PolygonClass();
MakeZAware(polygonGeometry);
IPointCollection polygonPointCollection = polygonGeometry as IPointCollection;
for (int i = 0; i < pathPointCollection.PointCount; i++)
{
polygonPointCollection.AddPoint(pathPointCollection.get_Point(i), ref _missing, ref _missing);
}
ITopologicalOperator topologicalOperator = polygonGeometry as ITopologicalOperator;
topologicalOperator.Simplify();
//Define Vector To Extrude Along
IVector3D extrusionVector3D = ConstructVector3D(10, 0, 5);
//Perform Extrusion
IConstructMultiPatch constructMultiPatch = new MultiPatchClass();
constructMultiPatch.ConstructExtrudeRelative(extrusionVector3D, polygonGeometry);
return constructMultiPatch as IGeometry;
}
private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)
{
IVector3D vector3D = new Vector3DClass();
vector3D.SetComponents(xComponent, yComponent, zComponent);
return vector3D;
}
private static double GetRadians(double decimalDegrees)
{
return decimalDegrees * (Math.PI / 180);
}
private static IPoint ConstructPoint3D(double x, double y, double z)
{
IPoint point = ConstructPoint2D(x, y);
point.Z = z;
MakeZAware(point as IGeometry);
return point;
}
private static IPoint ConstructPoint2D(double x, double y)
{
IPoint point = new PointClass();
point.PutCoords(x, y);
return point;
}
private static void MakeZAware(IGeometry geometry)
{
IZAware zAware = geometry as IZAware;
zAware.ZAware = true;
}