The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
HI All,
i want to write script to project the face nodes on nearest surface..
is there any API?
any idea how to do this..
@tinh
Thanks
Hi
the script is thought about long time ago
There are some ways but not actually efficient.
First i toggle all green lines to form 1 surf only => project easily, don't need script
But sometimes mess up the mesh!
Then i loop with each surf to project nodes on them. Mesh is not mess up
But script very slow because large number of small surfs
Then loop with each node to find closest surface, faster as surf list as shorter (appliable because we can limit surfs in a comp)
A script like this
Createmark surfs 1 all (or $slist , example: surfs in a comp => faster)
Foreach node $nlist (
Createmark node 1 $node
Lassign [hm_measureshortestdistance surfs 1 0 0 nodes 1 0 0] => closestSurf x y z
Nodemodify $node $x $y $z
)
Then i ....
am thinking other ways because above one still too long (so usually, i let it run finally, overnight.
Tips:
If you can divide a big model file to many files, each file has a few comps, above script will run much faster. And by dividing model you can run files on hm sessions simultenously.
<?xml version="1.0" encoding="UTF-8"?>
I wrote this one...this also takes lot of time...
1.Don't *createmark surfs 1 displayed every loop !
2.Use *nodemodify is faster than *projectmark
3.Ignore associated nodes
*createmark elems 1 displayed
*findfaces elems 1
*createmark nodes 1 'by comp name' ^faces
*createmark surfs 1 displayed
*createmark nodes 2 'by surface on mark' 1
*markdifference nodes 1 nodes 2
set nd_list ...
=> i think much faster
This will be much better..
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…