搜索附件  
头雁微网 附件中心 专业技术 微波工程 球面螺旋(Spherical Spiral): Spherical spiral_02.jpg
板块导航
附件中心&附件聚合2.0
For Discuz! X3.5 © hgcad.com

球面螺旋(Spherical Spiral): Spherical spiral_02.jpg

 

球面螺旋(Spherical Spiral):
【发帖际遇】: mfhsu在大街上捡到金币5元, 飞快的跑回家躲着.


在CST-->Macros--->construct---->curves---->creat 3D curves analytical(xyz-wcs)-------------------------- >出現一個螺旋線-------->到history把VBA code改成下述.
本文来自:微波仿真论坛〓http://bbs.rfeda.cn
------------------------------------------------------------------------------------------------------------------------------------
On Error GoTo Curve_Exists
Curve.NewCurve "3D-Analytical"
Curve_Exists:
On Error GoTo 0
Dim sCurveName As String
sCurveName = "3dpolygon_1"
With Polygon3D
  .Reset
  .Name sCurveName
  .Curve "3D-Analytical"
' ======================================
' !!! Do not change ABOVE this line !!!
' ======================================
' -----------------------------------------------------------
' adjust x-range as for-loop parameters (xmin,max,step)
' enter y/z-Function-statement within for-loop
' fixed parameters a,b,c have to be declared via Dim-Statement
' -----------------------------------------------------------
' NOTE: available MWS-Parameters can be used without
'       declaration at any place (loop-dimensions, ...)
'       (for parametric curves during parameter-sweeps and optimisation !)
' -------------------------------------------
Dim  x As Double, y As Double, z As Double  
Dim  rho As Double, theta As Double, phi As Double

  Dim t As Double
  For t=-0.25*Pi To 0.25*Pi STEP 0.001 ( 此設定剛好繞球一圈)
  
            rho=10 (sphere radius)
            theta=t
            phi=2*t
            x=rho*( sin(theta*100) )*cos(phi)  (*100, 控制螺旋圈數)
            y=rho*( cos(theta*100) )*cos(phi)
            z=-rho*sin(phi)
     .Point x, y, z

  Next t
' ======================================
' !!! Do not change BELOW this line !!!
' ======================================
   .Create
End With
SelectTreeItem("Curves\3D-Analytical\"+sCurveName)

[ 本帖最后由 mfhsu 于 2008-4-22 11:43 PM 编辑 ]
这个是利用cst宏语言编写的,支持一个
:29bb 多谢楼主~~辛苦啦·~
多谢楼主,值得收藏,有空要好好研究
:27bb     有空要好好研究
楼主好厉害,见识见识!
请教楼主,螺旋波纹波导如何做?谢谢
学习了,好东东,谢谢!!!!!!!!!!!!!!!!!!!!
球面螺旋(Spherical Spiral): Spherical spiral_02.jpg
客服中心 搜索
关于我们
关于我们
关注我们
联系我们
帮助中心
资讯中心
企业生态
社区论坛
服务支持
资源下载
售后服务
推广服务
关注我们
官方微博
官方空间
官方微信
返回顶部