Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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.w, model.h, model.w);
let biggestDimension = Math.max(model.w, model.h, model.w);
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:

  • No labels