dailybright 发表于 2006-7-28 15:49:23

gid 有自己的二次开发语言么?gid可否自己生成自己定义的菜单?

gid 有自己的二次开发语言么?gid可否自己生成自己定义的菜单?

xjking263 发表于 2006-7-31 09:40:41

个人认为可以,具体命令流可以参考其生成的batch文件,该batch文件是这样炼成的:
1.进入gid---,选中write batch files这个选项,并且输入保存这个文件的路径和名称
2. 用gid进行简单的操作,如生成线、形成面等....,保存退出gid,打开上面所说的batch文件(用写字板或者 Uedit打开),会出现如下的命令流,
*****SAVE MARK
*****SAVE STATE
MaintainProblemTypeInNew 0
DefaultFileNAmeInCalcFile 0
ImportTolerance 0.001000
FastSelection 0
CreateAlwaysNewPoint 0
MeshUntilEnd 1
AllowAutomaticStructured 0
MaintainOldMesh 0
NoMeshFrozenLayers 1
AutomaticCorrectSizes 1
HighQualitySmoothing 0
SplashWindow 1
BatchFileToWrite d:/gls.mac
SizeTransitionsFactor 0.600000
SurfaceMesher 0
VolumeMesher 0
WriteRotationsInBatch 0
AutoCollapseAfterImport 1
SeeMsgRenderVolume 1
CollapseIgnoringLayers 1
IGESIgnoreInvisible 1
IGESCurveOnSurfaceFrom3D 1
AutoImportTolerance 1
PropertyToPost Layer
CommentsFont Helvetica 12
PostBinFormat 1.1
PostResOverRes no
PositionAxes 0 0 0 1
PositionCoord 0 0 0 1
PositionComments 0 0 0 0
PositionResultsLegend 0 0 0 1
ForceMeshEntities 0
UsingNowState GEOMETRYUSE
*****END SAVE STATE
escape escape escape escape geometry create NurbsLine
-9.671281,3.737024,0.000000tol0.207612
-9.013841,2.110727,0.000000tol0.207612
-7.906574,3.702422,0.000000tol0.207612
-7.318339,2.214533,0.000000tol0.207612
-6.245675,3.702422,0.000000tol0.207612
-5.726643,2.283737,0.000000tol0.207612
-4.411765,3.702422,0.000000tol0.207612
-3.961937,2.076125,0.000000tol0.207612
-2.612457,3.564014,0.000000tol0.207612
-2.162630,2.145329,0.000000tol0.207612
-1.159170,3.529412,0.000000tol0.207612
escape
escape
escape escape escape escape Files Save

前面的命令都是启动gid自动产生的,重要的是escape之间的命令流:
escape escape escape escape geometry create NurbsLine
-9.671281,3.737024,0.000000tol0.207612
-9.013841,2.110727,0.000000tol0.207612
-7.906574,3.702422,0.000000tol0.207612
-7.318339,2.214533,0.000000tol0.207612
-6.245675,3.702422,0.000000tol0.207612
-5.726643,2.283737,0.000000tol0.207612
-4.411765,3.702422,0.000000tol0.207612
-3.961937,2.076125,0.000000tol0.207612
-2.612457,3.564014,0.000000tol0.207612
-2.162630,2.145329,0.000000tol0.207612
-1.159170,3.529412,0.000000tol0.207612
escape
创建了一个多点形成的 NurbsLine, 将上面的这段另存为一个bch格式的文件,直接可以导入到gid中。
同理,大家也可参考gid形成面或体的命令流,然后自己依葫芦画瓢生成自己需要的模型......

可参考fepg论坛上的http://www.fegensoft.com/phpwind/read.php?tid=2193&fpage=1

ilovenili 发表于 2006-9-8 10:45:42

关于GID的二次开发,有必要说明一下,GID的二次开发和运行批处理是
两个概念。二次开发主要用到了TCL/TK语言,以及GID提供给用户的接口文件格式,
比如cnd,bas,sim,tcl,prb等等,所有的文件都放在*.gid目录下。
呵呵,现在转投FEPG公司了,专门做这方面的工作,以后有新发现了再告诉大家!
页: [1]
查看完整版本: gid 有自己的二次开发语言么?gid可否自己生成自己定义的菜单?