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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user