Repository navigation
Releases: KRGulaj/pySMESH
Release list
v5.1.2
v5.1.1
pySMESH 5.1.0
5.1.0 adds NETGEN: free tetrahedra and triangles, a remesher for triangle surfaces, and
boundary layers with a tetrahedral core. It also completes the boundary layers on the SMESH
algorithms. No public name is removed. Calls that ran on 5.0.0 give the same results, except
where 5.0.0 returned a wrong result in silence (see "Fixes and new refusals").
NETGEN
- netgen 6.2.2101 with SALOME's
netgen62ForSalome.patchand the OCCT 8 port, and
NETGENPluginV9_16_0. Both are built from source into_core.pyd, with zlib 1.3.2. They
add no DLL to the wheel. - Algorithms:
Netgen1D2D3D(a whole solid),Netgen3D(tetrahedra from the mesh of the
faces),Netgen1D2D(faces from the edges up),Netgen2D(faces on existing edges),
NetgenRemesher2D(a triangle surface with no CAD behind it). - Hypotheses:
NetgenParameters,NetgenParameters2D,NetgenSimpleParameters2D,
NetgenSimpleParameters3D,NetgenRemesherParameters2D, and theFinenesspresets. Local
sizes are given per sub-shape. A field that a fineness preset controls is accepted only with
Fineness.USER_DEFINED. - Mixed meshes: NETGEN reuses the nodes of edges and faces that another algorithm meshed,
soQuadrangle2Dfaces and NETGEN tetrahedra share one conformal mesh. - Embedding: a NETGEN compute writes nothing to the console, writes no file, never changes
the working directory and leaves no temporary file. One process-wide lock serializes NETGEN
calls, so two threads can mesh at once. The mesh is identical at 1, 4 and 16 threads. A
cancel lands within 5 s and the mesher can compute again. - Plugin defects fixed: a face's local size went to the face before it; an edge's local
size stopped short of its last vertex; the chordal error did nothing on curved faces (OCCT 8
returns a stale curvature); parallel debug text corrupted the heap; the remesher crashed
without parameters, overflowed its stack on a NaN size, and left part of a new mesh after a
cancel. The upstream fixe1d71a78(a crash at process exit) is backported. The other
upstream netgen fixes after 2101 were reviewed; none applies to this build.
Boundary layers
- NETGEN with layers:
ViscousLayersonNetgen3DandNetgen1D2D3D(prisms or
hexahedra on the chosen walls, tetrahedra inside),ViscousLayers2DonNetgen2Dand
Netgen1D2D, andViscousLayerBuilderwith a NETGEN inner mesh. CompositeHexa3DbuildsViscousLayers, andPolygonPerFace2Dbuilds
ViscousLayers2D. Both were refused in 5.0.0.- Several
ViscousLayerson one solid (a thickness per face set).unassignnow detaches
exactly the hypothesis it is given. - A sweep carries the 2-D layers of its source face through every level.
- Cartesian layers that are too thick name the largest thickness that works.
- A layer stack cut short in a narrow gap reports a warning in
ComputeReport.warnings.
Prism3D
Prism3Dsweeps through a side face whose horizontal side is split into several edges,
when the projection gives every split point a node and every edge the segment count of its
own hypothesis. Otherwise it refuses, names the edges and the counts, and gives the way out.
Fixes and new refusals
Each one raises PysmeshError with the reason. In 5.0.0 each case returned a wrong result in
silence.
- A compute that leaves a sub-shape unmeshed because its algorithm misses a hypothesis. SMESH
reports success there; pySMESH now raises and names the sub-shape. - Cartesian layers whose offset is not a valid solid, or whose cells fold over. 5.0.0 meshed
them with inverted cells or nodes outside the shape. - Layer face sets that an algorithm cannot read, a second layer hypothesis on an algorithm
that reads one, and 2-D layers on a face that a solid's algorithm or a sweep would drop. - A compute error built from a
std::stringlost its first 7 characters. - After a cancel, a mesher could not compute again.
Wheel
| 5.0.0 | 5.1.0 | |
|---|---|---|
| Wheel (cp313) | 39 991 976 bytes (38.1 MiB) | 41 501 951 bytes (39.6 MiB) |
| Bundled DLLs | 52 | 52 |
Known limits
- netgen 2101 fails on a unit sphere at
Fineness.COARSEwith max size 0.866. It fails with
netgen's reason. - Cartesian layers are not repeatable run to run on some shapes, as in 5.0.0.
- netgen's own boundary layers are not used: layers come from SMESH's
ViscousLayers.
pySMESH 5.0.0
5.0.0 moves both native kernels to new releases and fixes every pySMESH defect found in a full
sweep of 4.2.2. The public API only grows: no name is removed. The major number marks
changed results and new refusals. Code that ran on 4.2.2 can now get a different mesh,
a different measure, or an exception where 4.2.2 returned a bad result in silence.
Native kernels
- SALOME SMESH, KERNEL and GEOMUtils
V9_9_0→V9_16_0. Four years of upstream
algorithm work, including the rewritten Cartesian mesher. KERNEL's basics now come from
salome_bootstrapV9_16_0.Mefisto2Dstays public: upstream deleted it in 2022, so
itsV9_9_0sources are carried forward unchanged. - OCCT 8.0.0 → 8.0.1, built from source by
ci/build_occt.py, with only the toolkits
that_coreneeds. Three OCCT patches:- the ruled loft history through four or more closed single-edge sections;
- a native crash in chamfer;
- a native crash in pipe.
- SALOME patches: 36 on SMESH, KERNEL and GEOM. Among the fixes: the TABLE and
EXPRESSION distributions, theAdaptive1Dcrash, its deflection and size bounds, and the
Cartesian cancel.PROVENANCE.mdlists every patch.
Wheel
| 4.2.2 | 5.0.0 | |
|---|---|---|
| Wheel (cp313) | 43 345 198 bytes (41.3 MiB) | 39 991 806 bytes (38.1 MiB) |
| Bundled DLLs | 75 | 52 |
NumPy is still the only runtime dependency. OCCT, Boost and VTK stay private to the wheel.
Changed results
If your code compares against stored values from 4.x, expect these to move.
- TABLE and EXPRESSION distributions place their nodes at the positions the function
defines. 4.x used an absolute bisection tolerance and a single 20-point Gauss rule, so
steep tables and expressions were off. Adaptive1Dno longer crashes on a shape with faces. Every edge now meets its
deflection,[min_size, max_size]and the factor 2 between neighbours. Segment counts
change only on the edges that broke a rule before.- Measures (the default volume, area and length) are adaptive at relative precision
1e-6, asSession.mass_properties. 4.x gave a lofted wing's volume 20 % low. - Bounding boxes are the geometry's box. They are no longer grown by the shape
tolerance, and a B-spline box bounds the curve, not its poles. Mefisto2DhonoursMaxElementArea. In 4.x the bound had no effect.- The medial axis samples straight edges with at least 10 points (SMESH 9.16).
- A SMESH warning no longer fails the compute. It is reported in
ComputeReport.warnings.
New refusals
Each one raises PysmeshError with the reason and the offending ids. In 4.x each case
returned a result that was wrong, or crashed the process.
- A boolean whose result is empty or not watertight.
- An inside-out solid on import. Pass
inside_out="reverse"toload_brepor
Session.add_brepto repair it instead. sew(make_solid=True)when no solid can be made.- A swept or lofted solid that crosses itself, including sections that meet at one point.
- A solid loft with a non-planar end section, and a loft with a slit inside.
- A NaN or infinite argument to a geometry operation. Before, it reached OCCT and could
crash the process. - An assignment that makes the model ambiguous (SMESH's
HYP_CONCURRENT).assignraises
and undoes the assignment. - A hypothesis value that SMESH refuses.
- Viscous layers under an algorithm that does not build them.
Hexa3D,
PolyhedronPerSolid3DandCartesian3Dbuild 3-D layers.CompositeHexa3Dwith layers is
refused. - A layer stack with
total_thickness <= 0,layer_count < 1orstretch_factor < 1, at
construction.stretch_factor = 1(equal layers) is now accepted. Prism3Don a composite horizontal side. The message names the way out. 4.x threw
Standard_NotImplemented: Adaptor3d_Surface::EvalD0there.
New API
- Algorithms and hypotheses from SMESH 9.16:
SegmentAroundVertex0D,UseExisting1D,
UseExisting2D,PropagOfDistribution,LayerDistribution2D,LengthFromEdges,
BlockRenumber,NotConformAllowed. - New fields:
reversed_edgesonNumberOfSegments,Arithmetic1D,StartEndLength,Geometric1D
andFixedPoints1D;Distribution.BETA_LAWwithbeta;enforced_verticesandenforced_pointsonQuadrangleParams;- explicit grid coordinates,
fixed_point,axis_directions,use_quanta/quantaand
threshold_for_internal_facesonCartesianParameters3D.
- Viscous layers:
ViscousLayerBuilder, withMesher.shrink_geometryand
Mesher.add_layers(shrink the geometry, mesh it, then add the layers), and
first_layer_thickness(total_thickness, stretch_factor, layer_count). - Mesh operations and controls:
Mesher.make_boundary_meshwithBoundaryDimension,
Mesher.ray_volumesreturningRayVolumeHits,split_volumes(avoid_over_constrained=...),
add_nodes/add_elementsbound to a sub-shape (on=,parameters=), and the
Warping3DandScaledJacobianquality controls. - Session:
entities(kind, distinct=True)andalias_groups(kind);export_handoff(allow_aliases=True), withHandoff.solid_ids_of,face_ids_of,
edge_ids_ofandvertex_ids_of;Session.write_step, with face names keyed by session id;- a closed loft: name the first section again as the last;
HistoryDelta.warnings.
- Reporting:
ComputeReport.warnings(ComputeWarning: kind, ordinal, algorithm,
text). - Misc:
pysmesh.__version__.read_igestakes the file content as bytes, or a path.
Migration
read_iges(path=...)is nowread_iges(data_or_path=...). A positional call is
unchanged.- If you caught the exception that a SMESH warning raised, read
ComputeReport.warnings
instead. - If you import solids of unknown orientation, pass
inside_out="reverse". - If you assign hypotheses on overlapping sub-shapes, assign on the shared sub-shape first:
it takes priority over those around it. - Re-baseline stored meshes and measures that use TABLE or EXPRESSION distributions,
Adaptive1D,Mefisto2DwithMaxElementArea, bounding boxes, or default measures.
Known limits
Prism3Don a composite horizontal side is refused, not meshed.- Viscous layers with
CompositeHexa3Dare refused. - Cartesian viscous layers thicker than the shape allows are refused with the reason.
- OCCT pads B-spline and Bezier boxes by 1e-7. A strict
entities_in_boxquery at a
spline's exact extent misses by that amount. - There is no free tetrahedral volume mesher. NETGEN is planned.