42 namespace NekMeshUtils
45 CADCurve::CADCurve(
int i, TopoDS_Shape in)
48 gp_Pnt ori(0.0, 0.0, 0.0);
49 transform.SetScale(ori, 1.0 / 1000.0);
50 TopLoc_Location mv(transform);
53 m_occEdge = TopoDS::Edge(in);
54 m_occCurve = BRepAdaptor_Curve(m_occEdge);
57 BRepGProp::LinearProperties(m_occEdge, System);
58 m_length = System.Mass();
67 (m_occCurve.LastParameter() - m_occCurve.FirstParameter()) / (5000);
68 NekDouble t = m_occCurve.FirstParameter();
77 m_occCurve.D1(t, P1, drdt1);
79 m_occCurve.D1(t, P2, drdt2);
81 len += (drdt1.Magnitude() + drdt2.Magnitude()) / 2.0 * dt;
90 Handle(Geom_Curve) m_c = BRep_Tool::Curve(m_occEdge, b[0], b[1]);
91 Handle(Geom_Curve) NewCurve =
new Geom_TrimmedCurve(m_c, ti, tf);
92 TopoDS_Edge NewEdge = BRepBuilderAPI_MakeEdge(NewCurve);
94 BRepGProp::LinearProperties(NewEdge, System);
95 return System.Mass() / 1000.0;
101 gp_Pnt loc = m_occCurve.Value(t);
103 location[0] = loc.X();
104 location[1] = loc.Y();
105 location[2] = loc.Z();
115 m_occCurve.D2(t, loc, d1, d2);
133 t[0] = m_occCurve.FirstParameter();
134 t[1] = m_occCurve.LastParameter();
144 BRep_Tool::Pnt(TopExp::FirstVertex(m_occEdge, Standard_True));
145 gp_Pnt end = BRep_Tool::Pnt(TopExp::LastVertex(m_occEdge, Standard_True));