private void Initialize(IfcStore model) { units = new UnitAssignmentRelation(model); material = new Material(model, "S235J0"); //creating main project axis CartesianPoint3D point = new CartesianPoint3D(model, 0, 0, 0); DirectionVector3D mainAxis = new DirectionVector3D(model, 0, 0, 1); DirectionVector3D refAxis = new DirectionVector3D(model, 1, 0, 0); projectAxis = new PlacementAxis3D(model, point, mainAxis, refAxis); context = new GeometricRepresentationContext(model, "Model", 3, 0.00001, projectAxis); subContext = new GeometricRepresentationSubContext(model, "Body", "Model", Xbim.Ifc2x3.RepresentationResource.IfcGeometricProjectionEnum.MODEL_VIEW, context); //creating project project = new Project(model, "RevitProject", context, units); //creating site sitePlacement = new LocalPlacement(model, null, projectAxis); site = new Site(model, "Site", sitePlacement, IfcElementCompositionEnum.ELEMENT, 0); PostalAddress post = new PostalAddress(model, "IN YOUR MOMMA ROOM"); buildingPlacement = new LocalPlacement(model, sitePlacement, projectAxis); building = new Building(model, "Building", buildingPlacement, IfcElementCompositionEnum.ELEMENT, post); stories = new List <BuildingStorey>(); InitializeRelations(); }
public Project(IfcStore model, string name, GeometricRepresentationContext context, UnitAssignmentRelation units) { ifcProject = model.Instances.New <IfcProject>(p => { p.Name = name; p.RepresentationContexts.Add(context.IfcRepresenationContext); p.UnitsInContext = units.IfcUnitAssignment; }); this.name = name; this.context = context; this.units = units; }