diff --git a/src/ifcopenshell-python/docs/ifcopenshell-python/geometry_creation.rst b/src/ifcopenshell-python/docs/ifcopenshell-python/geometry_creation.rst index 20f25deeb1..05bf981cc8 100644 --- a/src/ifcopenshell-python/docs/ifcopenshell-python/geometry_creation.rst +++ b/src/ifcopenshell-python/docs/ifcopenshell-python/geometry_creation.rst @@ -529,6 +529,28 @@ Here is an example which generates a parametric table. .. image:: images/custom-representation.png +Another really common case for using the shape builder is when creating +**Representations** of reinforcement bars, cables, or circular railings. IFC +has a special type of extrusion specifically for extruding a disk (i.e. circle) +along a path. This should almost always be used for usecases like reinforcement +bar. + +.. code-block:: python + + builder = ifcopenshell.util.shape_builder.ShapeBuilder(model) + + # Sweep a 10mm radius disk along a polyline with a couple of straight segments and an arc. + curve = builder.polyline( + [(0., 0., 0.), (100., 0., 0.), (171., 29., 0.), (200., 100., 0.), (200., 200., 0.)], + arc_points=[2]) + swept_curve = builder.create_swept_disk_solid(curve, 10) + + # Create a body representation + body = ifcopenshell.util.representation.get_context(model, "Model", "Body", "MODEL_VIEW") + representation = builder.get_representation(body, swept_curve) + +.. image:: images/swept-disk-representation.png + For more information, consult the :doc:`shape builder documentation `. diff --git a/src/ifcopenshell-python/docs/ifcopenshell-python/images/swept-disk-representation.png b/src/ifcopenshell-python/docs/ifcopenshell-python/images/swept-disk-representation.png new file mode 100644 index 0000000000..3bd2dfdfed Binary files /dev/null and b/src/ifcopenshell-python/docs/ifcopenshell-python/images/swept-disk-representation.png differ