首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使曲线实体在曲面实体的两侧可见?

如何使曲线实体在曲面实体的两侧可见?
EN

Stack Overflow用户
提问于 2022-01-05 07:16:15
回答 1查看 182关注 0票数 0

我对眼睛很陌生,所以如果我错过了一些明显的东西,请说。

我有一个混合的表面,我与一个平面相交,试图在我的表面上得到“网格”线。麻烦的是,曲线只显示在表面的内部,我希望它们在两边都是可见的。

我的方法是否有一个可以发挥作用的调整,或者从根本上说,是否有一个更好的方法来实现我想要的?

下面是通用代码示例。

代码语言:javascript
复制
  // Define lists to hold curves and points  
  List<devDept.Eyeshot.Entities.ICurve> curveList = new List<devDept.Eyeshot.Entities.ICurve>();
  List<devDept.Geometry.Point3D> points = new List<devDept.Geometry.Point3D>();

  // Add points to a new curve
  points.Add(new devDept.Geometry.Point3D(0, 0, -1));
  points.Add(new devDept.Geometry.Point3D(0, 1, 1));
  curveList.Add(devDept.Eyeshot.Entities.Curve.GlobalInterpolation(points, 3));
  
  // Add points to a second new curve
  points.Clear();
  points.Add(new devDept.Geometry.Point3D(1, 0, -1));
  points.Add(new devDept.Geometry.Point3D(1, 1, 1));
  curveList.Add(devDept.Eyeshot.Entities.Curve.GlobalInterpolation(points, 3));
  
  // Create the surface
  devDept.Eyeshot.Entities.Surface loft1 = devDept.Eyeshot.Entities.Surface.Loft(curveList, 3)[0];

  // Generate a list of entities to render
  devDept.Eyeshot.EntityList entities = new devDept.Eyeshot.EntityList();
  entities.Add(loft1, Color.PeachPuff);

  // Intersect the surface with a horizontal plane at z == 0
  List<ICurve> sectionLine1 = loft1.IntersectWith(new Plane(new devDept.Geometry.Point3D(0, 0, 0), new Vector3D(0, 0, 1)), 1e-1).ToList();
  entities.Add((Entity)sectionLine1[index], Color.Black);

  // Show in the Eyeshot model
  modelVisualiser.Clear();
  modelVisualiser.Entities.AddRange(preview);
  modelVisualiser.Invalidate();
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-01-06 11:11:58

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70589068

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档