Hello everyone.
Im working on some script whitch be able to wrap a plane onto a curved shaped surface. Something similar to "shrikwrap" modifier in Blender. I try to simulate the natural effect of a lath bending on bottle neck. If the direction of bending a board is collinear with the main curvature its tend to twist.
This effect is shown here:
https://drive.google.com/file/d/16FR6H5uFYlVO7usGb3SpZHULhjBFtJCh/view?usp=sharingThe steps of the program looks like:
1. Find a
startPoint - whitch is an itersection point of a given ray and the surface
here i have also some problems because to find this point i generate the section via Vl-cmdf _section and looks for an intersection point with a given ray (red color line on the image). Sometimes created section shape is made of lines, polylines, 3dpolylines or splines. Espacialy when splines are being created the intersection points can not be find because of a devation - the splines doesnt lays on a section plane (diferrences about 0,0001) 2. From the
startPoint program looks for edge points (width of lath P1 and P2)
3. The lath is being divided into small parts (points along dthe edges) and tests the distance relation beetwen them.
4. From P1 and P2 scripts is looking for points Px1 and Px2 on a surface whitch have the same distance relations as the oryginal ones. Px1 becomes P1 and so on for given number of iteration...
to find this point im using get_border_on_surface whitch collects a sort of point list spreaded around the given point P1 with the same distance https://www.youtube.com/watch?v=Ys2yoAecjio - here is sample testing...
The program works very slowly and the problems accurs when the curvature fades out of the horizon - surface became prependicular to the curent UCS
So i need to find to find normal vector in a point P1 to generate multiple sections around this normal axishttps://drive.google.com/file/d/1LAbW8A-S93FDITzycgWjNiOCmWEXdE2J/viewIS any way to get point list of a intersected face by ray as a subsurface element via vlisp??ps. Im a newbie with lacks of knowlege, but here is probably one and only place i can get some hints and where i can be enligthen. You are my Hope - the most proffecional cad forum on worldWide...