On Wed, Apr 24, 2013 at 1:00 AM, phoenix <284281...@qq.com> wrote:
>
> Yes, I originally mentioned a MGED based graphical approach because its
> easy to see the result of intersections, but if the ON_X_EVENT can report
> intersections quite well, it would be perfect to write test programs as you
> mentioned above. I will study the code in opennurbs_x to have a better
> understanding of it. Thank you for your suggestion.
>
I doubt the ON_X_EVENT will handle all the cases we need, since it isn't
designed for surface/surface or point/anything cases, but since openNURBS
removed their version anyway I don't see why we couldn't extend it to meet
our full needs in libbrep, if that looks like a good way to go.
As for visualizing results in MGED (which I agree is desirable) I would
suggest having the test programs write out a .g file containing the inputs,
the expected output, and whatever was obtained instead in the case of a
failed test - test#_failed.g or some such naming convention would be needed
to keep them straight. That way, you can open that .g file and use the
brep command to visualize whatever needs visualization (for points, you
could just insert a sphere, and the rest I imagine could be represented as
invalid BReps, similar to the surface currently stored in
src/librt/tests/nurbs_surfaces.g. Eventually it probably will make sense
to have an interactive command for such operations in MGED, but I think the
unit tests are more critical initially.
> I'm not quite familiar with 3dm files, so I will setup a .g based test
> first, and then modify it later to deal with 3dm files.
>
Sounds good - that will mean your tests should live in src/librt/tests,
rather than src/libbrep/tests
Cliff
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel