public RectangularCrossSection(ModelOptions modelOption, double x, double y, double depth) { //Position of the 2D rectangular section (Will remain fixed). CartesianPoint2D p = CartesianPoint2D.Origin(modelOption.Model); DirectionVector2D v = DirectionVector2D.UnitX(modelOption.Model); PlacementAxis2D postion = new PlacementAxis2D(modelOption.Model, p, v); RectangleProfile rectProfile = new RectangleProfile(modelOption.Model, x, y, Xbim.Ifc2x3.ProfileResource.IfcProfileTypeEnum.AREA, postion); //Local placement of the 3D definition shape of the column(Will remain fixed). CartesianPoint3D Expoint = CartesianPoint3D.Origin(modelOption.Model); DirectionVector3D exMain = DirectionVector3D.UnitZ(modelOption.Model); DirectionVector3D exReff = DirectionVector3D.UnitX(modelOption.Model); PlacementAxis3D Exaxis = new PlacementAxis3D(modelOption.Model, Expoint, exMain, exReff); DirectionVector3D extVec = DirectionVector3D.UnitZ(modelOption.Model); ExtrudedAreaSolid solid = new ExtrudedAreaSolid(modelOption.Model, depth, rectProfile, extVec, Exaxis); ShapeRepresentation representation = new ShapeRepresentation(modelOption.Model, modelOption.Environment.SubContext, new List <ExtrudedAreaSolid>() { solid }); ProductShape = new ProductionDefinitionShape(modelOption.Model, new List <ShapeRepresentation>() { representation }); //Local placement of the object placement of the column (This will be manipulated according to Autodesk Revit readings). CartesianPoint3D point = CartesianPoint3D.Origin(modelOption.Model); DirectionVector3D main = DirectionVector3D.UnitZ(modelOption.Model); DirectionVector3D reff = DirectionVector3D.UnitX(modelOption.Model); PlacementAxis3D axis = new PlacementAxis3D(modelOption.Model, point, main, reff); LocalPlacement placement = new LocalPlacement(modelOption.Model, modelOption.Environment.Stories.FirstOrDefault().LocalPlacement, axis); }
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 TeklaPlatePlacementInitializer(IfcStore model, Model_info.Environment env, Point origin, Vector main, Vector reff) { this.origin = new CartesianPoint3D(model, origin.X, origin.Y, origin.Z); this.main = new DirectionVector3D(model, main.X, main.Y, main.Z); this.reff = new DirectionVector3D(model, reff.X, reff.Y, reff.Z); PlacementAxis3D axis = new PlacementAxis3D(model, this.origin, this.main, this.reff); localPlacement = new LocalPlacement(model, env.Stories.FirstOrDefault().LocalPlacement, axis); }
public GeometricRepresentationContext(IfcStore model, string contextType, long coordinateSpaceDim, double precision, PlacementAxis3D worldCoordinateSystem) { this.contextType = contextType; this.coordinateSpaceDimension = coordinateSpaceDim; this.precision = precision; this.worldCoordinateSystem = worldCoordinateSystem; this.Model = model; ifcRepresenationContext = Model.Instances.New <IfcGeometricRepresentationContext>(r => { r.ContextType = contextType; r.CoordinateSpaceDimension = coordinateSpaceDim; r.Precision = precision; r.WorldCoordinateSystem = worldCoordinateSystem.IfcAxis2Placement3D; }); }
public ExtrudedAreaSolid(IfcStore model, double depth, IProfile profile, DirectionVector3D direction, PlacementAxis3D placement) { this.Model = model; this.depth = depth; this.profile = profile; this.extrudedDirection = direction; this.position = placement; ifcExtrusionSolid = model.Instances.New <IfcExtrudedAreaSolid>(e => { e.Depth = depth; e.ExtrudedDirection = extrudedDirection.IfcDirection; e.Position = position.IfcAxis2Placement3D; e.SweptArea = profile.ProfileDef; }); }