sintef-geometry / sisl Goto Github PK
View Code? Open in Web Editor NEWThe SINTEF Spline Library
License: GNU Affero General Public License v3.0
The SINTEF Spline Library
License: GNU Affero General Public License v3.0
SISL is a comprehensive NURBS library for the modeling and interrogation of curves and surfaces. It is implemented in C. This software was written by the Geometry Group at SINTEF Digital, Department of Mathematics and Cybernethics. Requirements: * CMake www.cmake.org For information on installation, see the INSTALL file. Good luck!
First a big thanks is in order for a great library.
My question is, is there any command to calculate the area of a surface? If not, is there any other way of doing it?
Thanks.
No routine to construct closed surfaces + Using other routines fails when collapsing on a single point :(
In s1251 here, s1710 is called. the return value jstat can be 5:
parameter value at end of
curve, rcnew1=SISL_NULL or
rcnew2=SISL_NULL.
indicating that qc1 OR qc2 may be NULL. This is not handled by s1251, leading to a nullptr exception here or here in our case.
Our analysis is that in this case we are approaching the resolution limit, but the check for this in s1251 is slightly different from that in s1710. It might be solved by checking for NULL and stop recursion.
While building with MSVC (9.0) and -DBUILD_SHARED_LIBS:BOOL=TRUE, compilation fails because no import library is generated during the build.
To reproduce, open the "Command Shell" provided with the toolchain and run
cmake -DBUILD_SHARED_LIBS:BOOL=TRUE
nmake
Full log at http://ci.kicad-pcb.org/job/windows-sisl-msvc/cpu=x86,label=windows/10/console
After computing a SISLCurve, how to save it's information to TXT file and use in other app?
get the the point X,Y,Z when give a surface;
when i use void s1421(surf,der,parvalue,leftknot1,leftknot2,derive,normal,stat); i do not to know set parvalue value;
I have tried to approximate a sphere with a B-spline surface using the s1365 function as indicated in the manual.
In one parametric direction it seems to work properly, but not in the other. Any suggestions? Thank you.
///////////////
center[ 0 ] = center[ 1 ] = center[ 2 ] = 0.0;
axis[ 0 ] = 0.0; axis[ 1 ] = 0.0; axis[ 2 ] = 1.0;
equator[ 0 ] = 0.0; equator[ 1 ] = 10.0; equator[ 2 ] = 0.0;
_GetSISL( )->s1023( center, axis, equator, 2, 4, &surface2, &stat );
if ( stat < 0 ) return false;
_GetSISL( )->freeSurf( Surface );
Surface = surface2;
_GetSISL( )->s1365( Surface, 0.0, 0.01, 0.0, Surface->idim, &surface2, &stat );
if ( stat < 0 ) return false;
_GetSISL( )->freeSurf( Surface );
Surface = surface2;
in sislp.h ,There is an error here. How can I solve him?
my computer win 10,QT 5。
GCC 8.3 warns that
warning: iteration 3 invokes undefined behavior [-Waggressive-loop-optimizations]
Indeed, its seems that here:
kstop==16
kdimp2==5
which means that the loop
for (ki=0,kl=0 ; ki<kstop ; kl++,ki+=kdimp2)
{
temp = sdirec[kl];
carray[ki] = (double)1.0 - temp*temp/tcost2;
}
iterates 4 times (0, 5, 10, 15) and kl
takes the values 0, 1, 2, 3. 3 is out of bounds.
I am trying to use s1506 to compute position, first and second derivatives of a NURBS surface. I have a hard time understanding what is in the eder array output when ider > 0. I have a 2d NURBS in a 3d space. When ider = 0 I am getting three entries per point, which are the coordinates (position) of the NURBS surface. When ider = 1 there are 9 entries per point. The first three are the same as when ider=0. The documentation states that in this case (ider = 1) "position and first derivative" (! note the singular, I think this should be plural "derivatives") are calculated. In my case there should be just two first order derivatives. I can identify eder[3] and eder[7] as the total span in u- and v-directions, but the other entries are unclear. Are eder[5] and eder[8] the first order derivatives? Their values don't look right in my case. Things get even more confusing when ider=2. I am getting 18 entries per point. the first nine are the same as when ider = 1. What are the other 9?
I think the documentation needs to be a little more specific about this. An annotated example would be great.
I have some points want to approximate a circle by s1356 .
but when I debug , program crash with the error : Error status : -101 Call from routine : s1912 Position : 0 ,Scene radius must be positive - Ignoring value.
When I approximate a circle with 100 points that x = i , y= i * i , z=0 (i=1,2,3...100), I can get the result.
But if I change the points to x=i/100,y= i * i / 10000,z=0.,the program crash.
My real data is 3D point such as (0.0580612 0.494216 -0.163759) and the distance with next point is less than 0.0001.
I don't know the reason of the error.
Hello,
I was trying to create a spline by interpolating a set of points and I used the function s1356. I am getting a curve with same number of points as my input. Plotting that data obtained doesn't seem to provide me any spline. Can someone please help me with this?
we have 6 points want to approximate a circle by s1356 .
But seems get a b-spline curve not NURBS curve.
How can i to approximate NURBS curve?
I don't know how to set the weights for approximating a circle.
How can I rotate a curve ?
Hello,
I've a problem using the library.
This the problem.
I have 2 couples of curves: 2 straight lines, and 2 arcs. I created 4 different sislcurves object and then tried to create a surface.
Here is the problem: how can I create an extruded surface or a ruled surface? The s1538 function create a surface different from a right extrusion that not respect the four boundary curves.
Is there also a book or a reference to connect coded function with standard geometric theory?
Thanks in advance
Hi,
I'm having serious difficulty understanding what is happening with a curve that has weights that are not 1.0. This code for generating a circle:
` double coeffs[ 36 ] = {
0.0, -radius, 0.1, 1.0,
-radius, -radius, 0.1, 0.707,
-radius, 0.0, 0.1, 1.0,
-radius, radius, 0.1, 0.707,
0.0, radius, 0.1, 1.0,
radius, radius, 0.1, 0.707,
radius, 0.0, 0.1, 1.0,
radius, -radius, 0.1, 0.707,
0.0, -radius, 0.1, 1.0
};
double knots[ 12 ] = {
0,
0,
0,
0.25,
0.25,
0.5,
0.5,
0.75,
0.75,
1,
1,
1
};
SISLCurve * curve = newCurve( 9, 3, knots, coeffs, 2, 3, 1 );`
produces this curve:
which is obviously not planar. tracing the code to s6ratder.c:161, it says:
gder[ki] = eder[ki] / w0;
which seems to suggest the position is divided by the weight, which results in coordinates that are not in the xy plane.
could anyone shed some light on this ?
thank you !
Jonathan
I would like to know if, SISL provides any sort of mechanism for surface triangulation?
in SISL_4.7_manual
Chapter 2.6 B-spline Surfaces the 2nd n{1} should be n{2} instead
It seems like the viewer and streaming directories got left behind in the cmake upgrade. The User manual says to go to those directories and type "make viewer" and "make lib" respectively. Obviously that doesn't work with cmake.
There are makefiles, but they just include "makefile_template" which doesn't exist anywhere in the source as far as I can tell.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.