[Sketcher] Fix some issues in trim
1. Don't bother deleting internal geometry first. 2. Don't assume all new constraints are well formed.
This commit is contained in:
@@ -3830,7 +3830,6 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
|
||||
}
|
||||
// Remove internal geometry beforehand for now
|
||||
// FIXME: we should be able to transfer these to new curves smoothly
|
||||
deleteUnusedInternalGeometryAndUpdateGeoId(GeoId);
|
||||
// auto geo = getGeometry(GeoId);
|
||||
const auto* geoAsCurve = static_cast<const Part::GeomCurve*>(getGeometry(GeoId));
|
||||
|
||||
@@ -3964,7 +3963,7 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
|
||||
|
||||
delConstraints(idsOfOldConstraints);
|
||||
|
||||
if (isClosedCurve(geoAsCurve)) {
|
||||
if (!isClosedCurve(geoAsCurve)) {
|
||||
transferConstraints(GeoId, PointPos::start, newIds.front(), PointPos::start, true);
|
||||
transferConstraints(GeoId, PointPos::end, newIds.back(), PointPos::end, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user