tataratat / splinepy

Library for prototyping spline geometries of arbitrary dimensions and degrees, and IGA
https://tataratat.github.io/splinepy
Other
45 stars 13 forks source link

xml io issues for CATS splines #433

Closed felipegonzalezco closed 2 months ago

felipegonzalezco commented 3 months ago

I found the following problems when generating a spline for CATS SplineLib:

  1. the keyword closed expects at least splDim entries
  2. we use kntVec instead of knotVec for each individual knot vector
  3. weights are not optional and must be present
jzwar commented 3 months ago

@felipegonzalezco Would it be possible to quickly post a minimal example of the current state and how it should be fixed, to better understand what is the issue, please? That would be very helpful.

felipegonzalezco commented 3 months ago

Sure. As examples, here are screenshots of each case. First, the keyword closed expects splDim entries. Currently, splinepy is writing only one value.

closed

Second, kntVec is used for individual knot vectors. It's kinda consistent with kntVecs which is the vector of knot vectors.

kntVec

And third, I get an error if weights are not defined:

weights

I hope it is more clear now.

jzwar commented 3 months ago

Just to make sure, for the second we need to rename knotVec to kntVec?

jzwar commented 3 months ago

For the third, are weights only exported for rational splines or do they need to be exported for non-rational splines as well.

jzwar commented 3 months ago

I updated the code to deal with the first two issues, please check out the branch bf-433

j042 commented 3 months ago

After looking through the sources of cats-splinelib, it seems that the static buffer - that fortran splinelib creates for xml.io - is too small to load a "long" line or expects less value per line. Not conclusive yet

jzwar commented 3 months ago

@felipegonzalezco did you try it out?

j042 commented 2 months ago

fixed in #436 and #433. will be available in v0.1.1

felipegonzalezco commented 2 months ago

Sorry for the late reply. I tried it out and it worked, so the issues are resolved. Thank you for fixing them.