Project files
What a cSlope project file contains, how to open and save it, and the built-in example and benchmark models.
Saving and opening
- File › Save (Ctrl+S) saves the project; the first time it asks for a file name, offering the model's name. Save as… (Ctrl+Shift+S) saves under a new name.
- File › Open (Ctrl+O) opens a project. You can also drop a project file onto the window, or double-click it in Windows Explorer.
- File › New (Ctrl+N) starts a new project with one example model, a homogeneous slope, to adapt.
Project files have the extension .cslp. cSlope always saves .cslp, whatever extension is typed. Projects saved by earlier versions as .json or .cslope open as before; saving one asks for a name and offers the same name with .cslp next to it, so the old file is kept as it was. Before New, Open, opening the examples or benchmarks or closing the window, cSlope asks whether to save unsaved changes. Changes to zoom, the canvas mode or results do not count as changes.
A save writes the whole file anew under a temporary name and then replaces the old file, so a crash or a full disk during a save leaves the previous file intact.
Sharing a project: Save as anonymized
Project files often hold client names, site locations, borehole data and drawings. To share a project, for example to attach it to an issue on GitHub, use File › Save as anonymized…. It saves an anonymized copy, offered as <name>-anonymized.cslp next to the project (in a browser, a download). The open project is not changed: it keeps its file name, and unsaved changes stay unsaved.
The dialog has these options; the defaults are on unless stated:
| Option | What the copy gets |
|---|---|
| Remove project information | Empty title, subtitle, client, project number, revision, author, checker, date and description of every model, and no import notes. |
| Rename models | Model 1, Model 2, … |
| Rename materials | Material 1, Material 2, …, with their parameters and colors; the 3D effects' excluded materials and an imported earlier stage follow. |
| Give other objects generic names | Water line 1, …, Reference line 1, …, Drawing 1, …; reinforcement and pile labels are removed, and head lines of an imported waternet are renamed. |
| Remove drawings and their files | No drawings under the models and none of their files in the archive. |
| Remove free text from text annotations | Text other than the variables (#FOS, #Method, {{…}}) becomes Text, so "Calculated F: #FOS" becomes "Text #FOS"; or the text annotations are deleted. |
| Remove results (off) | No results. Results do not name the client and help to reproduce a problem, but they contain coordinates. |
| Move to a local origin (off) | Every coordinate shifted so that the smallest x of each model is 0, and optionally its lowest point y = 0. |
Always: the copy has no thumbnail, its manifest is dated at the time it is saved, drawing files keep no original file name, and attachments no model uses are left out. In the copy's results the old material and model names are replaced too.
Moving to a local origin hides the real chainage and levels. A rigid shift does not change the factor of safety, so every absolute coordinate is moved by the same amount: the geometry, boundaries, region assignments, water lines (also before a rapid drawdown), loads, reinforcement, piles, search limits, custom and block surfaces, the imported waternet and earlier stage, the datum elevations of strength profiles (S = f(datum), the reference levels of Su and c′ growing with depth, OCR against elevation, the points of a spatial Mohr-Coulomb material), drawings, reference lines and a locked result view. An expression of a coordinate or datum elevation gets the shift added (H becomes (H) - 1200), so the parameters keep their values. The results are removed, since they are in the original coordinates; run the analysis again in the copy. A model with a material model this version does not know is left where it is, and the summary says so.
Before saving, the dialog lists what will be removed or renamed. Names inside parameters, expressions and other free text, and the content of drawing files you keep, are not changed: the dialog lists those it finds. Open the copy and check it before you share it.
What a project contains
A .cslp file is a ZIP archive of JSON files, one folder per model:
| File | Contents |
|---|---|
manifest.json | the format (cslope-project), its version, the cSlope version that saved the file, and when the project was first saved and last saved |
project.json | the order of the models, the active model, the unit system (SI) |
models/<id>/model.json | one model: everything but its result |
models/<id>/result.json | the model's last analysis result, when there is one, with a hash of the input it was computed for and the engine version that computed it |
models/<id>/backgrounds.json | the drawings placed under the model, when there are any: which attachment, its page and crop, the calibration and the transform to model coordinates, opacity, visibility and display options (shown in results, inverted in the dark theme) |
assets/index.json, assets/ | the project's attachments (the drawing files: PNG, JPEG, TIFF, PDF, DWG and DXF), when there are any; each file once, however many models place it |
thumbnail.png | a small picture of the active model's result sheet, when one was on screen |
For each model, model.json holds:
- the geometry, materials, region assignments, piezometric lines, loads, reinforcement and piles,
- the parameters, analysis options (with the unit weight of water, when the model sets its own), search limits and custom surfaces,
- the project information (title, client, revision and so on),
- the result sheet: annotations, paper and extents.
Because the result is saved with the model, a project opens with its results, ready to report. The results (slip surfaces, slices, finite element meshes) are most of a project's size; packed, a project with results takes about a seventh of the space of the plain JSON files of earlier versions. The JSON files are written in a fixed form (sorted keys, one time stamp), so saving the same project twice gives the same file, and two versions of a project can be compared file by file. Any ZIP tool can unpack a .cslp file, and the model files can be kept under version control.
A project saved by a newer version of cSlope in a format this version cannot read is not opened; cSlope says which version saved it, so you know to update. Files from earlier versions of cSlope are converted when they are opened. A model saved before the unit weight of water was a setting opens with the default, 9.807 kN/m³. A result sheet saved while the critical surface was a layer of its own opens with the one Surfaces layer in the place of the first of the two. A material table or color bar turned off is saved with its place and settings (hidden) and opens off; an older version of cSlope shows it. The grid's style (color, widths and minor lines, layerStyles.grid) and its place in the layer order are saved with the sheet; an older version of cSlope draws the grid as before. The frame's style (color, line width, label size, tick labels, layerStyles.frame) and its place in the layer order are saved the same way; an older version of cSlope draws the frame as before. The frame's label size is in px of the F label's unit (12 px is 10 pt, on every paper size). So are the text sizes of text annotations, the material table and slice plots (fontSizePx); a project saved before, with the size in px that grew with the paper (fontSize), opens with its text as it was on A4, and is saved in the new unit. An older version of cSlope draws such text at its default size. A slice plot's style (its color, line, markers, axis ranges and the parts shown) is saved with the plot (plotStyle, only what differs from the default); an older version of cSlope draws the plot in its default look. Since the line widths of the result sheet's layers and reference lines are given in px of 0.1 mm on the paper, a width saved before draws at its number in that unit (by default nothing is saved, and the lines draw at about their size on A4). The format is specified in docs/file-format.md in the repository. The Python package opens, changes, runs and saves project files too.
Examples and benchmarks
Help › Examples replaces the project with six example models from published problems. The tutorials use them, and they come set up with search limits, a title block and a material table:
| Model | Problem |
|---|---|
| T-ACADS Simple | ACADS problem 1(a), homogeneous slope (Giam & Donald 1989) |
| T-ACADS Non-Homogeneous | ACADS problem 1(c), three soils |
| Arai & Tagyo (1985) | Arai & Tagyo (1985), example 3, with a water table |
| Arai & Tagyo (1985), weak layer | Arai & Tagyo (1985), example 2, a weak layer between stronger soils |
| Talbingo Dam | ACADS problem 2(a), rockfill dam with a clay core |
| Talbingo Dam (Single Circle) | ACADS problem 2(b), the same dam on one given circle |
Help › Benchmarks replaces the project with every verification problem, named by its id and title (for example V001 Arai & Tagyo (1985) example 1). Each is set up with the input and the analysis of the verification table, so running it gives the factor of safety published there, next to the values the sources publish. On its sheet the title, the source, the calculated F and the reference values are at the top left and the model low on the sheet, about 1 cm above the bottom of the drawing area, under the title. The material table is at the top right, moved down beside the title when the title is too wide for it, or placed over empty sky beside the model, a few mm clear of everything the model draws. Only where it fits nowhere is the model drawn at a smaller scale. After a run the table makes way for the F label at the critical circle's centre.