|
@@ -218,12 +218,16 @@ export class CircumferenceModel extends GeometricObject {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
- static do (map, list) {
|
|
|
|
|
|
+ static do (map, vecIdObj, list) {
|
|
const id = map.get("id");
|
|
const id = map.get("id");
|
|
const centerId = map.get("param")[0];
|
|
const centerId = map.get("param")[0];
|
|
const radiusId = map.get("param")[1];
|
|
const radiusId = map.get("param")[1];
|
|
- const center = list.find(x => x.id === centerId);
|
|
|
|
- const radius = list.find(x => x.id === radiusId);
|
|
|
|
|
|
+ // const center = list.find(x => x.id === centerId);
|
|
|
|
+ // const radius = list.find(x => x.id === radiusId);
|
|
|
|
+ const index_center = GeometricObject.findOD(vecIdObj, centerId); // get the index of vecIdObj[ii].id == centerId
|
|
|
|
+ const index_radius = GeometricObject.findOD(vecIdObj, radiusId); // get the index of vecIdObj[ii].id == radiusId
|
|
|
|
+ const center = list[index_center]; // center Point
|
|
|
|
+ const radius = list[index_radius]; // Point defining circumference radius
|
|
const label = map.get("label")[0];
|
|
const label = map.get("label")[0];
|
|
const circumference = new CircumferenceModel(center, radius, id);
|
|
const circumference = new CircumferenceModel(center, radius, id);
|
|
circumference.setLabel(label);
|
|
circumference.setLabel(label);
|