// Helper for creating a dummy-datamodel private void addFace(Point firstPoint, Point secondPoint, Point thirdPoint, Normal n, DataStructure dm) { var pntId1 = dm.AddPoint(firstPoint.X, firstPoint.Y, firstPoint.Z); var pntId2 = dm.AddPoint(secondPoint.X, secondPoint.Y, secondPoint.Z); var pntId3 = dm.AddPoint(thirdPoint.X, thirdPoint.Y, thirdPoint.Z); var ie1 = dm.AddEdge(pntId1, pntId2); var ie2 = dm.AddEdge(pntId1, pntId3); var ie3 = dm.AddEdge(pntId2, pntId3); dm.AddFace(ie1, ie2, ie3, n); }
// Filling the data model with test points and everything using the structure of Data Structure (BRep) public void FillDatamodel(DataStructure dm) { dm.AddPoint(11, 22, 33); dm.AddPoint(20, 10, 30); dm.AddPoint(1, 2, 3); dm.AddPoint(4, 6, 8); dm.AddPoint(11, 22, 33); dm.AddPoint(20, 10, 30); dm.AddPoint(1, 2, 3); dm.AddPoint(4, 6, 8); dm.AddPoint(11, 22, 33); dm.AddPoint(11, 22, 33); dm.AddPoint(20, 10, 30); dm.AddPoint(1, 2, 3); dm.AddPoint(4, 6, 8); dm.AddPoint(11, 22, 33); dm.AddPoint(20, 10, 30); dm.AddPoint(1, 2, 3); dm.AddPoint(4, 6, 8); dm.AddPoint(11, 22, 33); dm.AddEdge(0, 1); dm.AddEdge(1, 2); dm.AddEdge(2, 3); dm.AddEdge(3, 0); dm.AddEdge(3, 1); Normal norm1 = new Normal(0, 1, 1); Normal norm2 = new Normal(1, 0, 0); Normal norm3 = new Normal(1, 1, 1); Normal norm4 = new Normal(1, 1, 0); Normal norm5 = new Normal(1, 1, 1); Normal norm6 = new Normal(1, 0, 0); dm.AddFace(3, 1, 2, norm1); dm.AddFace(0, 1, 2, norm2); dm.AddFace(3, 1, 2, norm3); dm.AddFace(0, 1, 2, norm4); dm.AddFace(3, 1, 2, norm5); dm.AddFace(0, 1, 2, norm6); }
public void FillDatamodel(DataStructure dm) { //dm.AddPoint(0, 0, 0);//0 //dm.AddPoint(0, 4, 0); //dm.AddPoint(4, 4, 0);//2 //dm.AddPoint(4, 0, 4); //dm.AddPoint(2, 2, 0);//4 //dm.AddPoint(2, 2, 3); //dm.AddPoint(10, 123, 123); //dm.AddPoint(342, 234, 123); //dm.AddPoint(123, 32, 233); //dm.AddEdge(0, 1);//0 //dm.AddEdge(1, 2); //dm.AddEdge(2, 3); //dm.AddEdge(3, 0);//3 //dm.AddEdge(0, 4);//4// //dm.AddEdge(2, 4);// //dm.AddEdge(1, 4); //dm.AddEdge(0, 2);//7// //dm.AddEdge(0, 5);//8 //dm.AddEdge(1, 5); //dm.AddEdge(2, 5); //dm.AddEdge(3, 5);//11 //dm.AddEdge(6, 7); //dm.AddEdge(7, 8); //dm.AddEdge(8, 6); //dm.AddFace(0, 4, 6, new Normal(0, 1, 4)); //dm.AddFace(1, 5, 6, new Normal(1, 2, 4)); //dm.AddFace(2, 3, 7, new Normal(0, 2, 3)); //dm.AddFace(0, 8, 9, new Normal(0, 1, 5)); //dm.AddFace(1, 9, 10, new Normal(1, 2, 5)); //dm.AddFace(2, 10, 11, new Normal(2, 3, 5)); //dm.AddFace(3, 11, 8, new Normal(3, 0, 5)); //dm.AddFace(12, 13, 14, new Normal(3, 0, 5)); dm.AddPoint(4.175997e-15, -5.000000e+00, 0.000000e+00); dm.AddPoint(2.886751e+00, -5.551115e-16, 7.931284e+00); dm.AddPoint(-3.478977e-16, 5.000000e+00, 0.000000e+00); dm.AddPoint(8.660254e+00, 2.220446e-15, 0.000000e+00); dm.AddEdge(0, 1); dm.AddEdge(0, 2); //1 dm.AddEdge(0, 3); dm.AddEdge(1, 2); //3 dm.AddEdge(1, 3); dm.AddEdge(2, 3); //5 dm.AddFace(0, 3, 1, new Normal(0, 1, 4)); dm.AddFace(0, 4, 2, new Normal(0, 1, 4)); dm.AddFace(2, 5, 1, new Normal(0, 1, 4)); //dm.AddFace(3, 4, 5, new Normal(0, 1, 4)); //dm.AddPoint(10, 123, 123); //dm.AddPoint(342, 234, 123); //dm.AddPoint(123, 32, 233); //dm.AddEdge(0, 1); //dm.AddEdge(1, 2); //dm.AddEdge(2, 0); //dm.AddFace(0, 1, 2, new Normal(3, 0, 5)); }