I'm new with scripting with Javascript for 3DR. I want to automate the extraction of circles on point clouds and I need to constrain both circle radius and normal, but I can't find the correct terminology for applying multiple constraints to a best fit command. Here are my lines of code:
Code: Select all
function bestCircle(iCloud) {
// Define the parameters of the Best Circle Extraction
var eliminatePoints = iCloud.GetNumber() * 0.01; // 10% of the points are not considered to extract the best circle
var force = SCloud.CIRCLE_FORCE_RADIUS & SCloud.CIRCLE_FORCE_NORMAL;
var centerPoint = SPoint.New(0,0,0);
var circleNormal = SVector.New(0,0,1);
var result = iCloud.BestCircle(SCloud.BEST_CIRCLE,eliminatePoints,force,centerPoint,circleNormal,0.175);