Thanks to Luca for the help!
 
Xiaojiang

At 2011-05-21 21:57:14,"Luca Antiga" <luca.ant...@gmail.com> wrote:

>Dear Xiaojiang,
> sorry for the long wait.
>Before we start, would you mind posting this message to the vmtk mailing list? 
>Having questions and answers on the list helps vmtk immensely.
>Now, on to your questions.
>The surface remeshing code essentially does this: it iteratively improves the 
>mesh by looping through all the triangles and testing if the mesh is larger or 
>smaller than it should be, in which case it splits or merges triangles, and if 
>an edge swap or similar simple operation would improve the quality of the 
>triangle. Then, after each of these iterations, it moves the verices by 
>sliding then on top of the original surface in such a way that triangles are 
>again more regular, and it does this for a number of sub iterations.
>So, number of iterations controls how many times the algorithm loops over all 
>triangles trying to optimize the mesh and make it assume the right nominal 
>edge length (or nominal target area).
>So, yes, if you set the number of iterations too small, there will not be 
>enough "time" for the mesh to be iteratively led to have the right areas. 
>Remember that at each iteration only a triangle split or a triangle merge can 
>happen for each triangle, not more (this allows different constraints to 
>compete against each other), so it takes a few iterations for the mesh to get 
>where you want.
>
>The reason why I don't do anything in TestAspectRatioCollapseEdge when the 
>area is greater than the target area is that in that method I'm only testing 
>for the aspect ratio criterion. Besides, an edge collapse produces a triangle 
>that is larger than the starting triangles (because you make a triangle 
>collapse at the advantage of its neighbor) while if it's larger you'd like to 
>break it into smaller triangles. This is actually handled by the 
>TestAreaSplitEdge method, which is the one you want to take a look at.
>Hope this helps
>
>Luca
>
>
>On 09/mag/2011, at 18:54, Yang Xiaojiang <xjyan...@163.com> wrote:
>
>> Hi Luca,
>> 
>> I am reading your C++ code of class vtkvmtkPolyDataSurfaceRemeshing, and 
>> have a question about this class: I intend to use 
>> SetElementSizeModeToTargetArea() and SetTargetArea() to use the 
>> "edgelength"-based remeshing , I know there is a member called TargetArea in 
>> your class vtkvmtkPolyDataSurfaceRemeshing. What I did not understand very 
>> well is that you also use another control paramenter called 
>> NumberOfIterations in your class. I think if the NumberOfIterations is set 
>> too small, the TargetArea objective will not be reached before the iteration 
>> stops. How did you treat this problem in your class? I did not find any clue 
>> in your source code. Please help, thanks a lot!
>> 
>> Also, in the method TestAspectRatioCollapseEdge(..),   the following cose 
>> also confuse me:
>> 
>> if (area > targetArea)
>>     {
>>     return DO_NOTHING;
>>     }
>> 
>> Why if the triangle's area is more than the desired area you do nothing 
>> instead of collapsing the edges?
>> Thanks again!
>>  
>> Xiaojiang
>> 
>>  
>> 
>> 
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
vmtk-users mailing list
vmtk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vmtk-users

Reply via email to