Hi Justin, Rob,
I had a chance to put the trimmed surfaces API to test today, so I thought I'd type up some feedback. I did some random wing planform sampling for a design space study, so the wing shapes are not 'normal' but I figured they might be a useful test of the trimming algorithm as the fuselage is the same for all planforms. Trimming seems to work 60% - 70% of the time when the curve adaptation tolerance is left at the default setting.
I only exported .igs files and I tried relative tolerances of the default 0.005, 0.0005, 0.0001, and 1e-5. Am I correct in thinking this is the tolerance between surfaces? This makes sense as for tolerances between 0.005 - 0.0005, the trimmed surfaces did not appear watertight in Pointwise unless I set the PW edge tolerances larger than the VSP curve adaptation tolerance.
The trimming algorithm seemed to break for a curve adaptation tolerance of 1e-4, and 1e-5. The .igs that was output was no longer a trimmed surface; for 1e-4, parts of components appeared to not be trimmed correctly (some parts of the component which should be trimmed remained), and for 1e-5 whole components were left untrimmed. (At the moment, my default tolerance for PW projects around a geometry of this scale is around 1e-6.)
I've come across 4 types of issues/warnings that I received over the course of using the API function for around 100 cases - they don't seem to appear when using the GUI. I've attached the vsp files for each warning so that you can reproduce them, if required.
1. /opt/openvsp/OpenVSP_libs_3.23.0/LIBIGES-prefix/src/LIBIGES/src/entities/entity102.cpp:739:AddSegment():
+ [ERROR] curve is aready closed
For A008.vsp3 - only happened for this single file in all the random samples.
2. BAD
parameter in SurfPatch::find_closest_uw_planar_approx!
Example A004.vsp3. Making the tolerance smaller appears to increase the number of cases where this error appears.
3. ERROR: Incomplete IGES Loop
Example A038.vsp3. Happened much less often than error 2 above.
4. Minimum
distance surface g_functor, v less than minimum. vv: 0.004 vmin: 0.004
Minimum
distance surface gp_functor, v less than minimum. vv: 0.004 vmin: 0.004
This error only appeared when setting the curve tolerance to 0.0001 or less for A042.vsp3
I'm not sure how much of a role the above errors play in the failure of the trimming algorithm at small tolerances, as I couldn't immediately see any issues with the successfully trimmed surfaces, where these errors would also appear.
I hope that helps with a little debugging. Let me know if you need more data! I look forward to having this function work more of the time, as then I can finally throw away my own intersection code...
Take care,
Tim