根据数据信息动态生成三维管线及横断面表格。效果图如下:

在获取信息后,直接构造点阵进行文字绘制即可。

绘制IElement代码:

        /// <summary>
/// 绘制三维文字
/// </summary>
/// <param name="ppp">位置</param>
/// <param name="text">文本</param>
/// <param name="Fsize"></param>
/// <param name="rgb">颜色</param>
/// <param name="pTextJustification">对齐</param>
/// <returns></returns>
public IElement CreateElement( IPoint ppp, string text, double Fsize, int rgb,esriT3DJustification pTextJustification)
{
try
{
IPoint point = new PointClass();
point = ppp;
//point.Z = deep;
IText3DElement Ptext3DElement = new Text3DElementClass();
Ptext3DElement.AnchorPoint = point;
Ptext3DElement.Text = text;
Ptext3DElement.BoldFont = false;
Ptext3DElement.Alignment = esriT3DAlignment.esriT3DAlignHorizontal;//对齐-控制字是横排还是竖排
Ptext3DElement.AxisRotation = esriT3DRotationAxis.esriT3DRotateAxisX;//旋转轴x y z
Ptext3DElement.ZAxisScale = ;// 1.6;//z轴比例尺
Ptext3DElement.Justification = pTextJustification;//对齐
Ptext3DElement.Height = Fsize; Ptext3DElement.Depth = Fsize/;
Ptext3DElement.OrientationPlane = esriT3DOrientationPlane.esriT3DPlaneYZ;//初始方向,即文字所在平面 //字体颜色
IRgbColor Fcolor = new RgbColorClass();
Fcolor.RGB = rgb;
IFillSymbol pFillSymbol = new SimpleFillSymbol();
pFillSymbol.Color = Fcolor;
IFillShapeElement pFillShapeElement = Ptext3DElement as IFillShapeElement;
pFillShapeElement.Symbol = pFillSymbol; return pFillShapeElement as IElement;
}
catch (Exception ex)
{
return null;
}
}

绘制线:

        public IElement CreateLineElement(IPoint pS,IPoint pE ,int rgb,double lineWidth)
{
try
{
IRgbColor pRgbColor = new RgbColorClass();
pRgbColor.RGB = rgb;
ISimpleLine3DSymbol pSimpleLine3DSymbol = new SimpleLine3DSymbolClass();
pSimpleLine3DSymbol.Style = esriSimple3DLineStyle.esriS3DLSTube;
ILineSymbol pLineSymbol = pSimpleLine3DSymbol as ILineSymbol;
pLineSymbol.Color = pRgbColor;
pLineSymbol.Width = lineWidth; //将线段对象添加到多义线对象polyline
IPolyline polyline = new PolylineClass();
object Missing1 = Type.Missing;
object Missing2 = Type.Missing;
polyline.FromPoint = pS;
polyline.ToPoint = pE; //让Z值生效
IZAware Zaware = polyline as IZAware;
Zaware.ZAware = true; IGeometry geometry = (IGeometry)polyline;
IElement pElement = new LineElementClass();
pElement.Geometry = geometry;
ILineElement pLineElement = pElement as ILineElement;
pLineElement.Symbol = pLineSymbol; return pLineElement as IElement; }
catch (Exception ex)
{
return null;
}
}

将IElementCollection添加至控件:

        public void ADDElementCollectionToSceneControl2(AxSceneControl pSceneControl, IElementCollection pElCol)//IElementCollection
{
IScene pScene = pSceneControl.Scene;
IGraphicsLayer m_GraphLayer = new GraphicsLayer3DClass();
ILayer thisilayer = (ILayer)m_GraphLayer;
thisilayer.Name = "label3d" + System.DateTime.Now.Minute + System.DateTime.Now.Second;
pScene.AddLayer(thisilayer, true); I3DProperties p3DProps = RenderClass.Get3DPropsFromLayer(thisilayer);
if (p3DProps != null)
{
p3DProps.RenderMode = esriRenderMode.esriRenderCache;
p3DProps.Illuminate = false;
p3DProps.Apply3DProperties(thisilayer);
}
//IGraphicsContainer3D pGC3D = (IGraphicsContainer3D)new ESRI.ArcGIS.GlobeCore.GlobeGraphicsLayer();
//IGraphicsContainer3D pGC3D = (IGraphicsContainer3D)new ESRI.ArcGIS.GlobeCore.GlobeGraphicsLayerClass();
IGraphicsContainer3D pGC3D = (IGraphicsContainer3D)new ESRI.ArcGIS.Analyst3D.GraphicsLayer3DClass();
pGC3D = (IGraphicsContainer3D)m_GraphLayer; //让m_GraphLayer获得Container
pGC3D.AddElements(pElCol);
pScene.SceneGraph.RefreshViewers();
}

在Arcscene绘制管线三维横断面(AE绘制三维点阵文字)的更多相关文章

  1. (转)GPU图形绘制管线

    摘抄“GPU Programming And Cg Language Primer 1rd Edition” 中文名“GPU编程与CG语言之阳春白雪下里巴人”第二章. 图形绘制管线描述GPU渲染流程, ...

  2. GPU图形绘制管线简介

    (阅读GPU+编程与CG+语言之阳春白雪下里巴人所得总结) GPU图形绘制管线是描述GPU渲染(把三维世界显示为屏幕上的二维图像)的流程,主要分为三个主要阶段应用程序阶段.几何阶段.光栅阶段. 1.应 ...

  3. C#绘制立体三维饼状图

    转载自原文 C#绘制立体三维饼状图(超酷) 内容原文地址:LINK [翻译]Julijan Sribar著3D Pie Chart一个用于绘制立体三维饼状图的C#类库[简介]本文的想法就是创建一个独立 ...

  4. MATLAB三维散点图的绘制(scatter3、plot3)

    MATLAB三维散点图的绘制(scatter3.plot3) (1)函数scatter3 用法:scatter3(x,y,z,'.',c) % c 为颜色,需和x,y,z长度相同 例子: x=[422 ...

  5. Android绘图机制(二)——自定义View绘制形, 圆形, 三角形, 扇形, 椭圆, 曲线,文字和图片的坐标讲解

    Android绘图机制(二)--自定义View绘制形, 圆形, 三角形, 扇形, 椭圆, 曲线,文字和图片的坐标讲解 我们要想画好一些炫酷的View,首先我们得知道怎么去画一些基础的图案,比如矩形,圆 ...

  6. 自定义界面上绘制Text,可通过拖动控制文字大小及其位置

    项目地址 最近项目上有个需求,需要在一块区域中显示文字,这块区域可以拖动,也可以通过拖拽右下角来改变大小,里面的文字大小要根据区域的大小进行自适应.刚开始觉得这个需求不难,只需要一个TextView就 ...

  7. ArcGis For Silverlight API,地图显示Gis,绘制点,线,绘制图等--绘制点、线、圆,显示提示信息

    ArcGis For Silverlight API,地图显示Gis,绘制点,线,绘制图等--绘制点.线.圆,显示提示信息 /// <summary> /// 绘制界面上的点和线 ///  ...

  8. ArcGIS Mobile 自定义图层在绘制面时节点未绘制完全的问题

    ArcGIS Mobile 自定义图层在绘制面时节点未绘制完全,如下图: 面的绘制代码如下: public void Draw(Display dis, Pen p1, Pen p2,Pen p3 , ...

  9. Matlab绘图基础——其他三维图形(绘制填充的五角星)

    其他三维图形 %绘制魔方阵的三维条形图 subplot(2,2,1); bar3(magic(4));   %以三维杆图形式绘制曲线y=2sin(x) subplot(2,2,2); y=2*sin( ...

随机推荐

  1. 【转】zigbee终端无法重连的问题解决

    zigbee终端无法重连的问题解决 1.zigbee重连的原因 (1)zigbee由于各种原因的干扰导致信号太差而掉线. (2)协调器重启. 2.zigbee终端重连的处理 (1)zigbee掉线后会 ...

  2. GJM :Unity集成Leap Motion

        Demo演示视频

  3. ArcGIS Engine开发之TocControl

    TocControl控件简介 TocControl控件的主要作用是显示当前加载的图层有哪些.采用什么样的符号等,目的是使用户对当前加载的数据有一个总体的把握.与之相关联的伙伴控件有:MapContro ...

  4. CuPlayer

    <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> <met ...

  5. Stimulsoft入门视频

    .NET框架下最全面的报表解决方案,支持多种报表导出格式,拥有简单且强大的报表引擎.本系列教程适合Stimulsoft Reports上手入门. 001     Stimulsoft Reports. ...

  6. javascript函数的几种写法集合

    1.常规写法 function fnName(){ console.log("常规写法"); } 2.匿名函数,函数保存到变量里 var myfn = function(){ co ...

  7. C#冒泡排序算法

    用了两种形式的数据,一个是泛型List,一个是数据int[].记录一下,作为自己学习过程中的笔记. using System; using System.Collections.Generic; us ...

  8. Track 造成Goldengate abended的那条record

    Email收到了这样的报错: 2016-12-07 02:52:22  WARNING OGG-01004  Aborted grouped transaction on 'MSP.USER_ACTI ...

  9. ambari2.4.2_centos7 学习全纪录

    目录: 为什么要用Ambari 概念概述 原理简介 安装 创建集群 创建集群 手动修改配置 NameNode HA 安装SmartSense 二次开发 为什么要用Ambari Ambari 是 Apa ...

  10. 按照TYPE的文件导入导出功能

    /** * 导入文件Action;*/private File excelFile;// 保存原始文件名private String excelFileFileName;// 保存原始文件名priva ...