我有一个"隐藏"文件并将其转换为stl,我想手动重新设计以创建可以使用任何文件执行此操作的软件
STL BASE
facet normal -7.028554081916809e-1 -6.662387847900391e-1 2.4923914670944214e-1
outer loop
vertex -1.3733810424804688e+1 -2.2234020233154297e+1 8.85525131225586e+0
vertex -1.3620129585266113e+1 -2.2398649215698242e+1 8.735763549804688e+0
vertex -1.356096076965332e+1 -2.2442123413085938e+1 8.786409378051758e+0
endloop
endfacet
加密文件将成功:
顶点:
facet normal 1.3868725048266996e-28 -7.152297857163422e+24 -9.427265167236328e+0
outer loop
vertex -1.2666171280220628e-12 3.780374058237612e-8 -7.009968757629395e-1
vertex 1.7022672896e+10 -8.481494881276995e-39 9.942446044350513e+18
vertex 7.55889375e+4 1.17091516416e+11 -1.1634081566794228e-33
endloop
endfacet
FacetMarks:
facet normal inf inf inf
outer loop
vertex 1.47009e-39 1.47009e-39 7.17465e-43
vertex 7.17465e-43 7.17465e-43 7.17465e-43
vertex 7.17465e-43 7.17465e-43 7.17465e-43
endloop
endfacet
标题构面:(HEX)
0000-0010: 04 00 03 00-01 00 03 00-00 00 03 03-00 00 00 00 ........ ........
0000-0020: 01 00 03 03-00 02 02 00-00 00 00 00-03 09 00 00 ........ ........
0000-0030: 00 00 01 02-00 01 00 00-00 01 03 03-09 00 01 00 ........ ........
每个顶点纹理坐标:(HEX)
0000-0010: 04 02 73 2b-ca 41 6b 0f-13 17 cf 02-c8 43 29 35 ..s+.Ak. .....C)5
0000-0020: 7f c6 f0 58-c6 5f 66 ef-32 ce 2d 1e-d3 b3 ba 8b ...X._f. 2.-.....
0000-0030: e6 e1 14 ec-66 f6 c2 3e-64 e0 48 2f-ba d0 92 ab ....f..> d.H/....
两个Matrix4x4
//Focus2FinalTrans
var identityMatrix0 = [
[-0.139106587, -0.9896074, 0.0364231542, 22.71722],
[ 0.9774915, -0.143108979, -0.155016765, -3.1819346],
[ 0.1586182, 0.01403947, 0.9872402, -16.35489],
[ 0 ,0 , 0 , 1]
];
//AlignToBiteTransformation
var identityMatrix = [
[-0.9909725, 8.663357E-8, 0.134065166, 7.589744],
[-8.742278E-8, -1, -7.203359E-17, -1.193707],
[0.134065166, -1.17203491E-8, 0.9909725, -1.02678967],
[0, 0, 0, 1]
];
我无法理解如何获取所有获得加密文件的结果以获得与 STL BASE
相同的结果我尝试过:
function multiplyMatrixAndPoint(matrix, point) {
var c0r0 = matrix[ 0], c1r0 = matrix[ 1], c2r0 = matrix[ 2], c3r0 = matrix[ 3];
var c0r1 = matrix[ 4], c1r1 = matrix[ 5], c2r1 = matrix[ 6], c3r1 = matrix[ 7];
var c0r2 = matrix[ 8], c1r2 = matrix[ 9], c2r2 = matrix[10], c3r2 = matrix[11];
var c0r3 = matrix[12], c1r3 = matrix[13], c2r3 = matrix[14], c3r3 = matrix[15];
var x = point[0];
var y = point[1];
var z = point[2];
var w = point[3];
var resultX = (x * c0r0) + (y * c0r1) + (z * c0r2) + (w * c0r3);
var resultY = (x * c1r0) + (y * c1r1) + (z * c1r2) + (w * c1r3);
var resultZ = (x * c2r0) + (y * c2r1) + (z * c2r2) + (w * c2r3);
var resultW = (x * c3r0) + (y * c3r1) + (z * c3r2) + (w * c3r3);
return [resultX, resultY, resultZ, resultW]
}
和...
var transform = function(point,vector){
var p = [0,0,0];
for (var i = 0; i < 3; i++) {
p[i] += vector[i][3];
for (var c = 0; c < 3; c++) {
p[i] += point[c] * vector[i][c];
};
};
return p;
}