While I can successfully access the rhino.DimLinear object properties, the exposed properties are incomplete compared to the API documentation. Specifically, the “points” property defined in DimLinear | rhino3dm is unavailable, and accessing it results in undefined.
console.log("geometry :", geometry);
-------
geometry :
Object { richText: "", plainText: "24.84", objectType: {…}, isDeformable: false, hasBrepForm: false, isValid: true, userStringCount: 0 }
hasBrepForm: false
isDeformable: false
isValid: true
objectType: Object { name: "ObjectType_Annotation", value: 512 }
plainText: "24.84"
richText: ""
userStringCount: 0
<prototype>: Object { … }
ce0e75bb-ef56-4f4c-9782-f2de9992d078:577:13
----
console.log("points : ", geometry.points);
----
points : undefined
What steps should I take to resolve this issue?
Thank you for your support.
nathanletwory
(Nathan 'jesterKing' Letwory)
April 10, 2025, 4:02am
2
Are you sure you have the latest version of rhino3dm.js in use? points
most definitely is implemented
.property("points", &BND_Leader::GetPoints)
.function("getTextPoint2d", &BND_Leader::GetTextPoint2d, allow_raw_pointers())
;
class_<BND_Text, base<BND_AnnotationBase>>("Text")
;
class_<BND_Dimension, base<BND_AnnotationBase>>("Dimension")
;
class_<BND_DimLinear, base<BND_Dimension>>("DimLinear")
.property("points", &BND_DimLinear::GetPoints)
.function("getDisplayLines", &BND_DimLinear::GetDisplayLines, allow_raw_pointers())
;
class_<BND_DimAngular, base<BND_Dimension>>("DimAngular")
.property("points", &BND_DimAngular::GetPoints)
.property("radius", &BND_DimAngular::Radius)
.property("angle", &BND_DimAngular::Measurement)
.function("getDisplayLines", &BND_DimAngular::GetDisplayLines, allow_raw_pointers())
;
emscripten::val d(emscripten::val::object());
#endif
#if defined(ON_PYTHON_COMPILE)
d["defpt1"] = defpt1;
d["defpt2"] = defpt2;
d["arrowpt1"] = arrowpt1;
d["arrowpt2"] = arrowpt2;
d["dimline"] = dimline;
d["textpt"] = textpt;
#else
d.set("defpt1", PointToDict(defpt1));
d.set("defpt2", PointToDict(defpt2));
d.set("arrowpt1", PointToDict(arrowpt1));
d.set("arrowpt2", PointToDict(arrowpt2));
d.set("dimline", PointToDict(dimline));
d.set("textpt", PointToDict(textpt));
#endif
return d;
}
#if defined(ON_PYTHON_COMPILE)
throw py::value_error("Failed to get DimLinear points");
1 Like
Apologies for the lack of clarity earlier. I used the simplified rhino3dm.js loader library “3DMloader.js ” (from 01.1_basic_3dmLoader ) to load data, instead of working directly with rhino3dm.js itself. Thank you for your response — I will now attempt to use rhino3dm.js directly.
nathanletwory
(Nathan 'jesterKing' Letwory)
April 10, 2025, 6:20pm
4
Ah, maybe that is something @fraguada can tune up.