OpenVSP API Documentation 3.41.2
 
Loading...
Searching...
No Matches
Snap-To Functions

This group of API functions provide the capabilities available in the Snap-To tool. Click here to return to the main page. More...

Functions

double vsp::ComputeMinClearanceDistance (const std::string &geom_id, int set=SET_ALL)
 
double vsp::SnapParm (const std::string &parm_id, double target_min_dist, bool inc_flag, int set=SET_ALL)
 

Detailed Description

Function Documentation

◆ ComputeMinClearanceDistance()

double vsp::ComputeMinClearanceDistance ( const std::string & geom_id,
int set = SET_ALL )
extern

Compute the minimum clearance distance for the specified geometry

string fid = AddGeom( "FUSELAGE", "" ); // Add Fuselage
string pid = AddGeom( "POD", "" ); // Add Pod
string x = GetParm( pid, "X_Rel_Location", "XForm" );
SetParmVal( x, 3.0 );
double min_dist = ComputeMinClearanceDistance( pid, SET_ALL );
@ SET_ALL
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
double SetParmVal(const std::string &parm_id, double val)
std::string GetParm(const std::string &geom_id, const std::string &name, const std::string &group)
double ComputeMinClearanceDistance(const std::string &geom_id, int set=SET_ALL)
void Update(bool update_managers=true)
Parameters
[in]geom_idstring Geom ID
[in]setCollision set enum (i.e. SET_ALL)
Returns
Minimum clearance distance

◆ SnapParm()

double vsp::SnapParm ( const std::string & parm_id,
double target_min_dist,
bool inc_flag,
int set = SET_ALL )
extern

Snap the specified Parm to input target minimum clearance distance

//Add Geoms
string fid = AddGeom( "FUSELAGE", "" ); // Add Fuselage
string pid = AddGeom( "POD", "" ); // Add Pod
string x = GetParm( pid, "X_Rel_Location", "XForm" );
SetParmVal( x, 3.0 );
double min_dist = SnapParm( x, 0.1, true, SET_ALL );
double SnapParm(const std::string &parm_id, double target_min_dist, bool inc_flag, int set=SET_ALL)
Parameters
[in]parm_idstring Parm ID
[in]target_min_distTarget minimum clearance distance
[in]inc_flagDirection indication flag. If true, upper parm limit is used and direction is set to positive
[in]setCollision set enum (i.e. SET_ALL)
Returns
Minimum clearance distance