Breaking Changes
- APIs deprecated in earlier releases have been removed by @gumyr in a1d4f223.
- The tangent objects
ArcArcTangentArc,ArcArcTangentLine,PointArcTangentArcandPointArcTangentLineare replaced byConstrainedArcsandConstrainedLines Face.make_plane()byFace(Plane);Shape.is_planar_facebyFace.is_planar;Shape.split_by_perimeterby theFace/ShellmethodVector.to_tuple,Vertex.to_tuple,Location.to_tuple,Location.to_axis,Axis.to_plane,Edge.to_axis,Edge.to_wire,Wire.to_wire,Face.to_arcs,Shape.relocateand theLocationEncoderJSON helper are gone; theend_angleandangular_directionparameters of the center arcs are replaced byarc_size; and theis_inkscape_labelparameter ofimport_svgis removed.
- The tangent objects
Unitis now aStrEnumwhose values are the unit symbols (Unit.MM == "mm"), as part of the materials work by @bernhard-42 in #1270.
Compatibility Notes
These are compatibility-related changes that users should review. They are not necessarily all breaking changes.
- Builders are refactored around a unified
BuildScope: they construct in a local coordinate system onPlane.XYand publish their result through the enclosing placement, so a builder can now be positioned by an enclosingLocationscontext, and objects created inside customBase*Objectclasses no longer leak into the caller's builder by @gumyr in #1373. Select.LASTandSelect.NEWnow come from the kernel's own history of the operation rather than a before/after comparison, so a face an operation merely trimmed no longer counts as new, andSelect.NEWworks for every shape type and on the result of Algebra operations too.Select.LASTand others also now work with all shape types now, and not only edges as before.Builder.new_edgesis deprecated in favor ofedges(Select.NEW)by @gumyr in 1a7751a1 and 86952b27.- The builder operation
add()is renamedinsert();add()remains as a deprecated wrapper by @gumyr in 51f251b8. BoundBox.is_inside()is deprecated in favor ofBoundBox.within(),BoundBox.find_outside_box_2d()in favor ofBoundBox.contains(), andBoundBox.intersects()is back to tolerance-aware contact semantics whileoverlaps()stays the strict interior test by @gumyr in 0147c20d and 8a825f5d.ExportSVGacceptsColorLikevalues everywhere and inherits colors from faces, edges and wires;ColorIndexvalues, ezdxf RGB values and 0-255 RGB tuples are deprecated by @gumyr in 279f7b15.Face.location_atnow respects the face's orientation, so a reversed face returns a location whose z axis matchesnormal_atby @cycsmail in #1352.- The 2D exporters report a non-planar shape with
warnings.warninstead of printing to stdout, andpackraises errors instead of failing assertions by @gumyr in fa75e6d6. Shape.castis one registry-backed implementation for every dimension, soMixin2D.cast(solid)returns aSolidwhere it used to raise by @gumyr in f22736a1.bd_materials,threejs-materialsandfontToolsare new dependencies by @bernhard-42 in #1270 and @kforris in #1395.
Notable Changes
- Added materials:
Shape.materialtakes abd_materialsmaterial or its name (shape.material = "brass"),Shape.mass,compute_massandcompute_volumeuse it,export_gltfwrites the material's visual properties, and a materials tutorial explains the workflow by @bernhard-42 in #1270;Compound.masssums each child's own material by @gumyr in c1637160. - Added
Convexity(CONVEX,CONCAVE,SMOOTH,SADDLE) as a property of everyVertex,EdgeandFacerelative to the shape it was selected from, usable withfilter_byandgroup_by, together withtopo_path, the route a shape was selected by, by @gumyr in 2440c53c and 7511588d. - Unified the builder scope model so
BuildPart,BuildSketchandBuildLineshare one placement and publication path and can be placed byLocationscontexts by @gumyr in #1373. - Added UV texture coordinates:
Shape.tessellate_with_uvs()with optional atlas packing, a newexport_obj()exporter, and UVs inexport_gltffor texture, baking and displacement workflows by @zalo in #1272. - Added support for lofting faces with more than one inner wire, with the path between holes chosen automatically by @MatthiasJ1 in #449.
- Added the
Superellipsesketch object, covering squircles and rounded rectangles by @Silcantar in #1398. - Added
Rotation(Axis, angle)construction by @DaWeidmann in #1262. - Added
BoundBox(shape)construction, and bounding boxes of coplanar and collinear shapes now compare on their non-degenerate axes by @DaWeidmann in #1313 and @gumyr in 30268618 and 0147c20d. - Added
Builder.label, which propagates to the builder's output object by @kforris in #1424. - Improved 2D filleting:
fillet_2dhandles fillets that consume whole edges, the 2-tangent radius arc solver is more stable, and the OCCTChFi2dfillet algorithm is replaced by @javimixet in #1341. Locationmultiplication now applies to iterables of shapes and planes, andLocationsaccepts iterators such as generators andmapby @gumyr in e7652c64 and @kforris in #1396.ExtensionLineaccepts aVectorLikeoffset, choosing the side by direction rather than sign, andDimensionLineno longer crashes when its label is wider than its path by @pzfreo in #1338 and #1336.Face.make_surface_from_array_of_points(smoothing=...)now works by @gumyr in 1cb4aa48.- Added a
build123d_typeclass variable to the geometry, topology and builder classes for external applications by @gumyr in e3cfdde3. - Documentation now ships
llms.txtandllms-full.txtfor language models by @marked23 in #1074, and gained a series of examples and explanations by @kforris (see below). - Test coverage moved from codecov to coverage.py with diff-cover, the docs examples are now tested, and every
raisein the package is covered by @jdegenstein in #1377 and #1376 and @gumyr in db3fa0dc.
Selected Other Changes
- Fixed
BoundBox.is_insideby @jdegenstein in #828. - Fixed
export_stepof an imported single-shape STEP file by detaching it from its temporary wrapper by @cyberhuman in #1365. - Fixed the inverted bulge direction in
import_dxfby @greyltc in #1372. - Fixed loading
.ttffiles that actually contain a TrueType Collection by @cycsmail in #1380. - Enhanced the diff-cover step of the coverage workflow by @jdegenstein in #1384 and #1438.
- Added ArgilCAD to the external tools documentation by @turanerdem in #1386.
- Raised
FileNotFoundErrorfor a missing STL export directory by @kforris in #1389. - Completed the builder cheat sheet by @kforris in #1391.
- Preserved labels for 3MF assembly children by @kforris in #1397.
- Warned when
Planeignoresoriginwhile being built from aFaceby @kforris in #1399. - Clarified constrained geometry terminology in the docs by @kforris in #1400.
- Added a positioned sketch example by @kforris in #1401.
- Documented
Draftconfiguration by @kforris in #1402. - Added a rotation methods example by @kforris in #1404.
- Documented vectorized location operations by @kforris in #1405.
- Added ExportToPython to the external tools documentation by @RanVisionware in #1406.
- Explained mixing builder and algebra modes in the docs by @kforris in #1408.
- Deferred
FontManagerinitialization until fonts are needed, soimport build123dno longer scans system fonts by @kforris in #1413. Text.fontandText.font_pathnow report the font OpenCascade actually resolved by @kforris in #1415.- Skipped documentation builds for pull requests without documentation changes and moved them to Python 3.11 by @jdegenstein in #1416.
- Documented out-of-range curve position behavior by @kforris in #1417.
- Documented local and global assembly locations by @kforris in #1419.
- Fixed stochastic font registration test failures by @jdegenstein in #1421.
- Added a helical spring example by @kforris in #1422.
- Fixed the
full_roundreturn type annotation by @kforris in #1423. offset_2dnow raises a clearRuntimeErrornaming the offset when OCCT fails by @kforris in #1426.- Preserved colors when exporting base part objects to 3MF by @kforris in #1427.
- Fixed through holes on parts positioned away from the origin by @kforris in #1429 and @gumyr in 3236d2bd.
- Corrected the description of Solids and Parts as 3D shapes by @iparsrc in #1436.
- Guarded
import_stepagainst unnamed assembly components by @atirna in #1443. - Fixed a regression where a
Curvecontaining wires was not accepted as a builder argument by @gumyr in 87198852. - Fixed
RevoluteJointignoringangle_referenceby @gumyr in 2c5e6a0b. - Fixed joints inherited from the input part of a
BasePartObjectby @gumyr in 1f66b0c8. - Fixed
Compoundintersection after the parent has been moved by @gumyr in 217db07e. - Fixed
Vertex.X,YandZof a transformed vertex by @gumyr in 4ae9e170. - Skipped corrupt fonts during registration, based on a proposal by @karugaru, by @gumyr in 0e7f4015.
- Hardened the
Rotationaxis-angle constructor by @gumyr in 2627b6b9.
New Contributors
Thanks to the following first-time contributors:
- @cycsmail made their first contribution in #1352
- @kforris made their first contribution in #1389
- @turanerdem made their first contribution in #1386
- @greyltc made their first contribution in #1372
- @cyberhuman made their first contribution in #1365
- @pzfreo made their first contribution in #1336
- @zalo made their first contribution in #1272
- @Silcantar made their first contribution in #1398
- @RanVisionware made their first contribution in #1406
- @marked23 made their first contribution in #1074
- @atirna made their first contribution in #1443
Contributors
Thanks to everyone who contributed to this release:
@atirna, @bernhard-42, @cyberhuman, @cycsmail, @DaWeidmann, @greyltc, @gumyr, @iparsrc, @javimixet, @jdegenstein, @kforris, @marked23, @MatthiasJ1, @pzfreo, @RanVisionware, @Silcantar, @turanerdem, and @zalo.
Full Changelog
Full Changelog: v0.11.1...v0.12.0