示例#1
0
        protected override SLExpression VisitLineExtremityPoint(LineExtremityPointExpression lineExtremityPointExpression)
        {
            var line = (TwoPointsLineExpression)Visit(lineExtremityPointExpression.Line);

            return(lineExtremityPointExpression.Extremity == "start"
                ? line.Point1
                : line.Point2);
        }
示例#2
0
        protected virtual SLExpression VisitLineExtremityPoint(LineExtremityPointExpression lineExtremityPointExpression)
        {
            var line = Visit(lineExtremityPointExpression.Line);

            if (line != lineExtremityPointExpression.Line)
            {
                return(new LineExtremityPointExpression
                {
                    Extremity = lineExtremityPointExpression.Extremity,
                    Line = (LineExpression)line,
                });
            }
            return(lineExtremityPointExpression);
        }