Jump to content

GOM user defined plots with external logic


---
 Share

Recommended Posts

Hello,

Following is background on what I am trying to achieve:

  1. Fitted CAD to an GOM surface and create 6DOF between a reference coordinate system and the CAD coordinate system. This gives the Absolute Intrinsic YXZ-Euler angles for the rotation.
  2. I can convert this angle using scipy.spatial.transform.Rotation to a different Euler angle, say Extrinsic-zxy.
  3. I would then like to use the "user defined check" to create a diagram within GOM, which I can export and/or create a report page.

I am having issues with Step 3. Create the user defined check with a data type that is not native to GOM, such as "lists, ndarrays, and dataframes".

Following is my current work flow:

  1. Export the Intrinsic YXZ-Euler angles from GOM and use external python interpreter to convert/save data.
  2. Export the images/videos from GOM.
  3. Create report with exported/converted data, separate from GOM.

The current work flow is tedious and requires a lot of scripting to get automated. Is there a way to directly create a custom diagram with external "logic and data types" so it can be directly imported into the reports tab?

Best,

John

Link to comment
Share on other sites

  • 1 month later...

GOM软件里可以装外部的包,比如SCIPY。在菜单,脚本语言,tools,install python package ,不需要导出到外部解释器。如果不调用GOM的功能,你甚至可以用子线程在后台算。

Link to comment
Share on other sites

GOM软件里可以装外部的包。在菜单,脚本语言,tools,install python package ,不需要导出到外部解释器。如果不调用GOM的功能,你甚至可以用子线程在后台算。

然后计算结果,如果是文字表格,可以直接写到报告里。

然后自定义检测可以用其他元素的数据来直接计算,也能引入浮点数,字符串。如果要引入列表,可以先以字符串的方式引入,然后用spilt分开成列表。

 

Link to comment
Share on other sites

Hi John,

well, I think the best solution would be to get a rotation order parameter for rotation checks, but there seems to be not that much requests for such a feature yet.

On the other hand you can create python based value elements as User-defined Elements. There is still a bug which doesn't trigger an automatic update on any project change and the value element doesn't behave like a real check (it must be checked itself for it's value, it is not linked to the Local Coordinate System element, ...) but the data is generated/plotted/stored/edited in GOM Software anyway.

I will attach a package for such a rotation check (against global coordinate system always) for GOM Software 2020 and later. Please have a look into the code and adapt it to your needs.

Usage:

  • Drag&Drop the attached *.package file in your GOM Software (2020 and later)
  • Construct a Local Coordinate System
  • Run the package-script: SCRIPTING -> Script Choice -> Rotation Check
    image.png.d4c979e8d4f3b50a9fe5e9e67c0e3bf5.png
  • This will create a Value Element
    image.png.8af99df2f819676ac53b5a9c0b32b8ed.png
  • Check this Value Element with the package-UDC: Value
    image.png.8c865bf684a5e99d6ddfc4fd737df852.png

BTW: F4/"Edit Creation Parameters" is enabled on the Value Element as on any other element type in GOM Software.

Rotation_Check.package

Link to comment
Share on other sites

 Share

×
×
  • Create New...