140{
142 throw std::runtime_error(
_u8L(
"Profile has fewer than 2 points"));
143
144 BRepBuilderAPI_MakeWire builder;
145 for (
size_t i = 0; i <
points.size(); ++i) {
148 gp_Pnt pa(a3.x(), a3.y(), a3.z());
149 gp_Pnt pb(b3.x(), b3.y(), b3.z());
150 builder.Add(BRepBuilderAPI_MakeEdge(pa, pb).
Edge());
151 }
152 builder.Build();
153 if (!builder.IsDone())
154 throw std::runtime_error(
_u8L(
"Failed to build wire from profile"));
155 return builder.Wire();
156}
@ Edge
Definition Measure.hpp:26
Eigen::Matrix< double, 3, 1, Eigen::DontAlign > Vec3d
Definition Point.hpp:68
#define _u8L(s)
Definition I18N.hpp:11