Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

CreateFromCurves and MPSPLIT Hanging on Large MPolygon

tristan.jonas8XAAW
Advocate

CreateFromCurves and MPSPLIT Hanging on Large MPolygon

tristan.jonas8XAAW
Advocate
Advocate

Hello Everyone,

So I have a problem with splitting MPolygons, previously if I wanted to trim all the MPolygons of a drawing outside of a rectangle I would either use MPSPLIT or get a region from the MPolygon curves and process that, but I have an MPolygon that is so large that all my usual tools just hang.

 

Here's an image of the massive shape in question and the rectangle I'm trying to trim around:

tristanjonas8XAAW_0-1733873734474.png


I just don't know what approach to take, it's a Catch-22 because I have to break this down into a more manageable without using MPSPLIT so that it's small enough to be able to use MPSPLIT. I can't just explode it into a polygon because the MPolygon has many many internal islands which compounds the complexity when trimming. Any advice?

Thank you 😄

0 Likes
Reply
Accepted solutions (1)
243 Views
3 Replies
Replies (3)

tristan.jonas8XAAW
Advocate
Advocate
Accepted solution

I figured out the issue, I'll take the opportunity to ask another more important question though:

 

Is there a reason why posts on MPolygons don't get a lot of traction?

 

Normally these forums are extremely helpful and responsive but the last three questions I've asked have been about MPolygons and they all got radio silence. It's especially unusual in this situation because the answer ended up being EXTREMELY simple, I find it hard to believe nobody knew that in order to break these down, all I would have to do is:

1. Explode the MPolygon into a Polyline (you can only explode one complex polyline at a time because otherwise you have no way of keeping track of which internal islands belong to which exploded shape)

2. Use MAPCLEAN to eliminate some of the weight from the massive shape
3. If desired, break the polyline in strategic spots to cut off some of the huge parts of unnecessary complexity
4. Use the MPOLYGON command and select all the remaining Polylines, the islands will be automatically calculated into the main shape properly

 

That's it! Not that hard! Explode the MPolygon and use MAPCLEAN, reassemble with the MPOLYGON command. I tried to reverse engineer information on this and I can't even find an MPOLYGON command in the official Documentation! What in the world is going on here!?

0 Likes

ActivistInvestor
Advisor
Advisor

@tristan.jonas8XAAW wrote:

1. Explode the MPolygon into a Polyline (you can only explode one complex polyline at a time because otherwise you have no way of keeping track of which internal islands belong to which exploded shape)

Not really.

 

It's actually quite easy using a TransformOverrule that overrides the Explode() method to capture all objects created by exploding a single entity.

 

You can see an example of using TransformOverrule here

Izhar_Azati
Advocate
Advocate

One of the problems with using ACAD in the field of mapping is the internal use of Double numbers and on the other hand the coordinates that are usually used are only in the positive half and far from the origin, which causes numerical problems in some calculations.
In the real world of mapping, the tail of digits after the decimal point has no meaning for most applications.
There are cases where by moving the center of the work area to the origin of the axes, certain MAP functions manage to work when they failed when they were in the original coordinates.