如何构建带孔的3D对象 [英] How to build a 3D Object with holes

查看:71
本文介绍了如何构建带孔的3D对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿那里,

i我实际上正在寻找一种方法来获得3D渲染器的漏洞。

要创建和显示quader我使用基于螺旋wpf的工具包。

 meshBuilder.AddBox( new  Rect3D( new  Point3D(min.X,min.Y,min.Z), new  Size3D(dim.X,dim.Y,dim.Z))); 



现在我想创建一个更复杂的模型。因此,我搜索了一种使用建设性实体几何的方法。

https://en.wikipedia。 org / wiki / Constructive_solid_geometry [ ^ ]



但我找不到任何可行的解决方案。我想如果我不想在helix-toolkit中使用复杂模型,我必须在其他程序中构建它们并导入它们。是吗?



我感谢任何帮助:)

问候3DC#

解决方案


我担心meshBuilder不会帮你解决这个问题。对于CSG,您将需要布尔运算,但没有,所以您必须使用其他东西或者以旧方式面对面地进行操作。在这种情况下,您可能只使用三角形网格,这很容易(没有特殊情况)。提示:将它画在纸上,将面划分为三角形...:D

祝你好运


不是真的 - 你的显卡必须做同样的事情每次它呈现的东西......;)


嘿那里,



试图用三角形网格完成它。但我又失败了。



正如我所说,我想把多个圆柱体与一个矩形结合起来。

首先我收集圆柱体的所有点。因此,我将循环中的新柱面添加到构建器并将计算的位置保存在数组中

 insideMeshBuilder.AddCylinder(
new Point3D(drillPartMin.X,drillPartMin.Y,drillPartMin.Z),
new Point3D(drillPartMax.X,drillPartMax) .Y,drillPartMax.Z),
unitTask.Information.Diameter,
ThetaDiv);
列表< point3d> combinedPoints = new List< point3d>();

foreach (Point3D点 in insideMeshBuilder.Positions)
{
combinedPoints.Add(point);
}
< / point3d > < / point3d > ;



在第二步中,我将多维数据集的点添加到该集合中。

 meshBuilder.AddBox( new  Rect3D( new  Point3D(min.X,min.Y,min.Z) ), new  Size3D(dim.X,dim.Y,dim.Z))); 
列表< point3d> combinedPoints = new List< point3d>();
foreach (Point3D点 meshBuilder.Positions)
{
combinedPoints.Add(点);
}
< / point3d > < / point3d > ;



现在我拥有了我需要定义模式的所有点数。我不知道如何连接这些点来构建视觉表面。我想我需要某种三角测量?或者是否有一个meshBuilder方法只能通过点云构建模型?

感谢您的帮助! =)


Hey there,
i am actually looking for a way to get holes in a 3D-quader.
To create and display the quader i use the helix wpf based toolkit.

meshBuilder.AddBox(new Rect3D(new Point3D(min.X, min.Y, min.Z), new Size3D(dim.X, dim.Y, dim.Z)));


Now i want to create a more complexe model. Therefore i searched for a way to use "constructive solid geometry".
https://en.wikipedia.org/wiki/Constructive_solid_geometry[^]

But i can't find any working solution. I guess if i wan't to use complexe models in helix-toolkit i have to build them in some other programm and import them. Is that right?

I appreciate any kind of help :)
Greetings 3DC#

解决方案

Hi I'm afraid meshBuilder will not help you with this. For CSG you will need Boolean operations but there are none, so you will have to either use something else or do it old way face by face. In this case you can probably use only triangle mesh and that's quite easy (no special cases). Hint: Draw it on the paper, divide faces to triangles... :D
Good luck


Not really - your graphic card have to do the same thing every time it renders something... ;)


Hey there,

tried to get it done with the triangle mesh. But i failed again.

As i said i want to combine multiple cylinders with one rectangle.
First i collect all points of the cylinders. Therefore i add the new cylinders in a loop to the builder and save the calculated positions in an array

insideMeshBuilder.AddCylinder(
                    new Point3D(drillPartMin.X, drillPartMin.Y, drillPartMin.Z),
                    new Point3D(drillPartMax.X, drillPartMax.Y, drillPartMax.Z),
                    unitTask.Information.Diameter,
                    ThetaDiv);
List<point3d> combinedPoints = new List<point3d>();

foreach (Point3D point in insideMeshBuilder.Positions)
{
  combinedPoints.Add(point);
}
</point3d></point3d>


In the second step i add the points of the cube to that collection.

meshBuilder.AddBox(new Rect3D(new Point3D(min.X, min.Y, min.Z), new Size3D(dim.X, dim.Y, dim.Z)));
List<point3d> combinedPoints = new List<point3d>();
foreach (Point3D point in meshBuilder.Positions)
{
   combinedPoints.Add(point); 
}
</point3d></point3d>


Now i have all points which i need to define the modell. I don't know how to connect these points to build a visual surface. I guess i need some sort of triangulation? Or is there a meshBuilder method to build models only by a point cloud?
Thanks for your help! =)


这篇关于如何构建带孔的3D对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆