Hi senior developers,
I’m currently working on developing an automatic mesh mapping script. The main purpose is to allow duplication of meshes onto repeated identical geometries in the model using a script. The panel function I’m using is the *positionmark API.
However, I’m encountering a problem: the *positionmark API requires defining three positioning nodes (N1, N2, N3) on the geometry to correctly align the parts. My question is: how can I define N1, N2, and N3 individually within the script?
My initial idea was to define a coordinate system within the geometry and use that for transformation, but due to my current scripting skill level, that approach is a bit difficult for me to implement. So instead, I thought about just finding matching points on the identical geometries.
For N1, I’m currently using the centroid of the geometry (via hm_getcentroid
). However, I’m unsure what would be suitable for N2 and N3. Does anyone have any suggestions?
*positionmark
Positions a selection of entities in space.
Syntax
*positionmark entity_type mark_id node1 node2 node3 node4 node5 node6