![]() |
![]() |
![]() |
![]() |
Continuous Sketch
Synopsis
Create a 2D drawing with one continuous mouse gesture
Note: This object has superceded a previous version of an object with the same name. Please note that the older version's template is VIEW.Viewers.ContinuousSketch, and this version's template is GDM.Viewers.ContinuousSketch. The render_view input port present in the old template is no longer necessary when used with the new Uviewers.
V name
Input Ports
Output Ports
cont_sketch.GDmap2d_ss.out_mesh
Description
ContinuousSketch enables you to create a 2D drawing with one continuous motion of the mouse. It combines the following:
a two-point interactor for drawing
GDroi2d_cont for handling the drawing operation
GDmap2d_ss for converting the output buffer created by GDroi2d_cont to a field
a user interface, which the user accesses through the Module Panel provided by the DataViewer or ModuleStack (as appropriate)
Input
A view. This is typically connected to one of the Graphics Display Kit's viewer macros output view (for example, SimpleViewer2D.view).
An optional connection to an object. Without an object, ContinuousSketch converts the drawing to a field in the camera's world space. With an object, ContinuousSketch converts the drawing to a field in the object's world space.
Parameters
UIradioBox. A set of radio buttons to pick which type of primitive to draw. Possible primitives are point, line, box, polyline, and polygon.
UIradioBox. A set of radio buttons to pick the drawing mode to be used to draw the primitive while it is being built. Possible values are copy and exclusive or (that is, XOR).
UItoggle. This parameter controls whether the output buffer is immediately written to upon completion of a primitive: 1 means yes.; 0 means no. When the value is 0, you must press the Done button to cause the output buffer to be written.
build red color
build green color
build blue colorUIsliders. Float sliders to set the red/green/blue build color while initially constructing the primitive. Values are in the range 0-1.
UItoggle. The mode to use when building the primitive: 0 means clear; 1 means append. If the mode selected is clear, each time a primitive is built it overwrites any previous primitive. If the mode selected is append, each time a primitive is built, it is appended to a previous primitive(s). By using append mode, you can build multiple primitives before mapping them to a field.
UIbutton. When pressed, this button causes all existing primitives to be written to the build output buffer. This buffer is then converted into a field.
map red color
map green color
map blue colorUIsliders. Float sliders to set the red/green/blue map color while mapping the primitives from screen space to some world space coordinate system. Values are in the range 0-1. These colors are only used if the map color has a value of 1.
UItoggle. Enable/disable the use of the map red/green/blue colors. If the value is 0, no color information is written to the field. If the value is 1, color information is written to the output field as cell data. This gives you the ability to specify color on a per primitive basis.
UItoggle. The mode to use when mapping the primitives to world space: 0 means clear; 1 means append. If the mode selected is clear, each time primitives are mapped, any previous field is overwritten. If the mode selected is append, each time primitives are mapped, they are appended to the field. By using append mode, you can incrementally build the field.
Example
Libraries.Examples.Graphics_Display.RegionCrop3D
Libraries.Examples.Graphics_Display.RegionCrop2DFile
See also related modules
![]() |
![]() |
![]() |
![]() |