예제 #1
0
PocketDlg::PocketDlg(wxWindow *parent, CPocket* object, const wxString& title, bool top_level)
             : SketchOpDlg(parent, object, title, false)
{
	std::list<HControl> save_leftControls = leftControls;
	leftControls.clear();

	// add all the controls to the left side
	leftControls.push_back(MakeLabelAndControl(_("Step Over"), m_lgthStepOver = new CLengthCtrl(this)));
	leftControls.push_back(MakeLabelAndControl(_("Material Allowance"), m_lgthMaterialAllowance = new CLengthCtrl(this)));

	wxString starting_place_choices[] = {_("Boundary"), _("Center")};
	leftControls.push_back(MakeLabelAndControl(_("Starting Place"), m_cmbStartingPlace = new wxComboBox(this, ID_STARTING_PLACE, _T(""), wxDefaultPosition, wxDefaultSize, 2, starting_place_choices)));

	wxString cut_mode_choices[] = {_("Conventional"), _("Climb")};
	leftControls.push_back(MakeLabelAndControl(_("Cut Mode"), m_cmbCutMode = new wxComboBox(this, ID_CUT_MODE, _T(""), wxDefaultPosition, wxDefaultSize, 2, cut_mode_choices)));

	leftControls.push_back( HControl( m_chkKeepToolDown = new wxCheckBox( this, ID_KEEP_TOOL_DOWN, _("Keep Tool Down") ), wxALL ));
	leftControls.push_back( HControl( m_chkUseZigZag = new wxCheckBox( this, ID_USE_ZIG_ZAG, _("Use Zig Zag") ), wxALL ));
	leftControls.push_back(MakeLabelAndControl(_("Zig Zag Angle"), m_dblZigAngle = new CDoubleCtrl(this)));
	leftControls.push_back( HControl( m_chkZigUnidirectional = new wxCheckBox( this, ID_ZIG_UNIDIRECTIONAL, _("Zig Unidirectional") ), wxALL ));

	for(std::list<HControl>::iterator It = save_leftControls.begin(); It != save_leftControls.end(); It++)
	{
		leftControls.push_back(*It);
	}

	if(top_level)
	{
		HeeksObjDlg::AddControlsAndCreate();
		m_cmbSketch->SetFocus();
	}
}
예제 #2
0
DrillingDlg::DrillingDlg(wxWindow *parent, CDrilling* object, const wxString& title, bool top_level)
: DepthOpDlg(parent, object, true, title, false)
{
	std::list<HControl> save_leftControls = leftControls;
	leftControls.clear();

	// add all the controls to the left side
	leftControls.push_back(MakeLabelAndControl(_("Points"), m_idsPoints = new CObjectIdsCtrl(this), m_btnPointsPick = new wxButton(this, ID_POINTS_PICK, _("Pick"))));
	leftControls.push_back(MakeLabelAndControl(_("Dwell"), m_dblDwell = new CDoubleCtrl(this)));
	leftControls.push_back( HControl( m_chkFeedRetract = new wxCheckBox( this, ID_FEED_RETRACT, _("Feed Retract") ), wxALL ));
	leftControls.push_back( HControl( m_chkRapidToClearance = new wxCheckBox( this, ID_RAPID_TO_CLEARANCE, _("Rapid to Clearance") ), wxALL ));
	leftControls.push_back( HControl( m_chkStopSpindleAtBottom = new wxCheckBox( this, ID_STOP_SPINDLE, _("Stop Spindle at Bottom") ), wxALL ));
	leftControls.push_back( HControl( m_chkInternalCoolantOn = new wxCheckBox( this, ID_INTERNAL_COOLANT_ON, _("Interal Coolant On") ), wxALL ));

	for(std::list<HControl>::iterator It = save_leftControls.begin(); It != save_leftControls.end(); It++)
	{
		leftControls.push_back(*It);
	}

	if(top_level)
	{
		HeeksObjDlg::AddControlsAndCreate();
		m_idsPoints->SetFocus();
	}
}
예제 #3
0
SpeedOpDlg::SpeedOpDlg(wxWindow *parent, CSpeedOp* object, bool some_controls_on_left, const wxString& title, bool top_level)
             : OpDlg(parent, object, title, false)
{
	std::list<HControl> *feeds_and_speeds_control_list = &rightControls;
	if(some_controls_on_left)feeds_and_speeds_control_list = &leftControls;

	// add some of the controls to the right side
	feeds_and_speeds_control_list->push_back(MakeLabelAndControl(_("Horizontal Feedrate"), m_lgthHFeed = new CLengthCtrl(this)));
	feeds_and_speeds_control_list->push_back(MakeLabelAndControl(_("Vertical Feedrate"), m_lgthVFeed = new CLengthCtrl(this)));
	feeds_and_speeds_control_list->push_back(MakeLabelAndControl(_("Spindle Speed"), m_dblSpindleSpeed = new CDoubleCtrl(this)));

	if(top_level)
	{
		OpDlg::AddControlsAndCreate();
		m_cmbTool->SetFocus();
	}
}
예제 #4
0
파일: OpDlg.cpp 프로젝트: tapeguy/heekscnc
OpDlg::OpDlg(wxWindow *parent, COp* object, const wxString& title, bool top_level, bool want_tool_control, bool picture)
             : HeeksObjDlg(parent, object, title, false, picture)
{
	if(want_tool_control)leftControls.push_back(MakeLabelAndControl(_("Tool"), m_cmbTool = new HTypeObjectDropDown(this, ID_TOOL, ToolType, theApp.m_program->Tools())));
	else m_cmbTool = NULL;
	leftControls.push_back(MakeLabelAndControl(_("Pattern"), m_cmbPattern = new HTypeObjectDropDown(this, ID_PATTERN, PatternType, theApp.m_program->Patterns())));
	leftControls.push_back(MakeLabelAndControl(_("Surface"), m_cmbSurface = new HTypeObjectDropDown(this, ID_SURFACE, SurfaceType, theApp.m_program->Surfaces())));

	// add some of the controls to the right side
	rightControls.push_back(MakeLabelAndControl(_("Comment"), m_txtComment = new wxTextCtrl(this, wxID_ANY)));
	rightControls.push_back(HControl(m_chkActive = new wxCheckBox( this, wxID_ANY, _("Active") ), wxALL));
	rightControls.push_back(MakeLabelAndControl(_("Title"), m_txtTitle = new wxTextCtrl(this, wxID_ANY)));

	if(top_level)
	{
		HeeksObjDlg::AddControlsAndCreate();
		if(m_cmbTool)m_cmbTool->SetFocus();
		else m_cmbPattern->SetFocus();
	}
}
예제 #5
0
PocketDlg::PocketDlg(wxWindow *parent, CPocket* object, const wxString& title, bool top_level)
             : SketchOpDlg(parent, object, title, false)
{
	std::list<HControl> save_leftControls = leftControls;
	leftControls.clear();

	// add all the controls to the left side
	leftControls.push_back(MakeLabelAndControl(_("Step Over"), m_lgthStepOver = new CLengthCtrl(this)));
	leftControls.push_back(MakeLabelAndControl(_("Material Allowance"), m_lgthMaterialAllowance = new CLengthCtrl(this)));

	wxString starting_place_choices[] = {_("Boundary"), _("Center")};
	leftControls.push_back(MakeLabelAndControl(_("Starting Place"), m_cmbStartingPlace = new wxComboBox(this, ID_STARTING_PLACE, _T(""), wxDefaultPosition, wxDefaultSize, 2, starting_place_choices)));

	wxString cut_mode_choices[] = {_("Conventional"), _("Climb")};
	leftControls.push_back(MakeLabelAndControl(_("Cut Mode"), m_cmbCutMode = new wxComboBox(this, ID_CUT_MODE, _T(""), wxDefaultPosition, wxDefaultSize, 2, cut_mode_choices)));

    wxString post_processor_choices[] = {_("ZigZag"), _("ZigZag Unidirectional"), _("Offsets"), _("Trochoidal")};
    leftControls.push_back(MakeLabelAndControl(_("Post-Processor"), m_cmbPostProcessor = new wxComboBox(this, ID_POST_PROCESSOR, _T(""), wxDefaultPosition, wxDefaultSize, 4, post_processor_choices)));

	leftControls.push_back(MakeLabelAndControl(_("Zig Zag Angle"), m_dblZigAngle = new CDoubleCtrl(this)));

	for(std::list<HControl>::iterator It = save_leftControls.begin(); It != save_leftControls.end(); It++)
	{
		leftControls.push_back(*It);
	}

	if(top_level)
	{
		HeeksObjDlg::AddControlsAndCreate();
		m_cmbSketch->SetFocus();
	}
}
예제 #6
0
SketchOpDlg::SketchOpDlg(wxWindow *parent, CDepthOp* object, const wxString& title, bool top_level)
:DepthOpDlg(parent, object, false, title, false)
{
    leftControls.push_back (
            MakeLabelAndControl ( _( "Sketches" ),
                    m_cmbSketch = new HTypeObjectDropDown ( this, ID_SKETCH, SketchType, heeksCAD->GetMainObject ( ) ),
                    m_btnSketchPick = new wxButton ( this, ID_SKETCH_PICK, _( "Pick" ) ) ) );

	if(top_level)
	{
		HeeksObjDlg::AddControlsAndCreate();
		m_cmbSketch->SetFocus();
	}
}
예제 #7
0
파일: CToolDlg.cpp 프로젝트: play113/swer
CToolDlg::CToolDlg(wxWindow *parent, CTool* object, const wxString& title, bool top_level)
             : HeeksObjDlg(parent, object, title, false)
{
	// add some of the controls to the right side
	rightControls.push_back(MakeLabelAndControl(_("Title"), m_txtTitle = new wxTextCtrl(this, wxID_ANY)));
	wxString title_choices[] = {_("Leave manually assigned title"), _("Automatically Generate Title")};
	rightControls.push_back(MakeLabelAndControl(_("Title Type"), m_cmbTitleType = new wxComboBox(this, ID_TITLE_TYPE, _T(""), wxDefaultPosition, wxDefaultSize, 2, title_choices)));

	// add all the controls to the left side
	leftControls.push_back(MakeLabelAndControl(_("Tool Number"), m_dlbToolNumber = new wxTextCtrl(this, wxID_ANY)));
	wxString materials[] = {_("High Speed Steel"),_("Carbide") };
	leftControls.push_back(MakeLabelAndControl(_("Tool Material"), m_cmbMaterial = new wxComboBox(this, ID_MATERIAL, _T(""), wxDefaultPosition, wxDefaultSize, 2, materials)));
	wxString tool_types[] = {_("Drill Bit"), _("Centre Drill Bit"), _("End Mill"), _("Slot Cutter"), _("Ball End Mill"), _("Chamfer"), _("Engraving Bit")};
	leftControls.push_back(MakeLabelAndControl(_("Tool Type"), m_cmbToolType = new wxComboBox(this, ID_TOOL_TYPE, _T(""), wxDefaultPosition, wxDefaultSize, sizeof(tool_types)/sizeof(wxString), tool_types)));
	leftControls.push_back(MakeLabelAndControl(_("Diameter"), m_dblDiameter = new CLengthCtrl(this)));
	leftControls.push_back(MakeLabelAndControl(_("Tool Length Offset"), m_dblToolLengthOffset = new CLengthCtrl(this)));
	leftControls.push_back(MakeLabelAndControl(_("Flat Radius"), m_dblFlatRadius = new CLengthCtrl(this)));
	leftControls.push_back(MakeLabelAndControl(_("Corner Radius"), m_dblCornerRadius = new CLengthCtrl(this)));
	leftControls.push_back(MakeLabelAndControl(_("Cutting Edge Angle"), m_dblCuttingEdgeAngle = new CDoubleCtrl(this)));
	leftControls.push_back(MakeLabelAndControl(_("Cutting Edge Height"), m_dblCuttingEdgeHeight = new CLengthCtrl(this)));

	if(top_level)
	{
		HeeksObjDlg::AddControlsAndCreate();
		m_dblDiameter->SetFocus();
	}
}