News & Events

Publications

Subscription

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]

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.

Supported Commands

{"version":"2.0"}

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":{ "cx":number, "cy"::number, "r"::number, "label":string (optional), "boundaryLabel":string (optional)}}

Adds a circle with center at (cx, cy) 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.:

List of commands:

Log:

Labels collected:

Blocks
Edges
Vertices