- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
const NMath::TLineEquation<> C_E_(C_, E_);
const NMath::TLineEquation<> D_A_(D_, A_);
const NMath::TVector<2> F_=C_E_.Intersection(D_A_);
TSafeFloat lpr=_state._safeDistance->Value()+_state._instrumentRadius->Value();
if((F_-B).Length()>lpr)
{
const NMath::TVector<2> F__=(D_+E_)/2.0;//F
//...
const NMath::TVector<2> TV=D_-E_;
const NMath::TVector<2> F___=PointAtDistance(B,TV,lpr, m90);//F*
const NMath::TVector<2> DEDir=rt90(F___-B, m90).Normalize()*10;
const NMath::TLineEquation<> DE(F___,F___+DEDir);
const NMath::TVector<2> E=DE.Intersection(C_E_);
const NMath::TVector<2> D=DE.Intersection(D_A_);
TpointerAnyCommand result;
result=new TLineCommand(CurrentCommand.SourceCommand(),E-C_,OnOffCorrectionEmpty);
_resultDestination.push(result);
result=new TLineCommand(CurrentCommand.SourceCommand(),D-E,OnOffCorrectionEmpty);
_resultDestination.push(result);
result=new TLineCommand(CurrentCommand.SourceCommand(),D_-D,OnOffCorrectionEmpty);
_resultDestination.push(result);
}