Show Rhino document-level text strings #90

This commit is contained in:
kovacsv 2021-08-05 14:05:36 +02:00
parent 02dab25883
commit 669ab1f8b4
3 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/**
* Minified by jsDelivr using Terser v5.3.5.
* Original file: /npm/rhino3dm@0.16.0/rhino3dm.js
* Minified by jsDelivr using Terser v5.7.1.
* Original file: /npm/rhino3dm@7.7.0/rhino3dm.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/

Binary file not shown.

View File

@ -94,7 +94,15 @@ OV.Importer3dm = class extends OV.ImporterBase
ImportRhinoUserStrings (rhinoDoc)
{
// TODO: https://github.com/mcneel/rhino3dm/issues/303
let docStrings = rhinoDoc.strings ();
if (docStrings.count () > 0) {
let propertyGroup = new OV.PropertyGroup ('Document user texts');
for (let i = 0; i < docStrings.count (); i++) {
let docString = docStrings.get (i);
propertyGroup.AddProperty (new OV.Property (OV.PropertyType.Text, docString[0], docString[1]));
}
this.model.AddPropertyGroup (propertyGroup);
}
}
ImportRhinoGeometry (rhinoDoc)