Fix: ASMu2D can now read LRSplineSurface objects as well as tensor product SplineSurface objects and convert
git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1170 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
parent
8753a295fd
commit
e65e15b419
@ -62,11 +62,17 @@ bool ASMu2D::read (std::istream& is)
|
|||||||
{
|
{
|
||||||
if (lrspline) delete lrspline;
|
if (lrspline) delete lrspline;
|
||||||
|
|
||||||
Go::ObjectHeader head;
|
// read inputfile as either an LRSpline file directly or a tensor product B-spline and convert
|
||||||
Go::SplineSurface *surf = new Go::SplineSurface();
|
char firstline[256];
|
||||||
is >> head >> *surf;
|
is.getline(firstline, 256);
|
||||||
|
if(strncmp(firstline, "# LRSPLINE", 10) == 0) {
|
||||||
lrspline = new LR::LRSplineSurface(surf);
|
lrspline = new LR::LRSplineSurface();
|
||||||
|
is >> *lrspline;
|
||||||
|
} else { // probably a SplineSurface, so we'll read that and convert
|
||||||
|
Go::SplineSurface *surf = new Go::SplineSurface();
|
||||||
|
is >> *surf;
|
||||||
|
lrspline = new LR::LRSplineSurface(surf);
|
||||||
|
}
|
||||||
|
|
||||||
// Eat white-space characters to see if there is more data to read
|
// Eat white-space characters to see if there is more data to read
|
||||||
char c;
|
char c;
|
||||||
|
Loading…
Reference in New Issue
Block a user