void TR_SHELL02 :: drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) { WCRec p [ 3 ]; GraphicObj *go; if ( !gc.testElementGraphicActivity(this) ) { return; } if ( this->giveMaterial()->isActivated(tStep) ) { EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH); EASValsSetColor( gc.getElementColor() ); EASValsSetEdgeColor( gc.getElementEdgeColor() ); EASValsSetEdgeFlag(true); EASValsSetFillStyle(FILL_SOLID); EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER); p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(1); p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(2); p [ 0 ].z = ( FPNum ) this->giveNode(1)->giveCoordinate(3); p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(1); p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(2); p [ 1 ].z = ( FPNum ) this->giveNode(2)->giveCoordinate(3); p [ 2 ].x = ( FPNum ) this->giveNode(3)->giveCoordinate(1); p [ 2 ].y = ( FPNum ) this->giveNode(3)->giveCoordinate(2); p [ 2 ].z = ( FPNum ) this->giveNode(3)->giveCoordinate(3); go = CreateTriangle3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go); EGAttachObject(go, ( EObjectP ) this); EMAddGraphicsToModel(ESIModel(), go); } }
void InterfaceElem2dQuad :: drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) { GraphicObj *go; // if (!go) { // create new one WCRec p [ 2 ]; /* poin */ if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH); EASValsSetColor( gc.getElementColor() ); EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER); p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(1); p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(2); p [ 0 ].z = 0.0; p [ 1 ].x = ( FPNum ) this->giveNode(3)->giveCoordinate(1); p [ 1 ].y = ( FPNum ) this->giveNode(3)->giveCoordinate(2); p [ 1 ].z = 0.0; go = CreateLine3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go); EGAttachObject(go, ( EObjectP ) this); EMAddGraphicsToModel(ESIModel(), go); p [ 0 ].x = ( FPNum ) this->giveNode(3)->giveCoordinate(1); p [ 0 ].y = ( FPNum ) this->giveNode(3)->giveCoordinate(2); p [ 0 ].z = 0.0; p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(1); p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(2); p [ 1 ].z = 0.0; go = CreateLine3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go); EGAttachObject(go, ( EObjectP ) this); EMAddGraphicsToModel(ESIModel(), go); }
void QTrPlaneStrain :: drawRawGeometry(oofegGraphicContext &gc) { WCRec p [ 3 ]; GraphicObj *go; if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH); EASValsSetColor( gc.getElementColor() ); EASValsSetEdgeColor( gc.getElementEdgeColor() ); EASValsSetEdgeFlag(true); EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER); p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(1); p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(2); p [ 0 ].z = 0.; p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(1); p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(2); p [ 1 ].z = 0.; p [ 2 ].x = ( FPNum ) this->giveNode(3)->giveCoordinate(1); p [ 2 ].y = ( FPNum ) this->giveNode(3)->giveCoordinate(2); p [ 2 ].z = 0.; go = CreateTriangle3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go); EGAttachObject(go, ( EObjectP ) this); EMAddGraphicsToModel(ESIModel(), go); }
void Brick1_ht :: drawRawGeometry(oofegGraphicContext &gc) { WCRec p [ 8 ]; GraphicObj *go; if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH); EASValsSetColor( gc.getElementColor() ); EASValsSetEdgeColor( gc.getElementEdgeColor() ); EASValsSetEdgeFlag(true); EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER); EASValsSetFillStyle(FILL_SOLID); for ( int i = 0; i < 8; i++ ) { p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1); p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(2); p [ i ].z = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(3); } go = CreateHexahedron(p); EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go); EGAttachObject(go, ( EObjectP ) this); EMAddGraphicsToModel(ESIModel(), go); }
void CohesiveSurface3d :: drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) { if ( !gc.testElementGraphicActivity(this) ) { return; } //WCRec p[4]; GraphicObj *go; Particle *nodeA = ( Particle * ) this->giveNode(1); Particle *nodeB = ( Particle * ) this->giveNode(2); //double rA = nodeA -> giveRadius(); //double rB = nodeB -> giveRadius(); //double r = (rA+rB)/4.; EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH); EASValsSetColor( gc.getElementColor() ); EASValsSetEdgeColor( gc.getElementEdgeColor() ); EASValsSetEdgeFlag(true); EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER); WCRec pl [ 2 ]; // determine coordinates of the particles connected by this element pl [ 0 ].x = ( FPNum ) nodeA->giveCoordinate(1); pl [ 0 ].y = ( FPNum ) nodeA->giveCoordinate(2); pl [ 0 ].z = ( FPNum ) nodeA->giveCoordinate(3); pl [ 1 ].x = ( FPNum ) nodeB->giveCoordinate(1); pl [ 1 ].y = ( FPNum ) nodeB->giveCoordinate(2); pl [ 1 ].z = ( FPNum ) nodeB->giveCoordinate(3); if ( giveNumberOfNodes() == 3 ) { // the second particle should be shifted (periodic arrangement) Particle *nodeC = ( Particle * ) this->giveNode(3); pl [ 1 ].x += kx * ( nodeC->giveCoordinate(1) ); pl [ 1 ].y += ky * ( nodeC->giveCoordinate(2) ); pl [ 1 ].z += kz * ( nodeC->giveCoordinate(3) ); } // plot a line segment connecting the particles go = CreateLine3D(pl); EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go); EGAttachObject(go, ( EObjectP ) this); EMAddGraphicsToModel(ESIModel(), go); }
void Truss2d :: drawRawGeometry(oofegGraphicContext &gc) { int c1, c2; resolveCoordIndices(c1, c2); GraphicObj *go; // if (!go) { // create new one WCRec p [ 2 ]; /* point */ if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetLineWidth(OOFEG_RAW_GEOMETRY_WIDTH); EASValsSetColor( gc.getElementColor() ); EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER); if ( cs_mode == 0 ) { p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(c1); p [ 0 ].y = 0.; p [ 0 ].z = ( FPNum ) this->giveNode(1)->giveCoordinate(c2); p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(c1); p [ 1 ].y = 0.; p [ 1 ].z = ( FPNum ) this->giveNode(2)->giveCoordinate(c2); } else if ( cs_mode == 1 ) { p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(c1); p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(c2); p [ 0 ].z = 0.; p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveCoordinate(c1); p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(c2); p [ 1 ].z = 0.; } else if ( cs_mode == 2 ) { p [ 0 ].x = 0.; p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(c1); p [ 0 ].z = ( FPNum ) this->giveNode(1)->giveCoordinate(c2); p [ 1 ].x = 0.; p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveCoordinate(c1); p [ 1 ].z = ( FPNum ) this->giveNode(2)->giveCoordinate(c2); } go = CreateLine3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go); EGAttachObject(go, ( EObjectP ) this); EMAddGraphicsToModel(ESIModel(), go); }
void LumpedMassElement :: drawRawGeometry(oofegGraphicContext &gc) { GraphicObj *go; WCRec p [ 1 ]; /* point */ if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetColor( gc.getElementColor() ); EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER); EASValsSetMType(SQUARE_MARKER); EASValsSetMSize(8); p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveCoordinate(1); p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveCoordinate(2); p [ 0 ].z = ( FPNum ) this->giveNode(1)->giveCoordinate(3); go = CreateMarker3D(p); EGWithMaskChangeAttributes(COLOR_MASK | LAYER_MASK | MTYPE_MASK | MSIZE_MASK, go); EGAttachObject(go, ( EObjectP ) this); EMAddGraphicsToModel(ESIModel(), go); }
void IntElPoint :: drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep) { GraphicObj *go; // if (!go) { // create new one WCRec p [ 1 ]; /* poin */ if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetColor( gc.getElementColor() ); EASValsSetLayer(OOFEG_RAW_GEOMETRY_LAYER); EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH); EASValsSetColor( gc.getDeformedElementColor() ); p [ 0 ].x = ( FPNum ) ( this->giveNode(1)->giveCoordinate(1) ); p [ 0 ].y = ( FPNum ) ( this->giveNode(1)->giveCoordinate(2) ); p [ 0 ].z = ( FPNum ) ( this->giveNode(1)->giveCoordinate(3) ); EASValsSetMType(CIRCLE_MARKER); go = CreateMarker3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go); EMAddGraphicsToModel(ESIModel(), go); }