Handle SubD objects.
This commit is contained in:
parent
5956c9f131
commit
1cb267a2b8
6
source/external/rhino.importer.js
vendored
6
source/external/rhino.importer.js
vendored
@ -118,6 +118,10 @@ OV.Importer3dm = class extends OV.ImporterBase
|
|||||||
faces.delete ();
|
faces.delete ();
|
||||||
rhinoMesh.compact ();
|
rhinoMesh.compact ();
|
||||||
deleteMesh = true;
|
deleteMesh = true;
|
||||||
|
} else if (objectType === this.rhino.ObjectType.SubD) {
|
||||||
|
rhinoGeometry.subdivide (3);
|
||||||
|
rhinoMesh = this.rhino.Mesh.createFromSubDControlNet (rhinoGeometry);
|
||||||
|
deleteMesh = true;
|
||||||
} else if (objectType === this.rhino.ObjectType.InstanceReference) {
|
} else if (objectType === this.rhino.ObjectType.InstanceReference) {
|
||||||
let parentDefinitionId = rhinoGeometry.parentIdefId;
|
let parentDefinitionId = rhinoGeometry.parentIdefId;
|
||||||
let instanceDefinition = this.instanceDefinitions[parentDefinitionId];
|
let instanceDefinition = this.instanceDefinitions[parentDefinitionId];
|
||||||
@ -200,7 +204,7 @@ OV.Importer3dm = class extends OV.ImporterBase
|
|||||||
for (let i = rhinoInstanceReferences.length - 1; i >= 0; i--) {
|
for (let i = rhinoInstanceReferences.length - 1; i >= 0; i--) {
|
||||||
let rhinoInstanceReference = rhinoInstanceReferences[i];
|
let rhinoInstanceReference = rhinoInstanceReferences[i];
|
||||||
let rhinoInstanceReferenceGeometry = rhinoInstanceReference.geometry ();
|
let rhinoInstanceReferenceGeometry = rhinoInstanceReference.geometry ();
|
||||||
let rhinoInstanceReferenceMatrix = rhinoInstanceReferenceGeometry.xform.toFloatArray (0);
|
let rhinoInstanceReferenceMatrix = rhinoInstanceReferenceGeometry.xform.toFloatArray (false);
|
||||||
let transformationMatrix = new OV.Matrix (rhinoInstanceReferenceMatrix);
|
let transformationMatrix = new OV.Matrix (rhinoInstanceReferenceMatrix);
|
||||||
matrix = matrix.MultiplyMatrix (transformationMatrix);
|
matrix = matrix.MultiplyMatrix (transformationMatrix);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user