输出图片程序_PFC中如何采用程序循环输出图片

def part1
    x0 = 3.0
    y0 = 0.0
    i = 7
    command
        wall delete walls range id = @i
    end_command
    loop while 1 # 0
        if out_coal = 1 then
            i = i + 3
            if i > 24 then
                exit
            endif
            x21 = x00
            x22 = x11
            wallid = i - 3
            x0 = x0 + 4.5
            out_coal = 0
            fname = string.build('%1_picture.png',i)
            command
                wall delete walls range id = @i
                wall create id @wallid vertices @x21 @y0 @x22 @y0
                plot bitmap plot 'Plot01' filename @fname
            end_command
        else
            command
                cyc 100
            end_command
        endif
    end_loop
end


在这里贴出来一个程序,简单的看一下如何通过程序输出图片,而不是一张一张的去截图。

  1. 本程序首先定义的是一个无限循环的过程,loop while 1 # 0,就是一个无限循环的过程,在其中我们可以设置一些条件跳出循环;

  2. 输出图片之前,我们需要定义图片的名称的,也就是字符串构建命令string.build;

  3. plot bitmap plot 'Plot01' filename @fname,即为输出图片的命令,Plot01表示的是选取的视图。

  4. 7d486ce20b2a3cd2a0dd8842dff3ec1b.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值