planex2d editor: parametric 2D CAD in the browser

The planex2d editor is parametric 2D CAD that runs in the browser. You draw a part in constraint sketches, with relations and dimensions that define its shape, and a tree of operations turns the sketches into the finished part with faces, Boolean operations, offsets, fillets and patterns. The part is saved as a DXF, SVG, STEP or BREP file, put on dimensioned technical drawings, or simulated in the editor. Everything is computed in the page, the geometry by the planex2d library and the simulations by netgen and NGSolve, so nothing is uploaded. Open the editor.

The editor with the sketch of a connecting rod: two eyes with their bores, a tapered shank and four fillets, every element green, with the diameters, radii and distances dimensioned, the tree of operations on the left and the sketch toolbar on the right

The sketch of a connecting rod, fully constrained.

This page follows one part through the editor, a connecting rod with a window in its shank, from its sketch to a stress result. Each section names the page that describes its tools.

A sketch that is solved

A sketch is drawn roughly and then defined by its constraints. Relations such as tangent, concentric or symmetric fix how the elements stand to each other, and dimensions fix their sizes. planex2d’s solver places the elements so that every constraint holds, and places them again when a value changes. Lengths are in millimeters and angles in degrees. The colors show the state of the sketch. A black element can still move, a green one is fully constrained, and red marks constraints that contradict each other.

The rod’s outline is two circles and two lines, trimmed where they cross and rounded with four fillets. Its dimensions are those of a drawing: the diameters of the eyes and the bores, the distance between their centers, and the width of the shank at two stations. With the last dimension, the sketch turns green and the header reads “Fully constrained”.

See Drawing in a sketch for the drawing tools and Constraints and dimensions for the relations, the dimensions and the colors.

Parameters and formulas

A parameter is a named number for the whole part, listed at the top of the tree. A dimension takes a formula of parameters in place of a number. The diameter of the rod’s small eye is d + 2*rim, the bore and the rim around it, and the two stations of the shank lie at 0.4*L and 0.8*L between the eyes. A dimension with a formula shows an ƒ in front of its value. A changed parameter changes every dimension that uses it, and the tree computes the part again.

The top of the tree with the parameters L = 100, D = 32, d = 14, wall = 9 and rim = 5, and the open sketch below them
The small eye of the sketch and the value box of its diameter, with the formula d + 2*rim typed as the value

The part's parameters, and the diameter of the small eye given as a formula.

See Constraints and dimensions for parameters and formulas.

Curves

Besides lines, arcs and circles, a sketch holds splines and curves given by formulas. A spline runs through the points clicked, and each point can take a tangent angle, a tension and a radius of curvature. The default style is a quintic spline, and only this style takes a radius of curvature. Connect joins the ends of two elements with a curve that is tangent or curvature-continuous at both joins, and Curve draws a curve from two formulas, h(t) and v(t), over a range of t.

An outline closed by a spline through five points, and the spline's box with a row for each point: position, tangent angle, tension and curvature radius, with the style quintic and a dashed curve showing the result

A spline's points, with a tangent angle typed at both ends. The dashed curve is the result.

See Drawing in a sketch for splines, B-splines and curves.

From sketches to a part

A part is a tree of operations. Each operation takes the results before it, and a change early in the tree computes everything after it again. The rod takes eight operations. Face turns the outline’s sketch into a face with the two bores as holes, and Offset shrinks that face by 3 mm. A second sketch and its face hold a disc around each eye, and Subtract takes the discs from the offset, which leaves the middle of the shank. Fillet rounds its corners, and a second Subtract cuts it out of the rod as a window.

The tree of the rod: Offset.1 of Face.1 and Sketch.1, Subtract.1 of Offset.1 minus Face.2 and Sketch.2, Fillet.1, and Subtract.2 of Face.1 minus Fillet.1
The finished connecting rod in the view, with its two bores and the window in its shank

The eight operations of the rod, and their result.

See The Design tree for every operation.

Properties for meshing

Faces and edges of a result take a name, a color and mesh sizes. The rod’s face is named steel, and its two bores are named big end and small end, each with a largest element size. planex2d keeps these properties through the operations that follow, and the STEP file keeps the names and the mesh sizes.

The editor’s simulations build on them. A named edge or hole is a place for supports and loads, and the mesh follows the sizes set here. A script outside the editor does the same with the STEP file. It reads the file with planex2d, netgen meshes the part with these sizes, and the names become the regions and boundaries that materials, supports and loads refer to.

The Design workbench with the Properties panel open for the small bore of the rod, named small end with a largest element size of 1, the bore highlighted in the view, and the Properties folder in the tree listing the face steel and the edges big end and small end

The small bore named small end, with the rod’s three properties listed in the tree.

See Properties for the fields, and Meshing a face in the planex2d docs for how names and mesh sizes reach a mesh.

Files

Save writes the part as a project file, which opens again with its sketches, dimensions and operations. Save as writes the result for other programs, as a DXF or SVG drawing or as a STEP or BREP model, and Import reads the same four formats into the tree. A DXF file keeps arcs and circles as arcs and circles, which laser cutters and CAM programs expect.

See Files for the formats and their options.

A drawing of the part

Drafting in the header switches to the drafting workbench, which makes technical drawings. Drafting on a new page puts the rod’s last operation on a page of its own, seen face-on, and Automatic dimensions dimensions it. On an A3 sheet at 2:1, planex2d gives the center distance, the bores, the radii of the eyes, the fillets and the taper of the shank. The title block takes the part’s name and number from the page settings, and Save as writes the page as PDF, DXF or SVG.

The Drafting workbench with an A3 page of the connecting rod, seen face-on at 2:1 with its automatic dimensions: the center distance 100, the bores ⌀32 and ⌀14, the eye radii R25 and R12, the fillets and the taper of the shank, and the title block filled in with Connecting rod, CR-100, revision A

The rod on an A3 page, dimensioned automatically.

See Drafting for views of STEP parts, sections, dimensions placed by hand and the title block.

Into a simulation

The Simulate tools of the Design toolbar add a simulation of a result: a stress analysis, plate frequencies, heat transfer, electrostatics, magnetics or a beam. A simulation is an item below the tree, with a workbench for its material, its supports and loads and its results. Supports and loads go on the part’s edges and holes, by the names set with Properties.

In the stress analysis, the rod is 16 mm thick and made of steel S235. A bolt load of 5 kN pulls at each bore, as the two pins of the rod do, in opposite directions. The two loads balance, so balanced holding keeps the rod in place without a support. NGSolve solves the rod in plane stress, and the stress peaks at the small bore.

The editor with the stress analysis of the connecting rod open: the rod colored by its von Mises stress over its deformed shape, a bolt load of 5 kN at each bore, the peak of 128.7 MPa marked at the small bore, the color scale at the right, and the simulation unfolded below the tree

The rod in a stress analysis, pulled at both bores.

See Simulations for the six simulation types.

In your browser

The editor needs no account and no installation. planex2d runs in the page, so sketches, operations and files are computed on your computer, and the browser keeps a copy of the last part, which is back after a reload. The editor’s tools call the planex2d library, and the options of each tool are the options of its call. See the planex2d docs for the library and for the same steps in Python.

Where to go next

Page

What it covers

Getting started

A first part, a plate with two holes, from the first line to a DXF file.

Drawing in a sketch

The drawing tools of a sketch, snapping and selecting.

Constraints and dimensions

Relations, dimensions, parameters and what the colors mean.

Editing a sketch

Fillets, chamfers, trimming, offsets, mirrors and patterns in a sketch.

The Design tree

The tree and its operations.

Properties

Names, colors and mesh sizes of faces and edges.

Measuring

Lengths, areas, centers and second moments.

Files

Project files, importing, and saving drawings and models.

Drafting

Technical drawings: pages, views, sections, dimensions and the title block.

Simulations

The six simulation types, their workbenches and their results.

Tool reference

Every tool with its icon.

Shortcuts

The keys.