CommandConstraints.cpp
Tangency constrain
Code: Select all
void CmdSketcherConstrainTangent::applyConstraint(std::vector<SelIdPair> &selSeq, int seqIndex)
{
.....
int GeoId1 = GeoEnum::GeoUndef, GeoId2 = GeoEnum::GeoUndef, GeoId3 = GeoEnum::GeoUndef;
Sketcher::PointPos PosId1 = Sketcher::PointPos::none, PosId2 = Sketcher::PointPos::none, PosId3 = Sketcher::PointPos::none;
// check if the edge already has a Block constraint
if ( areBothPointsOrSegmentsFixed(Obj,GeoId1,GeoId2) ) {
showNoConstraintBetweenFixedGeometry();
return;
}
switch (seqIndex) {
case 0: // {SelEdge, SelEdgeOrAxis}
case 1: // {SelEdgeOrAxis, SelEdge}
case 2: // {SelEdge, SelExternalEdge}
case 3: // {SelExternalEdge, SelEdge}
{
GeoId1 = selSeq.at(0).GeoId; GeoId2 = selSeq.at(1).GeoId;
.....
I don't know if this IF has some use but the misplacement might cause some bad behaviour?