Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Offset algorithm/formula. DXF codes explanation

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
981 Views, 3 Replies

Offset algorithm/formula. DXF codes explanation

Hello autocad developers!

 

how does the Autocad make an offset in the DXF file? 

Meaning there are many kinds of offsets (with radii or without etc.).

How does it work? How do you know when to split a polygon? What is the algorithm?

 

In addition, in the DXF file, in the entities section.

What is the difference between code 5 and code 330?

Code 5 is different for each entity? Also code 330?

What does code 5 has to include? Can it be only letters? Only numbers? etc.?

Example of a circle code:

 

  0
SECTION
  2
ENTITIES
  0
CIRCLE
  5
75F
330
1F
100
AcDbEntity
  8
0
100
AcDbCircle
 10
0.0
 20
0.0
 30
0.0
 40
1.0

Code 5: 75F

Code 330: 1F

 

Seems like the DXF must have those codes. What are the rules for them?

 

Using Autocad 2013 and up

Tags (1)
3 REPLIES 3
Message 2 of 4
Bernd.Gerstenberger
in reply to: Anonymous

Hi nadav,

 

if you make an offset e.g. from a circle the offset of this circle will be save as a circle as well in the dxf-file.

 

The difference between code 5 and 330, you can read here: http://www.autodesk.com/techpubs/autocad/acadr14/dxf/group_codes_in_numerical_order_al_u05_c.htm

 

5 is an entity handle in general to handle the objects in the drawing

330 is a soft-handler to handle blocks and xrefs in a drawing.

 

For the last question about the polygon split: Can you explain me a scenario what you are mentioning here exactly?

 

Thank you

Bernd



Bernd G.

Senior Product Support Specialist


Message 3 of 4
Anonymous
in reply to: Anonymous

Thank you Bernd.

For the last question.
Let's say you have a polygon and you offset it inwards with an offset distance too big for it to fit. So autocad automatically splits this polygon into several polygons which will fit as close as possible. Or sometimes the offset distance is also too big for this splitting, and autocad nicely displays you a no can do icon.
How does autocad know whether to split it or not and how does it know? How does it split it?
I guess there is some kind of formula for the offset.

Thank you,
Nadav
Message 4 of 4
Bernd.Gerstenberger
in reply to: Anonymous

Hello nadav,

 

I have checked internally and this what I got for an answer:

 

The application checks for inward offset: if offset distance is more than or equal to  least side of polygon, application display no can do icon, or else, it will create the polygon at said offset, but the segements may change, pentagon may be offset in to triangle ..

 

Best regards

Bernd



Bernd G.

Senior Product Support Specialist


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report