question

Andres G4 avatar image
0 Likes"
Andres G4 asked Phil BoBo edited

Why my 3D shapes shrunk or disappeared from the model?

Some of the 3D shapes of my model shrunk or disappeared, the files are imported in .JT. I moved some of the files from folder I do not know if that's what cause the problem, but still some of the files that I move didn't suffer any problem and some that I didn't move disappeared from the model, the shapes still exist in the treenode. In the attached picture you can see the shrunk shape at top right shrunk-shape.png.

FlexSim 19.0.4
3d shape3d files
shrunk-shape.png (507.5 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Phil BoBo avatar image
1 Like"
Phil BoBo answered Phil BoBo edited

19.0.4 and 19.1.1 include a bug fix to the JT importer. The JT importer now correctly accounts for the measurement units of the shape that are defined in the file. JT shapes in existing models may appear scaled incorrectly when you open them. You can resolve their scaling issue by executing the script below:

forobjecttreeunder(model()) {
    treenode focus = a;
    string path = gets(shape(focus));
    if(stringlen(path) > 3) {
        string extension = stringcopy(path, stringlen(path)-1, 2);
        if(comparetext(extension, "jt", 1)) {
            double x = xsize(focus);
            double y = ysize(focus);
            double z = zsize(focus);
            applyshapefactors(focus);
            setsize(focus, x, y, z);
        }
    }
}

Below is an example of the issue. Note that the shape is much smaller than its yellow box. Running the script above fixes the shape's scale factors so that it correctly fits in the yellow box again.

-from FlexSim 19.0.4 and 19.1.1 Are Available

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.