We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

ProfileVectorImage polygon operation

ReignBough
Enthusiast
Is there an intersection (and other polygon) operation for ProfileVectorImage? Currently I am using:

try { 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.
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Akos Somorjai
Graphisoft
Graphisoft
ReignBough wrote:
Is there an intersection (and other polygon) operation for ProfileVectorImage? Currently I am using:

try { 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?
VectorImage 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

View solution in original post

3 REPLIES 3
Solution
Akos Somorjai
Graphisoft
Graphisoft
ReignBough wrote:
Is there an intersection (and other polygon) operation for ProfileVectorImage? Currently I am using:

try { 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?
VectorImage 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
ReignBough
Enthusiast
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.
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS
ReignBough
Enthusiast
BTW, is there a "Strip" function for ProfileVectorImage ?
~ReignBough~
ARCHICAD 26 INT (from AC18)
Windows 11 Pro, AMD Ryzen 7, 3.20GHz, 32.0GB RAM, 64-bit OS