Hi,
I am trying out your product and need to convert ASCII STL files to FBX. It seems like the conversion works but when I open the result in Autodesk FBX Review or Unity it is empty. Looking in the files they seem to be correct except that there are a lot of zeros.
The code:
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "c:\\";
openFileDialog1.Filter = "stl files (*.stl)|*.stl|All files (*.*)|*.*";
openFileDialog1.FilterIndex = 2;
openFileDialog1.RestoreDirectory = true;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
try
{
FileFormat inputFormat = FileFormat.Detect(openFileDialog1.FileName);
// Display the file format
textBox1.AppendText("File Format: " + inputFormat.ToString() + "\r\n");
// Load a 3D document into Aspose.3D
Scene scene1 = new Scene();
// Open an existing 3D scene
scene1.Open(openFileDialog1.FileName);
// Save Scene to a local path
scene1.Save("c:\\temp\\tst5.fbx", FileFormat.FBX7500ASCII);
scene1.Save("c:\\temp\\tst5b.fbx", FileFormat.FBX7500Binary);
scene1.Save("c:\\temp\\tst4.fbx", FileFormat.FBX7400ASCII);
scene1.Save("c:\\temp\\tst3.fbx", FileFormat.FBX7300ASCII);
scene1.Save("c:\\temp\\tst2.fbx", FileFormat.FBX7200ASCII);
scene1.Save("c:\\temp\\tst.obj", FileFormat.WavefrontOBJ);
MemoryStream dstStream1 = new MemoryStream();
scene1.Save(dstStream1, FileFormat.FBX7500ASCII);
// Rewind the stream position back to zero so it is ready for next reader.
dstStream1.Position = 0;
scene1.Save("c:\\temp\\tst5stream.fbx", FileFormat.FBX7500ASCII);
As you can see Ive tried a number of different formats and also tried to loop through with a “sub scene”
In the ziple are the original STL and the FBX7500ASCII file that I saved.
tst5.zip (3.5 KB)
What am I doing wrong?
Regards
Rouald