Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/geoml/utilities/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,19 @@ Shape make_fillet (Shape const& solid , Shape const& edges, Standard_Real radius
return operation.value();
}

TopoDS_Shape make_compound (const std::vector<TopoDS_Shape> & shapes)
{
TopoDS_Compound compound;
BRep_Builder builder;
builder.MakeCompound(compound);

for (auto shape: shapes)
{
builder.Add(compound, shape);
}

return compound;
}


} // namespace geoml
7 changes: 7 additions & 0 deletions src/geoml/utilities/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,11 @@ extract_control_point_vector_in_V_direction (const Handle(Geom_BSplineSurface) &
*/
GEOML_API_EXPORT Shape make_fillet (Shape const& solid , Shape const& edges, Standard_Real radius);

/**
* @brief Make a compound of a vector of TopoDS_Shapes
*
* @param shapes The vector of shapes
*/
GEOML_API_EXPORT TopoDS_Shape make_compound (const std::vector<TopoDS_Shape> &shapes);

} // namespace geoml