- stem(), replace_name(), replace_ext(), remove_ext() etc
- string::contains() method - similar to C++23 method
Eg,
if (keyword.contains('/')) ...
vs
if (keyword.find('/') != std::string::npos) ...
- wrap command-line retrieval of fileName with an implicit validate.
Instead of this:
fileName input(args[1]);
fileName other(args["someopt"]);
Now use this:
auto input = args.get<fileName>(1);
auto other = args.get<fileName>("someopt");
which adds a fileName::validate on the inputs
Because of how it is implemented, it will automatically also apply
to argList getOrDefault<fileName>, readIfPresent<fileName> etc.
- adjust fileName::validate and clean to handle backslash conversion.
This makes it easier to ensure that path names arising from MS-Windows
are consistently handled internally.
- dictionarySearch: now check for initial '/' directly instead of
relying on fileName isAbsolute(), which now does more things
BREAKING: remove fileName::clean() const method
- relying on const/non-const to control the behaviour (inplace change
or return a copy) is too fragile and the const version was
almost never used.
Replace:
fileName sanitized = constPath.clean();
With:
fileName sanitized(constPath);
sanitized.clean());
STYLE: test empty() instead of comparing with fileName::null
- Favour use of argList methods that are more similar to dictionary
method names with the aim of reducing the cognitive load.
* Silently deprecate two-parameter get() method in favour of the
more familiar getOrDefault.
* Silently deprecate opt() method in favour of get()
These may be verbosely deprecated in future versions.
- adjustments to internal handling to improve run-time addition of
other formats (eg, with additional user library)
For example, to write a binary STL with a '.stl' extension:
$ surfaceMeshConvert input.obj -write-format stlb output.stl
Or in a sampler,
to specify the input type without ambiguity:
surf
{
type meshedSurface;
surface sampling.inp;
fileType starcd;
scale 0.001;
...
}
STYLE: regularize naming for input/output scaling
* -read-scale (compat: -scaleIn)
* -write-scale (compat: -scaleOut)
CONFIG: change edge/surface selection name for STARCD format
- now select as "starcd" instead of "inp" to avoid naming ambiguity
with abaqus
General:
* -roots, -hostRoots, -fileHandler
Specific:
* -to <coordinateSystem> -from <coordinateSystem>
- Display -help-compat when compatibility or ignored options are available
STYLE: capitalization of options text
- use succincter method names that more closely resemble dictionary
and HashTable method names. This improves method name consistency
between classes and also requires less typing effort:
args.found(optName) vs. args.optionFound(optName)
args.readIfPresent(..) vs. args.optionReadIfPresent(..)
...
args.opt<scalar>(optName) vs. args.optionRead<scalar>(optName)
args.read<scalar>(index) vs. args.argRead<scalar>(index)
- the older method names forms have been retained for code compatibility,
but are now deprecated
- Added conformationSurface and searchableSurface classes in place
of querySurface.
- Added cellSizeControl class.
- Change cvMesh argument of relaxation model constructor to Time.
- Add writePrecision option to surfaceConvert.
- Add onLine function to surfaceFeatureExtract.
- Remove querySurface.
- Move createShellMesh and extrude2DMesh to their own libraries.
- Replace controls and tolerances with a cv2DControls object.
- Add patchToPoly2DMesh class to extrude2DMesh.