6 #include "GmshConfig.h"
19 OCCVertex::OCCVertex(
GModel *m, TopoDS_Vertex v,
int num,
double lc)
22 gp_Pnt pnt = BRep_Tool::Pnt(_v);
28 void OCCVertex::setPosition(
GPoint &p)
33 if(mesh_vertices.size()) {
34 mesh_vertices[0]->x() = p.
x();
35 mesh_vertices[0]->y() = p.
y();
36 mesh_vertices[0]->z() = p.
z();
40 SPoint2 OCCVertex::reparamOnFace(
const GFace *gf,
int dir)
const
42 std::vector<GEdge *>
const &l = gf->
edges();
43 for(
auto ge : l_edges) {
44 if(std::find(l.begin(), l.end(), ge) != l.end()) {
47 const TopoDS_Face *s = (TopoDS_Face *)gf->
getNativePtr();
48 const TopoDS_Edge *
c = (TopoDS_Edge *)ge->getNativePtr();
50 Handle(Geom2d_Curve) curve2d =
51 BRep_Tool::CurveOnSurface(*
c, *s, s0, s1);
52 if(ge->getBeginVertex() ==
this)
53 return ge->reparamOnFace(gf, s0, dir);
54 else if(ge->getEndVertex() ==
this)
55 return ge->reparamOnFace(gf, s1, dir);