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

AutoCAD - Hatch vs. MPolygon

8 REPLIES 8
Reply
Message 1 of 9
vladgriFFP47
1169 Views, 8 Replies

AutoCAD - Hatch vs. MPolygon

vladgriFFP47
Explorer
Explorer

I'm working on a design conversion utility from our tool to DWG that needs to be able to make polygons with holes on the DWG side. Both Hatches and MPolygons appear to be good candidates for this but they are similar and it's not immediately clear to me what the differences are between them and which entity is a better fit. Any advice? Thanks!

 

[ The subject line of this post has been edited for clarity by @handjonathan Original: Hatch vs. MPolygon ]

0 Likes

AutoCAD - Hatch vs. MPolygon

I'm working on a design conversion utility from our tool to DWG that needs to be able to make polygons with holes on the DWG side. Both Hatches and MPolygons appear to be good candidates for this but they are similar and it's not immediately clear to me what the differences are between them and which entity is a better fit. Any advice? Thanks!

 

[ The subject line of this post has been edited for clarity by @handjonathan Original: Hatch vs. MPolygon ]

8 REPLIES 8
Message 2 of 9
Kent1Cooper
in reply to: vladgriFFP47

Kent1Cooper
Consultant
Consultant

[Since MPOLYGON is an AutoCAD MAP feature, not a part of "vanilla" AutoCAD, you may do better asking over in the AutoCAD MAP Forum.]

Kent Cooper, AIA

[Since MPOLYGON is an AutoCAD MAP feature, not a part of "vanilla" AutoCAD, you may do better asking over in the AutoCAD MAP Forum.]

Kent Cooper, AIA
Message 3 of 9
vladgriFFP47
in reply to: Kent1Cooper

vladgriFFP47
Explorer
Explorer

Does it mean that MPolygon can potentially be unsupported in certain tools and/or AutoCAD installations?

0 Likes

Does it mean that MPolygon can potentially be unsupported in certain tools and/or AutoCAD installations?

Message 4 of 9
cadffm
in reply to: vladgriFFP47

cadffm
Consultant
Consultant

No, MPolygons are supported and a native object in plain dwg/dxf,

but in plain AutoCAD and LT is no command to create them.

Because of this, Autocad (and clone programs)  Users don't know what it is.

 

So I am also for use of Hatchs!

Sebastian

No, MPolygons are supported and a native object in plain dwg/dxf,

but in plain AutoCAD and LT is no command to create them.

Because of this, Autocad (and clone programs)  Users don't know what it is.

 

So I am also for use of Hatchs!

Sebastian

Message 5 of 9
vladgriFFP47
in reply to: cadffm

vladgriFFP47
Explorer
Explorer

Tried using hatches, the boundary/loop outlines are not shown, at least not by default or in DWG TrueView. I'd prefer to see the outlines and no pattern instead of using say a solid pattern to make the hatch visible. Is there a hatch property that gets stored in the DWG/DXF that tells CAD to show loops even if there is no pattern assigned?

0 Likes

Tried using hatches, the boundary/loop outlines are not shown, at least not by default or in DWG TrueView. I'd prefer to see the outlines and no pattern instead of using say a solid pattern to make the hatch visible. Is there a hatch property that gets stored in the DWG/DXF that tells CAD to show loops even if there is no pattern assigned?

Message 6 of 9
cadffm
in reply to: vladgriFFP47

cadffm
Consultant
Consultant

Hatchs don't have visible borders/outlines.

 

REGIONs have outlines only (no filling)

but it is also a rarely object in AutoCAD.

 

What are these areas in real live?

Perhaps you will create simple polylines and GROUP them.

 

We need to know what kind of "drawing" you create, 

woukd you share a ready drawing?

 

Sebastian

0 Likes

Hatchs don't have visible borders/outlines.

 

REGIONs have outlines only (no filling)

but it is also a rarely object in AutoCAD.

 

What are these areas in real live?

Perhaps you will create simple polylines and GROUP them.

 

We need to know what kind of "drawing" you create, 

woukd you share a ready drawing?

 

Sebastian

Message 7 of 9
vladgriFFP47
in reply to: cadffm

vladgriFFP47
Explorer
Explorer

This is a somewhat simplified example, real drawings have more complexity but nothing fancy, just polylines usually with bulges, etc.

Here the polylines.dxf contains 3 nested rectangular polylines, the outer 2 conceptually correspond to the outer and inner boundaries of a single entity, but as they are represented as independent polylines in this drawing that association is lost. The rectangle in the middle is independent.

The hatch.dxf is a hatch version of the same drawing, here the 2 outer polylines are made to form a single solid hatch entity, while it's the type of boundary association I'm trying to recreate, semantically this appears to be wrong due to the need of using hatch fill pattern.

This is a bi-directional drawing conversion utility that can also read dwg/dxf and convert the drawing to our internal format, this is where this outer/inner boundary association becomes important as we want to be able to maintain it in our tool.

 

0 Likes

This is a somewhat simplified example, real drawings have more complexity but nothing fancy, just polylines usually with bulges, etc.

Here the polylines.dxf contains 3 nested rectangular polylines, the outer 2 conceptually correspond to the outer and inner boundaries of a single entity, but as they are represented as independent polylines in this drawing that association is lost. The rectangle in the middle is independent.

The hatch.dxf is a hatch version of the same drawing, here the 2 outer polylines are made to form a single solid hatch entity, while it's the type of boundary association I'm trying to recreate, semantically this appears to be wrong due to the need of using hatch fill pattern.

This is a bi-directional drawing conversion utility that can also read dwg/dxf and convert the drawing to our internal format, this is where this outer/inner boundary association becomes important as we want to be able to maintain it in our tool.

 

Message 8 of 9
cadffm
in reply to: vladgriFFP47

cadffm
Consultant
Consultant

Thank you for sharing the files, but I asked for "What is it in real life" ? I like to understand what we talking about

A wall, a garden, a ??

 

Do users need to modify or creation this, or is it for displaying and plotting only?

then Use MPolygon, or Blocks or Groups - but groups are also not a good choice

because it is not one object and a lot of user don't know how to handle groups.

 

Autocad and a lot similar programs can not create mpolygons (editing the boundary is not a problem, but

add or erase Islands are not possible. For this they need a program extension and not all CAD programs

use the same api and not all offers an api.

 

Attached is a group (useless in your case) and a blockreference/block

Sebastian

0 Likes

Thank you for sharing the files, but I asked for "What is it in real life" ? I like to understand what we talking about

A wall, a garden, a ??

 

Do users need to modify or creation this, or is it for displaying and plotting only?

then Use MPolygon, or Blocks or Groups - but groups are also not a good choice

because it is not one object and a lot of user don't know how to handle groups.

 

Autocad and a lot similar programs can not create mpolygons (editing the boundary is not a problem, but

add or erase Islands are not possible. For this they need a program extension and not all CAD programs

use the same api and not all offers an api.

 

Attached is a group (useless in your case) and a blockreference/block

Sebastian

Message 9 of 9
vladgriFFP47
in reply to: cadffm

vladgriFFP47
Explorer
Explorer

I misunderstood. They are drawings of various electronic designs, such as printed circuit board layouts. As for what users need to do with their AutoCAD drawings, it's hard to tell as it is out of our control, so it's safe to assume they can do whatever they like, they may have toolchains that take dwg/dxf as input for further processing. Our task is to provide them with a reliable bi-directional translation mechanism for moving drawings between our tool and AutoCAD. We generally have good coverage but somehow were unable to keep polygons with holes together on the AutoCAD side, I'm trying to understand if we can improve on this.

0 Likes

I misunderstood. They are drawings of various electronic designs, such as printed circuit board layouts. As for what users need to do with their AutoCAD drawings, it's hard to tell as it is out of our control, so it's safe to assume they can do whatever they like, they may have toolchains that take dwg/dxf as input for further processing. Our task is to provide them with a reliable bi-directional translation mechanism for moving drawings between our tool and AutoCAD. We generally have good coverage but somehow were unable to keep polygons with holes together on the AutoCAD side, I'm trying to understand if we can improve on this.

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