-
Notifications
You must be signed in to change notification settings - Fork 13
Update documentation #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kayvv
wants to merge
5
commits into
cmlibs-python:main
Choose a base branch
from
Kayvv:documentation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c7dd608
Update documentation
Kayvv c161f9f
Merge branch 'main' into documentation
Kayvv 383ae17
Update documentation
Kayvv fff06af
Update Sceneviewer Widget Documentation
Kayvv f7f5f6f
Updated graphicseditor widget screenshot for documentation
Kayvv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,153 @@ | ||
| .. _Graphics-Editor-Widget: | ||
|
|
||
| ====================== | ||
| Graphics Editor Widget | ||
| ====================== | ||
|
|
||
| The **Graphics Editor Widget** is a control to add, remove, and modify the graphics of a scene. | ||
| The **Graphics Editor Widget** is where each graphical setting can be edited. | ||
| When a graphical setting is selected from the list, all of its editable properties appear in this area. | ||
| The range of editable properties will vary depending on the type of graphics currently selected. | ||
|
|
||
| .. _fig-cmlibs-widgets-graphics-editor-widget: | ||
|
|
||
| .. figure:: _images/graphics-editor-widget.png | ||
| :alt: Graphics editor widget. | ||
| :width: 75% | ||
|
|
||
| Graphics editor widget. | ||
|
|
||
| Settings editor | ||
| --------------- | ||
| This widget is normally used within the Scene Editor Widget. The content changes depending on the type of graphics selected in graphic list on Scene Editor Widget. | ||
|
|
||
| .. _curl: http://www.math.umn.edu/~nykamp/m2374/readings/divcurl/ | ||
|
|
||
| General description of graphics | ||
| ------------------------------- | ||
|
|
||
| Graphics are the building blocks used to create any visualization displayed in the :ref:`sceneviewer widget <Sceneviewer-Widget>`. | ||
| They are created, edited, re-ordered and deleted from within the :ref:`scene editor widget <Scene-Editor-Widget>`, or via the Zinc API. Most graphics have the following settings in common: | ||
|
|
||
Kayvv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * Domain: The model domain ``point/nodes/datapoints/mesh1d/mesh2d/mesh3d`` which graphics are built from. Some graphics types support multiple domain types. Special domain ``mesh highest dimension`` uses the highest dimension mesh present in the region. | ||
|
|
||
| * Subgroup: Optional group or field returning non-zero/true to limit graphics display to. | ||
|
|
||
| * Coordinate field: This setting has a drop-down menu showing a list of fields that can be selected as the coordinate field for the selected graphic. This is usually a geometric coordinate field from the model, but any field with up to 3 real components is usable and can be quite powerful: for example, using the principal strain field (over elements points) plots a strain space diagram. | ||
|
|
||
Kayvv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * Coordinate System: This setting can be used to render the graphic according to a range of different coordinate systems. This is useful for creating "static" overlays of data on visualizations. | ||
|
|
||
| * Boundary mode: This drop-down menu allows you to select a boundary, and automatically only render glyphs on the select boundary of a mesh. Options allow display on boundary or interior of mesh or subgroup. | ||
|
|
||
| * Select mode: This drop-down menu allows you to select different selection behaviours for the graphic: | ||
|
|
||
| * select_on - The default setting; graphics are able to be selected and selected items are highlighted by rendering in the *default_selected* material. | ||
| * no_select - No selection or highlighting of the graphic. | ||
| * draw_selected - only selected items are drawn, in the *default_selected* material. | ||
| * draw_unselected - only unselected items are drawn. | ||
|
|
||
| * Wireframe: This checkbox, if checked shows surface graphics as a wireframe mesh, otherwise shaded surfaces are shown. | ||
|
|
||
| * Material: This drop-down menu allows you to select which material should be used to render the graphic. Materials are defined and edited in the :ref:`material editor Widget <Material-Editor-Widget>`. | ||
|
|
||
| * Selected material: This drop-down menu allows you to set which material will be used to render parts of the graphic which are selected. | ||
|
|
||
| * Data: This setting has a drop-down menu, allowing you to select which field will be mapped on to the graphic. This enables you to colour the graphic according to the values of some field, for example. The check box also activates the *spectrum* drop-down menu. | ||
|
|
||
| * Spectrum: This drop-down menu is used to select which spectrum is to be used to colour the graphical element according to the field selected in the *data* setting. Spectrums are edited in the :ref:`spectrum editor widget <Spectrum-Editor-Widget>`. | ||
|
|
||
| * Tessellation: Tessellation settings are used to set the number of polygons or line segments used to approximate curves in the object. Higher tessellations give greater image quality at the expense of rendering time. | ||
|
|
||
| * Tessellation field: This setting has a drop-down menu showing a list of fields that can be selected as the tessellation field for the selected graphic. This approximates element curves with the native resolution of this field multiplied by the resolution from the Tessellation. | ||
|
|
||
| * Line width: This value sets the width of line graphics in pixels including line glyphs. | ||
|
|
||
| * Point size: This value sets the size of point glyphs in pixels. | ||
|
|
||
| .. _types-of-graphics: | ||
|
|
||
| The types of graphics | ||
| --------------------- | ||
|
|
||
| * **point** | ||
|
|
||
| Points are created in one of 4 sub-types which also sets the associated *Domain*: | ||
|
|
||
| * **point** - Show a single point in the scene. Assumes coordinate 0, 0, 0 if no coordinate field is specified. | ||
|
|
||
| * **node points** - Visualize each node point, usually representing vertexes on a mesh. | ||
|
|
||
| * **data points** - Visualize the second set of points, usually representing point data separate from the model. | ||
|
|
||
| * **element points** - Visualize points sampled across elements of 1 to 3 dimensions. | ||
|
|
||
| Points graphics have additional **Point attributes** specifying: | ||
|
|
||
| * The *Glyph* used to visualize the point, a selectable graphic e.g. point, sphere, cube, arrows etc. | ||
| * The *Base size* of the glyph prior to scaling. | ||
| * The *Scale field* orienting and scaling the glyph. | ||
| * The *Scaling* values multiplying the scale field. | ||
| * The *Signed scale field* multiplying the scale but allowing e.g. inward/outward arrows with repeat mode mirror. | ||
| * The *Glyph offset* allows the glyph origin to be offset relative to the scaled axes at the point. | ||
| * The *Repeat mode* allows multiple glyphs to be rendered to make custom glyphs by mirroring or laying out on 2 or 3 axes. | ||
| * The *Label field* specifies a field whose values are written beside the point. Use special field cmiss_number to show node/datapoint/element numbers. | ||
| * The *Label text* allows fixed text strings to be written prior to the label field, with up to 3 strings for different glyph repeat modes. | ||
| * The *Label text offset* allows the label origin to be offset relative to the scaled axes at the point. | ||
| * The *Font* allows different fonts to be chosen for the labels, where supported. | ||
|
|
||
| Points on mesh domains have additional **Sampling attributes**: | ||
|
|
||
| * *Sampling mode* controls number and location of sampled points in terms of tessellation: | ||
| * *cell centres* specifies points at centres of tessellation 'cells'. | ||
| * *cell corners* specifies points at corners of tessellation 'cells'. | ||
| * *cell poisson* randomly generates points in the tessellation 'cells' according to the Density field sampled at the centre along with the volume/surface area/length. | ||
| * *set location* uses a single set element location. | ||
| * *gaussian quadrature* specifies points at standard Gaussian quadrature locations for the element shape and tessellation, currently limited to be up to 4 points in each direction. | ||
| * *Sample location* specifies a single comma-separated element 'xi' coordinates, used with sampling mode *set location*. | ||
| * *Density field* specifies a field giving the density for use with sampling mode *cell* poisson. | ||
|
|
||
| * **lines** | ||
|
|
||
| Lines are used to visualize 1D elements, or the edges of 2D or 3D elements. They may be drawn as simple unshaded lines of fixed width, or rendered as surfaces with extruded shapes. | ||
|
|
||
| Lines have the following **Line attributes**: | ||
|
|
||
| * *Shape*: This drop down menu allows you to select the profile of the line: line, ribbon, circle extrusion or square extrusion, with the following only applying to non-line shapes: | ||
| * *Base size*: This base lateral size of the cross section of the line shape, formatted as number*number. | ||
| * *Scale field*: Optional field to scale lateral size of the cross section of the line shape. | ||
| * *Scaling*: Real-valued multiplier on scale field, formatted as number*number. | ||
|
|
||
| * **contours** | ||
|
|
||
| Contours show surfaces (with Domain ``mesh3d``) or lines (with Domain ``mesh2d``) at which the selected Scalar field has the chosen fixed values ("iso-values"), alternatively known as iso-surfaces and iso-lines. | ||
|
|
||
| Contours have the following **Contour attributes**: | ||
|
|
||
| * The *Scalar field* specifies the single-valued real field whose iso-values are to be rendered. | ||
| * The *Range number*, if checked allows the number of isovalues to be specified across a range. If not checked a list of fixed values is specified. | ||
| * The *Isovalues* contains a comma-separated list of iso-values to use, either 2 representing the minimum and maximum if a range is used (and values are sampled regularly between them) or a variable list of a range is not used. | ||
|
|
||
| * **surfaces** | ||
|
|
||
| Surfaces are used to visualize 2D elements or the faces of 3D elements. | ||
|
|
||
| The settings editor is where each graphic is set up. | ||
| It contains a number of controls. | ||
| Surfaces have no additional settings. | ||
|
|
||
| * Subgroup: This drop down menu allows you to select the subgroup of current graphic. | ||
| * Coordinates: This drop down menu allows you to select the coordinate of current graphic. | ||
| * Coord System: This drop down menu allows you to select the coordinate system of current graphic. | ||
| * Boundary Mode: This drop down menu allows you to select the boundary mode of current graphic. | ||
| * Face: This drop down menu allows you to select the face of current graphic. | ||
| * Wireframe: This checkbox allows you to set if the graphic is displayed in a skeletal three-dimensional model in which only lines and vertices are represented. | ||
| * Material: This drop down menu allows you to select material for current graphic. | ||
| * Data field: This drop down menu allows you to select data field for current graphic. | ||
| * Spectrum: This drop down menu allows you to select spectrum for current graphic. | ||
| * Tessellation: This drop down menu allows you to select tessellation for current graphic. | ||
| * **streamlines** | ||
|
|
||
| If the graphic is a line: | ||
| Streamlines visualize the path a point follows if it tracks along a vector field over the domain, for example, the velocity in a fluid flow solution. | ||
|
|
||
| * Shape: This drop down menu allows you to select shape for current line graphic. | ||
| * Base size: This text box allows you to set the base size for line graphic, format as number*number. | ||
| * Scale field: This drop down menu allows you to select scale field for current line graphic. | ||
| * Scaling: This text box allows you to set the scaling for line graphic, format as number*number. | ||
| Streamlines use both **Line attributes** and **Sampling attributes** defined earlier. | ||
|
|
||
| If the graphic is a point: | ||
| Streamlines have the following **Streamline attributes**: | ||
|
|
||
| * Glyph: This drop down menu allows you to select glyph for current point graphic. | ||
| * Base size: This text box allows you to set the base size for point graphic, format as number*number*number. | ||
| * Scale field: This drop down menu allows you to select scale field for current point graphic. | ||
| * Scaling: This text box allows you to set the scaling for point graphic, format as number*number*number. | ||
| * Label field: This drop down menu allows you to select label field for current point graphic. | ||
| * Sampling mode: This drop down menu allows you to select sampling mode for current point graphic. | ||
| * The *Vector field* specifies the field to track along, either a 3, 6 or 9 component vector fields for a 3 dimensional mesh. Streamlines align along their length according to the first vector of a vector field, and across their "width" (eg the width of the *ribbon* or *extruded square* line shape) to the second vector. For single vector (3 component) vector fields, the width direction of the shape rotates according to the curl of the vector field. Tip: Using a fibre field allows muscle fibre orientations to be viewed with ribbon or extruded square shape. | ||
| * *Track length* specifies the distance the streamline is tracked along before finishing. | ||
| * *Track direction* specifies forward or reverse tracking. | ||
| * *Colour data* allows special colouring modes: | ||
| * *field* uses the regular *Data field* sampled along its length, at the centre of the shape. | ||
| * *magnitude* gives the magnitude of the vector in the primary direction. | ||
| * *travel time* integrates the time/distance along the streamline to each point. | ||
|
|
||
| API | ||
| --- | ||
|
|
||
| .. autoclass:: cmlibs.widgets.graphicseditorwidget.GraphicsEditorWidget | ||
| :members: | ||
| :members: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.