本文整理汇总了C++中GEdge::haveParametrization方法的典型用法代码示例。如果您正苦于以下问题:C++ GEdge::haveParametrization方法的具体用法?C++ GEdge::haveParametrization怎么用?C++ GEdge::haveParametrization使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GEdge
的用法示例。
在下文中一共展示了GEdge::haveParametrization方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getAllParameters
static void getAllParameters(MVertex *v, GFace *gf, std::vector<SPoint2> ¶ms)
{
params.clear();
if (gf->geomType() == GEntity::CompoundSurface ){
GFaceCompound *gfc = (GFaceCompound*) gf;
params.push_back(gfc->parFromVertex(v));
return;
}
if(v->onWhat()->dim() == 0){
GVertex *gv = (GVertex*)v->onWhat();
std::list<GEdge*> ed = gv->edges();
bool seam = false;
for(std::list<GEdge*>::iterator it = ed.begin(); it != ed.end(); it++){
if((*it)->isSeam(gf)) {
Range<double> range = (*it)->parBounds(0);
if (gv == (*it)->getBeginVertex()){
params.push_back((*it)->reparamOnFace(gf, range.low(),-1));
params.push_back((*it)->reparamOnFace(gf, range.low(), 1));
}
if (gv == (*it)->getEndVertex()){
params.push_back((*it)->reparamOnFace(gf, range.high(),-1));
params.push_back((*it)->reparamOnFace(gf, range.high(), 1));
}
if (gv != (*it)->getBeginVertex() && gv != (*it)->getEndVertex()){
Msg::Warning("Strange!");
}
seam = true;
}
}
if (!seam)
params.push_back(gv->reparamOnFace(gf, 1));
}
else if(v->onWhat()->dim() == 1){
GEdge *ge = (GEdge*)v->onWhat();
if(!ge->haveParametrization()) return;
double UU;
v->getParameter(0, UU);
if (UU == 0.0)
UU = ge->parFromPoint(v->point());
params.push_back(ge->reparamOnFace(gf, UU, 1));
if(ge->isSeam(gf))
params.push_back(ge->reparamOnFace(gf, UU, -1));
}
else{
double UU, VV;
if(v->onWhat() == gf && v->getParameter(0, UU) && v->getParameter(1, VV))
params.push_back(SPoint2(UU, VV));
}
}