This group of API functions can be used to control the Ruler Tool through the API. Click here to return to the main page.
More...
|
string | vsp::AddRuler (const string &startgeomid, int startsurfindx, double startu, double startw, const string &endgeomid, int endsurfindx, double endu, double endw, const string &name) |
|
std::vector< string > | vsp::GetAllRulers () |
|
void | vsp::DelRuler (const string &id) |
|
void | vsp::DeleteAllRulers () |
|
string | vsp::AddProbe (const string &geomid, int surfindx, double u, double w, const string &name) |
|
std::vector< string > | vsp::GetAllProbes () |
|
void | vsp::DelProbe (const string &id) |
|
void | vsp::DeleteAllProbes () |
|
◆ AddProbe()
string vsp::AddProbe |
( |
const string & | geomid, |
|
|
int | surfindx, |
|
|
double | u, |
|
|
double | w, |
|
|
const string & | name ) |
|
extern |
Create a new Probe and add it to the Measure Tool
string pid1 =
AddGeom(
"POD",
"" );
SetParmVal( pid1,
"Y_Rel_Location",
"XForm", 2.0 );
string probe_id =
AddProbe( pid1, 0, 0.5, 0.8,
"Probe 1" );
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
string AddProbe(const string &geomid, int surfindx, double u, double w, const string &name)
std::string FindParm(const std::string &parm_container_id, const std::string &parm_name, const std::string &group_name)
double SetParmVal(const std::string &parm_id, double val)
- Parameters
-
[in] | geomid | string Parent Geom ID |
[in] | surfindx | int Main surface index from the parent Geom |
[in] | u | double Surface u (0 - 1) coordinate |
[in] | w | double Surface w (0 - 1) coordinate |
[in] | name | string Probe name |
- Returns
- string Probe ID
◆ AddRuler()
string vsp::AddRuler |
( |
const string & | startgeomid, |
|
|
int | startsurfindx, |
|
|
double | startu, |
|
|
double | startw, |
|
|
const string & | endgeomid, |
|
|
int | endsurfindx, |
|
|
double | endu, |
|
|
double | endw, |
|
|
const string & | name ) |
|
extern |
Create a new Ruler and add it to the Measure Tool
string pid1 =
AddGeom(
"POD",
"" );
SetParmVal( pid1,
"Y_Rel_Location",
"XForm", 2.0 );
string pid2 =
AddGeom(
"POD",
"" );
SetParmVal( pid2,
"Z_Rel_Location",
"XForm", 4.0 );
string rid =
AddRuler( pid1, 1, 0.2, 0.3, pid2, 0, 0.2, 0.3,
"Ruler 1" );
string AddRuler(const string &startgeomid, int startsurfindx, double startu, double startw, const string &endgeomid, int endsurfindx, double endu, double endw, const string &name)
- Parameters
-
[in] | startgeomid | string Start parent Geom ID |
[in] | startsurfindx | int Main surface index from the staring parent Geom |
[in] | startu | double Surface u (0 - 1) start coordinate |
[in] | startw | double Surface w (0 - 1) start coordinate |
[in] | endgeomid | string End parent Geom ID |
[in] | endsurfindx | int Main surface index on the end parent Geom |
[in] | endu | double Surface u (0 - 1) end coordinate |
[in] | endw | double Surface w (0 - 1) end coordinate |
[in] | name | string Ruler name |
- Returns
- string Ruler ID
◆ DeleteAllProbes()
void vsp::DeleteAllProbes |
( |
| ) |
|
|
extern |
Delete all Probes from the Measure Tool
string pid1 =
AddGeom(
"POD",
"" );
SetParmVal( pid1,
"Y_Rel_Location",
"XForm", 2.0 );
string probe_id_1 =
AddProbe( pid1, 0, 0.5, 0.8,
"Probe 1" );
string probe_id_2 =
AddProbe( pid1, 0, 0.2, 0.3,
"Probe 2" );
if ( probe_array.size() != 0 ) { Print( "Error: DeleteAllProbes" ); }
std::vector< string > GetAllProbes()
◆ DeleteAllRulers()
void vsp::DeleteAllRulers |
( |
| ) |
|
|
extern |
Delete all Rulers from the Measure Tool
string pid1 =
AddGeom(
"POD",
"" );
SetParmVal( pid1,
"Y_Rel_Location",
"XForm", 2.0 );
string pid2 =
AddGeom(
"POD",
"" );
SetParmVal( pid2,
"Z_Rel_Location",
"XForm", 4.0 );
string rid1 =
AddRuler( pid1, 1, 0.2, 0.3, pid2, 0, 0.2, 0.3,
"Ruler 1" );
string rid2 =
AddRuler( pid1, 0, 0.4, 0.6, pid1, 1, 0.8, 0.9,
"Ruler 2" );
◆ DelProbe()
void vsp::DelProbe |
( |
const string & | id | ) |
|
|
extern |
Delete a specific Probe from the Measure Tool
string pid1 =
AddGeom(
"POD",
"" );
SetParmVal( pid1,
"Y_Rel_Location",
"XForm", 2.0 );
string probe_id_1 =
AddProbe( pid1, 0, 0.5, 0.8,
"Probe 1" );
string probe_id_2 =
AddProbe( pid1, 0, 0.2, 0.3,
"Probe 2" );
if ( probe_array.size() != 1 ) { Print( "Error: DelProbe" ); }
void DelProbe(const string &id)
- Parameters
-
◆ DelRuler()
void vsp::DelRuler |
( |
const string & | id | ) |
|
|
extern |
Delete a particular Ruler from the Measure Tool
string pid1 =
AddGeom(
"POD",
"" );
SetParmVal( pid1,
"Y_Rel_Location",
"XForm", 2.0 );
string pid2 =
AddGeom(
"POD",
"" );
SetParmVal( pid2,
"Z_Rel_Location",
"XForm", 4.0 );
string rid1 =
AddRuler( pid1, 1, 0.2, 0.3, pid2, 0, 0.2, 0.3,
"Ruler 1" );
string rid2 =
AddRuler( pid1, 0, 0.4, 0.6, pid1, 1, 0.8, 0.9,
"Ruler 2" );
std::vector< string > GetAllRulers()
void DelRuler(const string &id)
- Parameters
-
◆ GetAllProbes()
std::vector< string > vsp::GetAllProbes |
( |
| ) |
|
|
extern |
Get an array of all Probe IDs from the Measure Tool
string pid1 =
AddGeom(
"POD",
"" );
SetParmVal( pid1,
"Y_Rel_Location",
"XForm", 2.0 );
string probe_id =
AddProbe( pid1, 0, 0.5, 0.8,
"Probe 1" );
Print( "One Probe: ", false );
Print( probe_array[0] );
- Returns
- [in] Array of Probe IDs
◆ GetAllRulers()
std::vector< string > vsp::GetAllRulers |
( |
| ) |
|
|
extern |
Get an array of all Ruler IDs from the Measure Tool
string pid1 =
AddGeom(
"POD",
"" );
SetParmVal( pid1,
"Y_Rel_Location",
"XForm", 2.0 );
string pid2 =
AddGeom(
"POD",
"" );
SetParmVal( pid2,
"Z_Rel_Location",
"XForm", 4.0 );
string rid1 =
AddRuler( pid1, 1, 0.2, 0.3, pid2, 0, 0.2, 0.3,
"Ruler 1" );
string rid2 =
AddRuler( pid1, 0, 0.4, 0.6, pid1, 1, 0.8, 0.9,
"Ruler 2" );
Print("Two Rulers");
for( int n = 0 ; n < int( ruler_array.length() ) ; n++ )
{
Print( ruler_array[n] );
}
- Returns
- vector<string> Vector of Ruler IDs