Exemplo n.º 1
0
        public static BbNamedRectangleProfile Create(double lengthX, double lengthY)
        {
            var rectProfile = new BbNamedRectangleProfile(lengthX, lengthY);

            BbInstanceDB.AddToExport(rectProfile);
            return(rectProfile);
        }
 /// <summary>
 /// wrong implementation
 /// </summary>
 /// <param name="extrudedGeometry"></param>
 /// <returns></returns>
 public static BbNamedRectangleProfile Retrieve(BbExtrudedGeometry extrudedGeometry)
 {
     var ret = new BbNamedRectangleProfile();
     //var profileDef = extrudedGeometry._ifcExtrudedAreaSolid.SweptArea as IfcRectangleProfileDef;
     //var semRProfile = new BbNamedRectangleProfile { IfcProfileDef = profileDef };
     //BbInstanceDB.AddToExport(semRProfile);
     //ret = semRProfile;
     return ret;
 }
Exemplo n.º 3
0
 protected BbStiffener(
     string id, string name,
     double width, double height,
     double length, BbCoordinate3D position, BbDirection3D zAxis,
     BbDirection3D xAxis, BbDirection3D extrudeDirection,
     BbElement container)
     : base(id, name, "Stiffener", BbNamedRectangleProfile.Create(width, height), length, position, zAxis, xAxis, extrudeDirection, container)
 {
 }
Exemplo n.º 4
0
        /// <summary>
        /// wrong implementation
        /// </summary>
        /// <param name="extrudedGeometry"></param>
        /// <returns></returns>
        public static BbNamedRectangleProfile Retrieve(BbExtrudedGeometry extrudedGeometry)
        {
            var ret = new BbNamedRectangleProfile();

            //var profileDef = extrudedGeometry._ifcExtrudedAreaSolid.SweptArea as IfcRectangleProfileDef;
            //var semRProfile = new BbNamedRectangleProfile { IfcProfileDef = profileDef };
            //BbInstanceDB.AddToExport(semRProfile);
            //ret = semRProfile;
            return(ret);
        }
Exemplo n.º 5
0
 protected BbRectangleOpening(
     BbElement hostElement,
     BbCoordinate2D position,
     double width,
     double height,
     SemHoleLocation location,
     bool through
     )
     : base(hostElement, position, BbNamedRectangleProfile.Create(width, height), location, through, "Rectangle Opening")
 {
 }
 public static BbNamedRectangleProfile Create(double lengthX, double lengthY)
 {
     var rectProfile = new BbNamedRectangleProfile(lengthX, lengthY);
     BbInstanceDB.AddToExport(rectProfile);
     return rectProfile;
 }
Exemplo n.º 7
0
        BbSkewedEnd(
            BbElement hostElement,
            BbPosition3D pos)
        {
            var mainPart = hostElement as BbPiece;

            if (mainPart == null)
            {
                return;
            }

            var width = mainPart.Length > mainPart.Profile.Width ? mainPart.Length : mainPart.Profile.Width;

            width = width * 100;
            var depth = mainPart.Length > mainPart.Profile.Depth ? mainPart.Length : mainPart.Profile.Depth;

            depth = depth * 100;
            var profile = BbNamedRectangleProfile.Create(width, depth);

            ObjectBbLocalPlacement = BbLocalPlacement3D.Create(
                hostElement.ObjectBbLocalPlacement, pos);



            //Direction3D exDir = Direction3D.Create(new[] {pos.Axis.X, pos.Axis.Y, pos.Axis.Z});

            BbExtrudedGeometry bbExtrudedGeometry = BbExtrudedGeometry.Create(
                profile,
                BbHeaderSetting.Setting3D.DefaultBbPosition3D,
                BbHeaderSetting.Setting3D.ZAxis,
                mainPart.Length);


            //IfcHalfSpaceSolid ifcHalfSpaceSolid = new IfcHalfSpaceSolid
            //    {
            //        BaseSurface = new IfcPlane
            //            {
            //                Position = pos.IfcAxis2Placement3D,
            //            },
            //            AgreementFlag = true,

            //    };

            //IfcShapeRepresentation ifcShapeRepresentation = new IfcShapeRepresentation
            //{
            //    ContextOfItems = HeaderSetting.Setting3D.GeometricRepresentationContext,
            //    RepresentationIdentifier = "Body",
            //    RepresentationType = "SweptSolid",
            //    //RepresentationIdentifier = "Body",
            //    //RepresentationType = "SolidModel",
            //    Items = new List<IfcRepresentationItem>(),
            //};
            //ifcShapeRepresentation.Items.Add(ifcHalfSpaceSolid);

            //IfcProductDefinitionShape ifcProductDefinitionShape = new IfcProductDefinitionShape
            //{
            //    // Name=
            //    // Description =
            //    Representations = new List<IfcRepresentation>(),
            //};
            //ifcProductDefinitionShape.Representations.Add(ifcShapeRepresentation);

            _ifcOpeningElement = new IfcOpeningElement
            {
                GlobalId     = IfcGloballyUniqueId.NewGuid(),
                OwnerHistory = hostElement.IfcObject.OwnerHistory,
                // Name =
                // Description =
                ObjectType      = "Opening",
                ObjectPlacement = ObjectBbLocalPlacement.IfcLocalPlacement,
                Representation  = bbExtrudedGeometry.IfcProductDefinitionShape,
                //Representation = ifcProductDefinitionShape,
            };

            _ifcRelVoidsElement = new IfcRelVoidsElement
            {
                GlobalId                = IfcGloballyUniqueId.NewGuid(),
                OwnerHistory            = hostElement.IfcObject.OwnerHistory,
                Name                    = "Skewed End",
                RelatingBuildingElement = hostElement.IfcObject as IfcElement,
                RelatedOpeningElement   = _ifcOpeningElement,
            };
        }