[vtk-developers] Spline effort and tests

Derek C Thomas dcthomas at utexas.edu
Tue Sep 8 13:11:52 EDT 2015


Lin,

Thank you for the data.  Where should this data be placed to run the tests?

Derek

On Sun, Sep 6, 2015 at 12:12 AM, Lin M <majcjc at gmail.com> wrote:

> Hi Dr. Thompson,
>
> Thank you for your reminder! I also found that I need to exclude the
> template class vtkControlPointArray from the header test and it passed now.
>
> Currently from the CDash, there are still several problems to make it
> ready to merge.
>
> The first is still the test data for brepreader. Is there a way to upload
> it into the source/Testing/Data folder?
>
> The second is a building error in linux. (
> https://open.cdash.org/viewBuildError.php?buildid=3996031 )
> The third is a test failure in vtkFiltersCorePython-cutPolygons. (
> https://open.cdash.org/testDetails.php?test=370902790&build=3996015 )
> These two problems seem not relate to the vtkFiltersBezier module. Can I
> just ignore them?
>
> Best,
> Lin
>
> On Sat, Sep 5, 2015 at 10:48 PM, David Thompson <
> david.thompson at kitware.com> wrote:
>
>> Hi Lin,
>>
>> You need to add a comment after one of the #include directives
>> (explaining why the extra include is required) and after each of the
>> private methods (saying exactly "Not implemented."). The header test looks
>> for certain comments as a way to ensure that the developer is aware of the
>> VTK style.
>>
>>     David
>>
>> On Sep 5, 2015, at 10:13, Lin M <majcjc at gmail.com> wrote:
>>
>> Hi Dr. Thompson,
>>
>> I checked the code. I think I have been following these rules but I still
>> got the fail message in CDash (
>> https://open.cdash.org/testDetails.php?test=367888290&build=3981191)
>>
>> The declaration is like: (
>> https://gitlab.kitware.com/Lin.Ma/vtk/blob/master/Filters/Bezier/vtkBezierPatchAdaptor.h
>> )
>>
>> class VTKFILTERSBEZIER_EXPORT vtkBezierPatchAdaptor : public vtkObject
>> {...}
>>
>> and only with two includes, one is "vtkObject.h" and another one is
>> "vtkFiltersBezierModule.h"
>>
>> In vtkBREPReader.h (
>> https://gitlab.kitware.com/Lin.Ma/vtk/blob/master/Filters/Bezier/vtkBREPReader.h
>> )
>>
>> I declared the copy constructor and assignment operators as private
>> methods without implementation.
>>
>> The main differences are 1. the vtkBezierPatchAdaptor is an abstract
>> class so it doesn't have a static New() method. 2. the vtkBREPReader's
>> parent class is vtkAlgorithm.
>>
>> Is it possible that I made some mistakes in the CMakeLists (
>> https://gitlab.kitware.com/Lin.Ma/vtk/blob/master/Filters/Bezier/CMakeLists.txt
>> )?
>>
>> Best,
>> Lin
>>
>> On Sat, Sep 5, 2015 at 8:08 PM, David Thompson <
>> david.thompson at kitware.com> wrote:
>>
>>> Hi Lin,
>>>
>>> The header test is telling you to add an export macro defined in
>>> vtkFiltersBezierModule.h to each class in the module. It means that you
>>> should declare the classes like this:
>>>
>>> class VTKFILTERSBEZIER_EXPORT vtkXXX { ... };
>>>
>>> On Windows, the macro is turned into a declspec that tells the compiler the class is part of the library's public API (instead of for internal use only).
>>>
>>> The test also complains that your header file includes more than one other header. We have had problems with compilation times for VTK growing very large because developers would add many include statements to the headers (instead of putting them in the implementation file, where they belong). To keep that from happening again, the header test complains when there is more than one include file. When the include file is necessary, simply add a comment explaining why it is needed to the right of the include statement, like
>>>
>>> #include "vtkFiltersBezierModule.h" // for export macro
>>>
>>> The only mandatory header file is the one for the declared class's parent.
>>>
>>> You should not implement the copy constructor and assignment operators. Instead, you should declare them as private methods and provide no implementation. Classes derived from vtkObject (which should be the default) should have instances created by calling a static New() method, should always be referenced by pointer instead of by value, and should not be copied unless ShallowCopy or DeepCopy methods are implemented. This is a design pattern used throughout VTK to make memory management safer.
>>>
>>> The failing image tests can be fixed by adding images that are correct but drawn with a few different pixels. Each test can have multiple valid baseline images. Just download the image from the dashboard web page, name it baseline_1.png (assuming the original was baseline.png), and add its MD5 checksum to the Data directory. There should be mention of how to do this on the wiki.
>>>
>>>     David
>>>
>>>
>>> On Sep 4, 2015, at 21:47, Lin M <majcjc at gmail.com> wrote:
>>>
>>> Hi Dr. Thompson,
>>>
>>> Some of the tests are still failing.
>>>
>>> 1. The header test output that
>>>
>>> Use export macro: VTKFILTERSBEZIER_EXPORT
>>>
>>> File: c:/Dashboards/buildbot/eec47309/source/Filters/Bezier/vtkBezierPatchAdaptor.h has 2 includes:
>>>    23: #include "vtkObject.h"
>>>    24: #include "vtkFiltersBezierModule.h"
>>>
>>> where I have no clue the problem is, and also
>>>
>>> File: c:/Dashboards/buildbot/eec47309/source/Filters/Bezier/vtkBREPReader.h has 2 includes:
>>>    28: #include "vtkAlgorithm.h"
>>>    29: #include "vtkFiltersBezierModule.h"
>>>
>>> File: c:/Dashboards/buildbot/eec47309/source/Filters/Bezier/vtkBREPReader.h does not define copy constructor
>>> Should be:
>>> vtkBREPReader(const vtkBREPReader&); // Not implemented
>>> File: c:/Dashboards/buildbot/eec47309/source/Filters/Bezier/vtkBREPReader.h does not define assignment operator
>>> Should be:
>>> void operator=(const vtkBREPReader&); // Not implemented
>>>
>>> where I really have implemented them.
>>>
>>>
>>> 2. The image tests seems to fail because of there are some slightly differences between the test image and the valid image.
>>>
>>> The lines in the valid image have different line width the rendered test image in different platforms.
>>>
>>> Could you give me some suggestions about how to fix that? Thank you!
>>>
>>>
>>> Best,
>>>
>>> Lin
>>>
>>>
>>> On Sat, Sep 5, 2015 at 9:35 AM, Lin M <majcjc at gmail.com> wrote:
>>>
>>>> Hi Derek,
>>>>
>>>> I put it in my public folder with the name Moto.brep (
>>>> http://midas3.kitware.com/midas/folder/13193).
>>>> Please let me know if you have any other questions. :-)
>>>>
>>>> Best,
>>>> Lin
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Sep 4, 2015 at 10:55 PM, David Thompson <
>>>> david.thompson at kitware.com> wrote:
>>>>
>>>>> Hi Derek,
>>>>>
>>>>> Lin should be able to point you at the test data. It should be on
>>>>> Midas, so he may just send the URL (hint hint).
>>>>>
>>>>> > I also have a question regarding the implementation.  Would it be
>>>>> possible to use this work to generate a nonlinear cell type to represent an
>>>>> unstructured grid of Bezier patches?
>>>>>
>>>>> Yes. The idea is that you would write an adaptor like the one Lin has
>>>>> written for NURBS to convert your non-linear data into Bézier patches. The
>>>>> patches can either be tessellated directly or operations performed on the
>>>>> patches.
>>>>>
>>>>> I am working on a contouring algorithm that would take patches in and
>>>>> output more Bézier patches of just the ioscontours/isovolumes, but it will
>>>>> be some time before it is ready.
>>>>>
>>>>>         David
>>>>
>>>>
>>>>
>>>
>>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150908/9a8e26db/attachment.html>


More information about the vtk-developers mailing list