Featurescript - Evaluate centre of circle
Hugh_Goodbody
Member Posts: 41 PRO
I am embarking on my first custom feature creation! I have run into an issue someone might be able to shed some light on.
I have selected the edge of a circle and would like to get the centre point to place a hole on. I have the below code to evaluate the selected circle:
var circleCentre = evCurveDefinition(context, { "edge" : definition.startVertex });
println(circleCentre);var myVar = circleCentre is map;
println(myVar);
println(circleCentre.radius);
println(circleCentre.center);
The first two println ststements give the expected results:
println(myVar) = radius 0.024999999999999994 meter
center (-0.10832993533461188 meter, -0.025 meter, 0.08940204711347347 meter)
println(circleCentre.radius) = 0.024999999999999994 meter
However, the last statement returns undefined, but I was expecting the coordinates.
println(circleCentre.center) = undefined
Tagged:
2
Comments
-
you can use
evCurveDefinition(context, { "edge" : definition.startVertex })<strong>.coordSystem</strong>to get the coordinate system of the circle. You can useevCurveDefinition(context, { "edge" : definition.startVertex })<strong>.coordSystem.origin</strong>to get the center of the circle2 -
Splendid, thanks for the advice. Will give it a go.
0
