87 if ( !
gc.testElementGraphicActivity(
this) ) {
92 EASValsSetColor(
gc.getElementColor() );
93 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
94 EASValsSetEdgeFlag(
true);
96 EASValsSetFillStyle(FILL_HOLLOW);
97 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveCoordinate(1);
98 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveCoordinate(2);
100 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveCoordinate(1);
101 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveCoordinate(2);
103 p [ 2 ].x = ( FPNum ) this->
giveNode(3)->giveCoordinate(1);
104 p [ 2 ].y = ( FPNum ) this->
giveNode(3)->giveCoordinate(2);
106 p [ 3 ].x = ( FPNum ) this->
giveNode(4)->giveCoordinate(1);
107 p [ 3 ].y = ( FPNum ) this->
giveNode(4)->giveCoordinate(2);
110 go = CreateQuad3D(p);
111 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
112 EGAttachObject(go, ( EObjectP )
this);
113 EMAddGraphicsToModel(ESIModel(), go);
121 double defScale =
gc.getDefScale();
123 if ( !
gc.testElementGraphicActivity(
this) ) {
128 EASValsSetColor(
gc.getDeformedElementColor() );
129 EASValsSetEdgeColor(
gc.getElementEdgeColor() );
130 EASValsSetEdgeFlag(
true);
132 EASValsSetFillStyle(FILL_HOLLOW);
133 p [ 0 ].x = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(1, tStep, defScale);
134 p [ 0 ].y = ( FPNum ) this->
giveNode(1)->giveUpdatedCoordinate(2, tStep, defScale);
136 p [ 1 ].x = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(1, tStep, defScale);
137 p [ 1 ].y = ( FPNum ) this->
giveNode(2)->giveUpdatedCoordinate(2, tStep, defScale);
139 p [ 2 ].x = ( FPNum ) this->
giveNode(3)->giveUpdatedCoordinate(1, tStep, defScale);
140 p [ 2 ].y = ( FPNum ) this->
giveNode(3)->giveUpdatedCoordinate(2, tStep, defScale);
142 p [ 3 ].x = ( FPNum ) this->
giveNode(4)->giveUpdatedCoordinate(1, tStep, defScale);
143 p [ 3 ].y = ( FPNum ) this->
giveNode(4)->giveUpdatedCoordinate(2, tStep, defScale);
146 go = CreateQuad3D(p);
147 EGWithMaskChangeAttributes(WIDTH_MASK | FILL_MASK | COLOR_MASK | EDGE_COLOR_MASK | EDGE_FLAG_MASK | LAYER_MASK, go);
148 EMAddGraphicsToModel(ESIModel(), go);
154 int i, indx, n [ 4 ], result = 0;
155 WCRec p [ 4 ], pp [ 9 ];
158 double s [ 9 ], ss [ 4 ], defScale;
160 if ( !
gc.testElementGraphicActivity(
this) ) {
167 for ( i = 1; i <= 8; i++ ) {
175 indx =
gc.giveIntVarIndx();
177 for ( i = 1; i <= 8; i++ ) {
178 s [ i - 1 ] = v [ i - 1 ].
at(indx);
186 if (
giveIPValue(v [ 0 ], gp,
gc.giveIntVarType(), tStep) == 0 ) {
190 s [ 8 ] += v [ 0 ].
at(indx);
196 for ( i = 0; i < 8; i++ ) {
197 if (
gc.getInternalVarsDefGeoFlag() ) {
199 defScale =
gc.getDefScale();
200 pp [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale);
201 pp [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(2, tStep, defScale);
205 pp [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(1);
206 pp [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(2);
211 pp [ 8 ].x = ( pp [ 4 ].x + pp [ 5 ].x + pp [ 6 ].x + pp [ 7 ].x ) / 4.;
212 pp [ 8 ].y = ( pp [ 4 ].y + pp [ 5 ].y + pp [ 6 ].y + pp [ 7 ].y ) / 4.;
216 for (
int t = 1; t <= 4; t++ ) {
222 }
else if ( t == 2 ) {
227 }
else if ( t == 3 ) {
239 ss [ 0 ] = s [ n [ 0 ] ];
240 ss [ 1 ] = s [ n [ 1 ] ];
241 ss [ 2 ] = s [ n [ 2 ] ];
242 ss [ 3 ] = s [ n [ 3 ] ];
245 for ( i = 0; i < 4; i++ ) {
246 p [ i ].x = pp [ n [ i ] ].x;
247 p [ i ].y = pp [ n [ i ] ].y;
269 gc.updateFringeTableMinMax(ss, 4);
270 tr = CreateQuadWD3D(p, ss [ 0 ], ss [ 1 ], ss [ 2 ], ss [ 3 ]);
271 EGWithMaskChangeAttributes(LAYER_MASK, tr);
272 EMAddGraphicsToModel(ESIModel(), tr);
276 for ( i = 0; i < 4; i++ ) {
293 if ( fabs(ss [ i ]) < 1.0e-6 ) {
299 EASValsSetColor(
gc.getDeformedElementColor() );
301 tr = CreateQuad3D(p);
302 EGWithMaskChangeAttributes(WIDTH_MASK | COLOR_MASK | LAYER_MASK, tr);
304 gc.updateFringeTableMinMax(s, 4);
305 tr = CreateQuadWD3D(p, ss [ 0 ], ss [ 1 ], ss [ 2 ], ss [ 3 ]);
306 EGWithMaskChangeAttributes(LAYER_MASK, tr);
309 EMAddGraphicsToModel(ESIModel(), tr);
321 for ( i = 0; i < 8; i++ ) {
322 if (
gc.getInternalVarsDefGeoFlag() ) {
324 defScale =
gc.getDefScale();
325 pp [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(1, tStep, defScale);
326 pp [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveUpdatedCoordinate(2, tStep, defScale);
329 pp [ i ].x = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(1);
330 pp [ i ].y = ( FPNum ) this->
giveNode(i + 1)->giveCoordinate(2);
335 pp [ 8 ].x = 0.25 * ( pp [ 0 ].x + pp [ 1 ].x + pp [ 2 ].x + pp [ 3 ].x );
336 pp [ 8 ].y = 0.25 * ( pp [ 0 ].y + pp [ 1 ].y + pp [ 2 ].y + pp [ 3 ].y );
340 const FloatArray& gpCoords = gp->giveNaturalCoordinates();
341 if ( ( gpCoords.
at(1) > 0. ) && ( gpCoords.
at(2) > 0. ) ) {
346 }
else if ( ( gpCoords.
at(1) < 0. ) && ( gpCoords.
at(2) > 0. ) ) {
351 }
else if ( ( gpCoords.
at(1) < 0. ) && ( gpCoords.
at(2) < 0. ) ) {
363 if (
giveIPValue(v [ 0 ], gp,
gc.giveIntVarType(), tStep) == 0 ) {
367 indx =
gc.giveIntVarIndx();
369 for ( i = 1; i <= 4; i++ ) {
370 s [ i - 1 ] = v [ 0 ].
at(indx);
373 for ( i = 0; i < 4; i++ ) {
374 p [ i ].x = pp [ ind.
at(i + 1) ].x;
375 p [ i ].y = pp [ ind.
at(i + 1) ].y;
376 p [ i ].z = pp [ ind.
at(i + 1) ].z;
379 gc.updateFringeTableMinMax(s, 4);
380 tr = CreateQuadWD3D(p, s [ 0 ], s [ 1 ], s [ 2 ], s [ 3 ]);
381 EGWithMaskChangeAttributes(LAYER_MASK, tr);
382 EMAddGraphicsToModel(ESIModel(), tr);
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]