首页 / 浏览问题 / 三维GIS / 问题详情
三维开挖贴图贴不上
3EXP 2018年05月02日

使用产品:组件开发.net 9.0.0 操作系统:win7 x64

数据类型:udb

问题描述:使用场景开挖,设置了贴图的图片,能看到地面挖开了,但是没有贴图

下面重要代码,绘制玩面的时候,创建开挖

//开挖结束
        private void M_sceneControl_Tracked_Kw(object sender, Tracked3DEventArgs e)
        {
            

            GeoRegion3D geoRegion3D = e.Geometry as GeoRegion3D;
            if (geoRegion3D == null)
                return;

            GeoStyle3D m_PointStyle = new GeoStyle3D();
            m_PointStyle.MarkerColor = Color.FromArgb(255, 255, 0, 0);
            m_PointStyle.MarkerSize = 2.0;
            m_PointStyle.AltitudeMode = AltitudeMode.RelativeToGround;
            m_PointStyle.BottomAltitude = 5;

            GeoStyle3D m_LineStyle3D = new GeoStyle3D();
            m_LineStyle3D.AltitudeMode = AltitudeMode.RelativeToGround;
            m_LineStyle3D.FillForeColor = Color.FromArgb(50, 255, 0, 0);
            m_LineStyle3D.FillMode = FillMode3D.Line;
            m_LineStyle3D.BottomAltitude = 5;


            GeoStyle3D _cutStyle3d = new GeoStyle3D();
            _cutStyle3d.FillForeColor = Color.FromArgb(50, 255, 0, 0);
            _cutStyle3d.FillMode = FillMode3D.Line;
            _cutStyle3d.BottomAltitude = 0;
            _cutStyle3d.ExtendedHeight = -10;
            _cutStyle3d.TopTextureFile = "D:\\work\\shuangliu_daima\\6-CS64\\GIS\\GIS\\bin\\Debug\\data\\Textures\\top.jpg";

            _cutStyle3d.SideTextureFiles = new string[] { "D:\\work\\shuangliu_daima\\6-CS64\\GIS\\GIS\\bin\\Debug\\data\\Textures\\Side.JPG" };
            _cutStyle3d.TopTilingU = 5;
            _cutStyle3d.TopTilingV = 5;
            _cutStyle3d.TilingU = 5;
            _cutStyle3d.TilingV = 5;
            _cutStyle3d.TextureRepeatMode = TextureRepeatMode.RepeatTimes;
            _cutStyle3d.TopTextureRepeatMode = TextureRepeatMode.RepeatTimes;



            geoRegion3D.Style3D = _cutStyle3d;
            m_sceneControl.Scene.Underground.IsVisible = true;
            m_sceneControl.Scene.GlobalImage.Transparency = 0;
            //m_sceneControl.Scene.GlobalImage.ClearExcavationRegions();
            //后面的那个名字不能重复,不然会添加不成功ff=-1
            int ff = m_sceneControl.Scene.GlobalImage.AddExcavationRegion(geoRegion3D, "ExcavationRegion" + geoRegion3D.BoundingBox.Center.ToString());

            //挖方文档说相机高度必须小于1000,GlobalImage.Transparency必须设置为100才能看见
            if (m_sceneControl.Scene.Camera.Altitude > 1000)
            {
                Camera camera = new Camera();
                camera.Longitude = geoRegion3D.InnerPoint3D.X;
                camera.Latitude = geoRegion3D.InnerPoint3D.Y;
                camera.AltitudeMode = AltitudeMode.Absolute;
                camera.Altitude = 25;
                camera.Tilt = 72.5;
                m_sceneControl.Scene.Fly(camera);
            }
            m_sceneControl.Action = Action3D.Pan;
        }

1个回答

您好,参考范例,看哪儿设置不对https://pan.baidu.com/share/init?surl=kVOzsWZ   提取码:g5dz

5,985EXP 2018年05月02日
你们绝对好久都没有试过开挖的功能了

811 32位可以开挖,64位就不行,9D的都不能挖开,你们是不是该解决一下

您好,经测试该功能在9D正常,建议你先在桌面测试看有无问题,桌面产品也是.NET组件写出来的,桌面没问题直接用桌面Bin包去写代码(避免某些组件包有缺陷),然后自行参考示范代码检查自己代码是否有问题。另外话不要说得太绝对。

我们的地表数据是 osgb 模型,地表9D挖不开,用的就是桌面和组件都挖不开
...