Example #1
0
        //        ExtrudedElement(
        //            string name,
        //            Profile profile,
        //            double length,
        //            Coordinate3D position,
        //            Direction3D zAxis,
        //            Direction3D xAxis,
        //            Direction3D extrudeDirection,
        //            Element container)
        //            :this (name, profile, length, position, zAxis, xAxis, extrudeDirection,
        //                   container.ObjectLocalPlacement, container.IfcElement.OwnerHistory)
        //        {}
        //
        //        ExtrudedElement(
        //            string name,
        //            Profile profile,
        //            double length,
        //            Coordinate3D position,
        //            Direction3D zAxis,
        //            Direction3D xAxis,
        //            Direction3D extrudeDirection,
        //            SpatialElement container)
        //            :this (name, profile, length, position, zAxis, xAxis, extrudeDirection,
        //                   container.ObjectLocalPlacement, container.IfcSpatialStructureElement.OwnerHistory)
        //        {}
        BbExtrudedElement(
			string name,
			BbProfile profile,
			double length,
			BbCoordinate3D position,
			BbDirection3D zAxis,
			BbDirection3D xAxis,
			BbDirection3D extrudeDirection,
			BbLocalPlacement3D containerLocation,
			IfcOwnerHistory ownerHistory,
			Type ifcEntityType)
        {
            Name = name;
            Profile = profile;
            Length = length;
            BbPosition3D pos = BbPosition3D.Create(position, zAxis, xAxis);

            ObjectBbLocalPlacement = BbLocalPlacement3D.Create(
                containerLocation, pos	);

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

            _ifcElement = Activator.CreateInstance(ifcEntityType) as IfcElement;
            _ifcElement.GlobalId = IfcGloballyUniqueId.NewGuid();
            _ifcElement.OwnerHistory = ownerHistory;
            _ifcElement.Name = Name;
                //ObjectType = ,
            _ifcElement.ObjectPlacement = ObjectBbLocalPlacement.IfcLocalPlacement;
            _ifcElement.Representation = bbExtrudedGeometry.IfcProductDefinitionShape;
        }
Example #2
0
        BbBrepElement(
            string name,
            BbBRepGeometry brepGeometry,
            BbCoordinate3D position,
            BbDirection3D zAxis,
            BbDirection3D xAxis,
            BbLocalPlacement3D containerLocation,
            IfcOwnerHistory ownerHistory,
            Type IfcEntityType)
        {
            Name = name;
            //Profile = profile;
            BbPosition3D pos = BbPosition3D.Create(position, zAxis, xAxis);

            ObjectBbLocalPlacement = BbLocalPlacement3D.Create(
                containerLocation, pos	);

            //			ifcBuildingElement = Activator.CreateInstance(EbConstants.Part21NSName, EbConstants.Part21NSName + "." + ifcEntityName);
            ifcElement = Activator.CreateInstance(IfcEntityType) as IfcElement;

            ifcElement.GlobalId = IfcGloballyUniqueId.NewGuid();
            ifcElement.OwnerHistory = ownerHistory;
            ifcElement.Name = Name;
            //ObjectType = ,
            ifcElement.ObjectPlacement = ObjectBbLocalPlacement.IfcLocalPlacement;
            ifcElement.Representation = brepGeometry.IfcProductDefinitionShape;
        }
Example #3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="authorName"></param>
        /// <param name="authorCompany"></param>
        /// <param name="softwareName"></param>
        /// <param name="softwareVersion"></param>
        /// <param name="softwareCompany"></param>
        public void SetCreator(
            string authorName,
            string authorCompany,
            string softwareName,
            string softwareVersion,
            string softwareCompany)
        {
            var person = new IfcPerson
            {
                GivenName = authorName,
                FamilyName = authorName
            };
            var organization = new IfcOrganization(authorCompany);

            var personAndOrganization = new IfcPersonAndOrganization(person, organization);

            var appOrganization = new IfcOrganization(softwareCompany);

            var application = new IfcApplication
            {
                ApplicationDeveloper = appOrganization,
                Version = softwareVersion,
                ApplicationFullName = softwareName,
                ApplicationIdentifier = softwareCompany + @"." + softwareName,
            };
            IfcOwnerHistory = new IfcOwnerHistory()
            {
                OwningUser = personAndOrganization,
                OwningApplication = application,
                State = IfcStateEnum.READONLY,
                ChangeAction = IfcChangeActionEnum.NOCHANGE,
                CreationDate = IfcTimeStamp.GetTimeStamp(),
            };
        }
Example #4
0
 public void RetrieveCreator(IfcOwnerHistory ifcOwnerHistory)
 {
     IfcOwnerHistory = ifcOwnerHistory;
 }