Skip to content

Commit

Permalink
fixes for function names for notebook 05
Browse files Browse the repository at this point in the history
  • Loading branch information
SigveMartin committed May 13, 2019
1 parent e9babe0 commit b1116ac
Showing 1 changed file with 11 additions and 18 deletions.
Expand Up @@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -64,7 +64,7 @@
"ContainedInStructure\t : \tSET [0:1] OF IfcRelContainedInSpatialStructure FOR RelatedElements;\n",
"\"\"\"\n",
"\n",
"def addObjectToRelAss(object_to_add,relAss):\n",
"def addObjectToRel(object_to_add,relAss):\n",
" if relAss.is_a(\"IfcRelationship\"):\n",
" if object_to_add.is_a(\"IfcElement\"):\n",
" if relAss.is_a(\"IfcRelAssignsToProduct\"):\n",
Expand Down Expand Up @@ -93,27 +93,20 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"## Helper function. "
"## Main function"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import ifcopenshell as ios\n",
"def changeWallToProduct(ifc_in,ifc_out):\n",
"def changeProxyToWall(ifc_in,ifc_out):\n",
" ifc_type_in = \"IfcBuildingElementProxy\"\n",
" ifc_type_out = \"IfcWall\"\n",
"\n",
Expand Down Expand Up @@ -273,13 +266,13 @@
" if len(rel_ass_objects)>0:\n",
" print(len(rel_ass_objects))\n",
" for rel_ass_obj in rel_ass_objects:\n",
" addObjectToRelAss(new_elem,rel_ass_obj)\n",
" addObjectToRel(new_elem,rel_ass_obj)\n",
" f.write(ifc_out) \n"
]
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand All @@ -303,12 +296,12 @@
}
],
"source": [
"changeWallToProduct(\"models/11134_D_Motebello_Heistopp_Rev.ifc\",\"models/11134_D_Motebello_Heistopp_Rev_edited.ifc\")"
"changeProxyToWall(\"models/11134_D_Motebello_Heistopp_Rev.ifc\",\"models/11134_D_Motebello_Heistopp_Rev_edited.ifc\")"
]
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand All @@ -331,7 +324,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit b1116ac

Please sign in to comment.