Sketch plug-in

Sketch plug-in includes features for creation of 2D shapes.

The sketch creation takes the following steps:

  • definition of sketch plane;

  • creation of sketch objects from scratch;

  • generation of sketch objects via operations on the existing operations;

  • definition of constraints.

Sketch can be created in the active part or in a partset (if there is no active part).

To create a Sketch:

  1. select in the Main Menu Sketch - > Sketch item or

  2. click SketchButton.icon Sketch button in Sketch toolbar:

First define a plane for the sketch:

../_images/PlaneDefinition.png
  • specify plane size (equal to 25 in the example above);

  • select the appropriate plane in the viewer.

Note that coordinate planes will be suggested for selection if no convenient objects for plane selection are displayed in the viewer:

../_images/CoordinatePlanes.png

After the plane for sketch is selected, the following property panel will be opened:

../_images/SketchPanel.png

Sketch general panel

  • Reversed check box - allows reversing the sketch plane normal;

  • Set plane view button - switches the viewer to the top view for the sketch plane;

  • Show geometrical constraints check box - displays/hides geometrical constraints:

  • Show dimensional constraints check box - displays/hides dimensional constraints;

  • Show existing expressions check box - displays/hides expressions.

  • Show free points check box - highlights free points in the current sketch if it is checked.

  • Automatic constraints - automatically create horizontal or vertical constraints if angle between created line and horizontal or vertical less then angular tolerance (defined in preferences).

  • Change sketch plane button - allows to change working plane of the current sketch.

  • Show remaining DoFs button - highlights all sketch edges which are not fully constrained.

Now it is possible to:

To apply or cancel sketch creation use Apply and Cancel buttons from the Sketch panel as well as equivalent buttons from Sketch toolbar.

The Result of operation will be a COMPOUND. In the object tree, Result node is located in Constructions folder.

The Name is assigned automatically: Sketch_1, Sketch_2, … both for Feature and Result.

TUI Command:

model.addSketch(PartOrPartSet, plane)
Parameters
  • part – The current part object.

  • object – A plane.

Returns

Result object.

Sketch objects

The plug-in includes the following features for creation of 2D objects:

Constraints

Constraints are available and viewable during sketch creation or editing.

The goal of constraints creation is to fix sketch geometry, i.e. set degrees of freedom to zero.

If all degrees of freedom are eliminated, the sketch is fixed and displayed with green color.

../_images/Sketch_fixed.png

Fixed Sketch

If any degrees of freedom remain unsolved, the sketch is under-constrained and displayed with red color.

../_images/Sketch_underconstrained.png

Underconstrained Sketch

The plug-in includes the following constraints:

Overconstraned state

Sketcher comes into overconstrained state when an extra constraint was defined. The following picture shows an example of the overconstrained state:

../_images/Overconstrained.png

Overconstrained Sketch

When Sketcher gets this state then:

  • buttons Apply and Cancel for the whole Sketcher are blocked;

  • a constraint which causes the overconstraint state is highlightid by red color;

  • a warning message in sketcher Property Panel is shown with recomendation what to do in this case;

  • an additional Undo button is shown under the warning messages;

After undoing the last operation or deletion of a conflicting constraint Sketcher will be reverted into a normal state.

Operations

Operations modify existing features of the sketch or create new ones by copying them.

The plug-in includes the following operations: