我对眼睛很陌生,所以如果我错过了一些明显的东西,请说。
我有一个混合的表面,我与一个平面相交,试图在我的表面上得到“网格”线。麻烦的是,曲线只显示在表面的内部,我希望它们在两边都是可见的。
我的方法是否有一个可以发挥作用的调整,或者从根本上说,是否有一个更好的方法来实现我想要的?
下面是通用代码示例。
// 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();发布于 2022-01-06 11:11:58
https://stackoverflow.com/questions/70589068
复制相似问题