/
How to activate manual pricing based on the geometry?
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:
Related content
Pricing Scripts
Pricing Scripts
More like this
Material Pricing Scripts based on Material Cost
Material Pricing Scripts based on Material Cost
More like this
How to define a Variable in pricing scripts
How to define a Variable in pricing scripts
More like this
Enabling Manual Pricing Rules
Enabling Manual Pricing Rules
More like this
Get Prices for 3D Models
Get Prices for 3D Models
More like this
Post Processing Pricing Scripts
Post Processing Pricing Scripts
More like this