2
$\begingroup$

I have a 3D model which is made by SolidWorks. I remember that in older versions there was a function to import 3D models but I can't find it in R2022b. Can you tell me how to import it? Thanks so much!

$\endgroup$
1
  • $\begingroup$ Did the answer help you? If so, please upvote and mark as the accepted answer. Thank you. $\endgroup$ Commented May 28, 2023 at 17:20

1 Answer 1

2
$\begingroup$

The functionality to import CAD models was removed from the latest versions of Webots because there is now a better way to handle this. Instead of importing a CAD model, you should now refer to it using a CadShape node. Simply insert a CadShape node in your scene tree at the desired location. It may be at root level or inside some other node. Set the url field to the point to your CAD file (prefer a relative path to an absolute path) and you are done:

CadShape {
  url "model/my_model.dae"
}

The CadShape node supports the following 3D formats: DAE (Collada) and OBJ (Wavefront).

Alternatively, you may also consider using the Mesh node which imports only the geometry of a CAD file, excluding the appearance and material information. In should inserted in the geometry field of a Shape node. In addition to DAE and OBJ formats, the Mesh node also supports the STL format.

Disclaimer: I am a Webots developer working at Cyberbotics.

$\endgroup$
1
  • 1
    $\begingroup$ Thanks for your help! $\endgroup$
    – Zxx
    Commented Jun 11, 2023 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.