Create via Code

Starting a Model

Assigning Beams

Python
1
import clr
2
import sys
3
4
clr.AddReferenceToFileAndPath(r"C:\Program Files\Geometry Gym\Rhino3d\ggRhinoIFC.dll")
5
6
import GeometryGym.Ifc as gg
7
8
from System.Collections.Generic import List
9
from System import Guid
10
from Rhino.Geometry import Transform
11
from Rhino.Geometry import Point3d
12
from Rhino.Geometry import Vector3d
13
from Rhino.Geometry import Line
14
from Rhino.Geometry import Plane
15
16
ipe = "IPE300"
17
db = gg.DatabaseIfc(True,gg.ModelView.Ifc2x3Coordination)
18
19
building = gg.IfcBuilding(db,"PythonBuilding")
20
project = gg.IfcProject(building,"PythonProject", gg.IfcUnitAssignment.Length.Millimetre)
21
s355 = gg.IfcMaterial(db,"S355JR")
22
s355.Category = "STEEL"
23
pd = gg.IfcIShapeProfileDef(db,ipe,150,300,7.1,10.7)
24
pd.FilletRadius = 15
25
#ifcBeamTypeID = GuidEncoder.Encode(Guid("{FA07940E-19FC-417a-B7F1-09A0CCF39B74}"))
26
#Can create a unique identifier if you wish else leave blank
27
28
mp = gg.IfcMaterialProfile(ipe,s355,pd)
29
30
mpUsage = gg.IfcMaterialProfileSetUsage(mp)
31
32
#bt = gg.IfcBeamType(ipe,mp,gg.IfcBeamTypeEnum.BEAM)
33
#ln = Line(Point3d(0,0,0),Point3d(1000,0,0))
34
#clipPlanes = List[Plane]()
35
36
#beam = gg.IfcBeamStandardCase(building,bt,ln,Vector3d.YAxis, gg.IfcCardinalPointReference.MID,clipPlanes)
37
38
axisPlacement = gg.IfcAxis2Placement3D(gg.IfcCartesianPoint(db,0,0,0),gg.IfcDirection(db,1,0,0),gg.IfcDirection(db,0,1,0))
39
40
beam = gg.IfcBeamStandardCase(building,mpUsage,axisPlacement,1000)
41
42
a = db.ToString()
Copied!