PDA

View Full Version : VRML1 Problems (origin?)


Michael_boelling
18th March 2004, 05:14 AM
Hello,

I have created an airship model with CATIA and exported the file as VRML1.
The CATIA file contains several parts. The VRML file shows up correct. When I import the file in AC3D, it seems as if AC3D puts the origin of all parts to the same point, but they should be different. The result is a wrong ac3d file.
The example file can be found at:
ftp://ftp.isd.uni-stuttgart.de/incoming/joey.wrl
ftp://ftp.isd.uni-stuttgart.de/incoming/joey.ac
You see that the envelope, the gondola, the engine and everythings starts at the same position in the ac file.

Also is the a option not to write the crease command in the ac file as that crashes the flightgear flightsimulator. I found the line in the plib library, but compiling compiling the plib libraray and the flight gear source code is a bit difficult for me. Maybe it is because I use WinXP.

Andy
18th March 2004, 12:15 PM
Hi Michael,

These links don't work for me. Email the files and I'll have a look.

It sounds like the plib loader needs to be changed so that it ignores lines starting with tokens that it doesn't know about. An AC3D file loader should do that anyway.

Andy

Andy
18th March 2004, 12:36 PM
I had a quick look at the plib code. In ssg/ssgLoadAC.cxx:

static int search ( Tag *tags, char *s )
{
skip_spaces ( & s ) ;

for ( int i = 0 ; tags[i].token != NULL ; i++ )
if ( ulStrNEqual ( tags[i].token, s, strlen(tags[i].token) ) )
{
s += strlen ( tags[i].token ) ;

skip_spaces ( & s ) ;

return (*(tags[i].func))( s ) ;
}

ulSetError ( UL_FATAL, "ac_to_gl: Unrecognised token '%s'", s ) ;

return 0 ; /* Should never get here */
}

replace:
ulSetError ( UL_FATAL, "ac_to_gl: Unrecognised token '%s'", s ) ;

with:
ulSetError ( UL_WARNING, "ac_to_gl: Unrecognised token '%s'", s );
replace ' return 0;' with:

return PARSE_CONT;

That may fix it.

Andy