Add documentation specifically about swept disk solid geometry for rebar

This commit is contained in:
Dion Moult
2023-07-23 23:41:33 +10:00
parent 1a54f54c64
commit 411ec36e65
2 changed files with 22 additions and 0 deletions
@@ -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
<autoapi/ifcopenshell/util/shape_builder/index>`.
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB