Search code examples
raspberry-picloudiotcatiasolidworks

Connecting CAD model (Solidworks, AutoCAD or CATIA) with realtime measurements from Raspbery Pi or Arduino Sensor


To present my question I will simplify my example.

I will connect a sprocket on a step motor and measure acceleration with an accelerometer. The data will be captured by using either an Arduino or Raspberry pi sensor setup. The measurements will then be stored in a cloud-based environment or somehow similar and be send to the CAD model (that's the idea).

Basically what I would like to achieve is to:

  • connect the movement of the step motor with the SW/CATIA/AutoCAD model (if the physical sprocket is spinning, so is the one in the CAD model),

  • in case that the measurements identify a problem in the assembly, the critical/weak component would be somehow highlighted inside the CAD model.

Has anyone an idea how this could be done or if it is even possible?


Solution

  • I think is definitely possible (and quite easy) in CATIA (which is the only one I know). CATIA has COM Automation exposed (i.e. you can interact with it like you do with MS Office apps) and naturally you would to it writing VBA project in the same fashion . But VBA projects have a lot of limitations, and I think it would be almost impossible to have a background, constantly running process such as the one you describe.

    If you switch to Python, you'll be able to:

    • access all python functionalities, in the scope you describe I think you'll have endless possibilities in getting data from a sensor and handle them, then send to the CAD.
      • run the script whenever you want, totally independently from VBA editor and CATIA macro related stuff. It will just send commands to CATIA and it will instantly execute.
      • have everything in real time, because if you enable Automatic Update in CATIA, each command sent via COM will be immediately executed and the Part or Product updated accordingly

    I already translated a complex project from VBA to Python with success, it interacts seamlessly with CATIA and Excel at the same time and transfer data between them.