void TR_SHELL02 :: drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType type) { WCRec p [ 3 ]; GraphicObj *go; double defScale = gc.getDefScale(); if ( !gc.testElementGraphicActivity(this) ) { return; } if ( this->giveMaterial()->isActivated(tStep) ) { EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH); EASValsSetColor( gc.getDeformedElementColor() ); EASValsSetEdgeColor( gc.getElementEdgeColor() ); EASValsSetEdgeFlag(true); EASValsSetFillStyle(FILL_SOLID); EASValsSetLayer(OOFEG_DEFORMED_GEOMETRY_LAYER); p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveUpdatedCoordinate(1, tStep, defScale); p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveUpdatedCoordinate(2, tStep, defScale); p [ 0 ].z = ( FPNum ) this->giveNode(1)->giveUpdatedCoordinate(3, tStep, defScale); p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveUpdatedCoordinate(1, tStep, defScale); p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveUpdatedCoordinate(2, tStep, defScale); p [ 1 ].z = ( FPNum ) this->giveNode(2)->giveUpdatedCoordinate(3, tStep, defScale); p [ 2 ].x = ( FPNum ) this->giveNode(3)->giveUpdatedCoordinate(1, tStep, defScale); p [ 2 ].y = ( FPNum ) this->giveNode(3)->giveUpdatedCoordinate(2, tStep, defScale); p [ 2 ].z = ( FPNum ) this->giveNode(3)->giveUpdatedCoordinate(3, tStep, defScale); go = CreateTriangle3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go); EMAddGraphicsToModel(ESIModel(), go); } }
void QPlaneStrain :: drawDeformedGeometry(oofegGraphicContext &gc, UnknownType type) { WCRec p [ 4 ]; GraphicObj *go; TimeStep *tStep = domain->giveEngngModel()->giveCurrentStep(); double defScale = gc.getDefScale(); if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH); EASValsSetColor( gc.getDeformedElementColor() ); EASValsSetEdgeColor( gc.getElementEdgeColor() ); EASValsSetEdgeFlag(true); EASValsSetLayer(OOFEG_DEFORMED_GEOMETRY_LAYER); EASValsSetFillStyle(FILL_HOLLOW); p [ 0 ].x = ( FPNum ) this->giveNode(1)->giveUpdatedCoordinate(1, tStep, defScale); p [ 0 ].y = ( FPNum ) this->giveNode(1)->giveUpdatedCoordinate(2, tStep, defScale); p [ 0 ].z = 0.; p [ 1 ].x = ( FPNum ) this->giveNode(2)->giveUpdatedCoordinate(1, tStep, defScale); p [ 1 ].y = ( FPNum ) this->giveNode(2)->giveUpdatedCoordinate(2, tStep, defScale); p [ 1 ].z = 0.; p [ 2 ].x = ( FPNum ) this->giveNode(3)->giveUpdatedCoordinate(1, tStep, defScale); p [ 2 ].y = ( FPNum ) this->giveNode(3)->giveUpdatedCoordinate(2, tStep, defScale); p [ 2 ].z = 0.; p [ 3 ].x = ( FPNum ) this->giveNode(4)->giveUpdatedCoordinate(1, tStep, defScale); p [ 3 ].y = ( FPNum ) this->giveNode(4)->giveUpdatedCoordinate(2, tStep, defScale); p [ 3 ].z = 0.; go = CreateQuad3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go); EMAddGraphicsToModel(ESIModel(), go); }
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 QPlaneStrain :: drawRawGeometry(oofegGraphicContext &gc) { WCRec p [ 4 ]; 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_HOLLOW); 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.; p [ 3 ].x = ( FPNum ) this->giveNode(4)->giveCoordinate(1); p [ 3 ].y = ( FPNum ) this->giveNode(4)->giveCoordinate(2); p [ 3 ].z = 0.; go = CreateQuad3D(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 LSpace :: drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType type) { int i; WCRec p [ 8 ]; GraphicObj *go; double defScale = gc.getDefScale(); if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH); EASValsSetColor( gc.getDeformedElementColor() ); EASValsSetEdgeColor( gc.getElementEdgeColor() ); EASValsSetEdgeFlag(true); EASValsSetLayer(OOFEG_DEFORMED_GEOMETRY_LAYER); EASValsSetFillStyle(FILL_SOLID); for ( i = 0; i < 8; i++ ) { p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale); p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveUpdatedCoordinate(2, tStep, defScale); p [ i ].z = ( FPNum ) this->giveNode(i + 1)->giveUpdatedCoordinate(3, tStep, defScale); } go = CreateHexahedron(p); EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go); 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 :: drawScalar(oofegGraphicContext &gc, TimeStep *tStep) { if ( !gc.testElementGraphicActivity(this) ) { return; } FloatArray val; GaussPoint *gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0); if ( !giveIPValue(val, gp, gc.giveIntVarType(), tStep) ) { return; } int indx = gc.giveIntVarIndx(); double s [ 8 ]; for ( int i = 0; i < 8; i++ ) { s [ i ] = val.at(indx); } gc.updateFringeTableMinMax(s, 1); WCRec p [ 8 ]; Particle *nodeA = ( Particle * ) giveNode(1); Particle *nodeB = ( Particle * ) giveNode(2); if ( gc.getInternalVarsDefGeoFlag() ) { // use deformed geometry double defScale = gc.getDefScale(); p [ 0 ].x = nodeA->giveUpdatedCoordinate(1, tStep, defScale); p [ 0 ].y = nodeA->giveUpdatedCoordinate(2, tStep, defScale); p [ 0 ].z = nodeA->giveUpdatedCoordinate(3, tStep, defScale); p [ 2 ].x = nodeB->giveUpdatedCoordinate(1, tStep, defScale); p [ 2 ].y = nodeB->giveUpdatedCoordinate(2, tStep, defScale); p [ 2 ].z = nodeB->giveUpdatedCoordinate(3, tStep, defScale); // handle special elements crossing the boundary of the periodic cell if ( giveNumberOfNodes() == 3 ) { Node *nodeC = ( Particle * ) giveNode(3); p [ 2 ].x += kxa + kxa * defScale * ( nodeC->giveDofWithID(D_u)->giveUnknown(VM_Total, tStep) ) + kyb * defScale * ( nodeC->giveDofWithID(R_u)->giveUnknown(VM_Total, tStep) ); p [ 2 ].y += kyb + kyb * defScale * ( nodeC->giveDofWithID(D_v)->giveUnknown(VM_Total, tStep) ) + kzc * defScale * ( nodeC->giveDofWithID(R_v)->giveUnknown(VM_Total, tStep) ); p [ 2 ].z += kzc + kzc * defScale * ( nodeC->giveDofWithID(D_w)->giveUnknown(VM_Total, tStep) ) + kxa * defScale * ( nodeC->giveDofWithID(R_w)->giveUnknown(VM_Total, tStep) ); } } else { // use initial geometry p [ 0 ].x = nodeA->giveCoordinate(1); p [ 0 ].y = nodeA->giveCoordinate(2); p [ 0 ].z = nodeA->giveCoordinate(3); p [ 2 ].x = nodeB->giveCoordinate(1); p [ 2 ].y = nodeB->giveCoordinate(2); p [ 2 ].z = nodeB->giveCoordinate(3); // handle special elements crossing the boundary of the periodic cell if ( giveNumberOfNodes() == 3 ) { p [ 2 ].x += kxa; p [ 2 ].y += kyb; p [ 2 ].z += kzc; } } double r1 = nodeA->giveRadius(); double r2 = nodeB->giveRadius(); double d = 0.1 * ( r1 + r2 ); p [ 1 ].x = 0.5 * ( p [ 0 ].x + p [ 2 ].x - d * lcs.at(2, 1) - d * lcs.at(3, 1) ); p [ 1 ].y = 0.5 * ( p [ 0 ].y + p [ 2 ].y - d * lcs.at(2, 2) - d * lcs.at(3, 2) ); p [ 1 ].z = 0.5 * ( p [ 0 ].z + p [ 2 ].z - d * lcs.at(2, 3) - d * lcs.at(3, 3) ); p [ 3 ].x = p [ 1 ].x + d *lcs.at(2, 1); p [ 3 ].y = p [ 1 ].y + d *lcs.at(2, 2); p [ 3 ].z = p [ 1 ].z + d *lcs.at(2, 3); for ( int i = 5; i < 8; i += 2 ) { p [ i ].x = p [ i - 4 ].x + d *lcs.at(3, 1); p [ i ].y = p [ i - 4 ].y + d *lcs.at(3, 2); p [ i ].z = p [ i - 4 ].z + d *lcs.at(3, 3); } p [ 4 ] = p [ 0 ]; p [ 6 ] = p [ 2 ]; GraphicObj *go = CreateHexahedronWD(p, s); EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER); EASValsSetLineWidth(2 * OOFEG_DEFORMED_GEOMETRY_WIDTH); EASValsSetFillStyle(FILL_SOLID); //EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, go); EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | LAYER_MASK, go); EMAddGraphicsToModel(ESIModel(), go); }
void Quad10_2D_SUPG :: drawScalar(oofegGraphicContext &gc, TimeStep *tStep) { int i, indx, result = 0; WCRec p [ 3 ]; GraphicObj *tr; FloatArray v1, v2, v3; double s [ 3 ]; if ( !gc.testElementGraphicActivity(this) ) { return; } EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER); // if ((gc.giveIntVarMode() == ISM_local) && (gc.giveIntVarType() == IST_VOFFraction)) { if ( ( gc.giveIntVarType() == IST_VOFFraction ) && ( gc.giveIntVarMode() == ISM_local ) ) { Polygon matvolpoly; //this->formMaterialVolumePoly(matvolpoly, NULL, temp_normal, temp_p, false); EASValsSetColor( gc.getStandardSparseProfileColor() ); //GraphicObj *go = matvolpoly.draw(gc,true,OOFEG_VARPLOT_PATTERN_LAYER); matvolpoly.draw(gc, true, OOFEG_VARPLOT_PATTERN_LAYER); return; } if ( gc.giveIntVarMode() == ISM_recovered ) { result += this->giveInternalStateAtNode(v1, gc.giveIntVarType(), gc.giveIntVarMode(), 1, tStep); result += this->giveInternalStateAtNode(v2, gc.giveIntVarType(), gc.giveIntVarMode(), 2, tStep); result += this->giveInternalStateAtNode(v3, gc.giveIntVarType(), gc.giveIntVarMode(), 3, tStep); } else if ( gc.giveIntVarMode() == ISM_local ) { GaussPoint *gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0); result += giveIPValue(v1, gp, gc.giveIntVarType(), tStep); v2 = v1; v3 = v1; result *= 3; } if ( result != 3 ) { return; } indx = gc.giveIntVarIndx(); s [ 0 ] = v1.at(indx); s [ 1 ] = v2.at(indx); s [ 2 ] = v3.at(indx); EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER); if ( gc.getScalarAlgo() == SA_ISO_SURF ) { for ( i = 0; i < 3; i++ ) { p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1); p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(2); p [ i ].z = 0.; } //EASValsSetColor(gc.getYieldPlotColor(ratio)); gc.updateFringeTableMinMax(s, 3); tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]); EGWithMaskChangeAttributes(LAYER_MASK, tr); EMAddGraphicsToModel(ESIModel(), tr); } else if ( ( gc.getScalarAlgo() == SA_ZPROFILE ) || ( gc.getScalarAlgo() == SA_COLORZPROFILE ) ) { double landScale = gc.getLandScale(); for ( i = 0; i < 3; i++ ) { p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1); p [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(2); p [ i ].z = s [ i ] * landScale; } if ( gc.getScalarAlgo() == SA_ZPROFILE ) { EASValsSetColor( gc.getDeformedElementColor() ); EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH); EASValsSetFillStyle(FILL_SOLID); tr = CreateTriangle3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | FILL_MASK | LAYER_MASK, tr); } else { gc.updateFringeTableMinMax(s, 3); EASValsSetFillStyle(FILL_SOLID); tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]); EGWithMaskChangeAttributes(FILL_MASK | LAYER_MASK, tr); } EMAddGraphicsToModel(ESIModel(), tr); } }
void Truss1d :: drawScalar(oofegGraphicContext &gc, TimeStep *tStep) { int i, indx, result = 0; WCRec p [ 2 ]; GraphicObj *tr; FloatArray v1, v2; double s [ 2 ], defScale; if ( !gc.testElementGraphicActivity(this) ) { return; } if ( gc.giveIntVarMode() == ISM_recovered ) { result += this->giveInternalStateAtNode(v1, gc.giveIntVarType(), gc.giveIntVarMode(), 1, tStep); result += this->giveInternalStateAtNode(v2, gc.giveIntVarType(), gc.giveIntVarMode(), 2, tStep); } else if ( gc.giveIntVarMode() == ISM_local ) { GaussPoint *gp = integrationRulesArray [ 0 ]->getIntegrationPoint(0); result += giveIPValue(v1, gp, gc.giveIntVarType(), tStep); v2 = v1; result *= 2; } if ( result != 2 ) { return; } indx = gc.giveIntVarIndx(); s [ 0 ] = v1.at(indx); s [ 1 ] = v2.at(indx); EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER); if ( ( gc.getScalarAlgo() == SA_ISO_SURF ) || ( gc.getScalarAlgo() == SA_ISO_LINE ) ) { for ( i = 0; i < 2; i++ ) { if ( gc.getInternalVarsDefGeoFlag() ) { // use deformed geometry defScale = gc.getDefScale(); p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale); p [ i ].y = 0.; p [ i ].z = 0.; } else { p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1); p [ i ].y = 0.; p [ i ].z = 0.; } } //EASValsSetColor(gc.getYieldPlotColor(ratio)); tr = CreateLine3D(p); EGWithMaskChangeAttributes(LAYER_MASK, tr); EMAddGraphicsToModel(ESIModel(), tr); } else if ( ( gc.getScalarAlgo() == SA_ZPROFILE ) || ( gc.getScalarAlgo() == SA_COLORZPROFILE ) ) { double landScale = gc.getLandScale(); for ( i = 0; i < 2; i++ ) { if ( gc.getInternalVarsDefGeoFlag() ) { // use deformed geometry defScale = gc.getDefScale(); p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale); p [ i ].y = 0.0; p [ i ].z = s [ i ] * landScale; } else { p [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1); p [ i ].y = 0.0; p [ i ].z = s [ i ] * landScale; } } if ( gc.getScalarAlgo() == SA_ZPROFILE ) { /* * EASValsSetColor(gc.getDeformedElementColor()); * EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH); * tr = CreateLine3D(p); * EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, tr); */ WCRec pp [ 4 ]; pp [ 0 ].x = p [ 0 ].x; pp [ 0 ].y = 0.0; pp [ 0 ].z = 0.0; pp [ 1 ].x = p [ 0 ].x; pp [ 1 ].y = 0.0; pp [ 1 ].z = p [ 0 ].z; pp [ 2 ].x = p [ 1 ].x; pp [ 2 ].y = 0.0; pp [ 2 ].z = p [ 1 ].z; pp [ 3 ].x = p [ 1 ].x; pp [ 3 ].y = 0.0; pp [ 3 ].z = 0.0; tr = CreateQuad3D(pp); EASValsSetLineWidth(OOFEG_DEFORMED_GEOMETRY_WIDTH); EASValsSetColor( gc.getDeformedElementColor() ); //EASValsSetLayer(OOFEG_DEFORMED_GEOMETRY_LAYER); EASValsSetFillStyle(FILL_HOLLOW); EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | LAYER_MASK, tr); EMAddGraphicsToModel(ESIModel(), tr); } else { //tr = CreateTriangleWD3D(p, s[0], s[1], s[2]); EASValsSetColor( gc.getDeformedElementColor() ); tr = CreateLine3D(p); EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, tr); EMAddGraphicsToModel(ESIModel(), tr); } } }
void QTrPlaneStress2d :: drawScalar(oofegGraphicContext &gc, TimeStep *tStep) { int t, n [ 3 ], i, indx, result = 0; WCRec p [ 3 ]; GraphicObj *tr; FloatArray v [ 6 ]; double s [ 6 ], ss [ 3 ], defScale; if ( !gc.testElementGraphicActivity(this) ) { return; } if ( gc.giveIntVarMode() == ISM_recovered ) { // ========= plot recovered values ========= for ( i = 1; i <= 6; i++ ) { result += this->giveInternalStateAtNode(v [ i - 1 ], gc.giveIntVarType(), gc.giveIntVarMode(), i, tStep); } if ( result != 6 ) { return; } indx = gc.giveIntVarIndx(); for ( i = 1; i <= 6; i++ ) { s [ i - 1 ] = v [ i - 1 ].at(indx); } EASValsSetLayer(OOFEG_VARPLOT_PATTERN_LAYER); if ( gc.getScalarAlgo() == SA_ISO_SURF ) { for ( t = 1; t <= 4; t++ ) { if ( t == 1 ) { n [ 0 ] = 1; n [ 1 ] = 4; n [ 2 ] = 6; } else if ( t == 2 ) { n [ 0 ] = 2; n [ 1 ] = 5; n [ 2 ] = 4; } else if ( t == 3 ) { n [ 0 ] = 3; n [ 1 ] = 6; n [ 2 ] = 5; } else { n [ 0 ] = 4; n [ 1 ] = 5; n [ 2 ] = 6; } for ( i = 0; i < 3; i++ ) { if ( gc.getInternalVarsDefGeoFlag() ) { // use deformed geometry defScale = gc.getDefScale(); p [ i ].x = ( FPNum ) this->giveNode(n [ i ])->giveUpdatedCoordinate(1, tStep, defScale); p [ i ].y = ( FPNum ) this->giveNode(n [ i ])->giveUpdatedCoordinate(2, tStep, defScale); p [ i ].z = 0.; } else { // use initial geometry p [ i ].x = ( FPNum ) this->giveNode(n [ i ])->giveCoordinate(1); p [ i ].y = ( FPNum ) this->giveNode(n [ i ])->giveCoordinate(2); p [ i ].z = 0.; } } //EASValsSetColor(gc.getYieldPlotColor(ratio)); ss [ 0 ] = s [ n [ 0 ] - 1 ]; ss [ 1 ] = s [ n [ 1 ] - 1 ]; ss [ 2 ] = s [ n [ 2 ] - 1 ]; gc.updateFringeTableMinMax(ss, 3); tr = CreateTriangleWD3D(p, ss [ 0 ], ss [ 1 ], ss [ 2 ]); EGWithMaskChangeAttributes(LAYER_MASK, tr); EMAddGraphicsToModel(ESIModel(), tr); } /* } else if (gc.getScalarAlgo() == SA_ISO_LINE) { * * EASValsSetColor(context.getActiveCrackColor()); * EASValsSetLineWidth(OOFEG_ISO_LINE_WIDTH); * * for (t=1; t<=4; t++) { * if (t==1) {n[0] = 1; n[1]=4; n[2]=6;} * else if (t==2) {n[0]=2; n[1]=5; n[2]=4;} * else if (t==3) {n[0]=3; n[1]=6; n[2]=5;} * else {n[0]=4; n[1]=5; n[2]=6;} * * * for (i=0; i< 3; i++) { * if (gc.getInternalVarsDefGeoFlag()) { * // use deformed geometry * defScale = gc.getDefScale(); * p[i].x = (FPNum) this->giveNode(n[i])->giveUpdatedCoordinate(1,tStep,defScale); * p[i].y = (FPNum) this->giveNode(n[i])->giveUpdatedCoordinate(2,tStep,defScale); * p[i].z = 0.; * * } else { * p[i].x = (FPNum) this->giveNode(n[i])->giveCoordinate(1); * p[i].y = (FPNum) this->giveNode(n[i])->giveCoordinate(2); * p[i].z = 0.; * } * } * sv[0]=s[n[0]-1]; * sv[1]=s[n[1]-1]; * sv[2]=s[n[2]-1]; * * // isoline implementation * oofeg_drawIsoLinesOnTriangle (p, sv); * } */ } } else if ( gc.giveIntVarMode() == ISM_local ) { // ========= plot local values ========= // (so far implemented for 4 Gauss points only) if ( numberOfGaussPoints != 4 ) { return; } IntArray ind(3); WCRec pp [ 6 ]; for ( i = 0; i < 6; i++ ) { if ( gc.getInternalVarsDefGeoFlag() ) { // use deformed geometry defScale = gc.getDefScale(); pp [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale); pp [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveUpdatedCoordinate(2, tStep, defScale); pp [ i ].z = 0.; } else { // use initial geometry pp [ i ].x = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(1); pp [ i ].y = ( FPNum ) this->giveNode(i + 1)->giveCoordinate(2); pp [ i ].z = 0.; } } for ( GaussPoint *gp: *integrationRulesArray [ 0 ] ) { //gpCoords = gp->giveNaturalCoordinates(); switch ( gp->giveNumber() ) { case 3: ind.at(1) = 0; ind.at(2) = 3; ind.at(3) = 5; break; case 4: ind.at(1) = 1; ind.at(2) = 4; ind.at(3) = 3; break; case 2: ind.at(1) = 2; ind.at(2) = 5; ind.at(3) = 4; break; case 5: default: ind.at(1) = 3; ind.at(2) = 4; ind.at(3) = 5; } if ( giveIPValue(v [ 0 ], gp, gc.giveIntVarType(), tStep) == 0 ) { return; } indx = gc.giveIntVarIndx(); for ( i = 1; i <= 3; i++ ) { s [ i - 1 ] = v [ 0 ].at(indx); } for ( i = 0; i < 3; i++ ) { p [ i ].x = pp [ ind.at(i + 1) ].x; p [ i ].y = pp [ ind.at(i + 1) ].y; p [ i ].z = pp [ ind.at(i + 1) ].z; } gc.updateFringeTableMinMax(s, 3); EASValsSetFillStyle(FILL_SOLID); tr = CreateTriangleWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ]); EGWithMaskChangeAttributes(FILL_MASK | LAYER_MASK, tr); EMAddGraphicsToModel(ESIModel(), tr); } } }