private Inventor.UnitVector GetTangentAtParam(Inventor.EdgeUse EdgeUse, double Pt) { Inventor.TransientGeometry TransientGeometry = mInvApplication.TransientGeometry; Inventor.CurveEvaluator CurveEvaluator; double[] Param = new double[0]; double[] v = new double[3]; Param[0] = Pt; CurveEvaluator = EdgeUse.Edge.Evaluator; CurveEvaluator.GetPointAtParam(ref Param, ref v); if (EdgeUse.IsOpposedToEdge) { return(TransientGeometry.CreateUnitVector(-v[0], -v[1], -v[2])); } else { return(TransientGeometry.CreateUnitVector(v[0], v[1], v[2])); } }
// ///////////////////////////////////////////////////////////////////////////////////////////////////// // Developing ` private Inventor.UnitVector GetFaceNormalAtPoint(ref Inventor.Face ViewFace, Inventor.Point point) { Inventor.TransientGeometry TransientGeometry = mInvApplication.TransientGeometry; double[] Pnt = new double[0]; double[] n = new double[3]; Pnt[0] = point.X; Pnt[1] = point.X; Pnt[2] = point.X; ViewFace.Evaluator.GetNormalAtPoint(ref Pnt, ref n); return(TransientGeometry.CreateUnitVector(n[0], n[1], n[2])); }