Skip to content

Commit

Permalink
Add test for face color handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacsv committed Mar 24, 2023
1 parent 0a93f44 commit 60057e4
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,31 @@ it ('Cube 10x10', function () {
});
});

it ('cube-fcstd', function () {
let result = LoadStepFile ('./test/testfiles/cube-fcstd/cube.step');
assert (result.success);
assert.deepStrictEqual (result.root, {
name : "",
meshes : [],
children : [
{
name : "Cube",
meshes : [ 0 ],
children : []
}
]
});
assert.strictEqual (result.meshes.length, 1);
assert.deepStrictEqual (result.meshes[0].name, 'Cube');
assert.deepStrictEqual (result.meshes[0].index.array.length, 36);
assert.deepStrictEqual (result.meshes[0].color, [ 0.6038273572921753, 0.6038273572921753, 0.6038273572921753 ]);
assert.deepStrictEqual (result.meshes[0].face_colors, [
{ first: 0, last: 1, color: [ 1, 0, 0 ] },
{ first: 6, last: 7, color: [ 0, 0, 1 ] },
{ first: 10, last: 11, color: [ 0, 0.4019778072834015, 0 ] }
]);
});

});

describe ('Iges Import', function () {
Expand Down

0 comments on commit 60057e4

Please sign in to comment.