User:GregoryLi/GSoC2022/FinalReport
Contents
brep_primitives_intersection project to test primitives intersection and brep cases
branch: https://github.com/GregoryLi0/brlcad/tree/brep_arb8intersect
The project intends to test if the intersection and brep functions are correct.
It creates one primitive intersection matrix, then converts all intersection cases into brep format. Now we have arb8 and sph primitives available. Either of them have 125 cases with different relative positions, each case have two primitives. They are converted into brep format with three kind of union format: OP_UNION, OP_INTERSECT and OP_SUBTRACT.
All the primitives data are stored and caculated in brep_primitives_intersection.h, and the brep_conversion functions are copied from libged.
primitives brep converting
branch: https://github.com/GregoryLi0/brlcad/tree/brep_rhc_debug
The project intends to test if all the primitives can be converted into brep format correctly.
This project creates all the solid primitives and converts them into brep format. Each of the primitives is given a default rotation. Two primitives got wrong answer. But they are fixed now.
primitives brep debugging
branch: https://github.com/GregoryLi0/brlcad/tree/brep_rhc_debug && https://github.com/GregoryLi0/brlcad/tree/brep_epa_debug
rhc
Converting rhc into brep get wrong side face and botton faces. The reason is about nurbs and Casteljau formula in rt_rhc_brep function.
epa
Epa’s Upper nurbs surface have no translation before. It’s solved by caculating a translation matrix and applying to the upper nurbs surface.
dplot cmd debug
branch: https://github.com/GregoryLi0/brlcad/tree/dplot_debug
The dplot calls overlay cmd to plot files, but the commands given by dplot can’t call overlay cmd correctly. So I change the parameters transfered to overlay and files plotted.
However, some of the plot files can’t be plotted normally. I still don’t know what goes wrong. Some files to be plotted are modified they can be displayed successfully.
brep and boolean functions
note: debugging at commit 8a508c8f.
Locate the error that the trimmed faces are not generated and stored correctly. If we trim one surface with a closed curve, we should get two subsurfaces,but we only get one now.
Here is one explanation for the error. I created two arb8 and convert the union to brep form. I keep all the subsurfaces no matter it should be kept or not. If everything works correct, we shall get two arb8 with trim lines. But now we get one subface for every origin face.
To fix it, we shall get all the subfaces created by the boolean operation, then decide whether to keep them or not. The key functions is get_evaluated_faces() in src/libbrep/boolean.cpp.