private void GetTransformedCurveLoopsFromProfile(IFCProfile profile, Transform lcs, ISet <IList <CurveLoop> > loops)
        {
            if (profile is IFCSimpleProfile)
            {
                IFCSimpleProfile simpleSweptArea = profile as IFCSimpleProfile;

                IList <CurveLoop> currLoops = GetTransformedCurveLoopsFromSimpleProfile(simpleSweptArea, lcs);
                if (currLoops != null && currLoops.Count > 0)
                {
                    loops.Add(currLoops);
                }
            }
            else if (profile is IFCCompositeProfile)
            {
                IFCCompositeProfile compositeSweptArea = profile as IFCCompositeProfile;

                foreach (IFCProfile subProfile in compositeSweptArea.Profiles)
                {
                    GetTransformedCurveLoopsFromProfile(subProfile, lcs, loops);
                }
            }
            else
            {
                // TODO: Support.
                Importer.TheLog.LogError(Id, "SweptArea Profile #" + profile.Id + " not yet supported.", false);
            }
        }
Beispiel #2
0
        override protected void Process(IFCAnyHandle ifcSurface)
        {
            base.Process(ifcSurface);

            IFCAnyHandle sweptCurve = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcSurface, "SweptCurve", true);

            SweptCurve = IFCProfile.ProcessIFCProfile(sweptCurve);

            IFCAnyHandle position = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcSurface, "Position", true);

            Position = IFCLocation.ProcessIFCAxis2Placement(position);
        }
        override protected void Process(IFCAnyHandle ifcSurface)
        {
            base.Process(ifcSurface);

            IFCAnyHandle sweptCurve = IFCImportHandleUtil.GetRequiredInstanceAttribute(ifcSurface, "SweptCurve", true);

            SweptCurve = IFCProfile.ProcessIFCProfile(sweptCurve);

            IFCAnyHandle position = IFCImportHandleUtil.GetOptionalInstanceAttribute(ifcSurface, "Position");

            if (IFCAnyHandleUtil.IsNullOrHasNoValue(position))
            {
                Position = Transform.Identity;
            }
            else
            {
                Position = IFCLocation.ProcessIFCAxis2Placement(position);
            }
        }
        override protected void Process(IFCAnyHandle solid)
        {
            base.Process(solid);

            IFCAnyHandle sweptArea = IFCImportHandleUtil.GetRequiredInstanceAttribute(solid, "SweptArea", true);

            SweptArea = IFCProfile.ProcessIFCProfile(sweptArea);

            IFCAnyHandle location = IFCImportHandleUtil.GetRequiredInstanceAttribute(solid, "Position", false);

            if (location != null)
            {
                Position = IFCLocation.ProcessIFCAxis2Placement(location);
            }
            else
            {
                Position = Transform.Identity;
            }
        }