void MakeTwistedCubeFaces(ON_Brep& brep) { MakeTwistedCubeFace(brep, ABCD, // index of surface geometry +1, // orientation of surface w.r.t. brep A, B, C, D, // indices of vertices listed in order AB, +1, // south edge, orientation w.r.t. trimming curve? BC, +1, // east edge, orientation w.r.t. trimming curve? CD, +1, AD, -1); MakeTwistedCubeFace(brep, BFGC, // index of surface geometry +1, // orientation of surface w.r.t. brep B, F, G, C, // indices of vertices listed in order BF, +1, // south edge, orientation w.r.t. trimming curve? FG, +1, // east edge, orientation w.r.t. trimming curve? CG, -1, BC, -1); // ok, i think I understand the trimming curve orientation // thingie. maybe. since the edge "directions" are arbitrary // (e.g. AD instead of DA (which would be more appropriate)) one // must indicate that the direction with relation to the trimming // curve (which only goes in ONE direction) - 1="in the same // direction" and -1="in the opposite direction" MakeTwistedCubeFace(brep, FEHG, // index of surface geometry +1, // orientation of surface w.r.t. brep F, E, H, G, // indices of vertices listed in order EF, -1, // south edge, orientation w.r.t. trimming curve? EH, +1, // east edge, orientation w.r.t. trimming curve? GH, -1, FG, -1); MakeTwistedCubeFace(brep, EADH, // index of surface geometry +1, // orientation of surface w.r.t. brep E, A, D, H, // indices of vertices listed in order AE, -1, // south edge, orientation w.r.t. trimming curve? AD, +1, // east edge, orientation w.r.t. trimming curve? DH, +1, EH, -1); MakeTwistedCubeFace(brep, EFBA, // index of surface geometry +1, // orientation of surface w.r.t. brep E, F, B, A, // indices of vertices listed in order EF, +1, // south edge, orientation w.r.t. trimming curve? BF, -1, // east edge, orientation w.r.t. trimming curve? AB, -1, AE, +1); MakeTwistedCubeFace(brep, DCGH, // index of surface geometry +1, // orientation of surface w.r.t. brep D, C, G, H, // indices of vertices listed in order CD, -1, // south edge, orientation w.r.t. trimming curve? CG, +1, // east edge, orientation w.r.t. trimming curve? GH, +1, DH, -1); }
static void MakeTwistedCubeFaces( ON_Brep& brep ) { MakeTwistedCubeFace( brep, ABCD, // Index of surface ABCD +1, // orientation of surface with respect to brep //A, B, C, D, // Indices of vertices listed in SW,SE,NW,NE order AB,+1, // South side edge and its orientation with respect to // to the trimming curve. (AB) BC,+1, // South side edge and its orientation with respect to // to the trimming curve. (BC) CD,+1, // South side edge and its orientation with respect to // to the trimming curve (CD) AD,-1 // South side edge and its orientation with respect to // to the trimming curve (AD) ); MakeTwistedCubeFace( brep, BCGF, // Index of surface BCGF -1, // orientation of surface with respect to brep //B, C, G, F, // Indices of vertices listed in SW,SE,NW,NE order BC,+1, // South side edge and its orientation with respect to // to the trimming curve. (BC) CG,+1, // South side edge and its orientation with respect to // to the trimming curve. (CG) FG,-1, // South side edge and its orientation with respect to // to the trimming curve (FG) BF,-1 // South side edge and its orientation with respect to // to the trimming curve (BF) ); MakeTwistedCubeFace( brep, CDHG, // Index of surface CDHG -1, // orientation of surface with respect to brep //C, D, H, G, // Indices of vertices listed in SW,SE,NW,NE order CD,+1, // South side edge and its orientation with respect to // to the trimming curve. (CD) DH,+1, // South side edge and its orientation with respect to // to the trimming curve. (DH) GH,-1, // South side edge and its orientation with respect to // to the trimming curve (GH) CG,-1 // South side edge and its orientation with respect to // to the trimming curve (CG) ); MakeTwistedCubeFace( brep, ADHE, // Index of surface ADHE +1, // orientation of surface with respect to brep //A, D, H, E, // Indices of vertices listed in SW,SE,NW,NE order AD,+1, // South side edge and its orientation with respect to // to the trimming curve. (AD) DH,+1, // South side edge and its orientation with respect to // to the trimming curve. (DH) EH,-1, // South side edge and its orientation with respect to // to the trimming curve (EH) AE,-1 // South side edge and its orientation with respect to // to the trimming curve (AE) ); MakeTwistedCubeFace( brep, ABFE, // Index of surface ABFE -1, // orientation of surface with respect to brep //A, B, F, E, // Indices of vertices listed in SW,SE,NW,NE order AB,+1, // South side edge and its orientation with respect to // to the trimming curve. (AB) BF,+1, // South side edge and its orientation with respect to // to the trimming curve. (BF) EF,-1, // South side edge and its orientation with respect to // to the trimming curve (EF) AE,-1 // South side edge and its orientation with respect to // to the trimming curve (AE) ); MakeTwistedCubeFace( brep, EFGH, // Index of surface EFGH -1, // orientation of surface with respect to brep //E, F, G, H, // Indices of vertices listed in SW,SE,NW,NE order EF,+1, // South side edge and its orientation with respect to // to the trimming curve. (EF) FG,+1, // South side edge and its orientation with respect to // to the trimming curve. (FG) GH,+1, // South side edge and its orientation with respect to // to the trimming curve (GH) EH,-1 // South side edge and its orientation with respect to // to the trimming curve (EH) ); }