Hot Door CORE Forum
accessing Pathfinder suite - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: General discussion (http://hotdoorcore.com/forum/forumdisplay.php?fid=3)
+--- Thread: accessing Pathfinder suite (/showthread.php?tid=184)



accessing Pathfinder suite - Rick Johnson - 09-15-2018

I'm having trouble using the SDK's Pathfinder suite from within CORE, and wonder if I need to do some prep work such as somehow run sInterface->SetupMessageData first (where would I find pb->d.self?). For now, all I want to do is outline one path. Here's my code:

Code:
    AIErr error;
    AIPathfinderData data;
    AIFilterMessage message;
    message.filter = NULL;
    message.parameters = NULL;
    message.d = NULL;
    // tempArt is an ArtAP, path style is set to desired width, caps, etc.
    AIArtHandle tempArtH = tempArt->aiArtHandle();
    
    data.fSelectedArt = &tempArtH;
    data.fSelectedArtCount = 1;
    data.options.flags = kSuppressProgressDialog | kIgnoreEvenOddFillRule ;
    data.options.ipmPrecision = kDefaultPrecision;
    data.options.removeRedundantPoints = kRemoveRedundantPointsDefault;
    data.parameters.mixParameters.convertCustomColors = kMixConvertCustomColorsDefault;
    data.parameters.mixParameters.softRate = kSoftRateDefault;
    data.parameters.trapParameters.convertCustomColors = kTrapConvertCustomColorsDefault;
    data.parameters.trapParameters.heightWidthAspectRatio = kHeightWidthAspectRatioDefault;
    data.parameters.trapParameters.maximumTint = kMaximumTintDefault;
    data.parameters.trapParameters.reverseTrap = kReverseTrapDefault;
    data.parameters.trapParameters.tintTolerance = kTintToleranceDefault;
    data.parameters.trapParameters.trapThickness = kTrapThicknessDefault;
    data.parameters.trapParameters.trapTint = kTrapTintDefault;
    data.fAlertInfoID = 0L;

    error = sAIPathfinder->DoOutlineEffect(&data, &message);
    if (error) goto error;
    
    HDI_CORE_ILLUSTRATOR->currentDocument()->syncAndRedraw();
...

This code does nothing, and grouping the target art doesn't help. Without syncAndRedraw, my target path's appearance is removed. At least it doesn't generate an error! Any suggestions would be very much appreciated. Smile


RE: accessing Pathfinder suite - garrett - 09-17-2018

Sorry Rick, but I have no experience with the path finder suite, so I can't advise whether you're using it correctly.

Either way, provided you have acquired a suite properly and are interacting with it properly, there is nothing we can do to resolve any issues in that case (i.e. you have likely run into a bug in the SDK itself).

To answer your question about "pb->d.self", I'm assuming you mean that you want a (native) pointer to your own Illustrator plugin. To get that, call the hdi::core:Tonguelugin:ConfusedpPluginRef() method.


RE: accessing Pathfinder suite - Rick Johnson - 09-17-2018

Thanks, Garrett. Perhaps another CORE user will have had Pathfinder experience and will chime in. The spPluginRef() method should help cover all of the bases possibly relating to CORE. Studying posts on the SDK forum suggests that it's fairly common for this suite to function without errors, yet produce no results. Other SDK suites work perfectly with CORE so I'll keep trying.