Skip to content
Snippets Groups Projects
Commit ea256314 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

hack for exact extrusions of 3-sided extruded faces

parent 2086136e
Branches
Tags
No related merge requests found
......@@ -659,15 +659,7 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
else if(fopt.count("Max")){
ps[0].setMax(fopt["Max"][0]); ps[0].setMin(-onelab::parameter::maxNumber());
}
//if(fopt.count("Step")) ps[0].setStep(fopt["Step"][0]);
if(fopt.count("Step")) {
int Step=fopt["Step"][0];
if (Step<=0) {
Step=1;
Error("Non positive Step for parameter '%s', set to 1", ps[0].getName().c_str());
}
ps[0].setStep(Step);
}
if(fopt.count("Step")) ps[0].setStep(fopt["Step"][0]);
if(fopt.count("Choices")) ps[0].setChoices(fopt["Choices"]);
if(fopt.count("Visible")) ps[0].setVisible(fopt["Visible"][0] ? true : false);
if(copt.count("Help")) ps[0].setHelp(copt["Help"][0]);
......
......@@ -251,6 +251,12 @@ SPoint2 gmshEdge::reparamOnFace(const GFace *face, double epar,int dir) const
for(int i = 0; i < 3; i++)
List_Read(s->Generatrices, i, &C[i]);
// FIXME: workaround for exact extrutions
bool hack = false;
if(CTX::instance()->geom.exactExtrusion && s->Extrude &&
s->Extrude->geo.Mode == EXTRUDED_ENTITY && s->Typ != MSH_SURF_PLAN)
hack = true;
double U, V;
if (C[0]->Num == c->Num) {
U = (epar - C[0]->ubeg) / (C[0]->uend - C[0]->ubeg) ;
......@@ -270,11 +276,11 @@ SPoint2 gmshEdge::reparamOnFace(const GFace *face, double epar,int dir) const
}
else if (C[2]->Num == c->Num) {
U = 1-(epar - C[2]->ubeg) / (C[2]->uend - C[2]->ubeg) ;
V = U;
V = hack ? 1 : U;
}
else if (C[2]->Num == -c->Num) {
U = 1-(C[2]->uend - epar - C[2]->ubeg) / (C[2]->uend - C[2]->ubeg) ;
V = U;
V = hack ? 1 : U;
}
else{
Msg::Info("Reparameterizing edge %d on face %d", c->Num, s->Num);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment