Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] question on splitting edges

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] question on splitting edges


Chronological Thread 
  • From: "Bill Conan" <>
  • To:
  • Subject: Re: [cgal-discuss] question on splitting edges
  • Date: Tue, 17 Jun 2008 02:57:09 +0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=rc5SPboLegSOBTpHs4Sr2oS6ZKHz8RX9kJSfIb+WkVPMztCzPM93mGZFuqmCiQhqd8 eTikB5fNazFbJ0fOG4rIyu9XtIo+zaaZBrnf0qNLJ5Q5EJ8AiXqQLVRdRdv472pNtRmP WnMoL9CRxavZVF63J/w+VFJ1Sw/8ml9T8gWC8=

hello Andreas,

thank you very much. I think that is an option, but is that efficient?

I'm wondering how people do this kind of operation normally?

for example, when applying a subdivision on a geometry object,

should i make a cloned object and do all the modification on it and
return the cloned one, or i just need to modify the original one.

i know the first way is easier to implement and also safer, but it
eats up more memory.

i think those commercial software, say 3D max, always keeps the
original geometry and do modification on a cloned object.

thank you,

On Mon, Jun 16, 2008 at 3:13 PM, Andreas Fabri
<>
wrote:
>
> Hello Bill,
>
> what you might do is to copy the edges you want to split
> into a container and then just split them.
>
> The behaviour of an iteration over the edges as they are stored in the
> datastructure itself interlaced with operations modifying the datastructure
> depends too much on how they are stored.
>
> andreas
>
>
> Bill Conan wrote:
>>
>> hello Pierre,
>>
>> thank you very much for your reply. but i don't want to make things
>> complicated. i just need to split each edge into two.
>>
>> so here is my understanding: if i split an edge e into e1 and e2,
>>
>> then e1 will be at the same location in the edge list as the edge e is,
>>
>> and e2 will be added to the end of the list.
>>
>> so if i write the code as this
>>
>> enditer=edge.end();
>> for(edgeiter=edge.begin();edgeiter<enditer;++edgeiter)
>> {
>> split edgeiter;
>>
>> // will edgeiter become null here?
>> }
>>
>> i'll be fine (the code will not loop forever). am i right?
>>
>> thank you very much.
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>



--
Dept. of Computer Science
University of California, Davis
Homepage:http://wwwcsif.cs.ucdavis.edu/~yans/



Archive powered by MHonArc 2.6.16.

Top of Page