Beispiel #1
0
        /// <summary>
        /// wrong implmentation
        /// </summary>
        /// <param name="extrudedGeometry"></param>
        /// <returns></returns>
        public static BbSlottedHoleProfile Retrieve(BbExtrudedGeometry extrudedGeometry)
        {
            var ret = new BbSlottedHoleProfile();

            //var profileDef = extrudedGeometry._ifcExtrudedAreaSolid.SweptArea as IfcArbitraryClosedProfileDef;
            //var semHProfile = new BbSlottedHoleProfile { IfcProfileDef = profileDef };
            //BbInstanceDB.AddToExport(semHProfile);
            //ret = semHProfile;
            return(ret);
        }
Beispiel #2
0
 protected BbSlottedHole(
     BbElement hostElement,
     BbCoordinate2D position,
     double centerToCenter,
     double radius,
     BbDirection2D refDirection,
     SemHoleLocation location,
     bool through
     )
     : base(
         hostElement, position, BbSlottedHoleProfile.Create(centerToCenter, radius, refDirection),
         location, through, "Slot Hole")
 {
 }
Beispiel #3
0
        public static BbProfile Create(double cToCDistance, double radius, BbDirection2D refDirection)
        {
            BbProfile ch = new BbSlottedHoleProfile(cToCDistance, radius);

            // what is this?
            // why it creates derived?
            if (refDirection.IfcDirection.DirectionRatios[0] != 1 && refDirection.IfcDirection.DirectionRatios[1] != 0)
            {
                ch = BbDerivedProfile.Create(ch,
                                             Math.Atan2(refDirection.IfcDirection.DirectionRatios[1],
                                                        refDirection.IfcDirection.DirectionRatios[0]));
            }
            else
            {
                BbInstanceDB.AddToExport(ch);
            }

            return(ch);
        }
 /// <summary>
 /// wrong implmentation
 /// </summary>
 /// <param name="extrudedGeometry"></param>
 /// <returns></returns>
 public static BbSlottedHoleProfile Retrieve(BbExtrudedGeometry extrudedGeometry)
 {
     var ret = new BbSlottedHoleProfile();
     //var profileDef = extrudedGeometry._ifcExtrudedAreaSolid.SweptArea as IfcArbitraryClosedProfileDef;
     //var semHProfile = new BbSlottedHoleProfile { IfcProfileDef = profileDef };
     //BbInstanceDB.AddToExport(semHProfile);
     //ret = semHProfile;
     return ret;
 }
        public static BbProfile Create(double cToCDistance, double radius, BbDirection2D refDirection)
        {
            BbProfile ch = new BbSlottedHoleProfile(cToCDistance, radius);

            // what is this?
            // why it creates derived?
            if (refDirection.IfcDirection.DirectionRatios[0] != 1 && refDirection.IfcDirection.DirectionRatios[1] != 0)
            {
                ch = BbDerivedProfile.Create(ch,
                                           Math.Atan2(refDirection.IfcDirection.DirectionRatios[1],
                                                      refDirection.IfcDirection.DirectionRatios[0]));
            }
            else {
                BbInstanceDB.AddToExport(ch);
            }

            return ch;
        }