CLI Usage — Project name not set documentation
The Geometor Model CLI provides an interactive environment (REPL) for constructing and analyzing geometric models using a concise, text-based syntax. It is designed for rapid experimentation and scripting.
Starting the CLI¶
To start the CLI, run the module as a script:
You will be greeted by the Geometor CLI prompt:
Geometor CLI
Commands:
...
>
Command Syntax¶
The CLI supports a variety of commands for creating geometric elements.
Points¶
Manual Label: Create a point with a specific label.
Auto Label: Create a point and let the model assign the next available label (A, B, C…).
Lines¶
Connect Points: Create a line passing through two points.
Circles¶
Center & Radius: Create a circle with a center point and a point on the circumference.
Center: A, Point on Circle: B
Polygons¶
Polygon from Points: Create a polygon connecting 3 or more points.
Linear Divisions¶
Segment: Create a segment between two points.
Section: Create a section defined by three collinear points (start, inner, end).
Wedges¶
Wedge: Create a wedge defined by a center, a radius point, and a sweep end point.
Center: A, Radius: B, Sweep to: C (Note: The sweep starts from the radius point B)
Scripting¶
You can pipe a file containing a list of commands directly into the CLI for batch processing.
Example Script (`script.txt`):
* 0, 0
* 1, 0
( A B )
( B A )
< A C B >
exit
Run:
python -m geometor.model < script.txt
Output¶
The CLI uses the rich library to provide formatted output, including:
Element Details: Coordinates, equations, and properties.
Intersection Logs: Automatically detected intersection points are logged as they are found.
Tables: Clean tabular data for complex objects like Polygons.