getFeatureResult(theSplitFeature));
createConstraint(SketchPlugin_ConstraintTangent::ID(), getFeatureResult(theSplitFeature),
getFeatureResult(aBaseFeature));
- if (theAfterFeature.get()) {
+ if (theAfterFeature.get() && theAfterFeature != aBaseFeature) {
createConstraint(SketchPlugin_ConstraintEqual::ID(), getFeatureResult(aBaseFeature),
getFeatureResult(theAfterFeature));
createConstraint(SketchPlugin_ConstraintTangent::ID(), getFeatureResult(theSplitFeature),
{
/// if first point is closer to last point, wrap first and last values
if (theStartPointAttr->pnt()->distance(theFirstPointAttr->pnt()) >
- theEndPointAttr->pnt()->distance(theLastPointAttr->pnt())) {
+ theStartPointAttr->pnt()->distance(theLastPointAttr->pnt())) {
AttributePoint2DPtr aTmpPoint = theFirstPointAttr;
theFirstPointAttr = theLastPointAttr;
theLastPointAttr = aTmpPoint;
theSourceAttribute);
if (aModifiedAttribute.get() && aSourceAttribute.get())
- aSourceAttribute->setValue(aModifiedAttribute->pnt());
+ aModifiedAttribute->setValue(aSourceAttribute->pnt());
}
FeaturePtr SketchPlugin_ConstraintSplit::createArcFeature(const FeaturePtr& theBaseFeature,