How to activate manual pricing based on the geometry?

Sometimes it might be reasonable to activate manual pricing based on the models geometry. This is possible through a workaround.

As an example let’s say that a model should be manual priced, if the ratio between the smallest dimension and the largest dimension crosses a threshold. You can then define a price script like this:

let price = 10; let smallestDimesion = Math.min(model.h, model.w, model.d); let biggestDimension = Math.max(model.h, model.w, model.d); let aspectRatio = biggestDimension / smallestDimesion; if (aspectRatio > 10) { // If there is a high aspect ratio, activate manual pricing // by setting a very high price price = 9999999999; } price;

 

Then, activate manual pricing if the unit price is very big: