Nesting Script

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Indicate the post processor used.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
fab
Newbie Member
Posts: 8
Joined: Mon Jan 25, 2021 9:23 am

Nesting Script

Post by fab » Tue Jan 26, 2021 2:04 pm

hi,

can i get the number of the "Not Placeable" parts after the nesting for the best solution?

Code: Select all

....

// add parts (all selected entities):
nester.addPartsFromSelection(doc);

// start nesting:
nester.start();

// apply the best result:
var op = new RModifyObjectsOperation();
nester.applyBestSolution(op);	
di.applyOperation(op);

....
like:
var count = nester.numberNotPlaceable; ?

is there a way getting this all for the second best result?

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Nesting Script

Post by andrew » Tue Jan 26, 2021 3:17 pm

Code: Select all

var count = nester.applyBestSolution(op);
applyBestSolution returns the number of not placeable parts.

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Nesting Script

Post by andrew » Tue Jan 26, 2021 3:27 pm

fab wrote:
Tue Jan 26, 2021 2:04 pm
is there a way getting this all for the second best result?
We will add

Code: Select all

RNester::applySolutionByIndex(index, operation)
for the next release.

Post Reply

Return to “QCAD/CAM”