Question about Video XML: How to Insert STL file

Hey guys, I'm trying to import a .stl part into my case though the xml code. The code block I used is basically the same like it is explained in the video:

        <setmkbound mk="0"/>

        <setdrawmode mode="face"/>

        <drawfilestl file="C:/Users/A/Desktop/freecadstuff/external_tank.stl" objname="tank" autofill="false">

          <drawscale x="0.001" y="0.001" z="0.001" />


        <matrixreset />

When I run the GenCase it stops right here:

Do you know what could be the problem?

Also another question. When I use FreeCAD to import a .stl, run the GenCase and look at the xml code, the .stl file is imported like this:

        <setmkbound mk="0"/>

        <drawfilestl file="external_tank.stl" objname="rohr" autofill="false">

          <drawscale x="0.001" y="0.001" z="0.001" />


Looking at the _Dp.vtk the import worked, but how is it possible to work when the path of the file is not defined in the highlighted section, like it is explained in the video? Thanks in advance!


  • Btw, there was probably something wrong with the path. I tried this in linux and it worked just fine

  • I encountered a similar issue even I was using the name of the STL file instead of the file path in the code:

    <drawfilestl file="abc.stl" objname="abc" autofill="false">

    However, I discovered that the STL file was exported in binary format, which was causing the problem. Once I exported the STL file with ASCII encoding, the code worked as expected!

Sign In or Register to comment.