mathLab / PyGeM

Python Geometrical Morphing
http://mathlab.github.io/PyGeM/
Other
342 stars 119 forks source link

Error - RBF Deformation of UNV #149

Closed prosimas closed 6 years ago

prosimas commented 6 years ago

In the latest version there seems to be an issue with RBF deformation of unv files. Loaded a case which was working 2 months ago, but doesn't in the latest update.

The error comes up, while reading the rbf parameter file, telling me that the number of control points is unequal to deformed points. In fact: number is the same. If I comment the typeerror in the params/rbf.py the error doesn't show up, but the geometry isn't deformed either.

What's wrong with latest rbf optimization?

prosimas commented 6 years ago

By the way: great project! 👍

mtezzele commented 6 years ago

Hi. Can you provide here the problematic parameter file?

prosimas commented 6 years ago

Hi Marco,

thank you for your fast reply! The parameter file is generated in matlab/octave by a script I wrote to extract the basis points from arbitrary geometries. This is working perfectly with the older PyGeM-version. Here is the parameter file in question:

`[Radial Basis Functions] basis function: beckert_wendland_c2_basis radius: 0.50 power: 2

[Control points] original control points: -0.024899 0.000000 -0.002240 -0.019187 0.000000 0.016020 -0.016020 0.000000 -0.019187 -0.002240 0.000000 0.024901 0.000878 0.049459 -0.009729 0.002240 0.000000 -0.024901 0.005163 0.048575 0.006696 0.007538 0.048153 -0.024994 0.016020 0.000000 0.019187 0.017873 0.046020 0.014662 0.019187 0.000001 -0.016020 0.021232 0.045423 -0.030163 0.024899 -0.000000 0.002240 0.031567 0.043290 0.009493 0.033942 0.042867 -0.022197 0.038227 0.041983 -0.005772 0.038620 0.085105 -0.012051 0.049950 0.078226 0.009592 0.052190 0.077031 -0.030260 0.063520 0.070152 -0.008617 0.088328 0.106936 -0.009206 0.090548 0.103016 -0.021109 0.093993 0.096617 0.009689 0.095112 0.094825 -0.025190 0.098557 0.088427 0.005608 0.099349 0.087160 -0.019050 0.100777 0.084507 -0.006295 0.150000 0.085048 0.001194 0.150000 0.088585 -0.009726 0.150000 0.090274 0.011415 0.150000 0.098805 -0.014953 0.150000 0.101195 0.014953 0.150000 0.109726 -0.011415 0.150000 0.114952 -0.001194

deformed control points: -0.024899 0.000000 -0.002240 -0.019187 0.000000 0.016020 -0.016020 0.000000 -0.019187 -0.002240 0.000000 0.024901 0.000878 0.049459 -0.009729 0.002240 0.000000 -0.024901 0.005163 0.048575 0.006696 0.007538 0.048153 -0.024994 0.016020 0.000000 0.019187 0.017873 0.046020 0.014662 0.019187 0.000001 -0.016020 0.021232 0.045423 -0.030163 0.024899 -0.000000 0.002240 0.031567 0.043290 0.009493 0.033942 0.042867 -0.022197 0.038227 0.041983 -0.005772 0.046344 0.068084 -0.009641 0.039960 0.062581 0.011510 0.041752 0.061625 -0.024208 0.063520 0.070152 -0.008617 0.088328 0.106936 -0.009206 0.090548 0.103016 -0.021109 0.093993 0.096617 0.009689 0.095112 0.094825 -0.025190 0.098557 0.088427 0.005608 0.099349 0.087160 -0.019050 0.100777 0.084507 -0.006295 0.150000 0.085048 0.001194 0.150000 0.088585 -0.009726 0.150000 0.090274 0.011415 0.150000 0.098805 -0.014953 0.150000 0.101195 0.014953 0.150000 0.109726 -0.011415 0.150000 0.114952 -0.001194 `

mtezzele commented 6 years ago

Thanks, I found the bug in the shape initialization of the control points. I will let you know when the PR #150 is merged.

prosimas commented 6 years ago

Great! 👍

mtezzele commented 6 years ago

@prosimas now it should work. Let us know if you still have problems. Otherwise I will close this issue in the next days.

Thanks again for finding the bug!

prosimas commented 6 years ago

Works perfectly, Marco! Thank you and your team for this great project! Soon my website will go online where I will promote PyGeM👍

mtezzele commented 6 years ago

@prosimas fantastic! Let us know when it's ready so we can promote each other.