magicpu 发表于 2005-7-27 10:56:00

请问如何在CAD中画椭球体?

请问如何在CAD中画椭球体?不知道为什么CAD中没有这个函数,本人尝试利用旋转椭圆的方法生成椭球体,但总是不能成功,还请大虾指教

marxbat 发表于 2005-7-28 07:42:00

<P>torus,“指定圆环体半径”输入负值,“指定圆管半径”时输入正值,圆管半径绝对值比圆环体半径绝对值大。</P>
<P>&nbsp;</P>

承诺 发表于 2005-7-28 10:08:00

<P>哈。。。又学了一招</P>

magicpu 发表于 2005-7-28 13:30:00

<P>呵呵,谢了,昨天仔细研究了一下,终于搞定了</P>
<P>Public Sub AddMyEllipsoid(ellipsoid As EllipsoidModel)<BR>&nbsp;&nbsp;&nbsp; Dim majAxis(0 To 2) As Double<BR>&nbsp;&nbsp;&nbsp; Dim center(0 To 2) As Double<BR>&nbsp;&nbsp;&nbsp; Dim radRatio As Double<BR>&nbsp;&nbsp;&nbsp; Dim curves(0 To 1) As AcadEntity<BR>&nbsp;&nbsp;&nbsp; Dim regionObj As Variant<BR>&nbsp;&nbsp;&nbsp; Dim startpt(0 To 2) As Double<BR>&nbsp;&nbsp;&nbsp; Dim endpt(0 To 2) As Double<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; center(0) = ellipsoid.cx: center(1) = ellipsoid.cy: center(2) = ellipsoid.cz<BR>&nbsp;&nbsp;&nbsp; majAxis(0) = ellipsoid.rx: majAxis(1) = 0: majAxis(2) = 0<BR>&nbsp;&nbsp;&nbsp; radRatio = ellipsoid.ry / ellipsoid.rx<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set curves(0) = ThisDrawing.ModelSpace.AddEllipse(center, majAxis, radRatio)<BR>&nbsp;&nbsp;&nbsp; curves(0).StartParameter = 0<BR>&nbsp;&nbsp;&nbsp; curves(0).EndParameter = 3.141592<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; startpt(0) = ellipsoid.cx: startpt(1) = ellipsoid.cy: startpt(2) = ellipsoid.cz<BR>&nbsp;&nbsp;&nbsp; endpt(0) = ellipsoid.rx: endpt(1) = 0: endpt(2) = 0<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set curves(1) = ThisDrawing.ModelSpace.AddLine(curves(0).StartPoint, curves(0).EndPoint)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; regionObj = ThisDrawing.ModelSpace.AddRegion(curves)</P>
<P>&nbsp;&nbsp;&nbsp; Set ModelObj = ThisDrawing.ModelSpace.AddRevolvedSolid(regionObj(0), startpt, endpt, 6.28)<BR><BR>End Sub</P>
<P>其中EllipsoidModel是个结构体</P>

wangfeiyin 发表于 2005-7-29 06:57:00

回复:(magicpu)请问如何在CAD中画椭球体?

<P>先做个椭圆,转换成面域,再将此面域延中线切除一半,将剩下面域延中线旋转360度成为椭球体。</P>
<P>&nbsp;</P>

☆笨蛋☆ 发表于 2005-7-30 12:55:00

<P>不看不知道,一看吓一跳呀</P>

zxdcad 发表于 2005-7-30 21:46:00

本帖最后由 作者 于 2005-7-31 19:27:29 编辑 <br /><br /> <P>楼上几位做的应该是旋转体,而不是椭球体,真正的三个正交方向投影均呈椭圆的椭球体恐怕用旋转做不出来吧!</P>
<P>下面这个文件中的东西恐怕才是椭球体!</P>
<P></P>

tamin 发表于 2005-8-2 13:24:00

先话一个圆球,比如半径是1,输出为块,然后用插入块,选择前面输出的块,在缩放比例里面输入想要的比例,比如X:1,Y:2,Z:3。得到立,侧,平三个剖面都是椭圆(长短轴分别为:1+2,1+3,2+3)的椭球。

ling18 发表于 2005-8-3 18:34:00

<P></P>
<P>试了几种效果</P>
<P>&nbsp;</P>

ling18 发表于 2005-8-3 18:35:00

wangfeiyin发表于2005-7-29 6:57:00static/image/common/back.gif回复:(wangfeiyin)回复:(magicpu)请问如何在CAD中画椭球体?
先做个椭圆,转换成面域,再将此面域延中线切除一半,将剩下面域延中线旋转360度成为椭球体。
UploadFil


<P><BR>请问你是怎么把DWG图转过来的</P>
<P>效果很好啊。。。。</P>
页: [1] 2
查看完整版本: 请问如何在CAD中画椭球体?