tinyspline icon indicating copy to clipboard operation
tinyspline copied to clipboard

Function suggestion

Open liufeijin opened this issue 6 years ago • 11 comments

Dear msteinbeck Below project has a lot function for your reference. https://github.com/SINTEF-Geometry/SISL

function no. list
s1850 - Find all the intersections between a curve and a plane (if curve dimension and dim = 3) or a curve and a line (if curve dimension and dim = 2). s1240 - Compute the length of a curve. The length calculated will not deviate more than epsge divided by the calculated length, from the real length of the curve. s1364 - To check if a curve is closed, i.e. test if the distance between the end points of the curve is less than a given tolerance. s1363 - To pick the parameter range of a curve. s1241 - To calculate the area between a 2D curve and a 2D point. When the curve is rotating counter-clockwise around the point, the area contribution is positive. When the curve is rotating clockwise around the point, the area contribution is negative. If the curve is closed or periodic, the area calculated is independent of where the point is situated. The area is calculated exactly for B-spline curves, for NURBS the result is an approximation. This routine will only perform if the order of the curve is less than 7 (can easily be extended). s1243 - To calculate the weight point and rotational momentum of an area between a 2D curve and a 2D point. The area is also calculated. When the curve is rotating counter-clockwise around the point, the area contribution is positive. When the curve is rotating clockwise around the point, the area contribution is negative. OBSERVE: FOR CALCULATION OF AREA ONLY, USE s1241().

best regards, jeff

liufeijin avatar Oct 04 '18 02:10 liufeijin

Hi @liufeijin,

the functions you listed look quite useful. I will consider to add them to TinySpline. Thanks!

msteinbeck avatar Oct 04 '18 07:10 msteinbeck

s1364 and s1363 have been implemented.

msteinbeck avatar Dec 09 '18 21:12 msteinbeck

wow, a good news! Many thanks for your great job. Hope , we can get other functions.

liufeijin avatar Dec 10 '18 06:12 liufeijin

s1240 is now available with sample.

msteinbeck avatar Sep 12 '19 23:09 msteinbeck

Hi msteinbeck Many thanks for your work on this!!! Could you continue to complete S1850,S1241,S1243? If complete these , tinyspline can replace SISL .

liufeijin avatar Nov 14 '21 01:11 liufeijin

pop

liufeijin avatar Jan 30 '22 07:01 liufeijin

Could you provide test cases for S1850, S1241, and S1243 so that I know what you are expecting?

msteinbeck avatar Jan 30 '22 11:01 msteinbeck

Hi msteinbeck For function S1850 as below QQ截图20220202120348 For function S1241 like as below clsoe close b to get the area of blue part an red part. sometime the line is not cross the spline, so the area shall be 0 of empty

liufeijin avatar Feb 02 '22 04:02 liufeijin

Hi msteinbeck Cloud you add these functions to your plan ?

liufeijin avatar Feb 03 '22 10:02 liufeijin

Hi @liufeijin,

I already did some research. Function S1850 should be straight-forward. The other two functions are more complex. I'm not sure when I'll find the time to work on these features. Currently I'm working on the next release of TinySpline (0.4.0).

msteinbeck avatar Feb 03 '22 10:02 msteinbeck

Hi msteinbeck Many thanks for you reply. It is big good news that you have plan on it. SISL is just only write by c. and it not convenient on NURBS. Hope your project tinyspline become a great and popular project.

liufeijin avatar Feb 03 '22 12:02 liufeijin