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

╄→尐↘猪︶ㄣ 提交于 2021-01-27 11:42:45

问题


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?


回答1:


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.




回答2:


It is definitely possible, look what has already been done with Solidworks and MS Kinect.

All you need to do is identify the component that you want to affect, calculate new transform based on your sensor input and assign that transform to the component.

To highlight you can either change color of the body or use built it Highlight method.

That being said I wouldn't recommend this as your first Solidworks project.



来源:https://stackoverflow.com/questions/53686812/connecting-cad-model-solidworks-autocad-or-catia-with-realtime-measurements-f

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!