### Example Usage Source: https://github.com/buildingsmart/ifc4.x-development/blob/ifc4.3-main/code/README.md Provide concrete examples to accompany abstract concepts. Examples should be short, use simple language, and relatable scenarios. ```markdown > EXAMPLE A spatial zone may be given a _Name_ of "1-003", typically a running > number provided by default by the application. Then _LongName_ may then be > "Office", with a _Description_ of "Corner office with habour view". ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/buildingsmart/ifc4.x-development/blob/ifc4.3-main/code/README.md Installs all necessary Python modules from the requirements.txt file. Ensure you are in the 'code/' directory. ```bash pip install -r requirements.txt ``` -------------------------------- ### IFC Instance Identification Example Source: https://github.com/buildingsmart/ifc4.x-development/blob/ifc4.3-main/docs/templates/Object Attributes/Software Identity/README.md This example shows how an instance is listed with a unique positive integer in the STEP physical file format. This identifier is file-specific and not stable across exchanges. ```plaintext #123=IFCPERSON($,$,'Alice',$,$,$,$,$); ``` -------------------------------- ### Clone Sample Models Source: https://github.com/buildingsmart/ifc4.x-development/blob/ifc4.3-main/code/README.md Clones the sample IFC models into a directory named 'examples' one level up from the current repository. This is used to load example files into the running website. ```bash cd .. git clone https://github.com/buildingSMART/IFC4.3.x-sample-models examples ``` -------------------------------- ### Download Static Documentation with wget Source: https://github.com/buildingsmart/ifc4.x-development/blob/ifc4.3-main/code/README.md Use wget to recursively download the website for offline viewing. Adjust recursion depth for testing. ```bash $ wget -r -l inf -E -k -p -H -Draw.githubusercontent.com,unpkg.com,polyfill.io,cdn.jsdelivr.net,cdnjs.cloudflare.com,i.creativecommons.org,localhost http://localhost:5000 ``` -------------------------------- ### IfcTriangulatedFaceSet Example Geometry Source: https://github.com/buildingsmart/ifc4.x-development/blob/ifc4.3-main/docs/schemas/resource/IfcGeometricModelResource/Entities/IfcTriangulatedFaceSet.md This example shows the structure of CoordIndex and IfcCartesianPointList3D for an IfcTriangulatedFaceSet. CoordIndex defines the triangles by referencing points, and IfcCartesianPointList3D provides the coordinates for these points. ```text CoordIndex: ((1,6,5), (1,2,6), (6,2,7), (7,2,3), (7,8,6), (6,8,5), (5,8,1), (1,8,4), (4,2,1), (2,4,3), (4,8,7), (7,3,4)) IfcCartesianPointList3D: ((0.,0.,0.), (1.,0.,0.), (1.,1.,0.), (0.,1.,0.), (0.,0.,2.), (1.,0.,2.), (1.,1.,2.), (0.,1.,2.)) ``` -------------------------------- ### Set up HTTPS Basic Auth for Production Deployment Source: https://github.com/buildingsmart/ifc4.x-development/blob/ifc4.3-main/code/README.md Create an htpasswd file for basic authentication and obtain an SSL certificate using Certbot for secure HTTPS access. This is a prerequisite for deploying the production website. ```bash # in case of ISO mode htpasswd -b proxy/auth/.htpasswd $USERNAME $PASSWORD docker run -it -v $PWD/proxy/cert:/etc/letsencrypt \ -p 80:80 \ certbot/certbot certonly --standalone --register-unsafely-without-email --agree-tos --cert-name host \ -d $DOMAIN_NAME ``` -------------------------------- ### Constrain Task Start Date (As Soon As Possible) Source: https://github.com/buildingsmart/ifc4.x-development/blob/ifc4.3-main/docs/schemas/core/IfcProcessExtension/Entities/IfcTask.md Use IfcMetric with ConstraintGrade=SOFT and Benchmark=LESSTHAN to indicate that a task should start as soon as possible. This constrains the ScheduleStart attribute. ```dot digraph dot_neato { IfcTask [pos="0,0!"]; IfcTaskTime [pos="0,-70!"]; IfcRelAssociatesConstraint [label=Constraint>, pos="200,0!"]; IfcObjective [label=<{IfcObjective | ObjectiveQualifier: PARAMETER}>, pos="400,0!"]; IfcMetric [label=<{IfcMetric | ConstraintGrade: SOFT
Benchmark: LESSTHAN}>, pos="400,-70!"]; IfcReference [label=<{IfcReference | AttributeIdentifier: TaskTime}>, pos="400,-140!"]; IfcReference2 [label=<{IfcReference | AttributeIdentifier: ScheduleStart }>, pos="400,-210!"]; IfcTask -> IfcTaskTime [label="TaskTime"] IfcRelAssociatesConstraint -> IfcTask [headlabel="RelatedObjects[1]", labelangle=90, labeldistance="3"] IfcRelAssociatesConstraint -> IfcObjective [taillabel="RelatingConstraint", labelangle=90, labeldistance="3"] IfcObjective -> IfcMetric [headlabel="BenchmarkValues[1]"]; IfcMetric -> IfcReference [headlabel="ReferencePath"]; IfcReference -> IfcReference2 [headlabel="InnerReference"]; } ``` -------------------------------- ### Deploy Website with Docker Compose Source: https://github.com/buildingsmart/ifc4.x-development/blob/ifc4.3-main/code/README.md Build and start the Docker containers for the website using docker-compose. This command ensures all services are running in detached mode and rebuilds if necessary. ```bash docker compose up -d --build ```