The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy

User avatar
By ReignBough
#287520
Is there an intersection (and other polygon) operation for ProfileVectorImage? Currently I am using:

Code: Select alltry { pvi.GetVectorImage().Strip(cutPoly, &vi); } catch (const GS::Exception& e) { WriteReport("%s", e.GetMessage().ToCStr().Get()); }; vi.CheckAndRepair();
pvi is the source ProfileVectorImage;
vi is the output VectorImage;
cutPoly is the IrregularPolygon2D that counts as a cutter;

But it sometimes crashes.
#287541
Is there an intersection (and other polygon) operation for ProfileVectorImage? Currently I am using:

Code: Select alltry { pvi.GetVectorImage().Strip(cutPoly, &vi); } catch (const GS::Exception& e) { WriteReport("%s", e.GetMessage().ToCStr().Get()); }; vi.CheckAndRepair();
pvi is the source ProfileVectorImage;
vi is the output VectorImage;
cutPoly is the IrregularPolygon2D that counts as a cutter;

But it sometimes crashes.
Have you tried to copy the source?
Code: Select allVectorImage vecIm = pvi.GetVectorImage (); vecIm.Strip (cutPoly, &vi);
If it still crashes, could you please write it to an XML file, and send me that?

Thanks, Akos
User avatar
By ReignBough
#287564
That was the original code but it also crashes. Then I made some changes (not only on that part but also on some other part of the code) and still crashes.

Now, I changed that part back to what you suggest. Now it is working.

Thanks.