明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1348|回复: 3

关于根据点的xyz坐标建曲面的问题

[复制链接]
发表于 2004-9-27 16:16:00 | 显示全部楼层 |阅读模式
如果已知若干控制点的xyz坐标,可以拟合一个曲面么:)


谢谢各位高手

发表于 2004-9-27 18:32:00 | 显示全部楼层
<RE class=Code>Sub Example_Add3DMesh()
    ' This example creates a 4 X 4 polygonmesh in model space.
    Dim meshObj As AcadPolygonMesh
    Dim mSize, nSize, count As Integer
    Dim points(0 To 47) As Double
   
    ' Create the matrix of points
    points(0) = 0: points(1) = 0: points(2) = 0
    points(3) = 2: points(4) = 0: points(5) = 1
    points(6) = 4: points(7) = 0: points(8) = 0
    points(9) = 6: points(10) = 0: points(11) = 1
    points(12) = 0: points(13) = 2: points(14) = 0
    points(15) = 2: points(16) = 2: points(17) = 1
    points(18) = 4: points(19) = 2: points(20) = 0
    points(21) = 6: points(22) = 2: points(23) = 1
    points(24) = 0: points(25) = 4: points(26) = 0
    points(27) = 2: points(28) = 4: points(29) = 1
    points(30) = 4: points(31) = 4: points(32) = 0
    points(33) = 6: points(34) = 4: points(35) = 0
    points(36) = 0: points(37) = 6: points(38) = 0
    points(39) = 2: points(40) = 6: points(41) = 1
    points(42) = 4: points(43) = 6: points(44) = 0
    points(45) = 6: points(46) = 6: points(47) = 0
   
    mSize = 4: nSize = 4
   
    ' creates a 3Dmesh in model space
    Set meshObj = ThisDrawing.ModelSpace.Add3DMesh(mSize, nSize, points)
   
    ' Change the viewing direction of the viewport to better see the polygonmesh
    Dim NewDirection(0 To 2) As Double
    NewDirection(0) = -1: NewDirection(1) = -1: NewDirection(2) = 1
    ThisDrawing.ActiveViewport.direction = NewDirection
    ThisDrawing.ActiveViewport = ThisDrawing.ActiveViewport
    ZoomAll
   
End Sub</PRE>
 楼主| 发表于 2004-9-29 19:40:00 | 显示全部楼层
谢谢斑竹


我还有个问题,如果所取得点是随机,分布不是很规律,那首先要将所有点按大小排个队,再将他们一个一个输入.


还有拟合曲面有除了二次B-spline,三次B-spline,Bezier,还有别的么???


我听同学说cass有拟合曲面的功能,它用的什么的方法呢?:)
发表于 2004-9-29 19:53:00 | 显示全部楼层
对三维方面,我也没什么研究,专业不对口,:)



看看别的大侠能不能帮你
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-28 01:35 , Processed in 0.171168 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表