double computeSparXsiValue(const CTiglWingStructureReference& wsr, const CCPACSWingSparSegment& spar, double eta) { TopoDS_Wire sparMidplaneLine = spar.GetSparMidplaneLine(); TopoDS_Face etaCutFace = buildEtaCutFace(wsr, eta); gp_Pnt etaXsiPoint; if (!GetIntersectionPoint(etaCutFace, sparMidplaneLine, etaXsiPoint)) { throw CTiglError("Error in computation of spar eta point in tigletaxsifunctions::computeSparXsiValue"); } double newEta, xsi; wsr.GetMidplaneEtaXsi(etaXsiPoint, newEta, xsi); return xsi; }
Interception InterceptorPlans::Intercept(Plan& a, Plan& b) { Interception interception; Vector direction = a.Normal() ^ b.Normal(); if(direction == Vector(0,0,0)){ if(a == b){ interception.Type(InterceptionPlan); interception.SetPlan(a); return interception; } else{ return interception; } } Line solution(GetIntersectionPoint(a,b,direction),direction); interception.Type(InterceptionLine); interception.SetLine(solution); return interception; }