IsoAlgo GUI Usage

简介: IsoAlgo GUI Usage eryar@163.com Abstract. The GUI of IsoAlgo is made by Tcl/Tk. The usage is easy and simple, if you are familiar with Tcl/Tk, you can customize it by yourself.

IsoAlgo GUI Usage

eryar@163.com

Abstract. The GUI of IsoAlgo is made by Tcl/Tk. The usage is easy and simple, if you are familiar with Tcl/Tk, you can customize it by yourself. The paper focus on the usage for IsoAlgo GUI and the method to customize the IsoAlgo GUI.

Key Words. IsoAlgo, isogen, GUI, Tcl/Tk, Customization, PCF, DXF

1. Introduction

图形用户界面(GUI: Graphical User Interface)相对命令行而方更直观,更易于操作,所以有必要给IsoAlgo加个操作窗口。考虑到Tcl/Tk的简单易用,且有很强的扩展能力,所以决定使用Tcl/Tk来生成界面,IsoAlgo GUI如下图所示:

wps_clip_image-2419

Figure 1.1 IsoAlgo GUI

使用Tcl/Tk来编写GUI方便快速,因为不需要编译链接,且Tcl提供了很多实用的功能,可以在比C/C++或Java更高的层次上进行开发。Tk隐藏了C或Java程序员必须关注的很多细节。使用Tcl/Tk所需要学习的知识更少,需要编写的代码更少。通过几个小时的学习,Tcl/Tk新手用户就可以创建有意思的用户界面。

Tcl/Tk适用于快速开发的另一个原因在于Tcl是解释语言。使用Tcl应用程序时,可以在运行中生成和使用新的脚本,而无需重新编译和重启应用程序。这使您可以迅速尝试新的想法,迅速修正程序中的错误。


2. IsoAlgo GUI Usage

IsoAlgo GUI的使用方法简单,主要分三步写成,步骤如下:

v 一是选择要生成iso图的pcf文件到文件列表框中;

v 二是设置出图文件目录;

v 最后,Apply就可将pcf文件生成dxf的iso图到指定的目录了。

2.1 Add PCF 

添加PCF文件到列表框有两种方式,一种是通过文件选择对话框来添加;一种是通过选择一个目录来添加。

wps_clip_image-29916

Figure 2.1.1 Add PCFs

通过菜单中的Add PCF...或按钮Add可以打开文件选择对话框以选择PCF文件,如下图所示:

wps_clip_image-28357

Figure 2.1.2 Add PCF Dialog

通过按钮Remove可以删除待生成iso图列表框中的pcf;按钮Clear可以清空列表框。

通过菜单中的Add PCF Directory...可以将一个文件夹中所有pcf文件添加到待生成iso图的列表框中。

2.2 Set DXF Directory

设置生成iso图的输出目录,通过菜单Set DXF Directory...来实现。如果未设置输出目录,则会将iso图生成到d:/isodxf文件夹中。

2.3 Generate Isometric Drawing

通过按钮Apply即可生成列表框中所列的PCF文件的Iso图到DXF了。生成过程中可以查看命令窗口中的相关信息,如下图所示:

wps_clip_image-28425

Figure 2.3.1 IsoAlgo Generating Isometric Drawing Info

生成图纸如下图所示:

wps_clip_image-31985

Figure 2.3.2 Piping Isometric Drawings generated by IsoAlgo

wps_clip_image-23820

Figure 2.3.3 Piping Isometric Drawings generated by IsoAlgo

wps_clip_image-15735

Figure 2.3.4 Piping Isometric Drawings generated by IsoAlgo

wps_clip_image-32629

Figure 2.3.5 Piping Isometric Drawings generated by IsoAlgo

3. IsoAlgo Tcl/Tk Command

IsoAlgo GUI也提供了几个自定义的命令,如下图所示:

wps_clip_image-8044

Figure 3.1 IsoAlgo Tcl/Tk Commands

这三个IsoAlgo命令的功能分别为:

v isoalgo input.pcf output.dxf:根据输入的input.pcf文件生成iso图到output.dxf;

v isoalgoinfo:显示IsoAlgo的使用说明,就是上面界面中的内容;

v dumpsymbol:生成符号模板库中所有的符号到IsoAlgoSymbolLib.dxf中,一是可以检查符号模板库是否完整;再者可以做为自定义符号的参考;命令生成如下图所示:

wps_clip_image-7847

Figure 3.2 IsoAlgo Symbol Template Library

4. IsoAlgo GUI Customization

由于IsoAlgo GUI是基于Tcl/Tk开发的,所以根据自定义的isoalgo命令及结合Tcl强大的扩展功能,可以自己用Tcl脚本来自定义IsoAlgo的GUI,即可以自己修改IsoAlgo.tcl文件,来根据需要扩展所需的功能。

5. Conclusion

基于Tcl/Tk为IsoAlgo开发的GUI使用方便,具有扩展能力,且程序小巧。由于GUI是由Tk来实现,由于Tk具有跨平台的特性,所以不用担心像使用MFC做GUI那样,需要安装相关的库。

如果用户熟悉Tcl/Tk,也可以对IsoAlgo GUI进行扩展及自定义。

IsoAlgo is not finish yet, any feedback or suggestion is welcome, please send email to the author: IsoAlgo@gmail.com or eryar@163.com.

For more information about IsoAlgo, please visit:

http://code.google.com/p/isoalgo/

 

PDF Version: IsoAlgo GUI Usage

目录
相关文章
|
应用服务中间件
|
移动开发 HTML5 数据可视化
IsoAlgo3d - A PCF 3D Viewer for Desktop, Tablet and Smart phone
IsoAlgo3d - A PCF 3D Viewer for Desktop, Tablet and Smart phone eryar@163.com Abstract. IsoAlgo3d 通过将PCF三维可视化,并导出HTML文件。
2120 0
|
Python
Chapter 1: Creating the GUI Form and Adding Widgets
# -*- coding: utf-8 -*- # import import tkinter as tk # 1 imports from tkinter import ttk from tkinter import scrolledtext as st win = tk.
972 0
IsoAlgo3d - PCF format 3d visualization tool
IsoAlgo3d - PCF format 3d visualization tool eryar@163.com IsoAlgo3d is a PCF format 3d visualization tool.
1612 0
IsoAlgo - PCF Viewer
IsoAlgo - PCF Viewer eryar@163.com IsoAlgo can be used to view PCF file in 2D, i.e. Isometric drawing, or in 3D by IsoAlgo3d.
1655 0
|
Ubuntu 开发工具 C语言
Building QT projects from the command line
/************************************************************************ * Building QT projects from the command line * 说明: * 很多时候都是通过Qtcreator进行项目的创建以及编译,但是有时候可能 * 会遇到一些编译小问题,这时候命令行创建工程、编译工程可以作为测试、验证 * 的一种手段。
832 0
IsoAlgo3d - A PCF 3D Viewer
IsoAlgo3d - A PCF 3D Viewer eryar@163.com Alias的Isogen的PCF和IDF是生成管道ISO图的数据交换文件,且已经成为了国际标准。 IsoAlgo可以根据PCF文件生成DXF格式的ISO图纸,如下图所示: 关于IsoAlgo的更多信息请参考: http://www.
1674 0
Texas Instruments matrix-gui-2.0 hacking -- execute_command.sh
#!/bin/sh #Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ # # # Redistribution and use in source and binary forms, w...
859 0