SkillAgentSearch skills...

Meshy

Slicing, measurements, transformations, and visualizations on polygon meshes.

Install / Use

/learn @0x00019913/Meshy
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

meshy

meshy is my browser-based tool for performing measurements, transformations, visualizations, repair, and slicing on polygonal meshes, intended to make life easier for 3D printing folks. This post presents a comprehensive guide to all current features of the tool.

Everything is under development, including: slicer improvements and additional features (better G-code exporter, more infill types), a better repair algorithm, UI improvements, more import formats.

Requirements

A computer with a GPU and a browser capable of running WebGL, with Javascript enabled. Tested and works in the latest releases of Chrome and Firefox on Ubuntu and Windows. Appears to work in Opera, though it's wise to turn off mouse gestures if panning with RMB.

General use

The user can upload a mesh. At any given time, the tool can contain one mesh (the mesh can be comprised of multiple islands, but the geometry must all come from one file). The user can perform standard transformations (translations, rotations, scaling, floor, center, mirror), use any of meshy's calculation, measurement, and repair tools, slice the mesh, export the mesh, and change some viewport settings. The user can delete the mesh and then upload another.

Interface and controls

The main viewport uses mouse and keyboard controls:

  • LMB to rotate the camera
  • scroll wheel to zoom
  • MMB/RMB to pan
  • ctrl+i to import a mesh
  • f to center the camera on the mesh
  • g toggles the gizmo
  • c toggles the center-of-mass indicator
  • w toggles wireframe
  • b toggles build volume visibility
  • ctrl+z to undo
  • ctrl+y or ctrl+shift+z to redo
  • esc to turn off the cursor (used for measurements and setting the mesh base)

The information box on the top left indicates computed quantities.

The dat.GUI box on the top right contains the user-interactive components.

The axis widget indicates the camera orientation. The outward-facing vector from a face of the cube points along the axis shown on the face.

The printout area next to the axis widget indicates status changes, events, and warnings.

Gizmo

gizmo

The gizmo is anchored at the current position of the mesh. Toggle its visibility with g.

The gizmo can scale, rotate, and translate the mesh. The colored handles indicate axis-oriented transformations; the white handles indicate transformation in the viewing plane:

  • the white rotation handle rotates around a vector normal to the viewing plane
  • the white chevrons translate in the viewing plane, though the mesh will be constrained to make contact with the build plate if the Edit -> Snap to floor box is checked
  • the white sphere scales uniformly

ctrl will force transformations to happen in increments (15 degrees for rotations, 1 unit for translations, powers of 2 for scaling).

Regarding world space vs. object space: scaling occurs in object space, so the scaling handles will rotate to match the object-space axes. General scaling in world space is disallowed. The rotation handles, however, will not rotate to facilitate intuitive rotation on world axes.

Import

import

Supported file formats are OBJ and STL (binary and ASCII). There appears to be a rough upper limit of 50-80MB on the upload size, which is in the neighborhood of what you'd use for 3D printing. I've been able to load meshes with around 1-2 million polygons. It depends on your browser and computer. If the page hangs, the file's too big.

meshy uses Three.js importers.

Import Settings

import_settings

Import units

Common file formats don't specify units, while meshy uses millimeters as its internal units. Use this field to specify the units of one unit of length in the imported file, which will then be converted to millimeters.

Autocenter

If checked, automatically center the mesh and floor it to the build plate.

Export

export

The user can specify a filename and export as either OBJ or STL.

Export units

Units of the export mesh: the world-space millimeter coords are scaled to match the export units.

Settings

settings

Little endian

Affects how the exporter writes files.

Vertex precision

Generally determines the conversion factor between floating-point and fixed-point coordinates and specifies the number of digits in the float values exported in ASCII files.

Display

display

Display precision

The number of decimal places shown in the infobox and number controllers.

Toggles

  • gizmo
  • axis widget
  • wireframe
  • center of mass indicator

Background color

In my experience, this is best left alone.

Material options

  • mesh color
  • mesh roughness
  • mesh metalness
  • wireframe color

Build Volume

Toggle volume

Toggles build volume visibility.

Center origin

The coordinate system origin is typically in a corner of the build volume. Check this to put it in the center instead.

Build volume dimensions

The dimensions of the build volume in millimeters.

Edit

edit

Functions that modify the mesh.

Snap to floor

Checked if all transformations force the mesh to make contact with the build plate. True by default.

Set base

Activates the pointer. Click on any part of the mesh to orient it in such a way that the target polygon faces downward. Helps orient the mesh in such a way that a flat base touches the floor. Can be turned off at any time with esc.

Autocenter

Automatically center the mesh and floor it to the build plate.

Translate

translate

Self-explanatory.

Rotate

rotate

Values are given in degrees, normalized to the [0, 360) range. Rotations are performed before translations.

This folder uses Euler angles in XYZ order relative to the mesh's original position in object space. Because Euler angles can yield unintuitive results, I recommend using the gizmo instead.

Scale

Scaling is performed with respect to the current mesh position. Scaling happens before rotation. meshy has the following modes of scaling:

Scale by factor

scale_by_factor

Scale the mesh by a given factor on the given axis.

Scale to size

scale_to_size

Scale the mesh uniformly such that it attains the correct size on the given axis.

Scale to measurement

scale_to_measurement

If a measurement is active, this folder will contain a selection box - use this to select one of the measured values. Change the value to scale the mesh such that the measurement now equals the given value.

Scale to ring size

scale_to_ring_size

Start a circle measurement and mark a circle around the ring's inner periphery. Select a size and scale: meshy will scale the ring to have the correct inner diameter. The ring sizes and their respective measurements are given according to the US, Canada, and Mexico standard <a href="https://en.wikipedia.org/wiki/Ring_size">as specified on Wikipedia</a>.

NB: the new diameter will be in millimeters. E.g., size 9.5 corresponds to an inner diameter of 19.35mm, so the diameter will now measure 19.35mm. Make sure your printer/printing service is aware of this.

I advise ending the circle measurement after scaling because the pointer code does raycasting at every frame, which is computationally costly and can cause lag.

Mirror

mirror

Mirror the mesh in object space.

Floor

floor

Translate the mesh along the given axis such that its lowest bound is at 0 on that axis.

Center

center

Center the mesh in the current build volume.

Flip normals

flip_normals

Self-explanatory.

Measurement

measurement

Measurement is performed thusly:

  • activate the desired measurement
  • left-click the model to place markers
  • once the necessary number of markers has been placed, the result of the measurement shows up in the infobox
  • placing more markers performs the measurement again, replacing old markers on a FIFO (first in, first out) basis

meshy has the following modes of measurement:

Length

Takes 2 markers; measures the Euclidean distance between the markers.

Angle

Takes 3 markers; measures the angle between two segments formed between them in degrees.

Circle

Takes 3 markers, which identify a circle in 3-space; measures radius, diameter, circumference, and area.

Cross-section

Takes 1 marker; measures the cross-section in the plane normal (perpendicular) to the given axis. Calculates total area, contour length, and the bounding box.

Note that this measurement is deactivated by rotating but can be safely scaled and translated.

Local cross-section

Takes 3 markers that denote a path around a particular part of the mesh. The 3 markers subtend a plane that cuts some number of contours through the mesh; meshy infers which of these contours is closest to the markers and selects that one. Calculates the same values as the regular axis-aligned cross-section.

Mesh Thickness

mesh_thickness

Visualizes approximate mesh thickness below the specified threshold. This is done by casting a ray along each face's negative normal and measuring the distance it travels before hitting the inside of the mesh.

Any part of the mesh that's below the threshold t is shown in red, interpolated linearly from full white to full red over the [t, 0] interval.

(NB: consulting the original paper that prompted this method - "Consistent Mesh Partitioning and Skeletonisation using the Shape

View on GitHub
GitHub Stars100
CategoryDevelopment
Updated2d ago
Forks32

Languages

JavaScript

Security Score

95/100

Audited on Apr 3, 2026

No findings