1.3.4.7.4.1. Create sketch from picture

By clicking on the Import drawing icon icon, you can import the image of a component, then extract the component cleanly from the image using various methods and finally transfer the drawing to the "Sketch cube" for sketch search (2D) [Sketch search (2D)].

In the following the procedure is shown by means of an example:

  1. Call up sketch search (2D) [Sketch search (2D)].

    -> The dialog window of the same name opens.

    The figure shows the still empty cube.

    The figure shows the still empty cube.

  2. Click on the Import drawing icon icon and insert the desired image via Explorer. Possible image formats are jpg, gif and png. You can also insert the image directly by pressing Ctrl+V.

    -> The Extraction of component [Extraction of the part] with imported image dialog box opens.

    Image imported

    Image imported

  3. Determine the method of extraction by clicking on the respective tab and extract the part.

    • Default

    • Segmentation

    • Cut

    Example "Segmentation [Segmentation] "

    Example "Segmentation [Segmentation] "

  4. Finally, confirm by clicking on OK.

    The illustration shows the currently adopted sketch under "Sketches [Sketches] ".

    The illustration shows the currently adopted sketch under "Sketches [Sketches] ".

If desired, you can modify the sketch now. Compare Section 1.3.4.7.6, “ Drawing Tools”.

Close the dialog box Sketch search (2D [Sketch search (2D)] ) with Apply [Commit] or Apply and search [Commit and Search].

The extraction methods standard [Default], segmentation [Segmentation] and cutting [Cut] are described in detail below.

1.3.4.7.4.1.1.  Default

The standard method [Default] offers the following options:

  • Use a color image [Use colored picture]: The image should already show the desired contour without shadows and can then be transferred directly.

  • Convert to black and white image [Convert to black and white picture]: Adjust the brightness until the desired contour is visible.

    Original

    Original

    Adjust brightness: In this case there is too little brightness.

    Adjust brightness: In this case there is too little brightness.

    Satisfying result

    Satisfying result

  • Convert to black and white image with alpha values [Convert to black and white picture with alpha values]: This option works for images that contain transparency. All transparent pixels are set to white and all non-transparent pixels are set to black.

1.3.4.7.4.1.2.  Segmentation

You can use the Segmentation method to select a segment of the part or background as often as you like until you are satisfied with the result.

Generally applies that high-contrast images with little interfering contours need less markings for the extraction of the drawing. In practice it's difficult to make perfect pictures. But the tool is designed to remove interfering contours easily.

[Note]Note

Segmentation does not have to be cut out completely. It is sufficient to say with a small marker: "This is the part" (green) and "This is the background or a hole" (purple).

You can switch between green (add) and purple (remove) as often as you like, furthermore you can flexibly move with navigation keys "Back" and "Forth".

Example:

The most important contours are displayed in the preview with only little markings.

Especially the low-contrast intermediate area is not correctly displayed yet. Mark the intermediate area with purple.

-> Thereby also areas of the part itself are removed (here in this example).

Add the missing part areas by using green.

1.3.4.7.4.1.3.  Cut

Mark the outer (green = component) and inner contour (purple = holes) of the component, either as a freehand line or with the option Activate edge detection [Activate border detection] (usually better).

The Cut, Erase, Smooth and Draw [Pull] tools are available:

  • Cut out [Cut]:

    1. First select green and mark the outer contour.

      Click on the edge to be marked and lead the mouse along the edge until you reach the starting point again.

      [Note]Note

      Make sure you close the circle. If the circle is not really closed, no preview [Preview] will appear.

    2. Select purple and mark the inner contour.

  • Erasing [Erase]: Erasing only works at the end of a line (not in the middle).

    Click on the end of the desired line and erase along the line with pressed mouse key.

    Before erasing

    Before erasing

    After erasing

    After erasing

  • Smoothing [Smooth]:

    Line Points are moved to the expected average value between previous and subsequent point.

    1. Choose the desired contour color to apply the tool.

    2. Set the mouse pointer on the line and move along.

    Contour non-smoothed

    Contour non-smoothed

    Contour smoothed

    Contour smoothed

  • Draw on [Pull]:

    Pull line points closer to the mouse pointer. When clicking outside of the contour, you will pull it outward, when clicking inside then inward. Each click brings the line closer to the mouse pointer.

    Marking too far from contour

    Marking too far from contour

    Marking pulled up

    Marking pulled up

Activate edge detection [Activate border detection]: If the option is deactivated, please try to hit the contours as accurately as possible. The result will be adopted.

Normally a good result is easier achieved with activated option.

Example of badly drawn freehand line

Example of badly drawn freehand line

Border detection activated

Border detection activated