Sketch: Fix creating the shape of a sketch

SketchObject::buildShape() used the geometries as they were created by the user. However, they are not accurate enough in order
to create a closed wire. Instead the geometries after running the solver must be used because they are guaranteed to be accurate.
This commit is contained in:
wmayer
2024-10-15 22:05:14 +02:00
committed by Chris Hennes
parent d2adeb6e69
commit d2637ec881

View File

@@ -323,7 +323,10 @@ void SketchObject::buildShape() {
std::vector<Part::TopoShape> shapes;
std::vector<Part::TopoShape> vertices;
int geoId =0;
for(auto geo : getInternalGeometry()) {
// get the geometry after running the solver
auto geometries = solvedSketch.extractGeometry();
for(auto geo : geometries) {
++geoId;
if(GeometryFacade::getConstruction(geo)) {
continue;
@@ -347,6 +350,10 @@ void SketchObject::buildShape() {
}
}
for (auto geo : geometries) {
delete geo;
}
for(int i=2;i<ExternalGeo.getSize();++i) {
auto geo = ExternalGeo[i];
auto egf = ExternalGeometryFacade::getFacade(geo);