50 (
"Use \"/vis/set/touchable\" to set current touchable.");
52 (
"You may also need \"/vis/touchable/findPath\".");
54 (
"Use \"/vis/touchable/set\" to set attributes.");
81 (
"Prints the path to touchable and its logical volume mother"
82 "\ngiven a physical volume name and copy no.");
84 (
"A search of all worlds is made and all physical volume names are"
85 "\nmatched against the argument of this command. If this is of the"
86 "\nform \"/regexp/\", where regexp is a regular expression (see C++ regex),"
87 "\nthe physical volume name is matched against regexp by the usual rules"
88 "\nof regular expression matching. Otherwise an exact match is required."
89 "\nFor example, \"/Shap/\" matches \"Shape1\" and \"Shape2\".");
91 (
"It may help to see a textual representation of the geometry hierarchy of"
92 "\nthe worlds. Try \"/vis/drawTree [worlds]\" or one of the driver/browser"
93 "\ncombinations that have the required functionality, e.g., HepRep.");
95 parameter =
new G4UIparameter (
"physical-volume-name",
's', omitable =
true);
96 parameter -> SetDefaultValue (
"world");
98 parameter =
new G4UIparameter (
"copy-no",
'i', omitable =
true);
99 parameter -> SetGuidance (
"If negative, matches any copy no.");
100 parameter -> SetDefaultValue (-1);
146 size_t nWorlds = transportationManager->
GetNoWorlds();
152 "ERROR: G4VisCommandsTouchable::SetNewValue:"
153 "\n No world. Maybe the geometry has not yet been defined."
154 "\n Try \"/run/initialize\""
160 G4VViewer* currentViewer = fpVisManager -> GetCurrentViewer ();
161 if (!currentViewer) {
164 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
170 G4Scene* currentScene = fpVisManager->GetCurrentScene();
174 "ERROR: No current scene - \"/vis/scene/list\" to see possibilities."
180 if (command == fpCommandCentreOn || command == fpCommandCentreAndZoomInOn) {
195 G4Scene tempScene(
"Centre Scene");
200 <<
"Touchable " << fCurrentTouchableProperties.fTouchablePath
201 <<
",\n has been added to temporary scene \"" << tempScene.
GetName() <<
"\"."
209 if (command == fpCommandCentreAndZoomInOn) {
219 InterpolateToNewView(currentViewer, saveVP, newVP);
222 <<
"Viewer \"" << currentViewer->
GetName()
224 if (fpCommandCentreAndZoomInOn) {
225 G4cout <<
"and zoomed in";
227 G4cout <<
" on touchable\n" << fCurrentTouchableProperties.fTouchablePath
230 SetViewParameters(currentViewer, newVP);
236 }
else if (command == fpCommandDraw) {
257 currentScene = fpVisManager->GetCurrentScene();
265 <<
"\", copy no. " << properties.
fCopyNo <<
" drawn"
269 G4VisCommandsSceneAddUnsuccessful(verbosity);
276 }
else if (command == fpCommandDump) {
290 const std::map<G4String,G4AttDef>* attDefs = tempPVModel.
GetAttDefs();
296 G4cout <<
"\nLocal polyhedron coordinates:\n" << *polyhedron;
298 polyhedron->Transform(*transform);
299 G4cout <<
"\nGlobal polyhedron coordinates:\n" << *polyhedron;
305 }
else if (command == fpCommandExtentForField) {
313 fCurrentExtentForField = extent;
314 fCurrrentPVFindingsForField.clear();
316 G4cout <<
"Extent for field set to " << extent
317 <<
"\nVolume for field has been cleared."
320 if (fpCommandExtentForField->GetNewBoolValue(newValue)) {
328 }
else if (command == fpCommandFindPath) {
332 std::istringstream iss(newValue);
333 iss >> pvName >> copyNo;
334 std::vector<G4PhysicalVolumesSearchScene::Findings> findingsVector;
335 std::vector<G4VPhysicalVolume*>::iterator iterWorld =
337 for (
size_t i = 0; i < nWorlds; ++i, ++iterWorld) {
343 for (
const auto& findings: searchScene.
GetFindings()) {
344 findingsVector.push_back(findings);
347 for (
const auto& findings: findingsVector) {
349 << findings.fFoundBasePVPath
350 <<
' ' << findings.fpFoundPV->GetName()
351 <<
' ' << findings.fFoundPVCopyNo
352 <<
" (mother logical volume: "
353 << findings.fpFoundPV->GetMotherLogical()->GetName()
357 if (findingsVector.size()) {
359 <<
"Use this to set a particular touchable with \"/vis/set/touchable <path>\""
360 <<
"\nor to see overlaps: \"/vis/drawLogicalVolume <mother-logical-volume-name>\""
364 if (copyNo >= 0)
G4cout <<
':' << copyNo;
368 }
else if (command == fpCommandShowExtent) {
377 if (fpCommandShowExtent->GetNewBoolValue(newValue)) DrawExtent(extent);
383 }
else if (command == fpCommandVolumeForField) {
391 fCurrentExtentForField = extent;
392 fCurrrentPVFindingsForField.clear();
393 fCurrrentPVFindingsForField.push_back
402 if (fpCommandVolumeForField->GetNewBoolValue(newValue)) {
414 "ERROR: G4VisCommandsTouchable::SetNewValue: unrecognised command."