On Tue, Jul 31, 2012 at 2:16 PM, phoenix <284281...@qq.com> wrote:

> Yes, it does make sense. As for the case above, for a tours, only one
> circular intersection curve cannot divide the torus' surface into two parts,
> so I hope it won't cause much problem. I will try this and find out whether
> it works...

Ah, right - I would expect that to be a degenerate curve in UV space,
come to think of it.  Definitely a good test case.

> As for splitting a surface using the intersection curves, it still needs
> some consideration. There are several different cases. But it's the first
> step before we do the rest. Creating several trimming NURBS surfaces from
> the original one (splitting) is the first thing I need to focus on now. Does
> it make sense?

Yes - new surfaces will need to be made first, before we can work with
them.  Since you have uv space curves, they will be used to either
alter existing inner and outer trimming loops, add completely new
inner loops, or re-define outer loops.  The cases are:

   1.  trimming loop found by intersection test does not intersect any
existing inner or outer loop on the original surface.
        a.  Surface 1 - copy original surface, create new interior
trimming loop using loop from intersection test.
        b.  Surface 2 - copy original surface, replace original outer
trimming loop with loop from intersection test.

   2.  trimming loop found by intersection test does intersect an
outer trimming loop on the original surface.
        a.  Surface 1 - copy the original surface - when working with
the copy, the intersected outer loop can either be adjusted to
incorporate the curve from the intersection test, or a new interior
loop can be created using the intersected segment of the outer loop
and the intersection curve.  I'd opt for the first, personally, but
either could work.
        b.  Surface 2 - copy the original surface, find the curve
segment from the outer loop that, in combination with the intersection
curve, forms a closed loop, and make that the new outer trimming
curve.

   3.  trimming loop found by intersection test intersects an inner
trimming loop on the original surface.
        a.  Surface 1 - copy the original surface.  Find the portion
of the inner trimming loop that is intersected by the intersection
curve.  Remove that portion from the original inner trimming loop, and
replace it with the curve from the intersection test.
        b.  Surface 2 - copy the original surface. Use the curve
segment discarded from Surface 1 and the intersection test curve to
form a new outer loop.

Then, of course, you can have multiple intersections with multiple
sorts of curves from the original surface.  In essence, this part of
the process is where curve/curve intersection functions are necessary.
 You can probably create those with a 2D variation on the same
approach used for the 3D intersection curves - get the UV space
bounding boxes for two candidate intersection curves, and subdivide
down to get close to the intersections, then linear (rather than
planar) approximations to get the final points.  (Or there may be
other, faster/better algorithms - that's just the one that suggests
itself in context.)

Your earlier tgc/epa intersection example is an example where there
will be curve/curve intersections to find, and of course it's quite
simple to construct others.

It's up to you - it may be simpler, initially, to create breps
consisting of surfaces made from each of the original intersected
breps, and verify that the new surfaces reproduce successfully the
original breps - that would allow postponement of how to assemble the
surfaces into the final brep form.

Cheers,
Cliff

------------------------------------------------------------------------------
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