46 (
"Produces a representation of the geometry hierarchy. Further"
47 "\nguidance is given on running the command. Or look at the guidance"
48 "\nfor \"/vis/ASCIITree/verbose\".");
51 parameter =
new G4UIparameter(
"physical-volume-name",
's', omitable =
true);
52 parameter -> SetDefaultValue(
"world");
54 parameter =
new G4UIparameter(
"system",
's', omitable =
true);
55 parameter -> SetDefaultValue(
"ATree");
66 std::istringstream is(newValue);
67 is >> pvname >> system;
93 if (keepUIVerbose >= 2 ||
132 (
"Draw view from this angle, etc.");
134 parameter =
new G4UIparameter(
"theta-degrees",
'd', omitable =
true);
135 parameter -> SetDefaultValue(0.);
137 parameter =
new G4UIparameter(
"phi-degrees",
'd', omitable =
true);
138 parameter -> SetDefaultValue(0.);
140 parameter =
new G4UIparameter(
"pan-right",
'd', omitable =
true);
141 parameter -> SetDefaultValue(0.);
143 parameter =
new G4UIparameter(
"pan-up",
'd', omitable =
true);
144 parameter -> SetDefaultValue(0.);
146 parameter =
new G4UIparameter(
"pan-unit",
's', omitable =
true);
147 parameter -> SetDefaultValue(
"cm");
149 parameter =
new G4UIparameter(
"zoom-factor",
'd', omitable =
true);
150 parameter -> SetDefaultValue(1.);
152 parameter =
new G4UIparameter(
"dolly",
'd', omitable =
true);
153 parameter -> SetDefaultValue(0.);
155 parameter =
new G4UIparameter(
"dolly-unit",
's', omitable =
true);
156 parameter -> SetDefaultValue(
"cm");
169 if (!currentViewer) {
172 "WARNING: G4VisCommandsDrawView::SetNewValue: no current viewer."
186 std::istringstream is(newValue);
187 is >> thetaDeg >> phiDeg >> panRight >> panUp >> panUnit
188 >> zoomFactor >> dolly >> dollyUnit;
193 if (keepVerbose >= 2 ||
202 G4String(
"/vis/viewer/set/viewpointThetaPhi " + thetaDeg +
" " + phiDeg +
" deg"));
204 G4String(
"/vis/viewer/panTo " + panRight +
" " + panUp +
" " + panUnit));
206 G4String(
"/vis/viewer/zoomTo " + zoomFactor));
211 G4String(
"/vis/viewer/dollyTo " + dolly +
" " + dollyUnit));
220 (
"Draws logical volume with additional components.");
222 (
"Synonymous with \"/vis/specify\".");
224 (
"Creates a scene consisting of this logical volume and asks the"
225 "\n current viewer to draw it. The scene becomes current.");
249 if (keepAutoRefresh) UImanager->
ApplyCommand(
"/vis/viewer/set/autoRefresh false");
255 UImanager->
ApplyCommand(
"/vis/viewer/set/style wireframe");
257 if (!keepMarkerNotHidden) UImanager->
ApplyCommand(
"/vis/viewer/set/hiddenMarker false");
258 if (keepAutoRefresh) UImanager->
ApplyCommand(
"/vis/viewer/set/autoRefresh true");
263 <<
"Drawing style changed to wireframe. To restore previous style:";
265 switch (keepDrawingStyle) {
267 style =
"wireframe"; edge =
"false";
break;
269 style =
"wireframe"; edge =
"true";
break;
271 style =
"surface"; edge =
"false";
break;
273 style =
"surface"; edge =
"true";
break;
275 style =
"cloud"; edge =
"";
break;
277 G4cout <<
"\n /vis/viewer/set/style " + style;
278 if (!edge.empty())
G4cout <<
"\n /vis/viewer/set/hiddenEdge " + edge;
283 <<
"Markers changed to \"not hidden\". To restore previous condition:"
284 <<
"\n /vis/viewer/set/hiddenmarker true"
288 static G4bool warned =
false;
291 "NOTE: For systems which are not \"auto-refresh\" you will need to"
292 "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
303 (
"Creates a scene containing this physical volume and asks the"
304 "\ncurrent viewer to draw it. The scene becomes current.");
329 static G4bool warned =
false;
332 "NOTE: For systems which are not \"auto-refresh\" you will need to"
333 "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
345 (
"Creates a scene handler ready for drawing.");
347 (
"The scene handler becomes current (the name is auto-generated).");
349 parameter =
new G4UIparameter(
"graphics-system-name",
's', omitable =
false);
351 parameter =
new G4UIparameter(
"window-size-hint",
's', omitable =
true);
353 (
"integer (pixels) for square window placed by window manager or"
354 " X-Windows-type geometry string, e.g. 600x600-100+100");
365 G4String systemName, windowSizeHint;
366 std::istringstream is(newValue);
367 is >> systemName >> windowSizeHint;
371 if (keepVerbose >= 2 ||
379 ed <<
"sub-command \"/vis/sceneHandler/create\" failed.";
386 ed <<
"sub-command \"/vis/viewer/create\" failed.";
393 std::set<G4String> candidates;
394 for (
const auto gs:
fpVisManager -> GetAvailableGraphicsSystems()) {
396 for (
const auto& nickname: gs->GetNicknames()) {
398 candidates.insert(nickname);
403 ed <<
"Invoked command has failed - see above. Available graphics systems are (short names):\n ";
404 for (
const auto& candidate: candidates) {
405 ed <<
' ' << candidate;
419 (
"Draws logical volume with Boolean components, voxels and readout geometry.");
421 (
"Synonymous with \"/vis/drawLogicalVolume\".");
423 (
"Creates a scene consisting of this logical volume and asks the"
424 "\n current viewer to draw it to the specified depth of descent"
425 "\n showing boolean components (if any), voxels (if any),"
426 "\n readout geometry (if any), local axes and overlaps (if any),"
427 "\n under control of the appropriate flag.");
429 (
"Note: voxels are not constructed until start of run - /run/beamOn."
430 "\n (For voxels without a run, \"/run/beamOn 0\".)");
433 parameter =
new G4UIparameter(
"logical-volume-name",
's', omitable =
false);
435 parameter =
new G4UIparameter(
"depth-of-descent",
'i', omitable =
true);
438 parameter =
new G4UIparameter(
"booleans-flag",
'b', omitable =
true);
441 parameter =
new G4UIparameter(
"voxels-flag",
'b', omitable =
true);
444 parameter =
new G4UIparameter(
"readout-flag",
'b', omitable =
true);
447 parameter =
new G4UIparameter(
"axes-flag",
'b', omitable =
true);
449 parameter -> SetGuidance (
"Set \"false\" to suppress axes.");
451 parameter =
new G4UIparameter(
"check-overlap-flag",
'b', omitable =
true);
453 parameter -> SetGuidance (
"Set \"false\" to suppress overlap check.");
474 static G4bool warned =
false;
477 "NOTE: For systems which are not \"auto-refresh\" you will need to"
478 "\n issue \"/vis/viewer/refresh\" or \"/vis/viewer/flush\"."
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
G4UIcommand * FindPath(const char *commandPath) const
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void CommandFailed(G4int errCode, G4ExceptionDescription &ed)
G4UIcommandTree * GetTree() const
G4int ApplyCommand(const char *aCommand)
G4int GetVerboseLevel() const
static G4UImanager * GetUIpointer()
void SetVerboseLevel(G4int val)
void SetDefaultValue(const char *theDefaultValue)
void SetGuidance(const char *theGuidance)
const G4String & GetName() const
const G4ViewParameters & GetViewParameters() const
void SetViewParameters(const G4ViewParameters &vp)
static G4VisManager * fpVisManager
void CopyParametersFrom(const G4UIcommand *fromCmd, G4UIcommand *toCmd)
void CopyGuidanceFrom(const G4UIcommand *fromCmd, G4UIcommand *toCmd, G4int startLine=0)
static G4VVisManager * GetConcreteInstance()
void SetAutoRefresh(G4bool)
G4bool IsMarkerNotHidden() const
G4bool IsAutoRefresh() const
DrawingStyle GetDrawingStyle() const
G4VisCommandDrawLogicalVolume()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandDrawLogicalVolume()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandDrawTree()
virtual ~G4VisCommandDrawView()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandDrawVolume()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandOpen()
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSpecify()
void SetCurrentGraphicsSystem(G4VGraphicsSystem *)
G4Scene * GetCurrentScene() const
void SetCurrentSceneHandler(G4VSceneHandler *)
void SetCurrentScene(G4Scene *)
void SetCurrentViewer(G4VViewer *)
G4VGraphicsSystem * GetCurrentGraphicsSystem() const
G4VViewer * GetCurrentViewer() const
G4VSceneHandler * GetCurrentSceneHandler() const
static Verbosity GetVerbosity()
void SetVerboseLevel(G4int)
G4bool contains(const G4String &str, std::string_view ss)
Check if a string contains a given substring.