Jump to content

gSDK->ConvertToPolygonN() does not preserve the original


Richard1

Recommended Posts

This function does not return nil on failure (VW2019 SP5.3), instead it seems to be returning the original object.

 

Worse, I have not been able to find any documentation as to which object types are supported by the function.

 

So far I have found that passing it a kLine2D returns the original object, thus the following snippet destroys the original drawing:

MCObjectHandle tempPoly = gSDK->ConvertToPolygonN(h, (Boolean) true, 512);
DoSomethingWithAPolygon"d(tempPoly);

if (tempPoly)
{
  gSDK->DeleteObjectNoNotify(tempPoly);
}

Fortunately this causes our plugin to crash, so our users have not lost data (yet)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...