Runs the kernel's general repair over a shape: closes small gaps, fixes wire and face defects and brings tolerances into the given range.
precision is the size of defect to look for, minTolerance and maxTolerance bound the
tolerances the repaired shape may carry, all in model units. Try it first on any shape that
fails shapes.shape.isValid.
The shape and the precision and tolerance bounds
The repaired shape
Removes edges shorter than precsmall from a wire and closes the gaps they leave, so a tiny
sliver no longer breaks a fillet or a face.
With lockvtx true the existing vertices are kept in place; otherwise they may move to close
the gap. A precsmall of 0 uses the wire's own tolerance.
The wire, whether to keep vertices fixed and the length below which an edge counts as small
The cleaned wire
Rebuilds a wire so its edges run head to tail in one direction along it.
A wire assembled from loose edges can hold edges pointing against the flow; this walks the wire in order and joins the edges again the right way round, which some operations need.
The wire
The wire with consistently oriented edges
Repairs for OpenCascade shapes that came out of a file or an operation with small defects: gaps between edges, edges too short to matter, wires whose edges point different ways, tolerances that drifted. Run
basicShapeRepairon a shape that failsshapes.shape.isValidor refuses a boolean; the wire fixes clean up outlines before they become faces. Every method returns a new shape.