lorensen / VTKExamples

The VTK examples, formerly hosted on media wiki
Apache License 2.0
344 stars 157 forks source link

C++ example #613

Closed chethanab16 closed 5 years ago

chethanab16 commented 5 years ago

@lorensen @ajpmaclean Please review.

ajpmaclean commented 5 years ago

It looks good, however in Boolean.cxx: 1) For me the name Boolean is not really descriptive. Maybe it should be called BooleanOperationImplicitFunctions and go in under the menu entry Working With 3D Data however the code should stay in Cxx/ImplicitFunctions. 2) The formatting should be 2 spaces not 4. 3) The blank line after int main(int argc, char *argv[])should be removed. 4) I would suggest replacing VTK variable declarations (vtkSmartPointer<vtkXX>) with auto vtkXX.

e.g Change the VTK variable declarations in this fashion throughout your code:

  vtkSmartPointer<vtkNamedColors> colors =
    vtkSmartPointer<vtkNamedColors>::New();

to

  auto colors =
    vtkSmartPointer<vtkNamedColors>::New();

What do you think @lorensen ?

chethanab16 commented 5 years ago

@ajpmaclean thank you for the response, required changes had done please verify.

ajpmaclean commented 5 years ago

1) You need to rename src/Cxx/ImplicitFunctions/Boolean.cxx to src/Cxx/ImplicitFunctions/BooleanOperationImplicitFunctions.cxx 2) src/Testing/Baseline/Cxx/ImplicitFunctions/TestBooleanOperationImplicitFunctions.png is missing, please add it in.

chethanab16 commented 5 years ago

@ajpmaclean I made required changes. Please review.

ajpmaclean commented 5 years ago

It looks really nice, thankyou for your efforts.