void Run(){ wxGetApp().m_digitizing->digitized_point = DigitizedPoint(line_for_tool->A->m_p, DigitizeInputType); Drawing *pDrawingMode = dynamic_cast<Drawing *>(wxGetApp().input_mode_object); if (pDrawingMode != NULL) { pDrawingMode->AddPoint(); } }
void Run(){ gp_Pnt midpoint((line_for_tool->A->m_p.XYZ() + line_for_tool->B->m_p.XYZ()) /2); wxGetApp().m_digitizing->digitized_point = DigitizedPoint(midpoint, DigitizeInputType); Drawing *pDrawingMode = dynamic_cast<Drawing *>(wxGetApp().input_mode_object); if (pDrawingMode != NULL) { pDrawingMode->AddPoint(); } }
void Run() { CBox box; sketch_for_tools->GetBox(box); double centre[3]; box.Centre(centre); wxGetApp().m_digitizing->digitized_point = DigitizedPoint(gp_Pnt(box.MinX(), centre[1], centre[2]), DigitizeInputType); Drawing *pDrawingMode = dynamic_cast<Drawing *>(wxGetApp().input_mode_object); if (pDrawingMode != NULL) { pDrawingMode->AddPoint(); } }
void Run(){ wxGetApp().m_digitizing->digitized_point = DigitizedPoint(which->m_p, DigitizeInputType); Drawing *pDrawingMode = dynamic_cast<Drawing *>(wxGetApp().input_mode_object); if (pDrawingMode != NULL) { pDrawingMode->AddPoint(); } DigitizeMode *pDigitizeMode = dynamic_cast<DigitizeMode *>(wxGetApp().input_mode_object); if (pDigitizeMode != NULL) { // Tell the DigitizeMode class that we're specifying the // location rather than the mouse location over the graphics window. pDigitizeMode->DigitizeToLocatedPosition( which->m_p ); } }
void Run(){ Drawing *pDrawingMode = dynamic_cast<Drawing *>(wxGetApp().input_mode_object); if (pDrawingMode != NULL) { wxString message(_("Enter offset in X,Y,Z format (with commas between them)")); wxString caption(_("Apply Offset To Selected Location")); wxString default_value(_T("0,0,0")); wxString value = wxGetTextFromUser(message, caption, default_value); wxStringTokenizer tokens(value,_T(" :,\t\n")); gp_Pnt location(which->m_p); for (int i=0; i<3; i++) { if (tokens.HasMoreTokens()) { double offset = 0.0; wxString token = tokens.GetNextToken(); if (token.ToDouble(&offset)) { offset *= wxGetApp().m_view_units; switch(i) { case 0: location.SetX( location.X() + offset ); break; case 1: location.SetY( location.Y() + offset ); break; case 2: location.SetZ( location.Z() + offset ); break; } } } } wxGetApp().m_digitizing->digitized_point = DigitizedPoint(location, DigitizeInputType); pDrawingMode->AddPoint(); } }
void Run(){ Drawing *pDrawingMode = dynamic_cast<Drawing *>(wxGetApp().input_mode_object); DigitizeMode *pDigitizeMode = dynamic_cast<DigitizeMode *>(wxGetApp().input_mode_object); if ((pDrawingMode != NULL) || (pDigitizeMode != NULL)) { gp_Pnt location = HPoint::GetOffset(which->m_p); if (pDrawingMode != NULL) { wxGetApp().m_digitizing->digitized_point = DigitizedPoint(location, DigitizeInputType); pDrawingMode->AddPoint(); } if (pDigitizeMode != NULL) { pDigitizeMode->DigitizeToLocatedPosition( location ); } } }
void Run() { wxGetApp().m_digitizing->digitized_point.m_type = DigitizeInputType; m_drawing->AddPoint(); }