Esempio n. 1
0
        public (Curve sourceCurve, IEnumerable <Point3d> sourceNotches, Curve targetCurve) ToObjects(Database db, Transaction trans)
        {
            var sourceCurve = AcadHelpers.GetObject <Polyline>(SourceCurveHandle, db, trans);
            var targetCurve = AcadHelpers.GetObject <Polyline>(TargetCurveHandle, db, trans);

            var notches = SourceNotchLines.Select(lineHandle =>
            {
                var line = AcadHelpers.GetObject <Line>(lineHandle, db, trans);
                return(AcadHelpers.GetSingleIntersection(sourceCurve, line));
            });

            return(sourceCurve, notches.ToList(), targetCurve);
        }
Esempio n. 2
0
        public Projector ToProjector(Database db, Transaction trans)
        {
            var sourceCurve = AcadHelpers.GetObject <Polyline>(SourceCurveHandle, db, trans);
            var targetCurve = AcadHelpers.GetObject <Polyline>(TargetCurveHandle, db, trans);

            var notches = SourceNotchLines.Select(lineHandle =>
            {
                var line = AcadHelpers.GetObject <Line>(lineHandle, db, trans);
                return(AcadHelpers.GetSingleIntersection(sourceCurve, line));
            });

            return(new Projector(sourceCurve, notches.ToList(), targetCurve, TargetFacetPercentages));
        }