On Tue, Jul 17, 2012 at 11:30 AM, phoenix <284281...@qq.com> wrote:
> Hi!
>
> I have just finished a draft of the NURBS surface-surface intersection
> function. The function is in opennurbs_ext.h and opennurbs_ext.cpp. Now this
> function needs lots of tests and improvement.

Cool!

> To make the test more convenient, I'd like to add an option to the brep
> command in MGED, to test the intersection of the NURBS surfaces. For
> example, this option can be used like this:
>
>  brep obj1.brep intersect obj2.brep i j

Hmm.  I'd suggest:

   brep intersect obj1.brep i obj2.brep j

with the sub-command following brep, but don't get too hung up on the
syntax of the command - whatever works for you, go ahead and implement
it.  It's easy enough to change parameter ordering later - it
shouldn't hold up writing and using the functionality.

> It intersects the ith surface of obj1.brep and the jth surface of obj2.brep,
> calling the surface_surface_intersection() function. But how to show the
> result is quite a problem. My current idea is to plot the two surfaces just
> like "brep xxx plot S i" and plot the intersection curves like plotting
> trims.

I think that makes sense.  You may also want to plot the bounding
boxes associated with each surface that went into creating the curve,
if they don't add too much visual clutter.

> The surfaces and intersection curves are displayed in different
> colors so they can be distinguished from each other. Any suggestions?

Something like the following coloring scheme may work (RGB color
values in parenthesis):

surface 1:  surface lines (255,0,0), bboxes (80,0,0)
surface 2:  surface lines (0,0,255), bboxes (0,0,80)
intersection curve:  random colors for each "segment" of the curve

That will let you identify which bboxes go with which surface.

One other thought is that in addition to an interactive visual, you
may also want to generate a series of .pl files (plot files that can
be viewed with the overlay command) corresponding to each individual
segment of the curve - i.e. for each curve segment generated, generate
a pl file containing the surface plots, the bounding boxes from both
surfaces that went into that specific curve segment, and the curve
segment itself.  That will let you pull up the subset of the plots
that pertain to a specific curve, if you need to focus in on a problem
- avoiding the visual clutter is often very helpful when debugging.  I
don't know if the data are stored in such a way that you can easily do
that, but if so it may be a worthwhile addition.

Let us know if you need examples of generating .pl files.  Nice progress!

Cheers,
CY

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to