mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-01 17:36:21 +03:00
0032694: Documentation, Draw Harness Guide - update ViewerTest commands
Draw Harness Guide now refers to ViewerTest commands description via @snippet pointing to C++ source code instead of duplicating it. "help" command now tries to beautify output of command's description.
This commit is contained in:
parent
4f5e934445
commit
44f6e8d5e8
@ -835,6 +835,7 @@ proc OCCDoc_MakeDoxyfile {docType outDir tagFileDir {doxyFileName} {generatorMod
|
||||
puts $doxyFile "PROJECT_NUMBER = $occt_version"
|
||||
puts $doxyFile "OUTPUT_DIRECTORY = $outDir/."
|
||||
puts $doxyFile "PROJECT_LOGO = [OCCDoc_GetDoxDir]/resources/occ_logo.png"
|
||||
puts $doxyFile "EXAMPLE_PATH = [OCCDoc_GetSourceDir $productsPath]"
|
||||
|
||||
set PARAM_INPUT "INPUT ="
|
||||
set PARAM_IMAGEPATH "IMAGE_PATH = [OCCDoc_GetDoxDir]/resources/ "
|
||||
|
@ -43,6 +43,7 @@ configure_file ("${OCCT_OVERVIEW_RESOURCE_DIR}/occt_ug_html.doxyfile" "${OCCT_CO
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_NUMBER = ${OCC_VERSION_STRING_EXT}")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nOUTPUT_DIRECTORY = ${OCCT_GENERATED_OVERVIEW_DIR}/.")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nPROJECT_LOGO = ${OCCT_OVERVIEW_DIR}/resources/occ_logo.png")
|
||||
file (APPEND ${OCCT_CONFIG_FOR_DOXYGEN} "\nEXAMPLE_PATH = ${CMAKE_SOURCE_DIR}/src")
|
||||
|
||||
set (OCCT_ARTICLE_PARAM_INPUT "INPUT =")
|
||||
set (OCCT_ARTICLE_PARAM_IMAGEPATH "IMAGE_PATH = ${OCCT_OVERVIEW_DIR}/resources/ ")
|
||||
|
File diff suppressed because one or more lines are too long
@ -59,13 +59,28 @@ proc help {{theCommand ""} {theHelpString ""} {theGroup "Procedures"}} {
|
||||
} elseif {$theHelpString == ""} {
|
||||
# help function
|
||||
set isFound 0
|
||||
foreach f [lsort [array names Draw_Helps]] {
|
||||
if {[string match $theCommand $f]} {
|
||||
dputs -nonewline -intense $f
|
||||
for {set j [string length $f]} {$j < 15} {incr j} {
|
||||
puts -nonewline " "
|
||||
foreach aCmdIter [lsort [array names Draw_Helps]] {
|
||||
if {[string match $theCommand $aCmdIter]} {
|
||||
dputs -nonewline -intense $aCmdIter
|
||||
set aLines [split $Draw_Helps($aCmdIter) "\n"]
|
||||
set aNbLines [llength $aLines]
|
||||
set isFirstLine 0
|
||||
for {set aLineIter 0} {$aLineIter < $aNbLines} {incr aLineIter} {
|
||||
set aLine [lindex $aLines $aLineIter]
|
||||
if { "$aLine" == "" && ($aLineIter == 0 || $aLineIter == [expr $aNbLines - 1]) } { continue }
|
||||
if { $isFirstLine == 0 } {
|
||||
set isFirstLine 1
|
||||
for {set j [string length $aCmdIter]} {$j < 15} {incr j} {
|
||||
puts -nonewline " "
|
||||
}
|
||||
puts -nonewline " : "
|
||||
} else {
|
||||
if { ![string match "\t\t:*" $aLine] } {
|
||||
puts -nonewline " : "
|
||||
}
|
||||
}
|
||||
puts -nonewline "${aLine}\n"
|
||||
}
|
||||
puts " : $Draw_Helps($f)"
|
||||
set isFound 1
|
||||
}
|
||||
}
|
||||
|
@ -6542,388 +6542,377 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands)
|
||||
ViewerTest::FilletCommands(theCommands);
|
||||
ViewerTest::OpenGlCommands(theCommands);
|
||||
|
||||
const char *group = "AIS_Display";
|
||||
const char* aGroup = "AIS Viewer";
|
||||
const char* aFileName = __FILE__;
|
||||
auto addCmd = [&](const char* theName, Draw_Interpretor::CommandFunction theFunc, const char* theHelp)
|
||||
{
|
||||
theCommands.Add (theName, theHelp, aFileName, theFunc, aGroup);
|
||||
};
|
||||
|
||||
// display
|
||||
theCommands.Add("visos",
|
||||
"visos [name1 ...] [nbUIsos nbVIsos IsoOnPlane(0|1)]\n"
|
||||
"\tIf last 3 optional parameters are not set prints numbers of U-, V- isolines and IsoOnPlane.\n",
|
||||
__FILE__, visos, group);
|
||||
addCmd ("visos", visos, /* [visos] */ R"(
|
||||
visos [name1 ...] [nbUIsos nbVIsos IsoOnPlane(0|1)]
|
||||
If last 3 optional parameters are not set prints numbers of U-, V- isolines and IsoOnPlane.
|
||||
)" /* [visos] */);
|
||||
|
||||
theCommands.Add("vdisplay",
|
||||
"vdisplay [-noupdate|-update] [-local] [-mutable] [-neutral]"
|
||||
"\n\t\t: [-trsfPers {zoom|rotate|zoomRotate|none}=none]"
|
||||
"\n\t\t: [-trsfPersPos X Y [Z]] [-3d]"
|
||||
"\n\t\t: [-2d|-trihedron [{top|bottom|left|right|topLeft"
|
||||
"\n\t\t: |topRight|bottomLeft|bottomRight}"
|
||||
"\n\t\t: [offsetX offsetY]]]"
|
||||
"\n\t\t: [-dispMode mode] [-highMode mode]"
|
||||
"\n\t\t: [-layer index] [-top|-topmost|-overlay|-underlay]"
|
||||
"\n\t\t: [-redisplay] [-erased]"
|
||||
"\n\t\t: [-noecho] [-autoTriangulation {0|1}]"
|
||||
"\n\t\t: name1 [name2] ... [name n]"
|
||||
"\n\t\t: Displays named objects."
|
||||
"\n\t\t: Option -local enables displaying of objects in local"
|
||||
"\n\t\t: selection context. Local selection context will be opened"
|
||||
"\n\t\t: if there is not any."
|
||||
"\n\t\t: -noupdate Suppresses viewer redraw call."
|
||||
"\n\t\t: -mutable Enables optimizations for mutable objects."
|
||||
"\n\t\t: -neutral Draws objects in main viewer."
|
||||
"\n\t\t: -erased Loads the object into context, but does not display it."
|
||||
"\n\t\t: -layer Sets z-layer for objects."
|
||||
"\n\t\t: Alternatively -overlay|-underlay|-top|-topmost"
|
||||
"\n\t\t: options can be used for the default z-layers."
|
||||
"\n\t\t: -top Draws object on top of main presentations"
|
||||
"\n\t\t: but below topmost."
|
||||
"\n\t\t: -topmost Draws in overlay for 3D presentations."
|
||||
"\n\t\t: with independent Depth."
|
||||
"\n\t\t: -overlay Draws objects in overlay for 2D presentations."
|
||||
"\n\t\t: (On-Screen-Display)"
|
||||
"\n\t\t: -underlay Draws objects in underlay for 2D presentations."
|
||||
"\n\t\t: (On-Screen-Display)"
|
||||
"\n\t\t: -selectable|-noselect Controls selection of objects."
|
||||
"\n\t\t: -trsfPers Sets a transform persistence flags."
|
||||
"\n\t\t: -trsfPersPos Sets an anchor point for transform persistence."
|
||||
"\n\t\t: -2d Displays object in screen coordinates."
|
||||
"\n\t\t: (DY looks up)"
|
||||
"\n\t\t: -dispmode Sets display mode for objects."
|
||||
"\n\t\t: -highmode Sets hilight mode for objects."
|
||||
"\n\t\t: -redisplay Recomputes presentation of objects."
|
||||
"\n\t\t: -noecho Avoid printing of command results."
|
||||
"\n\t\t: -autoTriang Enable/disable auto-triangulation for displayed shape.",
|
||||
__FILE__, VDisplay2, group);
|
||||
addCmd ("vdisplay", VDisplay2, /* [vdisplay] */ R"(
|
||||
vdisplay [-noupdate|-update] [-mutable] [-neutral]
|
||||
[-trsfPers {zoom|rotate|zoomRotate|none}=none]
|
||||
[-trsfPersPos X Y [Z]] [-3d]
|
||||
[-2d|-trihedron [{top|bottom|left|right|topLeft
|
||||
|topRight|bottomLeft|bottomRight}
|
||||
[offsetX offsetY]]]
|
||||
[-dispMode mode] [-highMode mode]
|
||||
[-layer index] [-top|-topmost|-overlay|-underlay]
|
||||
[-redisplay] [-erased]
|
||||
[-noecho] [-autoTriangulation {0|1}]
|
||||
name1 [name2] ... [name n]
|
||||
Displays named objects.
|
||||
-noupdate Suppresses viewer redraw call.
|
||||
-mutable Enables optimizations for mutable objects.
|
||||
-neutral Draws objects in main viewer.
|
||||
-erased Loads the object into context, but does not display it.
|
||||
-layer Sets z-layer for objects.
|
||||
Alternatively -overlay|-underlay|-top|-topmost
|
||||
options can be used for the default z-layers.
|
||||
-top Draws object on top of main presentations
|
||||
but below topmost.
|
||||
-topmost Draws in overlay for 3D presentations.
|
||||
with independent Depth.
|
||||
-overlay Draws objects in overlay for 2D presentations.
|
||||
(On-Screen-Display)
|
||||
-underlay Draws objects in underlay for 2D presentations.
|
||||
(On-Screen-Display)
|
||||
-selectable|-noselect Controls selection of objects.
|
||||
-trsfPers Sets a transform persistence flags.
|
||||
-trsfPersPos Sets an anchor point for transform persistence.
|
||||
-2d Displays object in screen coordinates.
|
||||
(DY looks up)
|
||||
-dispmode Sets display mode for objects.
|
||||
-highmode Sets hilight mode for objects.
|
||||
-redisplay Recomputes presentation of objects.
|
||||
-noecho Avoid printing of command results.
|
||||
-autoTriang Enable/disable auto-triangulation for displayed shape.
|
||||
)" /* [vdisplay] */);
|
||||
|
||||
theCommands.Add ("vnbdisplayed",
|
||||
"vnbdisplayed"
|
||||
"\n\t\t: Returns number of displayed objects",
|
||||
__FILE__, VNbDisplayed, group);
|
||||
addCmd ("vnbdisplayed", VNbDisplayed, /* [vnbdisplayed] */ R"(
|
||||
vnbdisplayed : Returns number of displayed objects
|
||||
)" /* [vnbdisplayed] */);
|
||||
|
||||
theCommands.Add ("vupdate",
|
||||
"vupdate name1 [name2] ... [name n]"
|
||||
"\n\t\t: Updates named objects in interactive context",
|
||||
__FILE__, VUpdate, group);
|
||||
addCmd ("vupdate", VUpdate, /* [vupdate] */ R"(
|
||||
vupdate name1 [name2] ... [name n]
|
||||
Updates named objects in interactive context
|
||||
)" /* [vupdate] */);
|
||||
|
||||
theCommands.Add("verase",
|
||||
"verase [-noupdate|-update] [-local] [name1] ... [name n] [-noerror]"
|
||||
"\n\t\t: Erases selected or named objects."
|
||||
"\n\t\t: If there are no selected or named objects the whole viewer is erased."
|
||||
"\n\t\t: Option -local enables erasing of selected or named objects without"
|
||||
"\n\t\t: closing local selection context."
|
||||
"\n\t\t: Option -noerror prevents exception on non-existing objects.",
|
||||
__FILE__, VErase, group);
|
||||
addCmd ("verase", VErase, /* [verase] */ R"(
|
||||
verase [-noupdate|-update] [name1] ... [name n] [-noerror]
|
||||
Erases selected or named objects.
|
||||
If there are no selected or named objects the whole viewer is erased.
|
||||
Option -noerror prevents exception on non-existing objects.
|
||||
)" /* [verase] */);
|
||||
|
||||
theCommands.Add("vremove",
|
||||
"vremove [-noupdate|-update] [-context] [-all] [-noinfo] [name1] ... [name n] [-noerror]"
|
||||
"or vremove [-context] -all to remove all objects"
|
||||
"\n\t\t: Removes selected or named objects."
|
||||
"\n\t\t If -context is in arguments, the objects are not deleted"
|
||||
"\n\t\t from the map of objects and names."
|
||||
"\n\t\t: Option -local enables removing of selected or named objects without"
|
||||
"\n\t\t: closing local selection context. Empty local selection context will be"
|
||||
"\n\t\t: closed."
|
||||
"\n\t\t: Option -noupdate suppresses viewer redraw call."
|
||||
"\n\t\t: Option -noinfo suppresses displaying the list of removed objects."
|
||||
"\n\t\t: Option -noerror prevents exception on non-existing objects.",
|
||||
__FILE__, VRemove, group);
|
||||
addCmd ("vremove", VRemove, /* [vremove] */ R"(
|
||||
vremove [-noupdate|-update] [-context] [-all] [-noinfo] [name1] ... [name n] [-noerror]
|
||||
or vremove [-context] -all to remove all objects
|
||||
Removes selected or named objects.
|
||||
-context do not delete object from the map of objects and names;
|
||||
-noupdate suppresses viewer redraw call;
|
||||
-noinfo suppresses displaying the list of removed objects;
|
||||
-noerror prevents exception on non-existing objects.
|
||||
)" /* [vremove] */);
|
||||
|
||||
theCommands.Add("vdonly",
|
||||
"vdonly [-noupdate|-update] [name1] ... [name n]"
|
||||
"\n\t\t: Displays only selected or named objects",
|
||||
__FILE__,VDonly2,group);
|
||||
addCmd ("vdonly", VDonly2, /* [vdonly] */ R"(
|
||||
vdonly [-noupdate|-update] [name1] ... [name n]
|
||||
Displays only selected or named objects.
|
||||
)" /* [vdonly] */);
|
||||
|
||||
theCommands.Add("vdisplayall",
|
||||
"vdisplayall"
|
||||
"\n\t\t: Displays all erased interactive objects (see vdir and vstate).",
|
||||
__FILE__, VDisplayAll, group);
|
||||
addCmd ("vdisplayall", VDisplayAll, /* [vdisplayall] */ R"(
|
||||
vdisplayall : Displays all erased interactive objects (see vdir and vstate).
|
||||
)" /* [vdisplayall] */);
|
||||
|
||||
theCommands.Add("veraseall",
|
||||
"veraseall"
|
||||
"\n\t\t: Erases all objects displayed in the viewer.",
|
||||
__FILE__, VErase, group);
|
||||
addCmd ("veraseall", VErase, /* [veraseall] */ R"(
|
||||
veraseall : Erases all objects displayed in the viewer.
|
||||
)" /* [veraseall] */);
|
||||
|
||||
theCommands.Add("verasetype",
|
||||
"verasetype <Type>"
|
||||
"\n\t\t: Erase all the displayed objects of one given kind (see vtypes)",
|
||||
__FILE__, VEraseType, group);
|
||||
theCommands.Add("vbounding",
|
||||
"vbounding [-noupdate|-update] [-mode] name1 [name2 [...]]"
|
||||
"\n\t\t: [-print] [-hide]"
|
||||
"\n\t\t: Temporarily display bounding box of specified Interactive"
|
||||
"\n\t\t: Objects, or print it to console if -print is specified."
|
||||
"\n\t\t: Already displayed box might be hidden by -hide option.",
|
||||
__FILE__,VBounding,group);
|
||||
addCmd ("verasetype", VEraseType, /* [verasetype] */ R"(
|
||||
verasetype <Type>
|
||||
Erase all the displayed objects of one given kind (see vtypes).
|
||||
The following types are possible:
|
||||
Point, Axis, Trihedron, PlaneTrihedron, Line, Circle, Plane, Shape,
|
||||
ConnectedShape, MultiConn.Shape, ConnectedInter., MultiConn., Constraint and Dimension.
|
||||
)" /* [verasetype] */);
|
||||
|
||||
theCommands.Add("vdisplaytype",
|
||||
"vdisplaytype : vdisplaytype <Type> <Signature> \n\t display all the objects of one given kind (see vtypes) which are stored the AISContext ",
|
||||
__FILE__,VDisplayType,group);
|
||||
addCmd ("vbounding", VBounding, /* [vbounding] */ R"(
|
||||
vbounding [-noupdate|-update] [-mode] name1 [name2 [...]]
|
||||
[-print] [-hide]
|
||||
Temporarily display bounding box of specified Interactive Objects,
|
||||
or print it to console if -print is specified.
|
||||
Already displayed box might be hidden by -hide option.
|
||||
)" /* [vbounding] */);
|
||||
|
||||
theCommands.Add("vsetdispmode",
|
||||
"vsetdispmode [name] mode(1,2,..)"
|
||||
"\n\t\t: Sets display mode for all, selected or named objects.",
|
||||
__FILE__,VDispMode,group);
|
||||
addCmd ("vdisplaytype", VDisplayType, /* [vdisplaytype] */ R"(
|
||||
vdisplaytype <Type> <Signature>
|
||||
Display all the objects of one given kind (see vtypes) which are stored the interactive context.
|
||||
The following types are possible:
|
||||
Point, Axis, Trihedron, PlaneTrihedron, Line, Circle, Plane, Shape,
|
||||
ConnectedShape, MultiConn.Shape, ConnectedInter., MultiConn., Constraint and Dimension.
|
||||
)" /* [vdisplaytype] */);
|
||||
|
||||
theCommands.Add("vunsetdispmode",
|
||||
"vunsetdispmode [name]"
|
||||
"\n\t\t: Unsets custom display mode for selected or named objects.",
|
||||
__FILE__,VDispMode,group);
|
||||
addCmd ("vsetdispmode", VDispMode, /* [vsetdispmode] */ R"(
|
||||
vsetdispmode [name] mode(1,2,..)
|
||||
Sets display mode for all, selected or named objects.
|
||||
In case of a shape presentation, 0 defines WireFrame, and 1 defines Shading display modes.
|
||||
)" /* [vsetdispmode] */);
|
||||
|
||||
theCommands.Add("vdir",
|
||||
"vdir [mask] [-list]"
|
||||
"\n\t\t: Lists all objects displayed in 3D viewer"
|
||||
"\n\t\t: mask - name filter like prefix*"
|
||||
"\n\t\t: -list - format list with new-line per name; OFF by default",
|
||||
__FILE__,VDir,group);
|
||||
addCmd ("vunsetdispmode", VDispMode, /* [vunsetdispmode] */ R"(
|
||||
vunsetdispmode [name]
|
||||
Unsets custom display mode for selected or named objects.
|
||||
)" /* [vunsetdispmode] */);
|
||||
|
||||
#ifdef HAVE_FREEIMAGE
|
||||
#define DUMP_FORMATS "{png|bmp|jpg|gif}"
|
||||
#else
|
||||
#define DUMP_FORMATS "{ppm}"
|
||||
#endif
|
||||
theCommands.Add("vdump",
|
||||
"vdump <filename>." DUMP_FORMATS " [-width Width -height Height]"
|
||||
"\n\t\t: [-buffer rgb|rgba|depth=rgb]"
|
||||
"\n\t\t: [-stereo mono|left|right|blend|sideBySide|overUnder=mono]"
|
||||
"\n\t\t: [-xrPose base|head|handLeft|handRight=base]"
|
||||
"\n\t\t: [-tileSize Size=0]"
|
||||
"\n\t\t: Dumps content of the active view into image file",
|
||||
__FILE__,VDump,group);
|
||||
addCmd ("vdir", VDir, /* [vdir] */ R"(
|
||||
vdir [mask] [-list]
|
||||
Lists all objects displayed in 3D viewer
|
||||
mask - name filter like prefix*
|
||||
-list - format list with new-line per name; OFF by default
|
||||
)" /* [vdir] */);
|
||||
|
||||
theCommands.Add("vsub", "vsub 0/1 (off/on) [obj] : Subintensity(on/off) of selected objects",
|
||||
__FILE__,VSubInt,group);
|
||||
addCmd ("vdump", VDump, /* [vdump] */ R"(
|
||||
vdump <filename>.png [-width Width -height Height]
|
||||
[-buffer rgb|rgba|depth=rgb]
|
||||
[-stereo mono|left|right|blend|sideBySide|overUnder=mono]
|
||||
[-xrPose base|head|handLeft|handRight=base]
|
||||
[-tileSize Size=0]
|
||||
Dumps content of the active view into image file.
|
||||
)" /* [vdump] */);
|
||||
|
||||
theCommands.Add("vaspects",
|
||||
"vaspects [-noupdate|-update] [name1 [name2 [...]] | -defaults] [-subshapes subname1 [subname2 [...]]]"
|
||||
"\n\t\t: [-visibility {0|1}]"
|
||||
"\n\t\t: [-color {ColorName | R G B}] [-unsetColor]"
|
||||
"\n\t\t: [-backfaceColor Color]"
|
||||
"\n\t\t: [-material MatName] [-unsetMaterial]"
|
||||
"\n\t\t: [-transparency Transp] [-unsetTransparency]"
|
||||
"\n\t\t: [-width LineWidth] [-unsetWidth]"
|
||||
"\n\t\t: [-lineType {solid|dash|dot|dotDash|0xHexPattern} [-stippleFactor factor]]"
|
||||
"\n\t\t: [-unsetLineType]"
|
||||
"\n\t\t: [-markerType {.|+|x|O|xcircle|pointcircle|ring1|ring2|ring3|ball|ImagePath}]"
|
||||
"\n\t\t: [-unsetMarkerType]"
|
||||
"\n\t\t: [-markerSize Scale] [-unsetMarkerSize]"
|
||||
"\n\t\t: [-freeBoundary {0|1}]"
|
||||
"\n\t\t: [-freeBoundaryWidth Width] [-unsetFreeBoundaryWidth]"
|
||||
"\n\t\t: [-freeBoundaryColor {ColorName | R G B}] [-unsetFreeBoundaryColor]"
|
||||
"\n\t\t: [-isoOnTriangulation 0|1]"
|
||||
"\n\t\t: [-maxParamValue {value}]"
|
||||
"\n\t\t: [-sensitivity {selection_mode} {value}]"
|
||||
"\n\t\t: [-shadingModel {unlit|flat|gouraud|phong|pbr|pbr_facet}]"
|
||||
"\n\t\t: [-unsetShadingModel]"
|
||||
"\n\t\t: [-interior {solid|hatch|hidenline|point}] [-setHatch HatchStyle]"
|
||||
"\n\t\t: [-unsetInterior]"
|
||||
"\n\t\t: [-faceBoundaryDraw {0|1}] [-mostContinuity {c0|g1|c1|g2|c2|c3|cn}]"
|
||||
"\n\t\t: [-faceBoundaryWidth LineWidth] [-faceBoundaryColor R G B] [-faceBoundaryType LineType]"
|
||||
"\n\t\t: [-drawEdges {0|1}] [-edgeType LineType] [-edgeColor R G B] [-quadEdges {0|1}]"
|
||||
"\n\t\t: [-drawSilhouette {0|1}]"
|
||||
"\n\t\t: [-alphaMode {opaque|mask|blend|maskblend|blendauto} [alphaCutOff=0.5]]"
|
||||
"\n\t\t: [-dumpJson]"
|
||||
"\n\t\t: [-dumpCompact {0|1}]"
|
||||
"\n\t\t: [-dumpDepth depth]"
|
||||
"\n\t\t: Manage presentation properties of all, selected or named objects."
|
||||
"\n\t\t: When -subshapes is specified than following properties will be assigned to specified sub-shapes."
|
||||
"\n\t\t: When -defaults is specified than presentation properties will be"
|
||||
"\n\t\t: assigned to all objects that have not their own specified properties"
|
||||
"\n\t\t: and to all objects to be displayed in the future."
|
||||
"\n\t\t: If -defaults is used there should not be any objects' names nor -subshapes specifier."
|
||||
"\n\t\t: See also vlistcolors and vlistmaterials to list named colors and materials"
|
||||
"\n\t\t: accepted by arguments -material and -color",
|
||||
__FILE__,VAspects,group);
|
||||
addCmd ("vsub", VSubInt, /* [vsub] */ R"(
|
||||
vsub 0/1 (off/on) [obj] : Subintensity(on/off) of selected objects
|
||||
)" /* [vsub] */);
|
||||
|
||||
theCommands.Add("vsetcolor",
|
||||
"vsetcolor [-noupdate|-update] [name] ColorName"
|
||||
"\n\t\t: Sets color for all, selected or named objects."
|
||||
"\n\t\t: Alias for vaspects -setcolor [name] ColorName.",
|
||||
__FILE__,VAspects,group);
|
||||
addCmd ("vaspects", VAspects, /* [vaspects] */ R"(
|
||||
vaspects [-noupdate|-update] [name1 [name2 [...]] | -defaults] [-subshapes subname1 [subname2 [...]]]
|
||||
[-visibility {0|1}]
|
||||
[-color {ColorName | R G B}] [-unsetColor]
|
||||
[-backfaceColor Color]
|
||||
[-material MatName] [-unsetMaterial]
|
||||
[-transparency Transp] [-unsetTransparency]
|
||||
[-width LineWidth] [-unsetWidth]
|
||||
[-lineType {solid|dash|dot|dotDash|0xHexPattern} [-stippleFactor factor]]
|
||||
[-unsetLineType]
|
||||
[-markerType {.|+|x|O|xcircle|pointcircle|ring1|ring2|ring3|ball|ImagePath}]
|
||||
[-unsetMarkerType]
|
||||
[-markerSize Scale] [-unsetMarkerSize]
|
||||
[-freeBoundary {0|1}]
|
||||
[-freeBoundaryWidth Width] [-unsetFreeBoundaryWidth]
|
||||
[-freeBoundaryColor {ColorName | R G B}] [-unsetFreeBoundaryColor]
|
||||
[-isoOnTriangulation 0|1]
|
||||
[-maxParamValue {value}]
|
||||
[-sensitivity {selection_mode} {value}]
|
||||
[-shadingModel {unlit|flat|gouraud|phong|pbr|pbr_facet}]
|
||||
[-unsetShadingModel]
|
||||
[-interior {solid|hatch|hidenline|point}] [-setHatch HatchStyle]
|
||||
[-unsetInterior]
|
||||
[-faceBoundaryDraw {0|1}] [-mostContinuity {c0|g1|c1|g2|c2|c3|cn}]
|
||||
[-faceBoundaryWidth LineWidth] [-faceBoundaryColor R G B] [-faceBoundaryType LineType]
|
||||
[-drawEdges {0|1}] [-edgeType LineType] [-edgeColor R G B] [-quadEdges {0|1}]
|
||||
[-drawSilhouette {0|1}]
|
||||
[-alphaMode {opaque|mask|blend|maskblend|blendauto} [alphaCutOff=0.5]]
|
||||
[-dumpJson] [-dumpCompact {0|1}] [-dumpDepth depth]
|
||||
Manage presentation properties of all, selected or named objects.
|
||||
When -subshapes is specified than following properties will be assigned to specified sub-shapes.
|
||||
When -defaults is specified than presentation properties will be
|
||||
assigned to all objects that have not their own specified properties
|
||||
and to all objects to be displayed in the future.
|
||||
If -defaults is used there should not be any objects' names nor -subshapes specifier.
|
||||
See also vlistcolors and vlistmaterials to list named colors and materials
|
||||
accepted by arguments -material and -color
|
||||
)" /* [vaspects] */);
|
||||
|
||||
theCommands.Add("vunsetcolor",
|
||||
"vunsetcolor [-noupdate|-update] [name]"
|
||||
"\n\t\t: Resets color for all, selected or named objects."
|
||||
"\n\t\t: Alias for vaspects -unsetcolor [name].",
|
||||
__FILE__,VAspects,group);
|
||||
addCmd ("vsetcolor", VAspects, /* [vsetcolor] */ R"(
|
||||
vsetcolor [-noupdate|-update] [name] ColorName
|
||||
Sets color for all, selected or named objects.
|
||||
Alias for vaspects -setcolor [name] ColorName.
|
||||
)" /* [vsetcolor] */);
|
||||
|
||||
theCommands.Add("vsettransparency",
|
||||
"vsettransparency [-noupdate|-update] [name] Coefficient"
|
||||
"\n\t\t: Sets transparency for all, selected or named objects."
|
||||
"\n\t\t: The Coefficient may be between 0.0 (opaque) and 1.0 (fully transparent)."
|
||||
"\n\t\t: Alias for vaspects -settransp [name] Coefficient.",
|
||||
__FILE__,VAspects,group);
|
||||
addCmd ("vunsetcolor", VAspects, /* [vunsetcolor] */ R"(
|
||||
vunsetcolor [-noupdate|-update] [name]
|
||||
Resets color for all, selected or named objects.
|
||||
Alias for vaspects -unsetcolor [name].
|
||||
)" /* [vunsetcolor] */);
|
||||
|
||||
theCommands.Add("vunsettransparency",
|
||||
"vunsettransparency [-noupdate|-update] [name]"
|
||||
"\n\t\t: Resets transparency for all, selected or named objects."
|
||||
"\n\t\t: Alias for vaspects -unsettransp [name].",
|
||||
__FILE__,VAspects,group);
|
||||
addCmd ("vsettransparency", VAspects, /* [vsettransparency] */ R"(
|
||||
vsettransparency [-noupdate|-update] [name] Coefficient
|
||||
Sets transparency for all, selected or named objects.
|
||||
The Coefficient may be between 0.0 (opaque) and 1.0 (fully transparent).
|
||||
Alias for vaspects -settransp [name] Coefficient.
|
||||
)" /* [vsettransparency] */);
|
||||
|
||||
theCommands.Add("vsetmaterial",
|
||||
"vsetmaterial [-noupdate|-update] [name] MaterialName"
|
||||
"\n\t\t: Alias for vaspects -setmaterial [name] MaterialName.",
|
||||
__FILE__,VAspects,group);
|
||||
addCmd ("vunsettransparency", VAspects, /* [vunsettransparency] */ R"(
|
||||
vunsettransparency [-noupdate|-update] [name]
|
||||
Resets transparency for all, selected or named objects.
|
||||
Alias for vaspects -unsettransp [name].
|
||||
)" /* [vunsettransparency] */);
|
||||
|
||||
theCommands.Add("vunsetmaterial",
|
||||
"vunsetmaterial [-noupdate|-update] [name]"
|
||||
"\n\t\t: Alias for vaspects -unsetmaterial [name].",
|
||||
__FILE__,VAspects,group);
|
||||
addCmd ("vsetmaterial", VAspects, /* [vsetmaterial] */ R"(
|
||||
vsetmaterial [-noupdate|-update] [name] MaterialName
|
||||
n\t\t: Alias for vaspects -setmaterial [name] MaterialName.
|
||||
)" /* [vsetmaterial] */);
|
||||
|
||||
theCommands.Add("vsetwidth",
|
||||
"vsetwidth [-noupdate|-update] [name] width(0->10)"
|
||||
"\n\t\t: Alias for vaspects -setwidth [name] width.",
|
||||
__FILE__,VAspects,group);
|
||||
addCmd ("vunsetmaterial", VAspects, /* [vunsetmaterial] */ R"(
|
||||
vunsetmaterial [-noupdate|-update] [name]
|
||||
Alias for vaspects -unsetmaterial [name].
|
||||
)" /* [vunsetmaterial] */);
|
||||
|
||||
theCommands.Add("vunsetwidth",
|
||||
"vunsetwidth [-noupdate|-update] [name]"
|
||||
"\n\t\t: Alias for vaspects -unsetwidth [name].",
|
||||
__FILE__,VAspects,group);
|
||||
addCmd ("vsetwidth", VAspects, /* [vsetwidth] */ R"(
|
||||
vsetwidth [-noupdate|-update] [name] width(0->10)
|
||||
Alias for vaspects -setwidth [name] width.
|
||||
)" /* [vsetwidth] */);
|
||||
|
||||
theCommands.Add("vsetinteriorstyle",
|
||||
"vsetinteriorstyle [-noupdate|-update] [name] Style"
|
||||
"\n\t\t: Alias for vaspects -setInterior [name] Style.",
|
||||
__FILE__,VAspects,group);
|
||||
addCmd ("vunsetwidth", VAspects, /* [vunsetwidth] */ R"(
|
||||
vunsetwidth [-noupdate|-update] [name]
|
||||
Alias for vaspects -unsetwidth [name].
|
||||
)" /* [vunsetwidth] */);
|
||||
|
||||
theCommands.Add ("vsetedgetype",
|
||||
"vsetedgetype [name] [-type {solid, dash, dot}] [-color R G B] [-width value]"
|
||||
"\n\t\t: Alias for vaspects [name] -setEdgeType Type.",
|
||||
__FILE__, VAspects, group);
|
||||
addCmd ("vsetinteriorstyle", VAspects, /* [vsetinteriorstyle] */ R"(
|
||||
vsetinteriorstyle [-noupdate|-update] [name] Style
|
||||
Alias for vaspects -setInterior [name] Style.
|
||||
)" /* [vsetinteriorstyle] */);
|
||||
|
||||
theCommands.Add ("vunsetedgetype",
|
||||
"vunsetedgetype [name]"
|
||||
"\n\t\t: Alias for vaspects [name] -unsetEdgeType.",
|
||||
__FILE__, VAspects, group);
|
||||
addCmd ("vsetedgetype", VAspects, /* [vsetedgetype] */ R"(
|
||||
vsetedgetype [name] [-type {solid, dash, dot}] [-color R G B] [-width value]
|
||||
Alias for vaspects [name] -setEdgeType Type.
|
||||
)" /* [vsetedgetype] */);
|
||||
|
||||
theCommands.Add ("vshowfaceboundary",
|
||||
"vshowfaceboundary [name]"
|
||||
"\n\t\t: Alias for vaspects [name] -setFaceBoundaryDraw on",
|
||||
__FILE__, VAspects, group);
|
||||
addCmd ("vunsetedgetype", VAspects, /* [vunsetedgetype] */ R"(
|
||||
vunsetedgetype [name] : Alias for vaspects [name] -unsetEdgeType.
|
||||
)" /* [vunsetedgetype] */);
|
||||
|
||||
theCommands.Add("vsensdis",
|
||||
"vsensdis : Display active entities (sensitive entities of one of the standard types corresponding to active selection modes)."
|
||||
"\n\t\t: Standard entity types are those defined in Select3D package:"
|
||||
"\n\t\t: - sensitive box"
|
||||
"\n\t\t: - sensitive face"
|
||||
"\n\t\t: - sensitive curve"
|
||||
"\n\t\t: - sensitive segment"
|
||||
"\n\t\t: - sensitive circle"
|
||||
"\n\t\t: - sensitive point"
|
||||
"\n\t\t: - sensitive triangulation"
|
||||
"\n\t\t: - sensitive triangle"
|
||||
"\n\t\t: Custom(application - defined) sensitive entity types are not processed by this command.",
|
||||
__FILE__,VDispSensi,group);
|
||||
addCmd ("vshowfaceboundary", VAspects, /* [vshowfaceboundary] */ R"(
|
||||
vshowfaceboundary [name]: Alias for vaspects [name] -setFaceBoundaryDraw on.
|
||||
)" /* [vshowfaceboundary] */);
|
||||
|
||||
theCommands.Add("vsensera",
|
||||
"vsensera : erase active entities",
|
||||
__FILE__,VClearSensi,group);
|
||||
addCmd ("vsensdis", VDispSensi, /* [vsensdis] */ R"(
|
||||
vsensdis : Display active entities
|
||||
(sensitive entities of one of the standard types corresponding to active selection modes).
|
||||
Standard entity types are those defined in Select3D package:
|
||||
- sensitive box, face, curve, segment, circle, point, triangulation, triangle.
|
||||
Custom (application-defined) sensitive entity types are not processed by this command.
|
||||
)" /* [vsensdis] */);
|
||||
|
||||
theCommands.Add("vsetshading",
|
||||
"vsetshading : vsetshading name Quality(default=0.0008) "
|
||||
"\n\t\t: Sets deflection coefficient that defines the quality of the shape representation in the shading mode.",
|
||||
__FILE__,VShading,group);
|
||||
addCmd ("vsensera", VClearSensi, /* [vsensera] */ R"(
|
||||
vsensera : erase active entities
|
||||
)" /* [vsensera] */);
|
||||
|
||||
theCommands.Add("vunsetshading",
|
||||
"vunsetshading :vunsetshading name "
|
||||
"\n\t\t: Sets default deflection coefficient (0.0008) that defines the quality of the shape representation in the shading mode.",
|
||||
__FILE__,VShading,group);
|
||||
addCmd ("vsetshading", VShading, /* [vsetshading] */ R"(
|
||||
vsetshading name Quality(default=0.0008)
|
||||
Sets deflection coefficient that defines the quality of the shape representation in the shading mode.
|
||||
)" /* [vsetshading] */);
|
||||
|
||||
theCommands.Add ("vtexture",
|
||||
"vtexture [-noupdate|-update] name [ImageFile|IdOfTexture|off]"
|
||||
"\n\t\t: [-tex0 Image0] [-tex1 Image1] [...]"
|
||||
"\n\t\t: [-origin {u v|off}] [-scale {u v|off}] [-repeat {u v|off}]"
|
||||
"\n\t\t: [-trsfTrans du dv] [-trsfScale su sv] [-trsfAngle Angle]"
|
||||
"\n\t\t: [-modulate {on|off}] [-srgb {on|off}]=on"
|
||||
"\n\t\t: [-setFilter {nearest|bilinear|trilinear}]"
|
||||
"\n\t\t: [-setAnisoFilter {off|low|middle|quality}]"
|
||||
"\n\t\t: [-default]"
|
||||
"\n\t\t: The texture can be specified by filepath"
|
||||
"\n\t\t: or as ID (0<=IdOfTexture<=20) specifying one of the predefined textures."
|
||||
"\n\t\t: The options are:"
|
||||
"\n\t\t: -scale Setup texture scaling for generating coordinates; (1, 1) by default"
|
||||
"\n\t\t: -origin Setup texture origin for generating coordinates; (0, 0) by default"
|
||||
"\n\t\t: -repeat Setup texture repeat for generating coordinates; (1, 1) by default"
|
||||
"\n\t\t: -modulate Enable or disable texture color modulation"
|
||||
"\n\t\t: -srgb Prefer sRGB texture format when applicable; TRUE by default"
|
||||
"\n\t\t: -trsfAngle Setup dynamic texture coordinates transformation - rotation angle"
|
||||
"\n\t\t: -trsfTrans Setup dynamic texture coordinates transformation - translation vector"
|
||||
"\n\t\t: -trsfScale Setup dynamic texture coordinates transformation - scale vector"
|
||||
"\n\t\t: -setFilter Setup texture filter"
|
||||
"\n\t\t: -setAnisoFilter Setup anisotropic filter for texture with mip-levels"
|
||||
"\n\t\t: -default Sets texture mapping default parameters",
|
||||
__FILE__, VTexture, group);
|
||||
addCmd ("vunsetshading", VShading, /* [vunsetshading] */ R"(
|
||||
vunsetshading name
|
||||
Sets default deflection coefficient (0.0008) that defines the quality of the shape representation in the shading mode.
|
||||
)" /* [vunsetshading] */);
|
||||
|
||||
theCommands.Add("vtexscale",
|
||||
"vtexscale name ScaleU ScaleV"
|
||||
"\n\t\t: Alias for vtexture name -setScale ScaleU ScaleV.",
|
||||
__FILE__,VTexture,group);
|
||||
addCmd ("vtexture", VTexture, /* [vtexture] */ R"(
|
||||
vtexture [-noupdate|-update] name [ImageFile|IdOfTexture|off]
|
||||
[-tex0 Image0] [-tex1 Image1] [...]
|
||||
[-origin {u v|off}] [-scale {u v|off}] [-repeat {u v|off}]
|
||||
[-trsfTrans du dv] [-trsfScale su sv] [-trsfAngle Angle]
|
||||
[-modulate {on|off}] [-srgb {on|off}]=on
|
||||
[-setFilter {nearest|bilinear|trilinear}]
|
||||
[-setAnisoFilter {off|low|middle|quality}]
|
||||
[-default]
|
||||
The texture can be specified by filepath
|
||||
or as ID (0<=IdOfTexture<=20) specifying one of the predefined textures.
|
||||
The options are:
|
||||
-scale Setup texture scaling for generating coordinates; (1, 1) by default
|
||||
-origin Setup texture origin for generating coordinates; (0, 0) by default
|
||||
-repeat Setup texture repeat for generating coordinates; (1, 1) by default
|
||||
-modulate Enable or disable texture color modulation
|
||||
-srgb Prefer sRGB texture format when applicable; TRUE by default
|
||||
-trsfAngle Setup dynamic texture coordinates transformation - rotation angle
|
||||
-trsfTrans Setup dynamic texture coordinates transformation - translation vector
|
||||
-trsfScale Setup dynamic texture coordinates transformation - scale vector
|
||||
-setFilter Setup texture filter
|
||||
-setAnisoFilter Setup anisotropic filter for texture with mip-levels
|
||||
-default Sets texture mapping default parameters
|
||||
)" /* [vtexture] */);
|
||||
|
||||
theCommands.Add("vtexorigin",
|
||||
"vtexorigin name OriginU OriginV"
|
||||
"\n\t\t: Alias for vtexture name -setOrigin OriginU OriginV.",
|
||||
__FILE__,VTexture,group);
|
||||
addCmd ("vtexscale", VTexture, /* [vtexscale] */ R"(
|
||||
vtexscale name ScaleU ScaleV
|
||||
Alias for vtexture name -setScale ScaleU ScaleV.
|
||||
)" /* [vtexscale] */);
|
||||
|
||||
theCommands.Add("vtexrepeat",
|
||||
"vtexrepeat name RepeatU RepeatV"
|
||||
"\n\t\t: Alias for vtexture name -setRepeat RepeatU RepeatV.",
|
||||
__FILE__, VTexture, group);
|
||||
addCmd ("vtexorigin", VTexture, /* [vtexorigin] */ R"(
|
||||
vtexorigin name OriginU OriginV
|
||||
Alias for vtexture name -setOrigin OriginU OriginV.
|
||||
)" /* [vtexorigin] */);
|
||||
|
||||
theCommands.Add("vtexdefault",
|
||||
"vtexdefault name"
|
||||
"\n\t\t: Alias for vtexture name -default.",
|
||||
__FILE__, VTexture, group);
|
||||
addCmd ("vtexrepeat", VTexture, /* [vtexrepeat] */ R"(
|
||||
vtexrepeat name RepeatU RepeatV
|
||||
Alias for vtexture name -setRepeat RepeatU RepeatV.
|
||||
)" /* [vtexrepeat] */);
|
||||
|
||||
theCommands.Add("vstate",
|
||||
"vstate [-entities] [-hasSelected] [name1] ... [nameN]"
|
||||
"\n\t\t: Reports show/hidden state for selected or named objects"
|
||||
"\n\t\t: -entities - print low-level information about detected entities"
|
||||
"\n\t\t: -hasSelected - prints 1 if context has selected shape and 0 otherwise",
|
||||
__FILE__,VState,group);
|
||||
addCmd ("vtexdefault", VTexture, /* [vtexdefault] */ R"(
|
||||
vtexdefault name : Alias for vtexture name -default.
|
||||
)" /* [vtexdefault] */);
|
||||
|
||||
theCommands.Add("vpickshapes",
|
||||
"vpickshape subtype(VERTEX,EDGE,WIRE,FACE,SHELL,SOLID) [name1 or .] [name2 or .] [name n or .]"
|
||||
"\n\t\t: Hold Ctrl and pick object by clicking Left mouse button."
|
||||
"\n\t\t: Hold also Shift for multiple selection.",
|
||||
__FILE__, VPickShape, group);
|
||||
addCmd ("vstate", VState, /* [vstate] */ R"(
|
||||
vstate [-entities] [-hasSelected] [name1] ... [nameN]
|
||||
Reports show/hidden state for selected or named objects.
|
||||
-entities prints low-level information about detected entities;
|
||||
-hasSelected prints 1 if context has selected shape and 0 otherwise.
|
||||
)" /* [vstate] */);
|
||||
|
||||
theCommands.Add("vtypes",
|
||||
"vtypes : list of known types and signatures in AIS - To be Used in vpickobject command for selection with filters",
|
||||
__FILE__, VIOTypes, group);
|
||||
addCmd ("vpickshapes", VPickShape, /* [vpickshapes] */ R"(
|
||||
vpickshape subtype(VERTEX,EDGE,WIRE,FACE,SHELL,SOLID) [name1 or .] [name2 or .] [name n or .]
|
||||
Hold Ctrl and pick object by clicking Left mouse button.
|
||||
Hold also Shift for multiple selection.
|
||||
)" /* [vpickshapes] */);
|
||||
|
||||
theCommands.Add("vselfilter",
|
||||
"vselfilter [-contextfilter {AND|OR}]"
|
||||
"\n [-type {VERTEX|EDGE|WIRE|FACE|SHAPE|SHELL|SOLID}]"
|
||||
"\n [-secondtype {VERTEX|EDGE|WIRE|FACE|SHAPE|SHELL|SOLID}]"
|
||||
"\n [-clear]"
|
||||
"\nSets selection shape type filter in context or remove all filters."
|
||||
"\n : Option -contextfilter : To define a selection filter for two or more types of entity,"
|
||||
"\n use value AND (OR by default)."
|
||||
"\n : Option -type set type of selection filter. Filters are applied with Or combination."
|
||||
"\n : Option -clear remove all filters in context",
|
||||
__FILE__,VSelFilter,group);
|
||||
addCmd ("vtypes", VIOTypes, /* [vtypes] */ R"(
|
||||
vtypes : list of known types and signatures in AIS.
|
||||
To be Used in vpickobject command for selection with filters.
|
||||
)" /* [vtypes] */);
|
||||
|
||||
theCommands.Add("vpickselected", "vpickselected [name]: extract selected shape.",
|
||||
__FILE__, VPickSelected, group);
|
||||
addCmd ("vselfilter", VSelFilter, /* [vselfilter] */ R"(
|
||||
vselfilter [-contextfilter {AND|OR}]
|
||||
[-type {VERTEX|EDGE|WIRE|FACE|SHAPE|SHELL|SOLID}]
|
||||
[-secondtype {VERTEX|EDGE|WIRE|FACE|SHAPE|SHELL|SOLID}]
|
||||
[-clear]
|
||||
Sets selection shape type filter in context or remove all filters.
|
||||
-contextfilter to define a selection filter for two or more types of entity,
|
||||
use value AND (OR by default).
|
||||
-type set type of selection filter; filters are applied with Or combination.
|
||||
-clear remove all filters in context.
|
||||
)" /* [vselfilter] */);
|
||||
|
||||
theCommands.Add ("vloadselection",
|
||||
"vloadselection [-context] [name1] ... [nameN] : allows to load selection"
|
||||
"\n\t\t: primitives for the shapes with names given without displaying them.",
|
||||
__FILE__, VLoadSelection, group);
|
||||
addCmd ("vpickselected", VPickSelected, /* [vpickselected] */ R"(
|
||||
vpickselected [name]: extract selected shape.
|
||||
)" /* [vpickselected] */);
|
||||
|
||||
theCommands.Add("vbsdf", "vbsdf [name] [options]"
|
||||
"\nAdjusts parameters of material BSDF:"
|
||||
"\n -help : Shows this message"
|
||||
"\n -print : Print BSDF"
|
||||
"\n -kd : Weight of the Lambertian BRDF"
|
||||
"\n -kr : Weight of the reflection BRDF"
|
||||
"\n -kt : Weight of the transmission BTDF"
|
||||
"\n -ks : Weight of the glossy Blinn BRDF"
|
||||
"\n -le : Self-emitted radiance"
|
||||
"\n -fresnel : Fresnel coefficients; Allowed fresnel formats are: Constant x,"
|
||||
"\n Schlick x y z, Dielectric x, Conductor x y"
|
||||
"\n -roughness : Roughness of material (Blinn's exponent)"
|
||||
"\n -absorpcoeff : Absorption coefficient (only for transparent material)"
|
||||
"\n -absorpcolor : Absorption color (only for transparent material)"
|
||||
"\n -normalize : Normalize BSDF coefficients",
|
||||
__FILE__, VBsdf, group);
|
||||
addCmd ("vloadselection", VLoadSelection, /* [vloadselection] */ R"(
|
||||
vloadselection [-context] [name1] ... [nameN]
|
||||
Allows to load selection primitives for the shapes with names given without displaying them.
|
||||
)" /* [vloadselection] */);
|
||||
|
||||
addCmd ("vbsdf", VBsdf, /* [vbsdf] */ R"(
|
||||
vbsdf [name] [options]
|
||||
nAdjusts parameters of material BSDF:
|
||||
-help shows this message
|
||||
-print print BSDF
|
||||
-kd weight of the Lambertian BRDF
|
||||
-kr weight of the reflection BRDF
|
||||
-kt weight of the transmission BTDF
|
||||
-ks weight of the glossy Blinn BRDF
|
||||
-le self-emitted radiance
|
||||
-fresnel Fresnel coefficients; Allowed fresnel formats are: Constant x,
|
||||
Schlick x y z, Dielectric x, Conductor x y
|
||||
-roughness roughness of material (Blinn's exponent)
|
||||
-absorpcoeff absorption coefficient (only for transparent material)
|
||||
-absorpcolor absorption color (only for transparent material)
|
||||
-normalize normalize BSDF coefficients
|
||||
)" /* [vbsdf] */);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
@ -6819,389 +6819,396 @@ static int VNormals (Draw_Interpretor& theDI,
|
||||
|
||||
void ViewerTest::ObjectCommands(Draw_Interpretor& theCommands)
|
||||
{
|
||||
const char *group ="AISObjects";
|
||||
const char* aGroup = "AIS Viewer";
|
||||
const char* aFileName = __FILE__;
|
||||
auto addCmd = [&](const char* theName, Draw_Interpretor::CommandFunction theFunc, const char* theHelp)
|
||||
{
|
||||
theCommands.Add (theName, theHelp, aFileName, theFunc, aGroup);
|
||||
};
|
||||
|
||||
theCommands.Add ("vtrihedron",
|
||||
"vtrihedron : vtrihedron name"
|
||||
"\n\t\t: [-dispMode {wireframe|shading} ]"
|
||||
"\n\t\t: [-origin x y z ]"
|
||||
"\n\t\t: [-zaxis u v w -xaxis u v w ]"
|
||||
"\n\t\t: [-drawAxes {X|Y|Z|XY|YZ|XZ|XYZ}]"
|
||||
"\n\t\t: [-hideLabels {on|off}]"
|
||||
"\n\t\t: [-hideArrows {on|off}]"
|
||||
"\n\t\t: [-label {XAxis|YAxis|ZAxis} value]"
|
||||
"\n\t\t: [-attribute {XAxisLength|YAxisLength|ZAxisLength"
|
||||
"\n\t\t: |TubeRadiusPercent|ConeRadiusPercent"
|
||||
"\n\t\t: |ConeLengthPercent|OriginRadiusPercent"
|
||||
"\n\t\t: |ShadingNumberOfFacettes} value]"
|
||||
"\n\t\t: [-color {Origin|XAxis|YAxis|ZAxis|XOYAxis|YOZAxis"
|
||||
"\n\t\t: |XOZAxis|Whole} {r g b | colorName}]"
|
||||
"\n\t\t: [-textColor [XAxis|YAxis|ZAxis] {r g b | colorName}]"
|
||||
"\n\t\t: [-arrowColor [XAxis|YAxis|ZAxis] {r g b | colorName}]"
|
||||
"\n\t\t: [-priority {Origin|XAxis|YAxis|ZAxis|XArrow"
|
||||
"\n\t\t: |YArrow|ZArrow|XOYAxis|YOZAxis"
|
||||
"\n\t\t: |XOZAxis|Whole} value]"
|
||||
"\n\t\t:"
|
||||
"\n\t\t: Creates a new *AIS_Trihedron* object or changes parameters of "
|
||||
"\n\t\t: existing trihedron. If no argument is set,"
|
||||
"\n\t\t: the default trihedron (0XYZ) is created."
|
||||
"\n\t\t: -dispMode mode of visualization: wf - wireframe,"
|
||||
"\n\t\t: sh - shading."
|
||||
"\n\t\t: Default value is wireframe."
|
||||
"\n\t\t: -origin allows to set trihedron location."
|
||||
"\n\t\t: -zaxis/-xaxis allows to set trihedron X and Z"
|
||||
"\n\t\t: directions. The directions should"
|
||||
"\n\t\t: be orthogonal. Y direction is calculated."
|
||||
"\n\t\t: -drawAxes allows to set what axes are drawn in the"
|
||||
"\n\t\t: trihedron, default state is XYZ"
|
||||
"\n\t\t: -hideLabels allows to show/hide trihedron labels"
|
||||
"\n\t\t: -hideArrows allows to show/hide trihedron arrows"
|
||||
"\n\t\t: -label allows to change default X/Y/Z titles of axes"
|
||||
"\n\t\t: -attribute sets parameters of trihedron"
|
||||
"\n\t\t: -color sets color properties of parts of trihedron"
|
||||
"\n\t\t: -textColor sets color properties of trihedron labels"
|
||||
"\n\t\t: -arrowColor sets color properties of trihedron arrows"
|
||||
"\n\t\t: -priority allows to change default selection priority"
|
||||
"\n\t\t: of trihedron components",
|
||||
__FILE__,VTrihedron,group);
|
||||
addCmd ("vtrihedron", VTrihedron, /* [vtrihedron] */ R"(
|
||||
vtrihedron name
|
||||
[-dispMode {wireframe|shading} ]
|
||||
[-origin x y z ]
|
||||
[-zaxis u v w -xaxis u v w ]
|
||||
[-drawAxes {X|Y|Z|XY|YZ|XZ|XYZ}]
|
||||
[-hideLabels {on|off}]
|
||||
[-hideArrows {on|off}]
|
||||
[-label {XAxis|YAxis|ZAxis} value]
|
||||
[-attribute {XAxisLength|YAxisLength|ZAxisLength
|
||||
|TubeRadiusPercent|ConeRadiusPercent
|
||||
|ConeLengthPercent|OriginRadiusPercent
|
||||
|ShadingNumberOfFacettes} value]
|
||||
[-color {Origin|XAxis|YAxis|ZAxis|XOYAxis|YOZAxis
|
||||
|XOZAxis|Whole} {r g b | colorName}]
|
||||
[-textColor [XAxis|YAxis|ZAxis] {r g b | colorName}]
|
||||
[-arrowColor [XAxis|YAxis|ZAxis] {r g b | colorName}]
|
||||
[-priority {Origin|XAxis|YAxis|ZAxis|XArrow
|
||||
|YArrow|ZArrow|XOYAxis|YOZAxis
|
||||
|XOZAxis|Whole} value]
|
||||
|
||||
theCommands.Add("vtri2d",
|
||||
"vtri2d Name"
|
||||
"\n\t\t: Creates a plane with a 2D trihedron from an interactively selected face.",
|
||||
__FILE__,VTrihedron2D ,group);
|
||||
Creates/changes *AIS_Trihedron* object.
|
||||
-dispMode mode of visualization: wf - wireframe,
|
||||
sh - shading;
|
||||
default value is wireframe;
|
||||
-origin allows to set trihedron location;
|
||||
-zaxis/-xaxis allows to set trihedron X and Z directions;
|
||||
the directions should be orthogonal;
|
||||
Y direction is calculated;
|
||||
-drawAxes allows to set what axes are drawn in the
|
||||
trihedron, default state is XYZ;
|
||||
-hideLabels allows to show/hide trihedron labels;
|
||||
-hideArrows allows to show/hide trihedron arrows;
|
||||
-label allows to change default X/Y/Z titles of axes;
|
||||
-attribute sets parameters of trihedron;
|
||||
-color sets color properties of parts of trihedron;
|
||||
-textColor sets color properties of trihedron labels;
|
||||
-arrowColor sets color properties of trihedron arrows;
|
||||
-priority allows to change default selection priority
|
||||
of trihedron components.
|
||||
)" /* [vtrihedron] */);
|
||||
|
||||
theCommands.Add("vplanetri",
|
||||
"vplanetri name"
|
||||
"\n\t\t: Create a plane from a trihedron selection. If no arguments are set, the default",
|
||||
__FILE__,VPlaneTrihedron ,group);
|
||||
addCmd ("vtri2d", VTrihedron2D, /* [vtri2d] */ R"(
|
||||
vtri2d Name : Creates a plane with a 2D trihedron from an interactively selected face.
|
||||
)" /* [vtri2d] */);
|
||||
|
||||
theCommands.Add("vsize",
|
||||
"vsize : vsize [name(Default=Current)] [size(Default=100)] "
|
||||
"\n\t\t: Changes the size of a named or selected trihedron."
|
||||
"\n\t\t: If the name is not defined: it affects the selected trihedrons otherwise nothing is done."
|
||||
"\n\t\t: If the value is not defined: it is set to 100 by default.",
|
||||
__FILE__,VSize,group);
|
||||
addCmd ("vplanetri", VPlaneTrihedron, /* [vplanetri] */ R"(
|
||||
vplanetri name
|
||||
Create a plane from a trihedron selection.
|
||||
If no arguments are set, the default plane is created.
|
||||
)" /* [vplanetri] */);
|
||||
|
||||
theCommands.Add("vaxis",
|
||||
"vaxis name [Xa] [Ya] [Za] [Xb] [Yb] [Zb]"
|
||||
"\n\t\t: Creates an axis. If the values are not defined, an axis is created by interactive selection of two vertices or one edge",
|
||||
__FILE__,VAxisBuilder,group);
|
||||
addCmd ("vsize", VSize, /* [vsize] */ R"(
|
||||
vsize [name(Default=Current)] [size(Default=100)]
|
||||
Changes the size of a named or selected trihedron.
|
||||
If the name is not defined: it affects the selected trihedrons otherwise nothing is done.
|
||||
If the value is not defined: it is set to 100 by default.
|
||||
)" /* [vsize] */);
|
||||
|
||||
theCommands.Add("vaxispara",
|
||||
"vaxispara name "
|
||||
"\n\t\t: Creates an axis by interactive selection of an edge and a vertex.",
|
||||
__FILE__,VAxisBuilder,group);
|
||||
addCmd ("vaxis", VAxisBuilder, /* [vaxis] */ R"(
|
||||
vaxis name [Xa] [Ya] [Za] [Xb] [Yb] [Zb]
|
||||
Creates an axis. If the values are not defined,
|
||||
an axis is created by interactive selection of two vertices or one edge.
|
||||
)" /* [vaxis] */);
|
||||
|
||||
theCommands.Add("vaxisortho",
|
||||
"vaxisortho name "
|
||||
"\n\t\t: Creates an axis by interactive selection of an edge and a vertex. The axis will be orthogonal to the selected edge.",
|
||||
__FILE__,VAxisBuilder,group);
|
||||
addCmd ("vaxispara", VAxisBuilder, /* [vaxispara] */ R"(
|
||||
vaxispara name
|
||||
Creates an axis by interactive selection of an edge and a vertex.
|
||||
)" /* [vaxispara] */);
|
||||
|
||||
theCommands.Add("vpoint",
|
||||
"vpoint name [X Y [Z]] [-2d] [-nosel]"
|
||||
"\n\t\t: Creates a point from coordinates."
|
||||
"\n\t\t: If the values are not defined, a point is created from selected vertex or edge (center)."
|
||||
"\n\t\t: -2d defines on-screen 2D point from top-left window corner"
|
||||
"\n\t\t: -nosel creates non-selectable presentation",
|
||||
__FILE__,VPointBuilder,group);
|
||||
addCmd ("vaxisortho", VAxisBuilder, /* [vaxisortho] */ R"(
|
||||
vaxisortho name
|
||||
Creates an axis by interactive selection of an edge and a vertex.
|
||||
The axis will be orthogonal to the selected edge.
|
||||
)" /* [vaxisortho] */);
|
||||
|
||||
theCommands.Add("vplane",
|
||||
"vplane PlaneName [AxisName/PlaneName/PointName] [PointName/PointName/PointName] [Nothing/Nothing/PointName] [TypeOfSensitivity {0|1}]"
|
||||
"\n\t\t: Creates a plane from named or interactively selected entities."
|
||||
"\n\t\t: TypeOfSensitivity:"
|
||||
"\n\t\t: 0 - Interior"
|
||||
"\n\t\t: 1 - Boundary",
|
||||
__FILE__,VPlaneBuilder,group);
|
||||
addCmd ("vpoint", VPointBuilder, /* [vpoint] */ R"(
|
||||
vpoint name [X Y [Z]] [-2d] [-nosel]
|
||||
Creates a point from coordinates.
|
||||
If the values are not defined, a point is created from selected vertex or edge (center).
|
||||
-2d defines on-screen 2D point from top-left window corner;
|
||||
-nosel creates non-selectable presentation.
|
||||
)" /* [vpoint] */);
|
||||
|
||||
theCommands.Add ("vchangeplane", "vchangeplane usage: \n"
|
||||
" vchangeplane <plane_name>"
|
||||
" [x=center_x y=center_y z=center_z]"
|
||||
" [dx=dir_x dy=dir_y dz=dir_z]"
|
||||
" [sx=size_x sy=size_y]"
|
||||
" [minsize=value]"
|
||||
" [noupdate]\n"
|
||||
" - changes parameters of the plane:\n"
|
||||
" - x y z - center\n"
|
||||
" - dx dy dz - normal\n"
|
||||
" - sx sy - plane sizes\n"
|
||||
" - noupdate - do not update/redisplay the plane in context\n"
|
||||
" Please enter coordinates in format \"param=value\" in arbitrary order.",
|
||||
__FILE__, VChangePlane, group);
|
||||
addCmd ("vplane", VPlaneBuilder, /* [vplane] */ R"(
|
||||
vplane PlaneName [AxisName/PlaneName/PointName]
|
||||
[PointName/PointName/PointName] [Nothing/Nothing/PointName] [TypeOfSensitivity {0|1}]
|
||||
Creates a plane from named or interactively selected entities. TypeOfSensitivity:
|
||||
0 - Interior;
|
||||
1 - Boundary.
|
||||
)" /* [vplane] */);
|
||||
|
||||
theCommands.Add("vplanepara",
|
||||
"vplanepara PlaneName "
|
||||
"\n\t\t: Creates a plane from interactively selected vertex and face.",
|
||||
__FILE__,VPlaneBuilder,group);
|
||||
addCmd ("vchangeplane", VChangePlane, /* [vchangeplane] */ R"(
|
||||
vchangeplane plane_name
|
||||
[x=center_x y=center_y z=center_z]
|
||||
[dx=dir_x dy=dir_y dz=dir_z]
|
||||
[sx=size_x sy=size_y]
|
||||
[minsize=value]
|
||||
[noupdate]
|
||||
Changes parameters of the plane:
|
||||
- x y z - center
|
||||
- dx dy dz - normal
|
||||
- sx sy - plane sizes
|
||||
- noupdate - do not update/redisplay the plane in context
|
||||
Please enter coordinates in format "param=value" in arbitrary order.
|
||||
)" /* [vchangeplane] */);
|
||||
|
||||
theCommands.Add("vplaneortho",
|
||||
"vplaneortho PlaneName "
|
||||
"\n\t\t: Creates a plane from interactive selected face and coplanar edge. ",
|
||||
__FILE__,VPlaneBuilder,group);
|
||||
addCmd ("vplanepara", VPlaneBuilder, /* [vplanepara] */ R"(
|
||||
vplanepara PlaneName
|
||||
Creates a plane from interactively selected vertex and face.
|
||||
)" /* [vplanepara] */);
|
||||
|
||||
theCommands.Add("vline",
|
||||
"vline LineName [Xa/PointName] [Ya/PointName] [Za] [Xb] [Yb] [Zb] "
|
||||
"\n\t\t: Creates a line from coordinates, named or interactively selected vertices. ",
|
||||
__FILE__,VLineBuilder,group);
|
||||
addCmd ("vplaneortho", VPlaneBuilder, /* [vplaneortho] */ R"(
|
||||
vplaneortho PlaneName
|
||||
Creates a plane from interactive selected face and coplanar edge.
|
||||
)" /* [vplaneortho] */);
|
||||
|
||||
theCommands.Add("vcircle",
|
||||
"vcircle CircleName [PointName PointName PointName IsFilled]\n\t\t\t\t\t[PlaneName PointName Radius IsFilled]"
|
||||
"\n\t\t: Creates a circle from named or interactively selected entities."
|
||||
"\n\t\t: Parameter IsFilled is defined as 0 or 1.",
|
||||
__FILE__,VCircleBuilder,group);
|
||||
addCmd ("vline", VLineBuilder, /* [vline] */ R"(
|
||||
vline LineName [Xa/PointName] [Ya/PointName] [Za] [Xb] [Yb] [Zb]
|
||||
Creates a line from coordinates, named or interactively selected vertices.
|
||||
)" /* [vline] */);
|
||||
|
||||
theCommands.Add ("vdrawtext",
|
||||
"vdrawtext name text"
|
||||
"\n\t\t: [-pos X=0 Y=0 Z=0]"
|
||||
"\n\t\t: [-color {R G B|name}=yellow]"
|
||||
"\n\t\t: [-halign {left|center|right}=left]"
|
||||
"\n\t\t: [-valign {top|center|bottom|topfirstline}=bottom}]"
|
||||
"\n\t\t: [-angle angle=0]"
|
||||
"\n\t\t: [-zoom {0|1}=0]"
|
||||
"\n\t\t: [-height height=16]"
|
||||
"\n\t\t: [-wrapping width=40]"
|
||||
"\n\t\t: [-aspect {regular|bold|italic|boldItalic}=regular]"
|
||||
"\n\t\t: [-font font=Times]"
|
||||
"\n\t\t: [-2d]"
|
||||
"\n\t\t: [-perspos {X Y Z}=0 0 0], where"
|
||||
"\n\t\t X and Y define the coordinate origin in 2d space relative to the view window"
|
||||
"\n\t\t Example: X=0 Y=0 is center, X=1 Y=1 is upper right corner etc..."
|
||||
"\n\t\t Z coordinate defines the gap from border of view window (except center position)."
|
||||
"\n\t\t: [-disptype {blend|decal|shadow|subtitle|dimension|normal}=normal}"
|
||||
"\n\t\t: [-subcolor {R G B|name}=white]"
|
||||
"\n\t\t: [-noupdate]"
|
||||
"\n\t\t: [-plane NormX NormY NormZ DirX DirY DirZ]"
|
||||
"\n\t\t: [-flipping]"
|
||||
"\n\t\t: [-ownanchor {0|1}=1]"
|
||||
"\n\t\t: Display text label at specified position.",
|
||||
__FILE__, VDrawText, group);
|
||||
addCmd ("vcircle", VCircleBuilder, /* [vcircle] */ R"(
|
||||
vcircle CircleName [PointName PointName PointName IsFilled]
|
||||
[PlaneName PointName Radius IsFilled]
|
||||
Creates a circle from named or interactively selected entities.
|
||||
Parameter IsFilled is defined as 0 or 1.
|
||||
)" /* [vcircle] */);
|
||||
|
||||
theCommands.Add("vdrawsphere",
|
||||
"vdrawsphere: vdrawsphere shapeName Fineness [X=0.0 Y=0.0 Z=0.0] [Radius=100.0] [ToShowEdges=0] [ToPrintInfo=1]\n",
|
||||
__FILE__,VDrawSphere,group);
|
||||
addCmd ("vdrawtext", VDrawText, /* [vdrawtext] */ R"(
|
||||
vdrawtext name text
|
||||
[-pos X Y Z]={0 0 0}
|
||||
[-color {R G B|name}]=yellow
|
||||
[-halign {left|center|right}]=left
|
||||
[-valign {top|center|bottom|topfirstline}}]=bottom
|
||||
[-angle angle]=0
|
||||
[-zoom {0|1}]=0
|
||||
[-height height]=16
|
||||
[-wrapping width]=40
|
||||
[-aspect {regular|bold|italic|boldItalic}]=regular
|
||||
[-font font]=Times
|
||||
[-2d] [-perspos {X Y Z}]={0 0 0}
|
||||
[-disptype {blend|decal|shadow|subtitle|dimension|normal}}=normal
|
||||
[-subcolor {R G B|name}]=white
|
||||
[-noupdate]
|
||||
[-plane NormX NormY NormZ DirX DirY DirZ]
|
||||
[-flipping] [-ownanchor {0|1}]=1
|
||||
Display text label at specified position.
|
||||
Within -perspos, X and Y define the coordinate origin in 2d space relative to the view window.
|
||||
Example: X=0 Y=0 is center, X=1 Y=1 is upper right corner etc...
|
||||
Z coordinate defines the gap from border of view window (except center position).
|
||||
)" /* [vdrawtext] */);
|
||||
|
||||
theCommands.Add ("vlocation",
|
||||
"vlocation name"
|
||||
"\n\t\t: [-reset] [-copyFrom otherName]"
|
||||
"\n\t\t: [-translate X Y [Z]] [-rotate x y z dx dy dz angle] [-scale [X Y Z] scale]"
|
||||
"\n\t\t: [-pretranslate X Y [Z]] [-prerotate x y z dx dy dz angle] [-prescale [X Y Z] scale]"
|
||||
"\n\t\t: [-mirror x y z dx dy dz] [-premirror x y z dx dy dz]"
|
||||
"\n\t\t: [-setLocation X Y [Z]] [-setRotation QX QY QZ QW] [-setScale [X Y Z] scale]"
|
||||
"\n\t\t: Object local transformation management:"
|
||||
"\n\t\t: -reset resets transformation to identity"
|
||||
"\n\t\t: -translate applies translation vector"
|
||||
"\n\t\t: -rotate applies rotation around axis"
|
||||
"\n\t\t: -scale applies scale factor with optional anchor"
|
||||
"\n\t\t: -mirror applies mirror transformation"
|
||||
"\n\t\t: -pretranslate pre-multiplies translation vector"
|
||||
"\n\t\t: -prerotate pre-multiplies rotation around axis"
|
||||
"\n\t\t: -prescale pre-multiplies scale transformation"
|
||||
"\n\t\t: -premirror pre-multiplies mirror transformation"
|
||||
"\n\t\t: -setLocation overrides translation part"
|
||||
"\n\t\t: -setRotation overrides rotation part with specified quaternion"
|
||||
"\n\t\t: -setScale overrides scale factor",
|
||||
__FILE__, VSetLocation, group);
|
||||
theCommands.Add ("vsetlocation",
|
||||
"alias for vlocation",
|
||||
__FILE__, VSetLocation, group);
|
||||
theCommands.Add ("vchild",
|
||||
"vchild parent [-add] [-remove] [-ignoreParentTrsf {0|1}] child1 [child2] [...]"
|
||||
"\n\t\t: Command for testing low-level presentation connections."
|
||||
"\n\t\t: vconnect command should be used instead.",
|
||||
__FILE__, VChild, group);
|
||||
theCommands.Add("vparent",
|
||||
"vparent parent [-ignoreVisu]"
|
||||
"\n\t\t: Command for testing object properties as parent in the hierarchy."
|
||||
"\n\t\t: Arguments:"
|
||||
"\n\t\t: -ignoreVisu do not propagate the visual state (display/erase/color) to children objects",
|
||||
__FILE__, VParent, group);
|
||||
theCommands.Add ("vcomputehlr",
|
||||
"vcomputehlr shapeInput hlrResult [-algoType {algo|polyAlgo}=polyAlgo]"
|
||||
"\n\t\t: [eyeX eyeY eyeZ dirX dirY dirZ upX upY upZ]"
|
||||
"\n\t\t: [-showTangentEdges {on|off}=off] [-nbIsolines N=0] [-showHiddenEdges {on|off}=off]"
|
||||
"\n\t\t: Arguments:"
|
||||
"\n\t\t: shapeInput - name of the initial shape"
|
||||
"\n\t\t: hlrResult - result HLR object from initial shape"
|
||||
"\n\t\t: eye, dir are eye position and look direction"
|
||||
"\n\t\t: up is the look up direction vector"
|
||||
"\n\t\t: -algoType HLR algorithm to use"
|
||||
"\n\t\t: -showTangentEdges include tangent edges"
|
||||
"\n\t\t: -nbIsolines include isolines"
|
||||
"\n\t\t: -showHiddenEdges include hidden edges"
|
||||
"\n\t\t: Use vtop to see projected HLR shape.",
|
||||
__FILE__, VComputeHLR, group);
|
||||
addCmd ("vdrawsphere", VDrawSphere, /* [vdrawsphere] */ R"(
|
||||
vdrawsphere shapeName Fineness [X=0.0 Y=0.0 Z=0.0] [Radius=100.0] [ToShowEdges=0] [ToPrintInfo=1]
|
||||
)" /* [vdrawsphere] */);
|
||||
|
||||
theCommands.Add("vdrawparray",
|
||||
"vdrawparray name TypeOfArray={points|segments|polylines|triangles"
|
||||
"\n\t\t: |trianglefans|trianglestrips|quads|quadstrips|polygons}"
|
||||
"\n\t\t: [-deinterleaved|-mutable]"
|
||||
"\n\t\t: [vertex={'v' x y z [normal={'n' nx ny nz}] [color={'c' r g b}] [texel={'t' tx ty}]]"
|
||||
"\n\t\t: [bound= {'b' nbVertices [bound_color={'c' r g b}]]"
|
||||
"\n\t\t: [edge= {'e' vertexId]"
|
||||
"\n\t\t: [-shape shapeName] [-patch]"
|
||||
"\n\t\t: Commands create an Interactive Object for specified Primitive Array definition (Graphic3d_ArrayOfPrimitives)"
|
||||
"\n\t\t: with the main purpose is covering various combinations by tests",
|
||||
__FILE__,VDrawPArray,group);
|
||||
addCmd ("vlocation", VSetLocation, /* [vlocation] */ R"(
|
||||
vlocation name
|
||||
[-reset] [-copyFrom otherName]
|
||||
[-translate X Y [Z]] [-rotate x y z dx dy dz angle] [-scale [X Y Z] scale]
|
||||
[-pretranslate X Y [Z]] [-prerotate x y z dx dy dz angle] [-prescale [X Y Z] scale]
|
||||
[-mirror x y z dx dy dz] [-premirror x y z dx dy dz]
|
||||
[-setLocation X Y [Z]] [-setRotation QX QY QZ QW] [-setScale [X Y Z] scale]
|
||||
Object local transformation management:
|
||||
-reset resets transformation to identity
|
||||
-translate applies translation vector
|
||||
-rotate applies rotation around axis
|
||||
-scale applies scale factor with optional anchor
|
||||
-mirror applies mirror transformation
|
||||
-pretranslate pre-multiplies translation vector
|
||||
-prerotate pre-multiplies rotation around axis
|
||||
-prescale pre-multiplies scale transformation
|
||||
-premirror pre-multiplies mirror transformation
|
||||
-setLocation overrides translation part
|
||||
-setRotation overrides rotation part with specified quaternion
|
||||
-setScale overrides scale factor
|
||||
)" /* [vlocation] */);
|
||||
|
||||
theCommands.Add("vconnect",
|
||||
"vconnect name Xo Yo Zo object1 object2 ... [color=NAME]"
|
||||
"\n\t\t: Creates and displays AIS_ConnectedInteractive object from input object and location.",
|
||||
__FILE__, VConnect, group);
|
||||
addCmd ("vsetlocation", VSetLocation, /* [vsetlocation] */ R"(
|
||||
Alias for vlocation
|
||||
)" /* [vsetlocation] */);
|
||||
|
||||
theCommands.Add("vconnectto",
|
||||
"vconnectto : instance_name Xo Yo Zo object [-nodisplay|-noupdate|-update]"
|
||||
" Makes an instance 'instance_name' of 'object' with position (Xo Yo Zo)."
|
||||
"\n\t\t: -nodisplay - only creates interactive object, but not displays it",
|
||||
__FILE__, VConnectTo,group);
|
||||
addCmd ("vchild", VChild, /* [vchild] */ R"(
|
||||
vchild parent [-add] [-remove] [-ignoreParentTrsf {0|1}] child1 [child2] [...]
|
||||
Command for testing low-level presentation connections.
|
||||
vconnect command should be used instead.
|
||||
)" /* [vchild] */);
|
||||
|
||||
theCommands.Add("vdisconnect",
|
||||
"vdisconnect assembly_name (object_name | object_number | 'all')"
|
||||
" Disconnects all objects from assembly or disconnects object by name or number (use vlistconnected to enumerate assembly children).",
|
||||
__FILE__,VDisconnect,group);
|
||||
addCmd ("vparent", VParent, /* [vparent] */ R"(
|
||||
vparent parent [-ignoreVisu]
|
||||
Command for testing object properties as parent in the hierarchy.
|
||||
-ignoreVisu do not propagate the visual state (display/erase/color) to children objects
|
||||
)" /* [vparent] */);
|
||||
|
||||
theCommands.Add("vaddconnected",
|
||||
"vaddconnected assembly_name object_name"
|
||||
"Adds object to assembly.",
|
||||
__FILE__,VAddConnected,group);
|
||||
addCmd ("vcomputehlr", VComputeHLR, /* [vcomputehlr] */ R"(
|
||||
vcomputehlr shapeInput hlrResult [-algoType {algo|polyAlgo}=polyAlgo]
|
||||
[eyeX eyeY eyeZ dirX dirY dirZ upX upY upZ]
|
||||
[-showTangentEdges {on|off}=off] [-nbIsolines N=0] [-showHiddenEdges {on|off}=off]
|
||||
Arguments:
|
||||
shapeInput - name of the initial shape
|
||||
hlrResult - result HLR object from initial shape
|
||||
eye, dir are eye position and look direction
|
||||
up is the look up direction vector
|
||||
-algoType HLR algorithm to use
|
||||
-showTangentEdges include tangent edges
|
||||
-nbIsolines include isolines
|
||||
-showHiddenEdges include hidden edges
|
||||
Use vtop to see projected HLR shape.
|
||||
)" /* [vcomputehlr] */);
|
||||
|
||||
theCommands.Add("vlistconnected",
|
||||
"vlistconnected assembly_name"
|
||||
"Lists objects in assembly.",
|
||||
__FILE__,VListConnected,group);
|
||||
addCmd ("vdrawparray", VDrawPArray, /* [vdrawparray] */ R"(
|
||||
vdrawparray name TypeOfArray={points|segments|polylines|triangles
|
||||
|trianglefans|trianglestrips|quads|quadstrips|polygons}
|
||||
[-deinterleaved|-mutable]
|
||||
[vertex={'v' x y z [normal={'n' nx ny nz}] [color={'c' r g b}] [texel={'t' tx ty}]]
|
||||
[bound= {'b' nbVertices [bound_color={'c' r g b}]]
|
||||
[edge= {'e' vertexId]
|
||||
[-shape shapeName] [-patch]
|
||||
Commands create an Interactive Object for specified Primitive Array definition
|
||||
with the main purpose is covering various combinations by tests.
|
||||
)" /* [vdrawparray] */);
|
||||
|
||||
addCmd ("vconnect", VConnect, /* [vconnect] */ R"(
|
||||
vconnect name Xo Yo Zo object1 object2 ... [color=NAME]
|
||||
Creates and displays AIS_ConnectedInteractive object from input object and location.
|
||||
)" /* [vconnect] */);
|
||||
|
||||
theCommands.Add("vselmode",
|
||||
"vselmode [object] selectionMode {on|off}"
|
||||
"\n\t\t: [{-add|-set|-globalOrLocal}=-globalOrLocal]"
|
||||
"\n\t\t: Switches selection mode for the specified object or for all objects in context."
|
||||
"\n\t\t: Selection mode is either an integer number specific to Interactive Object,"
|
||||
"\n\t\t: or sub-shape type in case of AIS_Shape:"
|
||||
"\n\t\t: Shape, Vertex, Edge, Wire, Face, Shell, Solid, CompSolid, Compound"
|
||||
"\n\t\t: The integer mode 0 (Shape in case of AIS_Shape) is reserved for selecting object as whole."
|
||||
"\n\t\t: Additional options:"
|
||||
"\n\t\t: -add already activated selection modes will be left activated"
|
||||
"\n\t\t: -set already activated selection modes will be deactivated"
|
||||
"\n\t\t: -globalOrLocal (default) if new mode is Global selection mode,"
|
||||
"\n\t\t: then active local selection modes will be deactivated"
|
||||
"\n\t\t: and the samthen active local selection modes will be deactivated",
|
||||
__FILE__, VSetSelectionMode, group);
|
||||
addCmd ("vconnectto", VConnectTo, /* [vconnectto] */ R"(
|
||||
vconnectto instance_name Xo Yo Zo object [-nodisplay|-noupdate|-update]
|
||||
Makes an instance 'instance_name' of 'object' with position (Xo Yo Zo).
|
||||
-nodisplay - only creates interactive object, but not displays it.
|
||||
)" /* [vconnectto] */);
|
||||
|
||||
theCommands.Add("vselnext",
|
||||
"vselnext : hilight next detected",
|
||||
__FILE__, VSelectionNext, group);
|
||||
addCmd ("vdisconnect", VDisconnect, /* [vdisconnect] */ R"(
|
||||
vdisconnect assembly_name {object_name|object_number|'all'}
|
||||
Disconnects all objects from assembly or disconnects object by name or number.
|
||||
Use vlistconnected to enumerate assembly children.
|
||||
)" /* [vdisconnect] */);
|
||||
|
||||
theCommands.Add("vselprev",
|
||||
"vselnext : hilight previous detected",
|
||||
__FILE__, VSelectionPrevious, group);
|
||||
addCmd ("vaddconnected", VAddConnected, /* [vaddconnected] */ R"(
|
||||
vaddconnected assembly_name object_name
|
||||
Adds object to assembly.
|
||||
)" /* [vaddconnected] */);
|
||||
|
||||
theCommands.Add("vtriangle",
|
||||
"vtriangle Name PointName PointName PointName"
|
||||
"\n\t\t: Creates and displays a filled triangle from named points.",
|
||||
__FILE__, VTriangle,group);
|
||||
addCmd ("vlistconnected", VListConnected, /* [vlistconnected] */ R"(
|
||||
vlistconnected assembly_name
|
||||
Lists objects in assembly.
|
||||
)" /* [vlistconnected] */);
|
||||
|
||||
theCommands.Add("vsegment",
|
||||
"vsegment Name PointName PointName"
|
||||
"\n\t\t: Creates and displays a segment from named points.",
|
||||
__FILE__, VTriangle,group);
|
||||
addCmd ("vselmode", VSetSelectionMode, /* [vselmode] */ R"(
|
||||
vselmode [object] selectionMode {on|off}
|
||||
[{-add|-set|-globalOrLocal}=-globalOrLocal]
|
||||
Switches selection mode for the specified object or for all objects in context.
|
||||
Selection mode is either an integer number specific to Interactive Object,
|
||||
or sub-shape type in case of AIS_Shape:
|
||||
Shape, Vertex, Edge, Wire, Face, Shell, Solid, CompSolid, Compound
|
||||
The integer mode 0 (Shape in case of AIS_Shape) is reserved for selecting object as whole.
|
||||
Additional options:
|
||||
-add already activated selection modes will be left activated
|
||||
-set already activated selection modes will be deactivated
|
||||
-globalOrLocal (default) if new mode is Global selection mode,
|
||||
then active local selection modes will be deactivated
|
||||
and the samthen active local selection modes will be deactivated
|
||||
)" /* [vselmode] */);
|
||||
|
||||
theCommands.Add ("vtorus",
|
||||
"vtorus name [R1 R2 [Angle1=0 Angle2=360] [Angle=360]]"
|
||||
"\n\t\t: [-radius R1] [-pipeRadius R2]"
|
||||
"\n\t\t: [-pipeAngle Angle=360] [-segmentAngle1 Angle1=0 -segmentAngle2 Angle2=360]"
|
||||
"\n\t\t: [-nbSlices Number=100] [-nbStacks Number=100] [-noupdate]"
|
||||
"\n\t\t: Creates and displays a torus or torus segment."
|
||||
"\n\t\t: Parameters of the torus :"
|
||||
"\n\t\t: - R1 distance from the center of the pipe to the center of the torus"
|
||||
"\n\t\t: - R2 radius of the pipe"
|
||||
"\n\t\t: - Angle1 first angle to create a torus ring segment"
|
||||
"\n\t\t: - Angle2 second angle to create a torus ring segment"
|
||||
"\n\t\t: - Angle angle to create a torus pipe segment",
|
||||
__FILE__, VTorus, group);
|
||||
addCmd ("vselnext", VSelectionNext, /* [vselnext] */ R"(
|
||||
vselnext : hilight next detected
|
||||
)" /* [vselnext] */);
|
||||
|
||||
theCommands.Add ("vcylinder",
|
||||
"vcylinder name [R1 R2 Height] [-height H] [-radius R] [-bottomRadius R1 -topRadius R2]"
|
||||
"\n\t\t: [-nbSlices Number=100] [-noupdate]"
|
||||
"\n\t\t: Creates and displays a cylinder."
|
||||
"\n\t\t: Parameters of the cylinder :"
|
||||
"\n\t\t: - R1 cylinder bottom radius"
|
||||
"\n\t\t: - R2 cylinder top radius"
|
||||
"\n\t\t: - Height cylinder height",
|
||||
__FILE__, VCylinder, group);
|
||||
addCmd ("vselprev", VSelectionPrevious, /* [vselprev] */ R"(
|
||||
vselnext : hilight previous detected
|
||||
)" /* [vselprev] */);
|
||||
|
||||
theCommands.Add ("vsphere",
|
||||
"vsphere name [-radius] R"
|
||||
"\n\t\t: [-nbSlices Number=100] [-nbStacks Number=100] [-noupdate]"
|
||||
"\n\t\t: Creates and displays a sphere.",
|
||||
__FILE__, VSphere, group);
|
||||
addCmd ("vtriangle", VTriangle, /* [vtriangle] */ R"(
|
||||
vtriangle Name PointName PointName PointName
|
||||
Creates and displays a filled triangle from named points.
|
||||
)" /* [vtriangle] */);
|
||||
|
||||
theCommands.Add("vobjzlayer",
|
||||
"vobjzlayer : set/get object [layerid] - set or get z layer id for the interactive object",
|
||||
__FILE__, VObjZLayer, group);
|
||||
addCmd ("vsegment", VTriangle, /* [vsegment] */ R"(
|
||||
vsegment Name PointName PointName
|
||||
Creates and displays a segment from named points.
|
||||
)" /* [vsegment] */);
|
||||
|
||||
addCmd ("vtorus", VTorus, /* [vtorus] */ R"(
|
||||
vtorus name [R1 R2 [Angle1=0 Angle2=360] [Angle=360]]
|
||||
[-radius R1] [-pipeRadius R2]
|
||||
[-pipeAngle Angle=360] [-segmentAngle1 Angle1=0 -segmentAngle2 Angle2=360]
|
||||
[-nbSlices Number=100] [-nbStacks Number=100] [-noupdate]
|
||||
Creates and displays a torus or torus segment.
|
||||
Parameters of the torus:
|
||||
- R1 distance from the center of the pipe to the center of the torus
|
||||
- R2 radius of the pipe
|
||||
- Angle1 first angle to create a torus ring segment
|
||||
- Angle2 second angle to create a torus ring segment
|
||||
- Angle angle to create a torus pipe segment
|
||||
)" /* [vtorus] */);
|
||||
|
||||
addCmd ("vcylinder", VCylinder, /* [vcylinder] */ R"(
|
||||
vcylinder name [R1 R2 Height] [-height H] [-radius R] [-bottomRadius R1 -topRadius R2]
|
||||
[-nbSlices Number=100] [-noupdate]
|
||||
Creates and displays a cylinder.
|
||||
Parameters of the cylinder:
|
||||
- R1 cylinder bottom radius
|
||||
- R2 cylinder top radius
|
||||
- Height cylinder height
|
||||
)" /* [vcylinder] */);
|
||||
|
||||
addCmd ("vsphere", VSphere, /* [vsphere] */ R"(
|
||||
vsphere name [-radius] R
|
||||
[-nbSlices Number=100] [-nbStacks Number=100] [-noupdate]
|
||||
Creates and displays a sphere.
|
||||
)" /* [vsphere] */);
|
||||
|
||||
addCmd ("vobjzlayer", VObjZLayer, /* [vobjzlayer] */ R"(
|
||||
vobjzlayer : set/get object [layerid] - set or get z layer id for the interactive object
|
||||
)" /* [vobjzlayer] */);
|
||||
|
||||
theCommands.Add("vpolygonoffset",
|
||||
"vpolygonoffset : [object [mode factor units]] - sets/gets polygon offset parameters for an object, without arguments prints the default values",
|
||||
__FILE__, VPolygonOffset, group);
|
||||
addCmd ("vpolygonoffset", VPolygonOffset, /* [vpolygonoffset] */ R"(
|
||||
vpolygonoffset [object [mode factor units]]
|
||||
Sets/gets polygon offset parameters for an object; without arguments prints the default values
|
||||
)" /* [vpolygonoffset] */);
|
||||
|
||||
theCommands.Add ("vmarkerstest",
|
||||
"vmarkerstest: name X Y Z [PointsOnSide=10] [MarkerType=0] [Scale=1.0] [FileName=ImageFile]\n",
|
||||
__FILE__, VMarkersTest, group);
|
||||
addCmd ("vmarkerstest", VMarkersTest, /* [vmarkerstest] */ R"(
|
||||
vmarkerstest: name X Y Z [PointsOnSide=10] [MarkerType=0] [Scale=1.0] [FileName=ImageFile]
|
||||
)" /* [vmarkerstest] */);
|
||||
|
||||
theCommands.Add ("text2brep",
|
||||
"text2brep: name text"
|
||||
"\n\t\t: [-pos X=0 Y=0 Z=0]"
|
||||
"\n\t\t: [-halign {left|center|right}=left]"
|
||||
"\n\t\t: [-valign {top|center|bottom|topfirstline}=bottom}]"
|
||||
"\n\t\t: [-height height=16]"
|
||||
"\n\t\t: [-aspect {regular|bold|italic|boldItalic}=regular]"
|
||||
"\n\t\t: [-font font=Courier] [-strict {strict|aliases|any}=any]"
|
||||
"\n\t\t: [-composite {on|off}=off]"
|
||||
"\n\t\t: [-plane NormX NormY NormZ DirX DirY DirZ]",
|
||||
__FILE__, TextToBRep, group);
|
||||
theCommands.Add ("vfont",
|
||||
"vfont [-add pathToFont [fontName] [regular,bold,italic,boldItalic=undefined] [singleStroke]]"
|
||||
"\n\t\t: [-strict {any|aliases|strict}] [-find fontName [regular,bold,italic,boldItalic=undefined]] [-verbose {on|off}]"
|
||||
"\n\t\t: [-findAll fontNameMask] [-findInfo fontName]"
|
||||
"\n\t\t: [-unicodeFallback {on|off}]"
|
||||
"\n\t\t: [-clear] [-init] [-list] [-names]"
|
||||
"\n\t\t: [-aliases [aliasName]] [-addAlias Alias FontName] [-removeAlias Alias FontName] [-clearAlias Alias] [-clearAliases]"
|
||||
"\n\t\t: Work with font registry - register font, list available fonts, find font."
|
||||
"\n\t\t: -findAll is same as -find, but can print more than one font when mask is passed."
|
||||
"\n\t\t: -findInfo is same as -find, but prints complete font information instead of family name.",
|
||||
__FILE__, VFont, group);
|
||||
addCmd ("text2brep", TextToBRep, /* [text2brep] */ R"(
|
||||
text2brep name text"
|
||||
[-pos X=0 Y=0 Z=0]"
|
||||
[-halign {left|center|right}=left]"
|
||||
[-valign {top|center|bottom|topfirstline}=bottom}]"
|
||||
[-height height=16]"
|
||||
[-aspect {regular|bold|italic|boldItalic}=regular]"
|
||||
[-font font=Courier] [-strict {strict|aliases|any}=any]"
|
||||
[-composite {on|off}=off]"
|
||||
[-plane NormX NormY NormZ DirX DirY DirZ]",
|
||||
)" /* [text2brep] */);
|
||||
|
||||
theCommands.Add ("vvertexmode",
|
||||
"vvertexmode [name | -set {isolated | all | inherited} [name1 name2 ...]]\n"
|
||||
"vvertexmode - prints the default vertex draw mode\n"
|
||||
"vvertexmode name - prints the vertex draw mode of the given object\n"
|
||||
"vvertexmode -set {isolated | all | inherited} - sets the default vertex draw mode and updates the mode for all displayed objects\n"
|
||||
"vvertexmode -set {isolated | all | inherited} name1 name2 ... - sets the vertex draw mode for the specified object(s)\n",
|
||||
__FILE__, VVertexMode, group);
|
||||
addCmd ("vfont", VFont, /* [vfont] */ R"(
|
||||
vfont [-add pathToFont [fontName] [regular,bold,italic,boldItalic=undefined] [singleStroke]]
|
||||
[-strict {any|aliases|strict}] [-find fontName [regular,bold,italic,boldItalic=undefined]]
|
||||
[-verbose {on|off}]
|
||||
[-findAll fontNameMask] [-findInfo fontName]
|
||||
[-unicodeFallback {on|off}]
|
||||
[-clear] [-init] [-list] [-names]
|
||||
[-aliases [aliasName]] [-addAlias Alias FontName] [-removeAlias Alias FontName]
|
||||
[-clearAlias Alias] [-clearAliases]
|
||||
Work with font registry - register font, list available fonts, find font.
|
||||
-findAll is same as -find, but can print more than one font when mask is passed.
|
||||
-findInfo is same as -find, but prints complete font information instead of family name.
|
||||
)" /* [vfont] */);
|
||||
|
||||
theCommands.Add ("vpointcloud",
|
||||
"vpointcloud name shape [-randColor] [-normals] [-noNormals] [-uv]"
|
||||
"\n\t\t: Create an interactive object for arbitrary set of points"
|
||||
"\n\t\t: from triangulated shape."
|
||||
"\n"
|
||||
"vpointcloud name x y z r npts {surface|volume}\n"
|
||||
" ... [-randColor] [-normals] [-noNormals] [-uv]"
|
||||
"\n\t\t: Create arbitrary set of points (npts) randomly distributed"
|
||||
"\n\t\t: on spheric surface or within spheric volume (x y z r)."
|
||||
"\n\t\t:"
|
||||
"\n\t\t: Additional options:"
|
||||
"\n\t\t: -randColor - generate random color per point"
|
||||
"\n\t\t: -normals - generate normal per point (default)"
|
||||
"\n\t\t: -noNormals - do not generate normal per point"
|
||||
"\n",
|
||||
__FILE__, VPointCloud, group);
|
||||
addCmd ("vvertexmode", VVertexMode, /* [vvertexmode] */ R"(
|
||||
vvertexmode [name | -set {isolated|all|inherited} [name1 name2 ...]]
|
||||
Sets the vertex draw mode for the specified object(s)
|
||||
or sets default vertex draw mode and updates the mode for all displayed objects.
|
||||
Prints the default vertex draw mode without -set parameter.
|
||||
)" /* [vvertexmode] */);
|
||||
|
||||
theCommands.Add("vpriority",
|
||||
"vpriority [-noupdate|-update] name [value]\n\t\t prints or sets the display priority for an object",
|
||||
__FILE__,
|
||||
VPriority, group);
|
||||
addCmd ("vpointcloud", VPointCloud, /* [vpointcloud] */ R"(
|
||||
vpointcloud name shape [-randColor] [-normals] [-noNormals] [-uv]
|
||||
Create an interactive object for arbitrary set of points from triangulated shape.
|
||||
|
||||
theCommands.Add ("vnormals",
|
||||
"vnormals usage:\n"
|
||||
"vnormals Shape [{on|off}=on] [-length {10}] [-nbAlongU {1}] [-nbAlongV {1}] [-nbAlong {1}]"
|
||||
"\n\t\t: [-useMesh] [-oriented {0}1}=0]"
|
||||
"\n\t\t: Displays/Hides normals calculated on shape geometry or retrieved from triangulation",
|
||||
__FILE__, VNormals, group);
|
||||
vpointcloud name x y z r npts {surface|volume}
|
||||
... [-randColor] [-normals] [-noNormals] [-uv]
|
||||
Create arbitrary set of points (npts) randomly distributed
|
||||
on spheric surface or within spheric volume (x y z r).
|
||||
|
||||
Additional options:
|
||||
-randColor - generate random color per point
|
||||
-normals - generate normal per point (default)
|
||||
-noNormals - do not generate normal per point
|
||||
)" /* [vpointcloud] */);
|
||||
|
||||
addCmd ("vpriority", VPriority, /* [vpriority] */ R"(
|
||||
vpriority [-noupdate|-update] name [value]
|
||||
Prints or sets the display priority for an object.
|
||||
)" /* [vpriority] */);
|
||||
|
||||
addCmd ("vnormals", VNormals, /* [vnormals] */ R"(
|
||||
vnormals Shape [{on|off}=on] [-length {10}] [-nbAlongU {1}] [-nbAlongV {1}] [-nbAlong {1}]
|
||||
[-useMesh] [-oriented {0}1}=0]
|
||||
Displays/Hides normals calculated on shape geometry or retrieved from triangulation
|
||||
)" /* [vnormals] */);
|
||||
}
|
||||
|
@ -1161,48 +1161,61 @@ static Standard_Integer VGenEnvLUT (Draw_Interpretor&,
|
||||
|
||||
void ViewerTest::OpenGlCommands(Draw_Interpretor& theCommands)
|
||||
{
|
||||
const char* aGroup ="Commands for low-level TKOpenGl features";
|
||||
const char* aGroup = "AIS Viewer";
|
||||
const char* aFileName = __FILE__;
|
||||
auto addCmd = [&](const char* theName, Draw_Interpretor::CommandFunction theFunc, const char* theHelp)
|
||||
{
|
||||
theCommands.Add (theName, theHelp, aFileName, theFunc, aGroup);
|
||||
};
|
||||
|
||||
theCommands.Add("vimmediatefront",
|
||||
"vimmediatefront : render immediate mode to front buffer or to back buffer",
|
||||
__FILE__, VImmediateFront, aGroup);
|
||||
theCommands.Add("vglinfo",
|
||||
"vglinfo [-short|-basic|-complete] [-lineWidth Value=80]"
|
||||
"\n\t\t: [GL_VENDOR] [GL_RENDERER] [GL_VERSION]"
|
||||
"\n\t\t: [GL_SHADING_LANGUAGE_VERSION] [GL_EXTENSIONS]"
|
||||
"\n\t\t: print OpenGL info."
|
||||
"\n\t\t: -lineWidth split values longer than specified value into multiple lines;"
|
||||
"\n\t\t: -1 disables splitting.",
|
||||
__FILE__, VGlInfo, aGroup);
|
||||
theCommands.Add("vshader",
|
||||
"vshader name -vert VertexShader -frag FragmentShader [-geom GeometryShader]"
|
||||
"\n\t\t: [-off] [-phong] [-aspect {shading|line|point|text}=shading]"
|
||||
"\n\t\t: [-header VersionHeader]"
|
||||
"\n\t\t: [-tessControl TessControlShader -tesseval TessEvaluationShader]"
|
||||
"\n\t\t: [-uniform Name FloatValue]"
|
||||
"\n\t\t: Assign custom GLSL program to presentation aspects.",
|
||||
__FILE__, VShaderProg, aGroup);
|
||||
theCommands.Add("vshaderprog", "Alias for vshader", __FILE__, VShaderProg, aGroup);
|
||||
theCommands.Add("vlistmaterials",
|
||||
"vlistmaterials [*] [MaterialName1 [MaterialName2 [...]]] [dump.obj|dump.html]"
|
||||
"\n\t\t: Without arguments, command prints the list of standard materials."
|
||||
"\n\t\t: Otherwise, properties of specified materials will be printed"
|
||||
"\n\t\t: or dumped into specified file."
|
||||
"\n\t\t: * can be used to refer to complete list of standard materials.",
|
||||
__FILE__, VListMaterials, aGroup);
|
||||
theCommands.Add("vlistcolors",
|
||||
"vlistcolors [*] [ColorName1 [ColorName2 [...]]] [dump.html]"
|
||||
"\n\t\t: Without arguments, command prints the list of standard colors."
|
||||
"\n\t\t: Otherwise, properties of specified colors will be printed"
|
||||
"\n\t\t: or dumped into specified file."
|
||||
"\n\t\t: * can be used to refer to complete list of standard colors.",
|
||||
__FILE__, VListColors, aGroup);
|
||||
theCommands.Add("vgenenvlut",
|
||||
"vgenenvlut [-size size = 128] [-nbsamples nbsamples = 1024]"
|
||||
"\n\t\t: Generates PBR environment look up table."
|
||||
"\n\t\t: Saves it as C++ source file which is expected to be included in code."
|
||||
"\n\t\t: The path where result will be located is 'Graphic3d_TextureRoot::TexturesFolder()'."
|
||||
"\n\t\t: -size size of one side of resulted square table"
|
||||
"\n\t\t: -nbsamples number of samples used in Monte-Carlo integration",
|
||||
__FILE__, VGenEnvLUT, aGroup);
|
||||
addCmd ("vimmediatefront", VImmediateFront, /* [vimmediatefront] */ R"(
|
||||
vimmediatefront : render immediate mode to front buffer or to back buffer
|
||||
)" /* [vimmediatefront] */);
|
||||
|
||||
addCmd ("vglinfo", VGlInfo, /* [vglinfo] */ R"(
|
||||
vglinfo [-short|-basic|-complete] [-lineWidth Value=80]
|
||||
[GL_VENDOR] [GL_RENDERER] [GL_VERSION]
|
||||
[GL_SHADING_LANGUAGE_VERSION] [GL_EXTENSIONS]
|
||||
Print OpenGL info.
|
||||
-lineWidth split values longer than specified value into multiple lines;
|
||||
-1 disables splitting.
|
||||
)" /* [vglinfo] */);
|
||||
|
||||
addCmd ("vshader", VShaderProg, /* [vshader] */ R"(
|
||||
vshader name -vert VertexShader -frag FragmentShader [-geom GeometryShader]
|
||||
[-off] [-phong] [-aspect {shading|line|point|text}=shading]
|
||||
[-header VersionHeader]
|
||||
[-tessControl TessControlShader -tessEval TessEvaluationShader]
|
||||
[-uniform Name FloatValue]
|
||||
Assign custom GLSL program to presentation aspects.
|
||||
)" /* [vshader] */);
|
||||
|
||||
addCmd ("vshaderprog", VShaderProg, /* [vshaderprog] */ R"(
|
||||
Alias for vshader
|
||||
)" /* [vshaderprog] */);
|
||||
|
||||
addCmd ("vlistmaterials", VListMaterials, /* [vlistmaterials] */ R"(
|
||||
vlistmaterials [*] [MaterialName1 [MaterialName2 [...]]] [dump.obj|dump.html]
|
||||
Without arguments, command prints the list of standard materials.
|
||||
Otherwise, properties of specified materials will be printed
|
||||
or dumped into specified file.
|
||||
* can be used to refer to complete list of standard materials.
|
||||
)" /* [vlistmaterials] */);
|
||||
|
||||
addCmd ("vlistcolors", VListColors, /* [vlistcolors] */ R"(
|
||||
vlistcolors [*] [ColorName1 [ColorName2 [...]]] [dump.html]
|
||||
Without arguments, command prints the list of standard colors.
|
||||
Otherwise, properties of specified colors will be printed
|
||||
or dumped into specified file.
|
||||
* can be used to refer to complete list of standard colors.
|
||||
)" /* [vlistcolors] */);
|
||||
|
||||
addCmd ("vgenenvlut", VGenEnvLUT, /* [vgenenvlut] */ R"(
|
||||
vgenenvlut [-size size = 128] [-nbsamples nbsamples = 1024]
|
||||
Generates PBR environment look up table.
|
||||
Saves it as C++ source file which is expected to be included in code.
|
||||
The path where result will be located is 'Graphic3d_TextureRoot::TexturesFolder()'.
|
||||
-size size of one side of resulted square table
|
||||
-nbsamples number of samples used in Monte-Carlo integration
|
||||
)" /* [vgenenvlut] */);
|
||||
}
|
||||
|
@ -1924,86 +1924,89 @@ static int VMoveDim (Draw_Interpretor& theDi, Standard_Integer theArgNum, const
|
||||
|
||||
void ViewerTest::RelationCommands(Draw_Interpretor& theCommands)
|
||||
{
|
||||
const char *group = "AISRelations";
|
||||
const char* aGroup = "AIS Viewer";
|
||||
const char* aFileName = __FILE__;
|
||||
auto addCmd = [&](const char* theName, Draw_Interpretor::CommandFunction theFunc, const char* theHelp)
|
||||
{
|
||||
theCommands.Add (theName, theHelp, aFileName, theFunc, aGroup);
|
||||
};
|
||||
|
||||
theCommands.Add("vdimension",
|
||||
"vdimension name {-angle|-length|-radius|-diameter}"
|
||||
"[-shapes shape1 [shape2 [shape3]]\n"
|
||||
"[-selected]\n"
|
||||
"[-text 3d|2d wf|sh|wireframe|shading IntegerSize]\n"
|
||||
"[-font FontName]\n"
|
||||
"[-label left|right|hcenter|hfit top|bottom|vcenter|vfit]\n"
|
||||
"[-arrow external|internal|fit]\n"
|
||||
"[-zoomablearrow]\n"
|
||||
"[{-arrowlength|-arlen} RealArrowLength]\n"
|
||||
"[{-arrowangle|-arangle} ArrowAngle(degrees)]\n"
|
||||
"[-plane xoy|yoz|zox]\n"
|
||||
"[-flyout FloatValue -extension FloatValue]\n"
|
||||
"[-autovalue]\n"
|
||||
"[-value CustomRealValue]\n"
|
||||
"[-textvalue CustomTextValue]\n"
|
||||
"[-dispunits DisplayUnitsString]\n"
|
||||
"[-modelunits ModelUnitsString]\n"
|
||||
"[-showunits | -hideunits]\n"
|
||||
" -Builds angle, length, radius and diameter dimensions.\n"
|
||||
" -See also: vdimparam, vmovedim.\n",
|
||||
__FILE__,VDimBuilder,group);
|
||||
addCmd ("vdimension", VDimBuilder, /* [vdimension] */ R"(
|
||||
vdimension name {-angle|-length|-radius|-diameter}
|
||||
[-shapes shape1 [shape2 [shape3]]
|
||||
[-selected]
|
||||
[-text 3d|2d wf|sh|wireframe|shading IntegerSize]
|
||||
[-font FontName]
|
||||
[-label left|right|hcenter|hfit top|bottom|vcenter|vfit]
|
||||
[-arrow external|internal|fit]
|
||||
[-zoomablearrow]
|
||||
[{-arrowlength|-arlen} RealArrowLength]
|
||||
[{-arrowangle|-arangle} ArrowAngle(degrees)]
|
||||
[-plane xoy|yoz|zox]
|
||||
[-flyout FloatValue -extension FloatValue]
|
||||
[-autovalue]
|
||||
[-value CustomRealValue]
|
||||
[-textvalue CustomTextValue]
|
||||
[-dispunits DisplayUnitsString]
|
||||
[-modelunits ModelUnitsString]
|
||||
[-showunits | -hideunits]
|
||||
Builds angle, length, radius and diameter dimensions.
|
||||
See also: vdimparam, vmovedim.
|
||||
)" /* [vdimension] */);
|
||||
|
||||
theCommands.Add ("vrelation",
|
||||
"vrelation name {-concentric|-equaldistance|-equalradius|-fix|-identic|-offset|-parallel|-perpendicular|-tangent|-symmetric}"
|
||||
"\n\t\t: concentric - 2 circled edges."
|
||||
"\n\t\t: equaldistance - 4 vertex/edges."
|
||||
"\n\t\t: equalradius - 1 or 2 circled edges."
|
||||
"\n\t\t: fix - 1 edge."
|
||||
"\n\t\t: identic - 2 faces, edges or vertices."
|
||||
"\n\t\t: offset - 2 faces."
|
||||
"\n\t\t: parallel - 2 faces or 2 edges."
|
||||
"\n\t\t: perpendicular - 2 faces or 2 edges."
|
||||
"\n\t\t: tangent - two coplanar edges (first the circular edge then the tangent edge) or two faces."
|
||||
"\n\t\t: symmetric - 3 edges or 1 edge and 2 vertices."
|
||||
"-Builds specific relation from selected objects.",
|
||||
__FILE__, VRelationBuilder, group);
|
||||
addCmd ("vrelation", VRelationBuilder, /* [vrelation] */ R"(
|
||||
vrelation name {-concentric|-equaldistance|-equalradius|-fix|
|
||||
-identic|-offset|-parallel|-perpendicular|-tangent|-symmetric}
|
||||
Builds specific relation from selected objects:
|
||||
-concentric - 2 circled edges
|
||||
-equaldistance - 4 vertex/edges
|
||||
-equalradius - 1 or 2 circled edges
|
||||
-fix - 1 edge
|
||||
-identic - 2 faces, edges or vertices
|
||||
-offset - 2 faces
|
||||
-parallel - 2 faces or 2 edges
|
||||
-perpendicular - 2 faces or 2 edges
|
||||
-tangent - two coplanar edges (first the circular edge then the tangent edge) or two faces
|
||||
-symmetric - 3 edges or 1 edge and 2 vertices
|
||||
)" /* [vrelation] */);
|
||||
|
||||
theCommands.Add("vdimparam",
|
||||
"vdimparam name"
|
||||
"[-text 3d|2d wf|sh|wireframe|shading IntegerSize]\n"
|
||||
"[-font FontName]\n"
|
||||
"[-label left|right|hcenter|hfit top|bottom|vcenter|vfit]\n"
|
||||
"[-arrow external|internal|fit]\n"
|
||||
"[-zoomablearrow 0|1]\n"
|
||||
"[{-arrowlength|-arlen} RealArrowLength]\n"
|
||||
"[{-arrowangle|-arangle} ArrowAngle(degrees)]\n"
|
||||
"[-plane xoy|yoz|zox]\n"
|
||||
"[-flyout FloatValue -extension FloatValue]\n"
|
||||
"[-value CustomNumberValue]\n"
|
||||
"[-textvalue CustomTextValue]\n"
|
||||
"[-dispunits DisplayUnitsString]\n"
|
||||
"[-modelunits ModelUnitsString]\n"
|
||||
"[-showunits | -hideunits]\n"
|
||||
" -Sets parameters for angle, length, radius and diameter dimensions.\n"
|
||||
" -See also: vmovedim, vdimension.\n",
|
||||
__FILE__,VDimParam,group);
|
||||
addCmd ("vdimparam", VDimParam, /* [vdimparam] */ R"(
|
||||
vdimparam name
|
||||
[-text 3d|2d wf|sh|wireframe|shading IntegerSize]
|
||||
[-font FontName]
|
||||
[-label left|right|hcenter|hfit top|bottom|vcenter|vfit]
|
||||
[-arrow external|internal|fit]
|
||||
[-zoomablearrow 0|1]
|
||||
[{-arrowlength|-arlen} RealArrowLength]
|
||||
[{-arrowangle|-arangle} ArrowAngle(degrees)]
|
||||
[-plane xoy|yoz|zox]
|
||||
[-flyout FloatValue -extension FloatValue]
|
||||
[-value CustomNumberValue]
|
||||
[-textvalue CustomTextValue]
|
||||
[-dispunits DisplayUnitsString]
|
||||
[-modelunits ModelUnitsString]
|
||||
[-showunits | -hideunits]
|
||||
Sets parameters for angle, length, radius and diameter dimensions.
|
||||
See also: vmovedim, vdimension.
|
||||
)" /* [vdimparam] */);
|
||||
|
||||
theCommands.Add("vlengthparam",
|
||||
"vlengthparam name"
|
||||
"[-direction {ox|oy|oz|x y z|autodirection}]\n"
|
||||
" -Sets parameters for length dimension.\n"
|
||||
" -See also: vdimparam, vdimension.\n",
|
||||
__FILE__,VLengthParam,group);
|
||||
addCmd ("vlengthparam", VLengthParam, /* [vlengthparam] */ R"(
|
||||
vlengthparam name [-direction {ox|oy|oz|x y z|autodirection}]
|
||||
Sets parameters for length dimension.
|
||||
See also: vdimparam, vdimension.
|
||||
)" /* [vlengthparam] */);
|
||||
|
||||
theCommands.Add("vangleparam",
|
||||
"vangleparam name"
|
||||
"[-type interior|exterior]\n"
|
||||
"[-showarrow first|second|both|none]\n"
|
||||
" -Sets parameters for angle dimension.\n"
|
||||
" -See also: vdimparam, vdimension.\n",
|
||||
__FILE__,VAngleParam,group);
|
||||
|
||||
theCommands.Add("vmovedim",
|
||||
"vmovedim : vmovedim [name] [x y z]"
|
||||
"\n\t\t: Moves picked or named (if name defined)"
|
||||
"\n\t\t: dimension to picked mouse position or input point."
|
||||
"\n\t\t: Text label of dimension 'name' is moved to position, another parts of dimensionare adjusted.",
|
||||
__FILE__,VMoveDim,group);
|
||||
addCmd ("vangleparam", VAngleParam, /* [vangleparam] */ R"(
|
||||
vangleparam name [-type interior|exterior]
|
||||
[-showarrow first|second|both|none]
|
||||
Sets parameters for angle dimension.
|
||||
See also: vdimparam, vdimension.
|
||||
)" /* [vangleparam] */);
|
||||
|
||||
addCmd ("vmovedim", VMoveDim, /* [vmovedim] */ R"(
|
||||
vmovedim [name] [x y z]
|
||||
Moves picked or named (if name defined)
|
||||
dimension to picked mouse position or input point.
|
||||
Text label of dimension 'name' is moved to position, another parts of dimension are adjusted.
|
||||
)" /* [vmovedim] */);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user