Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to find 'Gap tolerance' which is in CorelDraw in Illustrator?

Community Beginner ,
Aug 18, 2020 Aug 18, 2020

Hello.
I am using the Solid Edge 2D Nesting program to nesting shapes for the laser cutting machine. But when I use that nested file in illustrator I came to realize which all of my connected paths became separated from each other.
And that is a bad thing: because the laser machine use joined paths not separated. And as I know (and I wish I am wrong) Illustrator can not join path without the problem of joining unrelated paths together too! (Image bellow:)

 
 

BeforeBeforeexpand image

After using the join tool:

afterafterexpand image

 

You can see unrelated shapes will become connected t each other too! and I do not want that.
As I know CorelDraw has a solution to that and that is the "Gap Tolerance" feature (Like the image below) :

 

corel_lasercut_3.pngexpand image

This feature empowering us to do not connect shapes with larger gaps between them. And separated shapes do not connect together (As I wanted to).

Is it really a way to fix that Issue in Illustrator?
I attached the file. Thanks.

TOPICS
Draw and design , Feature request , Tools
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 22, 2020 Aug 22, 2020

Illustrator currently does not provide features comparable to Corel Draw's excellent join mechanisms.

 

However, based on your sample file you may try:

 

  • In the main Tools palette, double click the Shape Builder tool to open its Options dialog and set up a custom Gap Detection (1 inch is the maximum).
  • Select all objects on the scratch area, take the Shape Builder tool, hold down the Shift key and drag across the entire selection.

 

A good portion of the objects should now be joined. The remain

...
Translate
Community Expert ,
Aug 18, 2020 Aug 18, 2020

What you want might be a compound path instead of "Join"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 19, 2020 Aug 19, 2020

Do not work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 18, 2020 Aug 18, 2020

I've not tried it myself, but you could try Hiroyuki Sato's script "Join Reasonably".  It has variables you could set:

http://shspage.com/aijs/en/#join_reasonably

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 19, 2020 Aug 19, 2020

Thank you for that script.

this was the result of that script:

 

1. Select paths1. Select pathsexpand image

 

2. Run the script and the Error2. Run the script and the Errorexpand image

 

 

3. Lines disappeared and still disconnected3. Lines disappeared and still disconnectedexpand image

 

Error is telling me:

 

Error9090: You cannot delete all path-points of a path

Line: 142

-> p1.remove();

 

This is the edit I made in script settings:

var conf = {};
// Settings ==================================

conf.close = false;     // make a closed path. true/false
                        // (make closed paths when conf.ignore_if_further_than > 0)

conf.marge_if_nearer_than   = 0.5;  // merge the ends to connect within this distance
                                    // set 0 to be ignored (unit:mm)

conf.ignore_if_further_than = 0.6;  // ignore to connect if distance between the ends exceeds this value
                                  // set 0 to be ignored (unit:mm)

conf.hanLen = 0.33; // ratio of handle length to connected line. set 0 to be ignored

conf.dontAddRevHan = 120; // do not generate a handle if the angle of the connecting part is more than this value.
                          // set 0 to be ignored (unit:degree, 0-180)

// ========================================

I just set  conf.ignore_if_further_than to 0.6 from default settings.

And conf.close to false.

 

Maby it's better to write part of the code is the script which error showed to me:

// ------------------------------------------------
// adjust the length of handles
function adjustHandleLen(p1, p2){
  var d = dist(p1.anchor, p2.anchor);
  
  if(d == 0){ // distance is 0
    p2.leftDirection = p1.leftDirection;
    p1.remove();
    
  } else if(d < conf.marge_if_nearer_than){
    var pnt = [ (p1.anchor[0] + p2.anchor[0]) / 2,
                (p1.anchor[1] + p2.anchor[1]) / 2 ];
    p2.rightDirection = [ p2.rightDirection[0] + (pnt[0] - p2.anchor[0]),
                          p2.rightDirection[1] + (pnt[1] - p2.anchor[1]) ];
    p2.leftDirection =  [ p1.leftDirection[0] + (pnt[0] - p1.anchor[0]),
                          p1.leftDirection[1] + (pnt[1] - p1.anchor[1]) ];
    p2.anchor = pnt;
    p1.remove();
    
  } else if(conf.hanLen > 0){
    d *= conf.hanLen;
    var d2 = d * d;
    if(!arrEq(p1.anchor, p1.rightDirection)){
      if(conf.dontAddRevHan
         && getRad2(p2.anchor, p1.anchor, p1.rightDirection) > conf.dontAddRevHan){
        p1.rightDirection = p1.anchor;
      } else if(dist2(p1.anchor, p1.rightDirection) > d2){
        p1.rightDirection = getPnt(p1.anchor, getRad(p1.anchor, p1.rightDirection), d);
      }
    }
    if(!arrEq(p2.anchor, p2.leftDirection)){
      if(conf.dontAddRevHan
         && getRad2(p1.anchor, p2.anchor, p2.leftDirection) > conf.dontAddRevHan){
        p2.leftDirection = p2.anchor;
      } else if(dist2(p2.anchor, p2.leftDirection) > d2){
        p2.leftDirection = getPnt(p2.anchor, getRad(p2.anchor, p2.leftDirection), d);
      }
    }
    
  } else {
    p1.rightDirection = p1.anchor;
    p2.leftDirection  = p2.anchor;
  }
}
// ----------------------------------------------

 

What to do now?

My Illustrator version is Adobe Illustrator 2020 24.0.1

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 22, 2020 Aug 22, 2020

I attached my file to the discussion if that will helps you.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2020 Aug 22, 2020

I also didn't have success with Join Reasonably. The plugin VectorFirstAid can handle this.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 23, 2020 Aug 23, 2020
LATEST

Thank you for introducing this plugin, but I do not have that, and that's so pricey. The Shape Builder tool worked for me anyway.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 22, 2020 Aug 22, 2020

Illustrator currently does not provide features comparable to Corel Draw's excellent join mechanisms.

 

However, based on your sample file you may try:

 

  • In the main Tools palette, double click the Shape Builder tool to open its Options dialog and set up a custom Gap Detection (1 inch is the maximum).
  • Select all objects on the scratch area, take the Shape Builder tool, hold down the Shift key and drag across the entire selection.

 

A good portion of the objects should now be joined. The remaining (unjoined) paths would have to be joined manually with the Join command.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 23, 2020 Aug 23, 2020

Thank you.
The shape builder tool worked.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines