- 积分
- 0
- 注册时间
- 2009-11-4
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2009-11-5 16:59:26
|
显示全部楼层
来自 山东青岛
; Example to illustrate the use of FISHCALL 14 and 15 and FISH functions
; mclickx, mclicky and mclickz.
; The coordinate values obtained are also printed on the screen and can be
; routed to a log file if set log on is specified.
;
new
call fishcall.fis
gen zone brick size 10 10 10 p0 0 0 0 p1 10 0 0 p2 0 10 0 p3 0 0 10
model elastic
prop she 1e4 bulk 1e6 dens 2000
set grav 10
fix x y z range z 0
plot block model axes white
;
def leftdblclick
i = mclickx
j = mclicky
k = mclickz
ii=out('LCLICK ' + ' ' + string(i) + ' ' + string(j) + ' ' + string(k));
zpnt = z_near(i,j,k)
if zpnt # NULL then
zid = z_id(zpnt)
ii = out( 'LCLICK ' + ' ' +'zId = ' + ' ' + string(zid))
command
m ssoft range id zid ; Assign a model
endcommand
endif
end
;
def rightdblclick
i = mclickx
j = mclicky
k = mclickz
ii=out( 'RCLICK ' + ' ' + string(i) + ' ' + string(j) + ' ' + string(k));
zpnt = z_near(i,j,k)
if zpnt # NULL then
zid = z_id(zpnt)
ii = out('RCLICK ' + ' ' + 'zId = ' + ' ' + string(zid))
command
m mohr range id zid ; Assign a model
endcommand
endif
end
;
leftdblclick
rightdblclick
;
set fishcall FC_LEFT_DC leftdblclick
set fishcall FC_RIGHT_DC rightdblclick
; At this point users can double click on the model with left and right
; mouse buttons and see what happens. |
|