The Sketch Toolbar
The Sketch toolbar is visible when the graphics displays a 2D geometry.
The Sketch Visualization
Use the Sketch button () to toggle the sketch visualization in the Graphics window on and off. The sketch visualization differs from the usual geometry visualization in the following ways:
The following table lists extra vertices and edges that appear in the Sketch mode:
When the sketch visualization is enabled, the Graphics toolbar is modified as follows:
Instead of the Select Objects menu button, the Select Edges () and Select Vertices () buttons are available. Use them to enable or disable selection of edges and vertices, respectively.
If you have the Design Module, there is also a Select Constraints and Dimensions button () that enables or disables selection of symbols that corresponding to constraints and dimensions.
Drawing Geometry Primitives in the Graphics Window
Use the buttons in the Draw group to draw geometric primitives in the Graphics window (see the table in The Sketch Toolbar section). For example, use the Polygon, Circular Arc, Interpolation Curve, Quadratic, and Cubic buttons to draw a sequence of curve segments.
When drawing, you control snapping to the grid or the geometry using the Snap to Grid and Snap to Geometry buttons, respectively. When the Sketch button is active in a 2D geometry, hold down the Alt key to temporarily toggle snapping to geometry on and off while drawing or while dragging a vertex.
If the Solid button is selected and you draw a closed curve, it will result in a solid geometry object when you deselect the Sketch button.
The drawing tools are easily accessible in the context menu that appears when right-clicking in a 2D sketch. You can also switch between the Polygon, Circular Arc, Interpolation Curve, Quadratic, and Cubic drawing tools while drawing by using the context menu, which results in a Composite Curve object (see Composite Curves).
When drawing a sequence of polygons, circular arcs, interpolation curves, and Bézier curves, you can finish it in the following ways:
Right-click and select Finish Polygon (or similar) on the context menu. This does not add a new point.
You can cancel the drawing tools by pressing the Esc key.
Displaying Coordinates and Geometric Primitive Dimensions
For Windows users, the COMSOL Desktop displays the current x and y coordinates at the bottom of the desktop when you move the cursor in the Graphics window when working with the geometry. Also, when you interactively create 2D geometric primitives, the display shows the current dimensions for the following geometric primitives:
If you do not want to display this information, you can clear the Show mouse coordinates when drawing check box on the Graphics and Plot Windows page in the Preferences dialog box.
Selecting Entities in the Graphics Window
When you hover over a vertex or edge, it is usually highlighted in red. If you hold down the Ctrl key and the entity is already selected, it will instead be green to indicate that the entity will become deselected when you click it. If you hold down the Shift key, the other entities of the object will be highlighted in a weaker red color, or in a weaker green color if you also hold down the Ctrl key and the entity is already selected. You can use the scroll wheel to cycle through all entities at the cursor position.
When you click a vertex or edge, it becomes the only selected entity (shown in blue). If you hold down the Ctrl key, the entity is instead added to the selection or removed from the selection. If you hold down the Shift key, the other entities of the object will also become selected or deselected.
When you double-click a vertex or edge, the corresponding geometry feature will become selected in the Model Builder tree.
If you have the Design Module, you can select symbols for constraints and dimensions similarly.
Editing Geometry Objects in the Graphics Window
You can edit a primitive geometry object by hovering an unselected vertex or edge, pressing the left mouse button, and dragging the cursor to the desired position. Pressing the Ctrl or Shift key has a special meaning for some primitives.
If you drag a selected vertex or edge, all the selected entities will instead be moved by translation.
The following primitives do not support dragging:
Polygon primitives where the Data source list is not set to Table.
Interpolation Curve primitives where the Data source list is not set to Table or Relative tolerance is not 0.
If you have the Design Module and the geometry setting Use constraints and dimensions is On, then constraints and dimensions will be maintained while dragging. In addition, it is then possible to drag entities of geometry objects created by operation features.
Composite Curves
A Composite Curve feature node has a sequence of subnodes of type Polygon, Circular Arc, Interpolation Curve, Quadratic Bézier, and Cubic Bézier. The subnodes (child features) always form a connected curve chain (open or closed). You can create a Composite Curve in the following ways:
Draw a sequence of curve segments using the Polygon, Circular Arc, Interpolation Curve, Quadratic, and Cubic toolbar buttons.
Using Composite Curves on polygons gives a single polygon.
Fillets
Click the Fillet toolbar button () to create fillets (rounded corners) by optionally selecting vertices and then dragging a vertex to the desired fillet shape. When the Fillet button is selected, you can exit the fillet sketching mode in the following ways:
Click the Fillet button again.
When the Fillet button on the Sketch tab is selected, you can deselect it by pressing the Esc key.
Deleting Geometric Entities in the Graphics Window
To delete geometric entities, select some vertices and edges in the Graphics window. Then click the Delete button or press the Del key. This will delete the selected entities using a combination of the following methods:
Removing points from the Polygon features.
Splitting Polygon and Composite Curve features into several features.
Adding Delete Entities feature nodes.
This process will not delete selected vertices that are adjacent to an edge that is not selected.
If you have the Design Module, you can also select symbols for constraint and dimension features and then delete them by clicking Delete or pressing Del.