QuickField Model Builder
QuickField Model Builder is a lightweight utility that interacts with
QuickField installed on the same computer and automatically generates a
2D Geometry Model file (.mod) by executing commands from a script file (.qfs) in sequence.
The program is written in Python, and both the source code and a precompiled executable are available for download from the QuickField web site.
Program Launch Options
Model Builder can be started with or without command-line parameters:
model_builder.exe [/h] [filepath]
-
/h– displays a list of supported script commands. -
filepath– loads the specified.qfsscript.
If model_builder.exe is launched without parameters, it opens a graphical user interface where the user can choose a script file manually.
QuickField Model Builder Scripts
A Model Builder script (.qfs) is a plain text file where each line is interpreted
as a command.
Script format version 2.1 uses the unified label field for block labels in primitive geometry commands such as rect and circle.
Supported Commands
{"version":"2.1"}Specifies the version of this file format.
{"open":fileName}
Opens an existing QuickField 2D geometry model file (.mod) or creates a new model
if the file does not exist.
If fileName is omitted, a new model is created with the default name
Model1.
{"coordinates":string}Sets the Cartesian x, y ("cartesian") or polar r, φ ("polar") coordinate system. φ is in degrees. If no explicit command in the script - QuickField problem will be set as Cartesian by default.
{"save":fileName (optional)}
Saves the current model. If fileName is omitted, the model is saved under
the name used when it was opened or created.
{"units": string}
Sets the length units for the model.
Available values:
um, mm, cm, m, km,
in, mil, ft, ml.
If no explicit command in the script - QuickField problem will be set in meters by default.
{"circle":{ "xc":number, "yc":number, "r":number, "label":string (optional), "boundaryLabel":string (optional)}}
Adds a circle with center at (xc, yc) and radius r.
Optional parameters:
label – label assigned to the block area inside the circle.
boundaryLabel – label assigned to the circle boundary.
{"rect":{"x":number, "y":number, "w":number, "h":number, "label":string (optional), "boundaryLabel":string (optional)}}
Adds a rectangle.
(x, y) is the bottom-left corner,
w is the width, and h is the height.
Optional parameters:
label – label assigned to the block area of the rectangle.
boundaryLabel – label assigned to the rectangle boundary.
{"v":{"x":number, "y":number, "label":string (optional)}}
Adds a vertex at coordinates (x, y).
An optional label may be assigned to this vertex.
{"e":{"x1":number, "y1":number, "x2":number, "y2":number, "angle":number (optional), "label":string (optional)}}
Adds an edge (line segment or arc) between points (x1, y1) and (x2, y2).
If angle is omitted, a straight line segment is created.
If angle is specified, an arc is created with the given angle.
An optional label may be assigned to the edge.
{"bLabel":{"x":number, "y":number, "label":string, "boundaryLabel":string}}
Assigns label to the block (region) that contains the point
(x, y).
Optionally, boundaryLabel may also be assigned to the boundary edges of this block.
{"eLabel":{"x":number, "y":number, "label":string}}
Assigns label to the edge nearest to point
(x, y).
{"vLabel":{"x": number, "y": number, "label": string }}
Assigns label to the vertex nearest to point
(x, y).
Edit and preview
Here you can edit or create a script and instantly preview the geometry it generates.:
The software is provided "as is" and the author disclaims all warranties with regard to this software including all implied warranties of merchantability and fitness. in no event shall the author be liable for any special, direct, indirect, or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software.
- Accept terms above and download:
Source code and precompiled (py-file + exe-file)