This group of API functions provide the capabilities available in the Snap-To tool. Click here to return to the main page.
More...
|
| double | vsp::ComputeMinClearanceDistance (const std::string &geom_id, int set=SET_ALL, bool useMode=false, const std::string &modeID=std::string()) |
| double | vsp::SnapParm (const std::string &parm_id, double target_min_dist, bool inc_flag, int set=SET_ALL, bool useMode=false, const std::string &modeID=std::string()) |
◆ ComputeMinClearanceDistance()
| double vsp::ComputeMinClearanceDistance |
( |
const std::string & | geom_id, |
|
|
int | set = SET_ALL, |
|
|
bool | useMode = false, |
|
|
const std::string & | modeID = std::string() ) |
|
extern |
Compute the minimum clearance distance for the specified geometry
string fid =
AddGeom(
"FUSELAGE",
"" );
string x =
GetParm( pid,
"X_Rel_Location",
"XForm" );
if ( min_dist <= 0.0 )
{
Print( "ERROR: ComputeMinClearanceDistance reports no clearance between separated Geoms" );
__failure++;
}
{
Print( "ERROR: ComputeMinClearanceDistance did not close as the Geoms came together" );
__failure++;
}
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, bool useMode=false, const std::string &modeID=std::string())
void Update(bool update_managers=true)
- Parameters
-
| [in] | geom_id | string Geom ID |
| [in] | set | int Collision set enum (i.e. SET_ALL) |
| [in] | useMode | bool Flag determine if mode is used instead of sets |
| [in] | modeID | string ID of Mode to use |
- Returns
- double Minimum clearance distance
◆ SnapParm()
| double vsp::SnapParm |
( |
const std::string & | parm_id, |
|
|
double | target_min_dist, |
|
|
bool | inc_flag, |
|
|
int | set = SET_ALL, |
|
|
bool | useMode = false, |
|
|
const std::string & | modeID = std::string() ) |
|
extern |
Snap the specified Parm to input target minimum clearance distance
string fid =
AddGeom(
"FUSELAGE",
"" );
string x =
GetParm( pid,
"X_Rel_Location",
"XForm" );
{
Print( "ERROR: SnapParm did not move the Parm" );
__failure++;
}
{
Print( "ERROR: SnapParm did not reach the target clearance" );
__failure++;
}
{
Print( "ERROR: SnapParm reported a clearance it did not reach" );
__failure++;
}
double GetParmVal(const std::string &parm_id)
double SnapParm(const std::string &parm_id, double target_min_dist, bool inc_flag, int set=SET_ALL, bool useMode=false, const std::string &modeID=std::string())
- Parameters
-
| [in] | parm_id | string Parm ID |
| [in] | target_min_dist | double Target minimum clearance distance |
| [in] | inc_flag | bool Direction indication flag. If true, upper parm limit is used and direction is set to positive |
| [in] | set | int Collision set enum (i.e. SET_ALL) |
| [in] | useMode | bool Flag determine if mode is used instead of sets |
| [in] | modeID | string ID of Mode to use |
- Returns
- double Minimum clearance distance