|
[Sponsors] |
[DesignModeler] Specify body for slice operation in JavaScript |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 24, 2022, 14:11 |
Specify body for slice operation in JavaScript
|
#1 |
New Member
Alessandro Tassone
Join Date: Mar 2016
Posts: 4
Rep Power: 10 |
This is my first attempt to automate some tedious tasks with the scripting language used by DesignModeler and I struggle to understand how to manipulate some of the options in a Slice operation.
I want to create two planes from a plane of reference and apply the Slice on them to cut one specific body. I can't figure out how to specify in the script that each Slice should target just one body and not all of them. This is my script: Code:
var plyz = agb.GetActivePlane() ; var rotation = 90; //required rotation from orig plane var offset = 0.121; //offset for cutting var pl = []; for (i=0; i<=1; i++) { pl[i] = agb.PlaneFromPlane(plyz); // take this Type if (pl[i]) { //pl[i].Name = "Slice_Plane_" + i; // Name the new planes pl[i].AddTransform(agc.XformXRotate, 90); //rotate pl[i].AddTransform(agc.XformZOffset, (2*i-1)*offset); //offset //slice agb.SetActivePlane(pl[i]); var feature = ag.gui.CreateSlice(); ag.gui.Commit(); feature.PutBasePlane(pl[i]); ag.gui.Regen(); } } Hope someone can help with this problem. Thanks in advance, Alessandro |
|
Tags |
designmodeller, scripts |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
EHD + body force + vectorCodedSource | Pavithra | OpenFOAM Running, Solving & CFD | 2 | May 17, 2021 07:32 |
dynamic mesh 2d problem to move body | m zubair | Main CFD Forum | 0 | March 19, 2019 08:01 |
can not run simulation for body sinusoidal movement between two different fluid zones | M.Hodali | Autodesk Simulation CFD | 0 | December 17, 2018 18:07 |
Accelerated Body Motion Simulation | reza1111 | Main CFD Forum | 2 | June 3, 2013 10:00 |
[Need some advise] Am I doing right?? Simulating a rotational mixer | setasena | STAR-CCM+ | 4 | March 10, 2013 11:32 |