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 ]
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 ]
[Since MPOLYGON is an AutoCAD MAP feature, not a part of "vanilla" AutoCAD, you may do better asking over in the AutoCAD MAP Forum.]
[Since MPOLYGON is an AutoCAD MAP feature, not a part of "vanilla" AutoCAD, you may do better asking over in the AutoCAD MAP Forum.]
Does it mean that MPolygon can potentially be unsupported in certain tools and/or AutoCAD installations?
Does it mean that MPolygon can potentially be unsupported in certain tools and/or AutoCAD installations?
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
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?
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?
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
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
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.
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.
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
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
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.
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.