Files
OpenVSP/examples/scripts/SnapToDemo.vspscript
2016-04-28 20:46:49 -07:00

18 lines
492 B
Plaintext

void main()
{
string fid = AddGeom( "FUSELAGE", "" ); // Add Fuselage
string pid = AddGeom( "POD", "" ); // Add Pod
string x = GetParm( pid, "X_Rel_Location", "XForm" );
SetParmVal( x, 3.0 );
Update();
double min_dist = ComputeMinClearanceDistance( pid, SET_ALL );
Print( "Min Dist = ", false );
Print( min_dist );
min_dist = SnapParm( x, 0.1, true, SET_ALL );
Print( "Min Dist = ", false );
Print( min_dist );
}