ukaea / overlap_checker

A growing collection of tools to process CAD geometries for use in modelling workflows.
GNU General Public License v2.0
3 stars 1 forks source link

switching dependencies over to those used elsewhere at UKAEA #11

Closed smason closed 2 years ago

smason commented 2 years ago

basically drop everything I can that isn't in the STL, use CMake for building, and catch2 for unit tests

makeclean commented 2 years ago

Would it be worth registering these tests to ctest?

makeclean commented 2 years ago

For the various tools, lets alias '-h' to '--help'

makeclean commented 2 years ago

Text for overlap_checker help

./overlap_checker --help
Usage: overlap_checker [OPTION...] input.brep
Perform imprinting of BREP shapes.

      --bbox-clearance=C     Bounding-boxes closer than C[=0.5] will be checked
                             for overlaps
      --imprint-tolerance=T  Faces, edges, and verticies will be merged when
                             closer than T[=0.001]
  -j, --jobs=N               Parallelise over N[=4] threads
      --max-common-volume-ratio=R
                             Imprinted volume with ratio <R[=0.01] is
                             considered acceptable
  -?, --help                 Give this help list
      --usage                Give a short usage message

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Says that its for imprinting stuff, which it isn't

makeclean commented 2 years ago

overlap_checker - default seems to be debug being on, should this not be off by default?

makeclean commented 2 years ago

No useful summary from overlap checker, I would expect something like a list of overlaps, or a message to say there weren't any

smason commented 2 years ago

No useful summary from overlap checker

what would a useful summary look like? it did follow the old school unix paradigm of no output indicates success, at least it did until I broke the code that sets logging levels

it'll output a line if there are problems, are you saying it should always output a line, listing things like number of comparisons done, number of shapes touching, with small overlaps, etc?

re. the other comments, I'll see what I can do this afternoon

makeclean commented 2 years ago

I guess I would expect a summary table as a default option, with some useful stats, like number of overlaps, number of overlap checks, number of coincidences and so on?

smason commented 2 years ago

No useful summary from overlap checker, I would expect something like a list of overlaps, or a message to say there weren't any

you could always tee the CSV output to watch progress

that said, I've added a summary line in 074b8c1ae540efce1940227fd77dee15097a5feb that outputs:

202.961 [Info] processing summary: bbox tests=525825, intersection tests=3404, touching=158, overlapping=1, bad overlaps=0, tests failed=0

smason commented 2 years ago

@makeclean think that's all done now

please let me know if I've missed anything!

makeclean commented 2 years ago

The end of run summary is great!

Im seeing a bunch of things like

204.528 [Warn]   435-129 imprint failed with (73 filler and 0 common) warnings
204.528 [Error]   435-129 failed to classify overlap

What is a filler warning?

I'm not sure if you want to branch some of the following of here into issues, or just fix em all here?

I'm noticing a tool step_to_brep - I presume I should run this on STEP files first, would it not be easier (better?) to have filename based dispactch in the overlap and imprint tools to either convert a step file to brep then run?

makeclean commented 2 years ago

Hmm, I actually quite like the the one tool one job, unix pipeline maybe type dispatch would be overkill. Though some additonal verbositry form the input tool would be good, I've currently no idea what its doing, or how long it might take?

smason commented 2 years ago

What is a filler warning?

it's coming from the deep guts of opencascade, I'm reporting it because it was easy to pull out and in the hope it'd be useful for debugging if/when something like this fails

maybe open another issue with a pointer to the file an I can have a look?

smason commented 2 years ago

the main reason for separating things out is to help with materials later, I've added some detail as part of another merge: https://github.com/ukaea/overlap_checker/tree/shape-merge-tool#file-formats

i.e. step_to_brep flattens the file into a list of shapes, then all other tools keep shapes the "same", when I start handling materials it'll hopefully be an easy job to match things back up afterwards