41 namespace LibUtilities {
43 CADSurf::CADSurf(
int i, TopoDS_Shape in,
44 vector<vector<pair<int,int> > > ein) : m_ID(i), m_edges(ein)
49 gp_Pnt ori(0.0, 0.0, 0.0);
50 transform.SetScale(ori, 1.0 / 1000.0);
51 TopLoc_Location mv(transform);
52 m_s = BRep_Tool::Surface(TopoDS::Face(in));
66 gp_Pnt loc(p[0] * 1000.0, p[1] * 1000.0, p[2] * 1000.0);
68 GeomAPI_ProjectPointOnSurf projection(loc, m_s,
73 Extrema_ExtAlgo_Tree);
75 ASSERTL0(projection.NbPoints() > 0,
"locuv failed");
77 Quantity_Parameter ui;
78 Quantity_Parameter vi;
80 projection.Parameters(1,ui,vi);
89 "large locuv distance");
106 location[0] = loc.X();
107 location[1] = loc.Y();
108 location[2] = loc.Z();
124 gp_Vec n = D1U.Crossed(D1V);
126 if (n.X() == 0 && n.Y() == 0 && n.Z() == 0)
182 gp_Vec D1U, D1V, D2U, D2V, D2UV;
183 m_occSurface.D2(uv[0], uv[1], Loc, D1U, D1V, D2U, D2V, D2UV);
#define ASSERTL0(condition, msg)
Array< OneD, NekDouble > D1(Array< OneD, NekDouble > uv)
Get the set of first derivatives at parametric point u,v.
Array< OneD, NekDouble > locuv(Array< OneD, NekDouble > p)
Performs a reverse look up to find u,v and x,y,z.
Array< OneD, NekDouble > P(Array< OneD, NekDouble > uv)
Get the x,y,z at parametric point u,v.
Array< OneD, NekDouble > N(Array< OneD, NekDouble > uv)
Get the normal vector at parametric point u,v.
BRepAdaptor_Surface m_occSurface
OpenCascade object for surface.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Array< OneD, NekDouble > D2(Array< OneD, NekDouble > uv)
Get the set of second derivatives at parametric point u,v.
static const NekDouble GeomTol