LEVIATHANDocumentation

DOC 02WORKSPACES

CAD Studio

CAD Studio is LEVIATHAN's parametric part modeller. It is built for the parts a marine robot needs: pressure housings, flanges, end caps, brackets and hulls. Geometry comes from a full boundary-representation (B-rep) solid-modelling kernel and a constraint solver for sketches, both bundled with the application. Parts can be measured, given a material, exported as STEP, STL or GLB, written out as a robot link in URDF or SDFormat, and sent to the World as solid objects the vehicle collides with.

New after 0.8.0

Parts of this page marked Next release describe CAD Studio improvements that are finished and tested but not yet in the 0.8.0 download. They arrive with the next release:

  • Work is never lost when a document is locked, taken over or recovered (Saving, revisions and recovery).
  • Sweep corners can be kept sharp or turned into exact bends (Features).
  • Export a body as a one-link URDF or SDFormat robot description (Robot links), and download any verified export.
  • A wider material library for marine parts (Evaluate).
  • Smooth shading, the model shown before its mesh, and faster recompute (Display and responsiveness).
  • Ctrl+Z, Ctrl+Y and Ctrl+S in CAD Studio, and preview workspaces behind a setting (Preview workspaces).
CAD Studio with the Evaluate ribbon: the FeatureManager on the left lists the history of a BlueROV2-style housing (tube, flange, end cap and bolt-hole features) and one body in Aluminium 6061-T6; the housing tube is in the centre; the Inspector on the right shows Mass Properties with a mass of 2187.28 g, volume, surface area, centre of mass, principal moments and inertia tensors.
Figure 2.1 A part from the BlueROV2-style housing template, in Aluminium 6061-T6, with Evaluate ▸ Mass Properties open: 2,187.28 g, 810,105.23 mm³, and the inertia tensor at the centre of mass and at the output coordinate system.

Layout

From sketch to World Sketch with dimensions and relations, build features with a live kernel preview, get a body with a material, evaluate it, then export verified STEP, STL or GLB, or send it to the World. Sketch Profile dimensions, relations Feature Preview live kernel geometry Body Material mass, buoyancy Evaluate Measure mass properties, section, check Out Export verified STEP, STL, GLB, or To World
Figure 2.2 How a part is built in CAD Studio.
CAD Studio with the Features ribbon: Sketch, Boss/Base (Extrude, Revolve, Sweep, Loft), Cut, Dress-up, Pattern, Reference and Combine groups; a parametric pressure housing in the view; the FeatureManager with History, Bodies, Parameters, Materials and Reference frames; the Inspector with the body's volume, area and faces; and the Output dock.
Figure 2.3 The Pressure housing (parametric) template: the Features ribbon, the FeatureManager, the view with its heads-up toolbar and view cube, the Inspector, and the dock.
  • Ribbon. A CAD File menu and three tabs: Sketch, Features and Evaluate. Only tools with a working implementation appear as buttons. Undo, redo, save, the kernel state (ready or recomputing), the document name and revision, and the last operation's message sit at its right end; the message's full history is in Output.
  • FeatureManager, left: the model's history, bodies, parameters, materials and reference frames, with a search box. Drag the rollback bar between features, or focus it and use Up and Down; features below it are not computed. Right-click a feature for its context menu.
  • View, centre: a heads-up toolbar with face and body selection filters, orientation, display style (shaded, shaded with edges and others) and section (off, or an X, Y or Z plane), plus a clickable view cube. Faces pre-highlight under the pointer.
  • Inspector, right: the selected feature, body or face, and the Evaluate results.
  • Dock, bottom: Output, Problems (recompute errors, blocked features, warnings and stale bodies), Kernel and Exports.

Documents and templates

A part is a native LEVIATHAN CAD document (.les), saved by revision with a SHA-256 of its content, and with an autosave that is offered back after an unexpected exit. File ▸ New from Template starts from one of four templates:

  • Pressure housing (parametric): a cylindrical enclosure, 150 mm outside diameter, 6 mm wall, 300 mm long, with a hemispherical end cap.
  • BlueROV2-style housing: a tube with flange, end cap and bolt-hole pattern (Figure 5.1).
  • Torpedo AUV hull (Myring): an axisymmetric torpedo hull revolved from nose, body and tail parameters.
  • Pressure housing calculator: preliminary wall and buckling estimates for a housing. Its results are estimates, not depth ratings.

File ▸ Import STEP / IGES / STL brings in outside geometry as the first feature of a new part, or adds it to the open one, as an Import base body. STEP and IGES are read in metres as written, and STL in millimetres. The limit is 64 MB or 200,000 triangles. An open STL mesh becomes a surface body, which has no volume or mass.

Document versions Next release

  • Open only opens. Open (or Enter in the document field) opens a saved document and lists the saved ones to choose from; a mistyped name reports that there is no such document instead of creating an empty one. Create / open still creates.
  • Documents stay readable by 0.8.0. A save keeps the format LEVIATHAN 0.8.0 reads whenever the document allows it, and an unchanged document saves byte for byte as before. Only a feature that 0.8.0 cannot read, such as a sweep with Bend corners, needs the newer format. Saving then asks you to Upgrade and save (or Cancel), and the previous revision is kept for older versions.
  • Documents from a newer LEVIATHAN open read-only and are never changed: This document was saved by a newer LEVIATHAN … update LEVIATHAN to edit it.
  • Opening a document never rewrites its revisions on disk.

Sketch

Sketches are solved by the built-in constraint solver. Sketch (Features tab) or Insert ▸ Sketch on starts a sketch on the XY, XZ or YZ plane, a reference plane or a selected face. Dimensions are typed at the cursor and accept expressions such as 40 mm, t + 5 or 90 deg; bare numbers are millimetres or degrees. A sketch is coloured by its state: blue when under-defined, white when fully defined, and red when over-defined by conflicting or redundant relations.

Table 2.1 Sketch tools.
GroupTools
EntitiesLine, rectangle, circle, arc, slot (click two centres), polygon (3–64 sides), spline (click fit points; click the first point to close)
EditTrim (cut at lines, circles and arcs), offset (a chain of lines, or circles; negative is inside), mirror (about the last selected construction line)
RelationsAutomatic relations while drawing, plus midpoint, symmetric, concentric, fix and angle
DimensionsSmart Dimension: a diameter on a circle, a radius on an arc, an angle between two lines
Sketch tab active: Draw tools Line, Rectangle, Circle, Arc, Point, Slot, Polygon and Spline, Smart Dimension, Edit tools and Snap and Auto relations; a rectangle with a circle inside it drawn on the XZ plane; the Relations panel listing two horizontal and two vertical constraints; the Inspector showing Sketch1 with 10 entities, 4 constraints and 7 degrees of freedom.
Figure 2.4 A sketch on the XZ plane. Drawing the rectangle added its horizontal and vertical relations automatically; the chip at the bottom left and the Inspector report 7 remaining degrees of freedom, so the sketch is still blue (under-defined).

Rectangles add their horizontal and vertical relations; slots, polygons (inscribed in a construction circle) and splines (2–64 points) are built the same way. Snapping uses points and a grid, and lines within 3° of horizontal or vertical are inferred as such. Relations include coincident, horizontal, vertical, parallel, perpendicular, tangent, equal, distance, radius, diameter, angle, fix, on, midpoint, symmetric and concentric; a conflicting or redundant one is flagged. Enter ends a spline, Esc steps back to Select, and Delete removes the selection.

Features

A feature opens in a PropertyManager. The feature is added as soon as its references are complete, so the preview is real kernel geometry. OK keeps it, and Cancel undoes every change made while it was open.

Table 2.2 Features.
FeatureOptions
Extrude and CutBlind, blind reversed, mid-plane, through all, through all both ways; as a new body, or added to, cut from or intersected with a body
Revolve, Sweep, LoftSweep along a path of several curves keeps the section normal to the path. Next release Corners: Sharp (as drawn), the default, or Bend (exact elbows), which turns each sharp corner of the path into a smooth pipe bend with an editable Bend radius (by default 1.5 × the profile size, shown as auto; it must be larger than the profile). A loft section with holes is refused.
Hole WizardHole, counterbore or countersink with ISO metric presets M2–M12 (ISO 273 normal clearance, ISO 4762 counterbore, ISO 10642 90° countersink); through all or blind
Fillet, chamfer, shell, draftEdge and face modifiers
Pattern, mirrorRepeat or mirror features
BooleanUnion, subtract, intersect
Reference planeOffset from the XY, XZ or YZ plane
Extrude open in the PropertyManager on the left, with OK and Cancel, name, sketch Sketch1, end condition Blind, distance 10 and operation New body; the History shows Pressure housing, Sketch1 and Extrude; the preview body appears in the view.
Figure 2.5 Extrude in the PropertyManager. The preview in the view is real kernel geometry; OK keeps it, Cancel removes every change made while it was open.

Named parameters can drive dimensions, so a housing's wall thickness or bore can be changed in one place.

Next release Cancel in a PropertyManager undoes only that feature's own changes; anything else you changed while it was open is kept, and Output says so.

Sharp sweep corners and STEP

A sweep whose path has sharp corners often cannot pass the STEP export check, because its re-imported shape differs from the model. The export is then refused and Problems suggests setting that sweep's Corners to Bend. CAD Studio never changes the shape by itself. Bend rounds every sharp corner, so the part's volume is a little smaller than the sharp version.

Evaluate

  • Measure. Pick two faces for the minimum distance, the normal distance between parallel planes, the angle, and the centre distance between cylinders or spheres, together with each face's type, area, radius or diameter, and dX, dY and dZ.
  • Mass Properties. In MMGS or MKS units: density, mass, volume, surface area, centre of mass, principal axes and moments at the centre of mass, moments of inertia at the centre of mass and at the output coordinate system. Products of inertia are ∫xy dm. Copy puts a text report on the clipboard. A body needs a material for mass, inertia and buoyancy; without one it shows No material.
  • Check. Geometry validity: closed or free edges, invalid sub-shapes, short edges, maximum tolerance and unnamed faces. Curvature is shown for a selected face.
  • Section View. Cut the view at the X, Y or Z plane and move the cut with the slider.
  • Export. STEP, STL and GLB (glTF binary, metres, +Y up). Each export is read back and verified before it is recorded in the document's exports. Next release URDF and SDFormat robot links (see Robot links); a Download button on every entry in the Exports dock, which saves the file as <document>-<body>.<ext> after re-checking its SHA-256; finer STL and GLB meshes scaled to the part, so small curved parts export; and a refused export no longer replaces the last verified file.
The pressure housing in Aluminium 6061-T6 cut by a section plane to show its wall, with the Evaluate ribbon (Measure, Mass Properties, Check, Curvature, Section View, STEP, STL, GLB, To World) and Mass Properties in the Inspector: mass 3521.07 g, volume 1,304,098.20 cubic millimetres, surface area 421,469.84 square millimetres, centre of mass and inertia.
Figure 2.6 Evaluate on the pressure housing in Aluminium 6061-T6: a section through the wall, and its mass properties (3,521.07 g).

Materials: Aluminium 6061-T6, Titanium Ti-6Al-4V, Stainless steel 316, Acetal (POM-C) and Acrylic (PMMA). Their values are illustrative, not design allowables. A body's net buoyancy in sea water is shown with its mass.

Next release New material assignments choose from a library of nine marine materials, each with density, stiffness, strength and thermal values where they are known:

Table 2.3 Material library for new assignments.
GroupMaterials
Aluminium6061-T6, 5083-H116
Stainless steel316L, duplex 2205
TitaniumTi-6Al-4V Grade 5, annealed
PlasticsPOM-C acetal, PMMA cast acrylic, PVC-U rigid
BuoyancySyntactic foam (compressive values and density only)

Metal strengths are specification minimums and the other values are typical. They are not design allowables. Where a value is not known, such as Poisson's ratio for some of these materials, it is left empty rather than guessed. Existing documents keep the materials they were saved with, and the pressure housing calculator lists the new materials before the five illustrative ones.

Values are shown in millimetres with two decimals and thousands grouped, and mass in kilograms or grams. Values below 10−9 mm, which are kernel round-off, show as zero.

URDF and SDF buttons in Inspector ▸ Bodies, and File ▸ Export body as URDF (one link) or Export body as SDFormat (one link), write the selected body as one rigid robot link:

  • its mass, centre of mass and full inertia tensor about the centre of mass, in SI units;
  • in the robotics frame convention, x forward, y left and z up;
  • with the body's verified STL as both its visual and collision mesh.

Each file is read back and compared with the CAD mass properties before it is recorded (Output: read back PASS), and appears in the Exports dock with Download. The buttons are disabled until the body has a material: a robot link needs a mass and an inertia, and LEVIATHAN never guesses a density.

Vehicle Import accepts these files and other URDFs. It uses the declared mass, centre of mass and inertia, combined across the URDF's joints, and puts the body origin at the declared centre of mass. The result shows Inertia … (declared) or (estimated), with a warning line whenever something was estimated or dropped: estimated inertia, a mesh-only hull, no declared centre of mass, a mass override or dropped products of inertia. A physically impossible inertia tensor is refused.

One link only

Assemblies with several links and joints, MJCF and hydrodynamic coefficients are not exported yet.

Export to World

Evaluate ▸ To World (or File ▸ Export body to World) sends the selected body to the World workspace as a world asset. The Hull workspace does the same for a hull with Export ▸ To World.

World workspace in the Shipwreck scene: a torpedo-shaped Myring hull exported from CAD Studio rests on the seabed beside the BlueROV2 Heavy. The Stage panel lists it under Structures as Hull, and Property shows its position, rotation and scale.
Figure 2.7 A Myring torpedo hull from CAD Studio, placed in the Shipwreck scene. It appears under Stage ▸ Structures, and Property edits its transform.
  • The mesh is stored with the open project, or with the application's own World when no project is open, and is reloaded when the project opens.
  • Its collision is generated as convex pieces. Vehicles collide with it in simulation runs and in live Worlds.
  • It is placed at the World view's orbit target. A hull floats at its draft; other bodies rest on the seabed when the target is below it.
  • Move, rotate or scale it with the gizmo or in Property; changes are saved. Delete it from the Stage with Delete or the context menu.
Collision is approximate

The convex pieces cover the body and are larger than it: a hollow part, such as an open housing, is filled in. The World computes contact with these pieces but no hydrodynamics for the asset itself.

Display and responsiveness Next release

  • Smooth shading. Curved faces such as cylinders, fillets and hulls are shaded with the exact surface normals from the kernel, and edges between faces stay sharp. The display mesh is finer on small parts and never coarser than 0.1 mm.
  • Model first, mesh after. After an edit the feature tree, validity and mass properties update at once, and the 3D mesh follows a moment later. Meanwhile the view shows Updating mesh… with the previous shape dimmed, and clicks select nothing, so you never pick a face that has moved.
  • Faster recompute. Features whose inputs have not changed are reused instead of rebuilt, so editing late in a long history recomputes only what follows the edit.
  • Section views pick only the faces you can see.
  • The status chip shows ready, applying, recomputing or meshing, and the kernel chip shows Kernel busy while the kernel works through other requests.

Preview workspaces Next release

File ▸ Show preview workspaces, off by default, adds the Assembly, Marine and Drawing workspaces as tabs, each labelled Preview. They work, but each has documented limits. The setting is remembered for you on this computer; turn it off and the tabs go away, and if you were in one, CAD Studio returns to Features.

The geometry kernel

The geometry kernel runs as a separate process, which the application bundles and starts itself, so there is nothing to install. Its state is shown in the status bar (Kernel, Kernel starting, Kernel unavailable) and in the chip at the top right of CAD Studio, whose popover offers Retry. If the kernel is unavailable, CAD Studio says so and geometry operations wait until it is back.

Next release GET /api/cad/capabilities reports what this version of CAD Studio supports: document format versions, the maturity of each feature, limits and what is not modelled. It answers without starting the kernel.

Saving, revisions and recovery

  • Every save writes a new revision with a SHA-256 of its content. The first revision, named revisions, the sources of exports and the newest 100 are kept.
  • Exports are re-read and verified before they are recorded, and are kept with the document.
  • Autosave is offered back after an unexpected exit (Recover or Set aside).
  • One writer at a time: a document already open elsewhere opens read-only.

Locked documents and unsaved work Next release

  • Read-only, with the reason. When another session is editing the document, a banner says so, with how long ago it was last active, and offers Check again.
  • Take over a stale lock. When the session holding the document has gone (its process ended, the computer restarted, or it stopped responding for two minutes), the banner also offers Take over…. Taking over is never automatic: you confirm it, the previous session can no longer save, and its unsaved changes are copied to autosave-backups/ in the document folder before anything is written.
  • Recover or set aside. Unsaved work then shows as Unsaved work found · autosaved <time> with Recover and Set aside. Editing is paused until you choose, and work you set aside stays on disk in autosave-discarded/.
  • Autosave first. Every change is autosaved before it is applied. If the autosave cannot be written, the change is not made and CAD Studio says so.
  • Named versions. Save as named version with nothing changed now names the current revision. A revision that an export was made from is always kept.

View keys

Table 2.4 CAD Studio view keys.
KeysAction
F, SFit all, focus the selection
1, 3, 7, 0Front, right, top, isometric
Ctrl+1, Ctrl+3, Ctrl+7Back, left, bottom
5Perspective or orthographic
Ctrl+Z, Ctrl+Y or Ctrl+Shift+ZUndo, redo (the same commands as Edit ▸ Undo and Redo; inside a text field they edit the text)
Ctrl+SSave Next release