mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
ifcconvert: default --threads to auto-detected CPU count (#2709)
The auto-detect path (hardware_concurrency()) already existed for --threads 0 but was never the default, so users had to pass it explicitly to get multi-threaded conversion. aothms confirmed in #2709 this was intended to change for the 0.8 release. This file was generated with the assistance of an AI coding tool.
This commit is contained in:
@@ -297,8 +297,9 @@ int main(int argc, char** argv) {
|
||||
geom_options.add_options()
|
||||
("kernel", po::value<std::string>(&geometry_kernel)->default_value(default_kernel),
|
||||
"Geometry kernel to use (opencascade, cgal, cgal-simple, hybrid-cgal-simple-opencascade).")
|
||||
("threads,j", po::value<int>(&num_threads)->default_value(1),
|
||||
"Number of parallel processing threads for geometry interpretation.")
|
||||
("threads,j", po::value<int>(&num_threads)->default_value(0),
|
||||
"Number of parallel processing threads for geometry interpretation. "
|
||||
"Defaults to 0, which auto-detects the number of concurrent threads supported by the system.")
|
||||
("center-model",
|
||||
"Centers the elements by applying the center point of all placements as an offset."
|
||||
"Can take several minutes on large models.")
|
||||
|
||||
@@ -16,12 +16,11 @@ you provide for the output file determines what format the IFC is converted to.
|
||||
On Windows, you can drag and drop a ``.ifc`` file on the ``IfcConvert.exe``
|
||||
file to automatically convert it to an ``.obj`` file.
|
||||
|
||||
For any conversion, it is recommended to use multiple cores to speed up
|
||||
processing:
|
||||
By default, IfcConvert uses all available CPU cores to speed up processing. To
|
||||
use a specific number of threads instead:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Change "7" to the number of CPU cores you have then plus one.
|
||||
IfcConvert -j 7 /path/to/input.ifc /path/to/output.dae
|
||||
|
||||
By default, units are converted to meters. If you want to retain the original units:
|
||||
@@ -112,8 +111,11 @@ CLI Manual
|
||||
--kernel arg (=opencascade) Geometry kernel to use (opencascade,
|
||||
cgal, cgal-simple, hybrid-cgal-simple-o
|
||||
pencascade).
|
||||
-j [ --threads ] arg (=1) Number of parallel processing threads
|
||||
for geometry interpretation.
|
||||
-j [ --threads ] arg (=0) Number of parallel processing threads
|
||||
for geometry interpretation. Defaults
|
||||
to 0, which auto-detects the number
|
||||
of concurrent threads supported by
|
||||
the system.
|
||||
--center-model Centers the elements by applying the
|
||||
center point of all placements as an
|
||||
offset.Can take several minutes on
|
||||
|
||||
@@ -93,7 +93,7 @@ num_threads
|
||||
+------+-------------------------+---------+
|
||||
| Type | IfcConvert Option | Default |
|
||||
+======+=========================+=========+
|
||||
| INT | ``--threads`` or ``-j`` | 1 |
|
||||
| INT | ``--threads`` or ``-j`` | 0 |
|
||||
+------+-------------------------+---------+
|
||||
|
||||
Number of parallel processing threads for geometry interpretation.
|
||||
|
||||
Reference in New Issue
Block a user