| 31 | return 0; |
| 32 | } |
| 33 | static void registerMakeBoxFaces(Solid* pThis, BRepPrimAPI_MakeBox& tool) |
| 34 | { |
| 35 | pThis->_registerNamedShape("top", tool.TopFace()); |
| 36 | pThis->_registerNamedShape("bottom", tool.BottomFace()); |
| 37 | pThis->_registerNamedShape("right", tool.RightFace()); |
| 38 | pThis->_registerNamedShape("left", tool.LeftFace()); |
| 39 | pThis->_registerNamedShape("front", tool.FrontFace()); |
| 40 | pThis->_registerNamedShape("back", tool.BackFace()); |
| 41 | |
| 42 | BRepPrim_GWedge& wedge = tool.Wedge(); |
| 43 | |
| 44 | for (int _p1 = Primitives_XMin; _p1 <= Primitives_YMax; _p1++) { |
| 45 | Primitives_Direction p1 = (Primitives_Direction)_p1; |
| 46 | for (int _p2 = ((_p1 >> 1) + 1) * 2; _p2 <= Primitives_ZMax; _p2++) { |
| 47 | Primitives_Direction p2 = (Primitives_Direction)_p2; |
| 48 | if (wedge.HasEdge(p1, p2)) { |
| 49 | char name[4]; |
| 50 | name[0] = 'E'; |
| 51 | name[1] = m(p1); |
| 52 | name[2] = m(p2); |
| 53 | name[3] = 0; |
| 54 | pThis->_registerNamedShape(name, wedge.Edge(p1, p2)); |
| 55 | } |
| 56 | for (int _p3 = ((_p2 >> 1) + 1) * 2; _p3 <= Primitives_ZMax; _p3++) { |
| 57 | Primitives_Direction p3 = (Primitives_Direction)_p3; |
| 58 | if (wedge.HasVertex(p1, p2, p3)) { |
| 59 | char name[5]; |
| 60 | name[0] = 'V'; |
| 61 | name[1] = m(p1); |
| 62 | name[2] = m(p2); |
| 63 | name[3] = m(p3); |
| 64 | name[4] = 0; |
| 65 | pThis->_registerNamedShape(name, wedge.Vertex(p1, p2, p3)); |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | |
| 73 | NAN_METHOD(ShapeFactory::makeBox) |
no test coverage detected