Offset curve exception

Offset curve exception

Anonymous
Not applicable
1,114 Views
3 Replies
Message 1 of 4

Offset curve exception

Anonymous
Not applicable

Hello,

 

According to AutoCAD.NET guide, Curve.GetOffsetCurves will offset inside in case of negative values. Now I did the following test:

 

  1. Draw circle with radius = 2 units, and 2x2 square
  2. Try to offset inside with distance = 2.5 as follows: var offsetObj = Curve.GetOffsetCurves(-2.5)
  3. This line has been silently skipped in case of the square (polyine) but raised an exception for the circle!!

 

Is this a bug in AutoCAD.NET or am I missing something here?

 

 

0 Likes
1,115 Views
3 Replies
Replies (3)
Message 2 of 4

nagamalliv
Enthusiast
Enthusiast

Hi,

 

As per your information circle radius is 2.0, but offset value is -2.5, How it possiable to offset inside of the source circle, can you try in AutoCAD it will shows error "Cannot offset that object"

Command: circle
Specify center point for circle or [3P/2P/Ttr (tan tan radius)]:
Specify radius of circle or [Diameter]: 2

Command: offset

Current settings: Erase source=No Layer=Source OFFSETGAPTYPE=0
Specify offset distance or [Through/Erase/Layer] <Through>: 2.5

Select object to offset or [Exit/Undo] <Exit>:
Specify point on side to offset or [Exit/Multiple/Undo] <Exit>:
Cannot offset that object.
Select object to offset or [Exit/Undo] <Exit>: *Cancel*

Thanks,
Malli.

0 Likes
Message 3 of 4

Anonymous
Not applicable

At least, polyline should raise the same exception instead of failing silencly

0 Likes
Message 4 of 4

nagamalliv
Enthusiast
Enthusiast

Hi,

 

Please send your sample drawing with your C# code.

 

Thanks,

0 Likes