<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Lin,</div><div><br></div><div>You are correct; most of the surfaces in those models that look strange just need to be trimmed by their neighbors. Trimming is an operation closely related to isocontouring (which would be the next step); it cuts a patch where the distance to another patch becomes 0. Isocontouring is more general in that the function specifying the location of the cut does not need to be the distance to another curve or surface.</div><div><br></div><div>The motorcycle would make a good image-based test of both the interpolation and reader classes!<br><br>    David</div><div><br>On Aug 15, 2015, at 09:51, Lin M <<a href="mailto:majcjc@gmail.com">majcjc@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>Hi Dr. Thompson,</div><div><br></div><div>I have found some surfaces model in brep format from <a href="http://www.opencascade.org/showroom/shapegallery/gal5/" target="_blank">http://www.opencascade.org/showroom/shapegallery/gal5/</a> and I think the motorcycle is correct. The reason why it looks odd in the seat area is because those surfaces need some bool operation which we haven't implemented yet.</div><div><br></div><div>I try to load the model of suitcase, boat and F1 and all of them displayed correctly, I suppose. :-)</div><div><br></div><div>P.S. </div><div><br></div><div>Best,</div><div>Lin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 15, 2015 at 2:45 PM, Lin M <span dir="ltr"><<a href="mailto:majcjc@gmail.com" target="_blank">majcjc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Dr. Thompson,</div><div><br></div><div>I finally make the vtkBrepReader work (partially, it can only load surface patches). The problem is that I can not find enough data source. None of the files in CGM/test contains nurbs surface and the only one with Bezier surface is moto.brep. It looks like this</div><div><img width="522" height="334" src="cid:ii_idcp145w0_14f3015de9e09284"></div><div>As you can see, the seats area looks strange in the rendered shape. So I really need some mroe simpler nurbs shape to test my implementation. Can you give some advice where I should look for? Thanks!</div><div><br></div><div>Best,</div><div>Lin<br>​</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 12, 2015 at 11:07 PM,  <span dir="ltr"><<a href="mailto:majcjc@gmail.com" target="_blank">majcjc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">



<div>
<p dir="ltr">Thank you for your suggestions!</p>
<p dir="ltr">I will polish the code and make them throughly tested before merged to VTK.</p>
<p dir="ltr">Best,<br>
Lin<br>
</p><div><div>
<br>
<br>
<br>
<div class="gmail_quote">On Wed, Aug 12, 2015 at 7:48 AM -0700, "David Thompson" <span dir="ltr">
<<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>></span> wrote:<br>
<br>
</div>
<div>
<div>Hi Lin,<br>
<br>
> I have finished the point inversion and projection algorithm for both 1-d, 2-d and 3-d NURBS.<br>
> We can turn to more dedicated algorithms now.<br>
<br>
I think that a better use of the remaining time would be to clean up and merge your work into VTK. You have made great progress and it looks really good. It would be better to polish it so it is easy to maintain and get it accepted than to push for contouring
 and be left with something that is not tested well enough to be maintained as VTK changes. That way you or another GSoC student can continue things next summer.<br>
<br>
It has been my experience that the only way to ensure it is maintained is to make sure it is extensively tested so that when a change to VTK is proposed, the developer making the change gets immediate feedback that the change requires work on the spline classes.
 So, I propose doing the following:<br>
<br>
1. There are some style changes that need to be made. I'll push some changes off your branch to sampling/vtk, but to get started:<br>
   a. There is trailing whitespace at the ends of lines in many files which are disallowed by our pre-merge scripts.<br>
   b. Method names should be spelled out, so "Curv," "Surf," and "Volm" should become "Curve," "Surface," and "Volume." I know it is nice for names to have the same length, but it is nicer for other developers to be able to predict the names of methods across
 the entire toolkit. :-)<br>
<br>
2. Testing should be more exhaustive testing to make sure that changes to VTK don't break things. Right now only interpolation is tested at all (and there is a lot of commented-out code in that test which should probably be removed). Other tests should include,
 for example,<br>
  a. simplicial (triangular and tetrahedral) patch interpolation (you can do this with an image-based test and/or by checking that numeric values are within a tolerance of an analytical solution,<br>
  b. point inversion for rectangular and simplicial patches<br>
  c. derivative computation<br>
  d. the NURBS adaptor should be tested with several shapes whose patches can be computed<br>
<br>
3. Every class should have documentation that covers its purpose, its intended lifecycle (how should it be used, what methods must be called before others, etc.). The way field data is used to hold NURBS knot vectors should be documented and should have an
 example data file (which should be used in an image test to verify that it continues to work).<br>
<br>
        Thanks,<br>
        David<br>
<br>
> On Sun, Aug 9, 2015 at 2:47 PM, Lin M <<a href="mailto:majcjc@gmail.com" target="_blank">majcjc@gmail.com</a>> wrote:<br>
> Hi Dr. Thompson,<br>
> <br>
> I have pushed new methods to compute point inversion and projection to gitlab.<br>
> It took longer time than I expected. It would be really helpful if you could review the code a little bit. Thanks!<br>
> <br>
> Best,<br>
> Lin<br>
> <br>
> On Mon, Aug 3, 2015 at 10:50 AM, David Thompson <<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>> wrote:<br>
> Hi Lin,<br>
> <br>
> Yes, that is correct. Inserting knot values does not change the polynomial degree or shape, it just adds control points so that the weights are uniform (as required by the Bézier basis). So, the underlying parameterization is unchanged... it just has more
 piecewise segments.<br>
> <br>
>     David <br>
> <br>
> <br>
> <br>
> On Aug 2, 2015, at 22:38, Lin M <<a href="mailto:majcjc@gmail.com" target="_blank">majcjc@gmail.com</a>> wrote:<br>
> <br>
>> Hi Dr. Thompson,<br>
>> <br>
>> I have a question about the inversion and projection. Currently, we evaluate the NURBS by inserting knots and making it into Bezier forms. My question is that if I evaluate u = 0.2 in original knot vector [0,1,2,3], would it be the same to evaluate u = 0.2
 in the new knot vector which is a bezier form?<br>
>> <br>
>> Best,<br>
>> Lin<br>
>> <br>
>> On Mon, Jul 27, 2015 at 1:26 AM, Lin M <<a href="mailto:majcjc@gmail.com" target="_blank">majcjc@gmail.com</a>> wrote:<br>
>> Hi Dr. Thompson,<br>
>> <br>
>> I have added new method vtkPatachInterpolation::InterpolateOnSimplicialPatch() and pushed to gitlab.<br>
>> <br>
>> I'm now working on the point inversion part.<br>
>> <br>
>> Best,<br>
>> Lin<br>
>> <br>
>> On Sun, Jul 26, 2015 at 8:05 PM, David Thompson <<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>> wrote:<br>
>> Hi Lin,<br>
>> <br>
>> How is triangular/tetrahedral patch interpolation going? They will be a basic building block of the contouring and cutting algorithms. By identifying points on edges, edges on surfaces, and surfaces in volumes that take on a single value, a single patch
 can be decomposed into sections that are inside, outside, or on an isosurface. Not all of these pieces can be expressed as brick patches, but they can be expressed as simplicial patches.<br>
>> <br>
>>     David<br>
>> <br>
>> <br>
> <br>
> <br>
<br>
</div>
</div>
</div></div></div>

</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></blockquote></body></html>