Macrobody fixes: Facets/Sense #39
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR seeks to resolve issues, #37, #38
#37, resolved by changing flip_sense for RPP facets all to false. A bit surprising to me, but I guess the way it considers them is already correct?
#38 , resolved by detection of RCCs with negative height. This was messing up the selection of the correct facet and sense. The detection of negative height than informs replace_macrobody_facets method.
The latter probably occurs with other macrobodies when they too are defined in, particular ways. And this is a RCC specific fix-up, not generalized.
I have tested this on the example inputs for issues 37, 38, as well as on an original much larger model and another macrobody heavy model.
The fixes work in these cases and the larger model and macrobody conversion is not broken.
I have not systematically tested this on a large variety of inputs (which would be best).
I used quite a bit of Claude Opus 4.1 to implement the detection and flipping. Though I have steered it quite a bit and tested the implementation myself manually. But probably some greater scrutiny is called for.