Welcome, Guest
Username: Password: Remember me

TOPIC: PYTHON: castProfileAtPolyline()

PYTHON: castProfileAtPolyline() 9 years 4 months ago #17529

  • jdesombr
  • jdesombr's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
Hello,

Using the castProfileAtPolyline function of the castSELAFIN class gives "sawtooth" profils as shown below:

profil_FOND_geo_pildepon.slf.png


Maybe this is due to sliceMesh replacing crossMesh ?
Does anyone have fixed this issue ?

Regards,
The administrator has disabled public write access.

PYTHON: castProfileAtPolyline() 9 years 3 months ago #17908

This problem should be fixed in the next release of Telemac. In the mean time you can make the following modifications to scripts/python27/utils/geometry.py

Two changes need to be made to getSegmentIntersection

The accuracy variable should be set to zero.

The final line should be changed to:
return [[x0,y0],getNorm2((x0,y0),(x2,y2))/getNorm2((x1,y1),(x2,y2))]

I hope this helps.
The administrator has disabled public write access.
The following user(s) said Thank You: jdesombr

PYTHON: castProfileAtPolyline() 9 years 1 month ago #18428

  • jdesombr
  • jdesombr's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
Thanks a lot !
It works like a charm now !
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.