没有找到合适的产品?
联系客服协助选型:023-68661681
提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
翻译|使用教程|编辑:况鱼杰|2019-12-23 10:44:07.360|阅读 306 次
概述:本系列教程整理了VectorDraw Developer Framework(VDF)最常见问题,教程整理的很齐全,非常适合新手学习。本文将会展示如何在vdPolyface的特定面上应用映射的图像。
# 界面/图表报表/文档/IDE等千款热门软控件火热销售中 >>
相关链接:
VectorDraw Developer Framework(VDF)是一个用于应用程序可视化的图形引擎库。有了VDF提供的功能,您可以轻松地创建、编辑、管理、输出、输入和打印2D和3D图形文件。
VectorDraw Developer Framework试用版下载
问:
如何在vdPolyface的特定面上应用映射的图像? 如果vdPolyface的面不在X / Y平面中,最后就会得到一些奇怪的结果。怎么才能解决这个问题?
答:
对于此代码,可以使用以下图像:
(点击可下载VectorDraw File Converter)
请参见下面的代码和注释:
vdDocument doc = framed.BaseControl.ActiveDocument; doc.New(); // create a new dowcument and add a "box" polyface bool res = doc.CommandAction.CmdBox3d(new gPoint(10, 10, 3), (double)3.0d, (double)3.0d, (double)3.0d, VectorDraw.Geometry.Globals.DegreesToRadians((double)23.5d)); if (!res) return; vdPolyface pface = doc.ActiveLayOut.Entities.Last as vdPolyface; // this the polyface just created by CmdBox3d if (pface == null) return; doc.CommandAction.CmdRotate3d("Y", pface, new gPoint(), (double)62.1d); // rotate it a bit doc.CommandAction.View3D("VINW"); doc.CommandAction.View3D("SHADEON"); // set the view vdImageDef imgdef = doc.Images.Add(@"converter_200x200.png"); //add the image definition to be applied if (imgdef == null) return; int choosenface = 3; // 0,1,2,..,7 8 faces in total In this face we will apply the material // get the position of the points that make the specific face int[] face = new int[] { pface.FaceList[choosenface * 5 ], pface.FaceList[choosenface * 5 + 1], pface.FaceList[choosenface * 5 + 3] }; gPoint origin = new gPoint(pface.VertexList[face[0]]); // set which point will be the origin of the image gPoint xDir = new gPoint(pface.VertexList[face[1]]); // set which point will be the x direction of the image gPoint yDir = new gPoint(pface.VertexList[face[2]]); // set which point will be the y direction of the image Matrix mat = new Matrix(); // need to create the Matrix to be applied Vector xver = new Vector(origin, xDir); // based on the origin Vector yver = new Vector(origin, yDir); //xdir and ydir mat.SetFrom(origin, xver, yver); gPoint originTrans = mat.Transform(origin); // get the transformed origin gPoint xDirTrans = mat.Transform(xDir);// get the transformed x direction //create the mapped image double border = originTrans.Distance3D(xDirTrans) / 100.0d; // give a bit of a border arround vdMappedImage mappedimg = new vdMappedImage(imgdef, new gPoint(originTrans.x +
结果显示:
请注意:图像将应用于整个多面体,而不是应用于特定的一个或多个面,因此,如果图像投影中有面(如该三次多面体的底部),则图像也将应用于它们。
以上问答,如果您有任何的疑惑都可以在评论区留言,我们会及时回复。此系列的问答教程我们会持续更新,如果您感兴趣,可以多多关注本教程。
热门文章推荐:
=======================================================
如果您对想要购买正版授权VectorDraw Developer Framework(VDF),可以联系咨询相关问题。
关注慧聚IT微信公众号 ☟☟☟,了解产品的最新动态及最新资讯。
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@atlvshi.cn
文章转载自:锁定 Excel 中的单元格对于数据完整性至关重要。在这篇教程中,我们将探讨如何使用 C# 锁定 Excel 中的单元格。
VMProtect 是一款强大的代码保护工具,支持虚拟化、混淆和加密等多种保护技术。本文将详细介绍如何将 VMProtect 集成到 Visual Studio,并提供实用技巧。
在 Word 文档中,图片和形状可以添加超链接,用于跳转到外部网站、文件,或文档中的特定位置。这篇文章将介绍如何使用 Spire.Doc for .NET 在 C# 中以编程方式修改 Word 文档中图片和形状的超链接。
本文将演示如何使用DevExpress WPF Grid控件实现列绑定到数字源字段,欢迎下载最新版组件体验!
将常用工程图文件转换为新的VectorDraw格式标准,以及其他文件格式。
VectorDraw Developer Framework (All in one)面向对象的矢量图形引擎库,支持2D和3D图形,用于可视化其应用程序,无限分发授权。
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@atlvshi.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢