Exemplo n.º 1
0
                private static Boolean IsCrossed(PartitionParam setterParam)
                {
                    Partition       dividerTest = setterParam.PartitionPre;
                    PartitionOrigin originTest  = setterParam.OriginPost;

                    Vector3d normal         = originTest.BaseLine.UnitNormal;
                    Polyline trimmed        = setterParam.OutlineLabel.Difference;
                    double   coverAllLength = new BoundingBox(new List <Point3d>(trimmed)).Diagonal.Length * 2;
                    Line     testLine       = new Line(originTest.Point, originTest.Point + normal * coverAllLength);

                    foreach (RoomLine i in dividerTest.Lines)
                    {
                        if (i.UnitTangent == normal)
                        {
                            continue;
                        }

                        Point3d crossPt = CCXTools.GetCrossPt(testLine, i.PureLine);

                        if (PCXTools.IsPtOnLine(crossPt, i.PureLine, 0.005) && PCXTools.IsPtOnLine(crossPt, testLine, 0.005))
                        {
                            return(true);
                        }
                    }

                    return(false);
                }
Exemplo n.º 2
0
                private static Boolean IsOnOriginBase(Point3d ptTest, PartitionOrigin originTest)
                {
                    Line testLine = new Line(originTest.Point, originTest.BaseLine.PointAt(1));

                    return(PCXTools.IsPtOnLine(ptTest, testLine, 0));
                }