Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function suggestion #125

Open
liufeijin opened this issue Oct 4, 2018 · 11 comments
Open

Function suggestion #125

liufeijin opened this issue Oct 4, 2018 · 11 comments

Comments

@liufeijin
Copy link

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

@msteinbeck
Copy link
Owner

Hi @liufeijin,

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

@msteinbeck
Copy link
Owner

s1364 and s1363 have been implemented.

@liufeijin
Copy link
Author

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

@msteinbeck
Copy link
Owner

s1240 is now available with sample.

@liufeijin
Copy link
Author

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
Copy link
Author

pop

@msteinbeck
Copy link
Owner

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

@liufeijin
Copy link
Author

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
Copy link
Author

Hi msteinbeck
Cloud you add these functions to your plan ?

@msteinbeck
Copy link
Owner

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).

@liufeijin
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants