From 226e6b79122df582c4ec0e1a10022594676d2784 Mon Sep 17 00:00:00 2001 From: Dan Heeks Date: Mon, 3 Mar 2014 17:34:32 +0000 Subject: [PATCH] updated help links --- depth_params.py | 2 - kurve_funcs.py | 29 +++++++++++--- nc/cutviewer.py | 2 +- nc/iso.py | 16 ++++++-- nc/iso_read.py | 61 +++++++++++++++-------------- nc/nc_read.py | 12 +++++- src/CToolDlg.cpp | 2 +- src/Drilling.cpp | 95 +++++++++++++++++++++++++-------------------- src/DrillingDlg.cpp | 2 +- src/HeeksCNC.cpp | 40 +++++++++++++------ src/PocketDlg.cpp | 2 +- src/ProfileDlg.cpp | 2 +- src/Program.cpp | 2 +- src/ScriptOpDlg.cpp | 2 +- src/Simulate.cpp | 2 +- src/Surface.cpp | 6 --- src/Surface.h | 3 +- src/SurfaceDlg.cpp | 6 +-- src/SurfaceDlg.h | 1 - 19 files changed, 169 insertions(+), 118 deletions(-) diff --git a/depth_params.py b/depth_params.py index f03c2591..918c6675 100644 --- a/depth_params.py +++ b/depth_params.py @@ -27,7 +27,5 @@ def get_depths(self): for i in range(1, layer_count): depth += layer_depth depths.insert(0, depth) - - print 'depths = ', depths return depths diff --git a/kurve_funcs.py b/kurve_funcs.py index 827ff0f9..4f9431a3 100644 --- a/kurve_funcs.py +++ b/kurve_funcs.py @@ -238,6 +238,8 @@ def add_CRC_end_line(curve,roll_on_curve,roll_off_curve,radius,direction,crc_end crc_end_point.x = crc_end.x crc_end_point.y = crc_end.y +using_area_for_offset = False + # profile command, # direction should be 'left' or 'right' or 'on' def profile(curve, direction = "on", radius = 1.0, offset_extra = 0.0, roll_radius = 2.0, roll_on = None, roll_off = None, depthparams = None, extend_at_start = 0.0, extend_at_end = 0.0, lead_in_line_len=0.0,lead_out_line_len= 0.0): @@ -254,11 +256,28 @@ def profile(curve, direction = "on", radius = 1.0, offset_extra = 0.0, roll_radi # get tool diameter offset = radius + offset_extra if use_CRC() == False or (use_CRC()==True and CRC_nominal_path()==True): - if direction == "right": - offset = -offset - offset_success = offset_curve.Offset(offset) - if offset_success == False: - raise Exception, "couldn't offset kurve " + str(offset_curve) + if math.fabs(offset) > 0.00005: + if direction == "right": + offset = -offset + offset_success = offset_curve.Offset(offset) + if offset_success == False: + global using_area_for_offset + if curve.IsClosed() and (using_area_for_offset == False): + cw = curve.IsClockwise() + using_area_for_offset = True + a = area.Area() + a.append(curve) + a.Offset(-offset) + for curve in a.getCurves(): + curve_cw = curve.IsClockwise() + if cw != curve_cw: + curve.Reverse() + set_good_start_point(curve, False) + profile(curve, direction, 0.0, 0.0, roll_radius, roll_on, roll_off, depthparams, extend_at_start, extend_at_end, lead_in_line_len, lead_out_line_len) + using_area_for_offset = False + return + else: + raise Exception, "couldn't offset kurve " + str(offset_curve) # extend curve if extend_at_start > 0.0: diff --git a/nc/cutviewer.py b/nc/cutviewer.py index 04e1ec34..033b592e 100644 --- a/nc/cutviewer.py +++ b/nc/cutviewer.py @@ -1,4 +1,4 @@ -def tool_defn(self, id, name, params): +def tool_defn(self, id, params): self.write('(TOOL/') type = params['type'] if type == 0:#eDrill = 0, diff --git a/nc/iso.py b/nc/iso.py index f9866e1e..f5406c13 100644 --- a/nc/iso.py +++ b/nc/iso.py @@ -71,6 +71,9 @@ def __init__(self): self.output_g98_and_g99 = True self.g98_not_g99 = None # True for G98 ouput, False for G99 output self.output_cutviewer_comments = False + self.current_fixture = None + self.output_fixtures = False + self.tool_defn_params = {} ############################################################################ ## Codes @@ -141,7 +144,7 @@ def END_CANNED_CYCLE(self): return('G80') def TAP(self): return('G84') def TAP_DEPTH(self, depth): return('K' + (self.fmt.string(depth))) def INTERNAL_COOLANT_ON(self): return('M18') - def INTERNAL_COOLANT_OFF(self): return('M28') + def INTERNAL_COOLANT_OFF(self): return('M9') def X(self): return('X') def Y(self): return('Y') @@ -196,6 +199,10 @@ def write_blocknum(self): self.start_of_line = True def write_spindle(self): + if self.output_fixtures: + if self.current_fixture == None: + self.write(self.SPACE() + 'G54') + self.current_fixture = 54 self.write(self.SPACE()) self.s.write(self) @@ -308,6 +315,10 @@ def translate(self,x=None, y=None, z=None): ## Tools def tool_change(self, id): + if self.output_cutviewer_comments: + import cutviewer + if id in self.tool_defn_params: + cutviewer.tool_defn(self, id, self.tool_defn_params[id]) if (self.t != None) and (self.z_for_g53 != None): self.write_blocknum() self.write('G53 Z' + str(self.z_for_g53) + '\n') @@ -323,8 +334,7 @@ def tool_change(self, id): def tool_defn(self, id, name='',params=None): if self.output_cutviewer_comments: - import cutviewer - cutviewer.tool_defn(self, id, name, params) + self.tool_defn_params[id] = params if self.output_tool_definitions: self.write_blocknum() self.write(self.SPACE() + self.TOOL_DEFINITION()) diff --git a/nc/iso_read.py b/nc/iso_read.py index 44f231a5..c32d15db 100644 --- a/nc/iso_read.py +++ b/nc/iso_read.py @@ -28,48 +28,49 @@ def __init__(self, writer): # then look for the 'comment' function towards the end of the file and add another elif def ParseWord(self, word): - if (word[0] == 'A' or word[0] == 'a'): + word == word.upper() + if (word[0] == 'A'): self.col = "axis" self.a = eval(word[1:]) self.move = True - elif (word[0] == 'B' or word[0] == 'b'): + elif (word[0] == 'B'): self.col = "axis" self.b = eval(word[1:]) self.move = True - elif (word[0] == 'C' or word[0] == 'c'): + elif (word[0] == 'C'): self.col = "axis" self.c = eval(word[1:]) self.move = True - elif (word[0] == 'F' or word[0] == 'f'): + elif (word[0] == 'F'): self.col = "axis" self.writer.feedrate(word[1:]) - elif (word[0] == 'H' or word[0] == 'h'): + elif (word[0] == 'H'): self.col = "axis" self.h = eval(word[1:]) self.move = True - elif (word == 'G0' or word == 'G00' or word == 'g0' or word == 'g00'): + elif (word == 'G0' or word == 'G00'): self.path_col = "rapid" self.col = "rapid" self.arc = 0 - elif (word == 'G1' or word == 'G01' or word == 'g1' or word == 'g01'): + elif (word == 'G1' or word == 'G01'): self.path_col = "feed" self.col = "feed" self.arc = 0 - elif (word == 'G2' or word == 'G02' or word == 'g2' or word == 'g02' or word == 'G12' or word == 'g12'): + elif (word == 'G2' or word == 'G02' or word == 'G12'): self.path_col = "feed" self.col = "feed" self.arc = -1 - elif (word == 'G3' or word == 'G03' or word == 'g3' or word == 'g03' or word == 'G13' or word == 'g13'): + elif (word == 'G3' or word == 'G03' or word == 'G13'): self.path_col = "feed" self.col = "feed" self.arc = +1 - elif (word == 'G10' or word == 'g10'): + elif (word == 'G10'): self.no_move = True - elif (word == 'G53' or word == 'g53'): + elif (word == 'G53'): self.no_move = True - elif (word == 'L1' or word == 'l1'): + elif (word == 'L1'): self.no_move = True - elif (word == 'G61.1' or word == 'g61.1' or word == 'G61' or word == 'g61' or word == 'G64' or word == 'g64'): + elif (word == 'G61.1' or word == 'G61' or word == 'G64'): self.no_move = True elif (word == 'G20' or word == 'G70'): self.col = "prep" @@ -77,75 +78,77 @@ def ParseWord(self, word): elif (word == 'G21' or word == 'G71'): self.col = "prep" self.writer.metric() - elif (word == 'G43' or word == 'g43'): + elif (word == 'G43'): self.height_offset = True self.move = True self.path_col = "rapid" self.col = "rapid" - elif (word == 'G81' or word == 'g81'): + elif (word == 'G80'): + self.drill_off = True + elif (word == 'G81'): self.drill = True self.no_move = True self.path_col = "feed" self.col = "feed" - elif (word == 'G82' or word == 'g82'): + elif (word == 'G82'): self.drill = True; self.no_move = True self.path_col = "feed" self.col = "feed" - elif (word == 'G83' or word == 'g83'): + elif (word == 'G83'): self.drill = True self.no_move = True self.path_col = "feed" self.col = "feed" - elif (word == 'G90' or word == 'g90'): + elif (word == 'G90'): self.absolute() - elif (word == 'G91' or word == 'g91'): + elif (word == 'G91'): self.incremental() elif (word[0] == 'G') : col = "prep" - elif (word[0] == 'I' or word[0] == 'i'): + elif (word[0] == 'I'): self.col = "axis" self.i = eval(word[1:]) self.move = True - elif (word[0] == 'J' or word[0] == 'j'): + elif (word[0] == 'J'): self.col = "axis" self.j = eval(word[1:]) self.move = True - elif (word[0] == 'K' or word[0] == 'k'): + elif (word[0] == 'K'): self.col = "axis" self.k = eval(word[1:]) self.move = True elif (word[0] == 'M') : self.col = "misc" elif (word[0] == 'N') : self.col = "blocknum" elif (word[0] == 'O') : self.col = "program" - elif (word[0] == 'P' or word[0] == 'p'): + elif (word[0] == 'P'): if (self.no_move != True): self.col = "axis" self.p = eval(word[1:]) self.move = True - elif (word[0] == 'Q' or word[0] == 'q'): + elif (word[0] == 'Q'): if (self.no_move != True): self.col = "axis" self.q = eval(word[1:]) self.move = True - elif (word[0] == 'R' or word[0] == 'r'): + elif (word[0] == 'R'): self.col = "axis" self.r = eval(word[1:]) self.move = True - elif (word[0] == 'S' or word[0] == 's'): + elif (word[0] == 'S'): self.col = "axis" self.writer.spindle(word[1:], (float(word[1:]) >= 0.0)) elif (word[0] == 'T') : self.col = "tool" self.writer.tool_change( eval(word[1:]) ) - elif (word[0] == 'X' or word[0] == 'x'): + elif (word[0] == 'X'): self.col = "axis" self.x = eval(word[1:]) self.move = True - elif (word[0] == 'Y' or word[0] == 'y'): + elif (word[0] == 'Y'): self.col = "axis" self.y = eval(word[1:]) self.move = True - elif (word[0] == 'Z' or word[0] == 'z'): + elif (word[0] == 'Z'): self.col = "axis" self.z = eval(word[1:]) self.move = True diff --git a/nc/nc_read.py b/nc/nc_read.py index 3401d17d..4b5260df 100644 --- a/nc/nc_read.py +++ b/nc/nc_read.py @@ -65,6 +65,7 @@ def Parse(self, name): self.arc = 0 self.q = None self.r = None + self.drilling = None while (self.readline()): self.a = None @@ -87,6 +88,7 @@ def Parse(self, name): self.move = False self.height_offset = False self.drill = False + self.drill_off = False self.no_move = False try: @@ -101,8 +103,14 @@ def Parse(self, name): if self.t != None: if (self.m6 == True) or (self.need_m6_for_t_change == False): self.writer.tool_change( self.t ) - - if (self.drill): + + if self.drill: + self.drilling = True + + if self.drill_off: + self.drilling = False + + if self.drilling: if self.z != None: self.drillz = self.z self.writer.rapid(self.x, self.y, self.r) self.writer.feed(self.x, self.y, self.drillz) diff --git a/src/CToolDlg.cpp b/src/CToolDlg.cpp index ee795cea..02defe0b 100644 --- a/src/CToolDlg.cpp +++ b/src/CToolDlg.cpp @@ -228,5 +228,5 @@ void CToolDlg::EnableAndSetCornerFlatAndAngle(CToolParams::eToolType type) void CToolDlg::OnHelp( wxCommandEvent& event ) { - ::wxLaunchDefaultBrowser(_T("http://heeks.net/tool")); + ::wxLaunchDefaultBrowser(_T("http://heeks.net/help/tool")); } diff --git a/src/Drilling.cpp b/src/Drilling.cpp index 7536d3ea..2b80593b 100755 --- a/src/Drilling.cpp +++ b/src/Drilling.cpp @@ -10,6 +10,7 @@ #include "CNCConfig.h" #include "ProgramCanvas.h" #include "interface/HeeksObj.h" +#include "interface/HeeksColor.h" #include "interface/PropertyInt.h" #include "interface/PropertyDouble.h" #include "interface/PropertyLength.h" @@ -24,6 +25,7 @@ #include "Program.h" #include "src/Geom.h" #include "DrillingDlg.h" +#include "Tools.h" #include #include @@ -293,55 +295,62 @@ void CDrilling::glCommands(bool select, bool marked, bool no_color) { CDepthOp::glCommands(select, marked, no_color); - if(marked && !no_color) + if(marked) { - double l_dHoleDiameter = 12.7; // Default at half-inch (in mm) - - if (m_tool_number > 0) + if(!no_color) { - HeeksObj* Tool = heeksCAD->GetIDObject( ToolType, m_tool_number ); - if (Tool != NULL) - { - l_dHoleDiameter = ((CTool *) Tool)->m_params.m_diameter; - } // End if - then - } // End if - then + heeksCAD->GetBackgroundColor().best_black_or_white().glColor(); + } - for (std::list::iterator It = m_points.begin(); It != m_points.end(); It++) + if (m_tool_number > 0) { - HeeksObj* object = heeksCAD->GetIDObject(PointType, *It); - double p[3]; - if(!object->GetEndPoint(p))continue; - gp_Pnt point = make_point(p); - - GLdouble start[3], end[3]; - - start[0] = point.X(); - start[1] = point.Y(); - start[2] = m_depth_op_params.m_start_depth; - - end[0] = point.X(); - end[1] = point.Y(); - end[2] = m_depth_op_params.m_final_depth; - - glBegin(GL_LINE_STRIP); - glVertex3dv( start ); - glVertex3dv( end ); - glEnd(); - - std::list< CNCPoint > pointsAroundCircle = DrillBitVertices( point, - l_dHoleDiameter / 2, - m_depth_op_params.m_final_depth); - - glBegin(GL_LINE_STRIP); - CNCPoint previous = *(pointsAroundCircle.begin()); - for (std::list< CNCPoint >::const_iterator l_itPoint = pointsAroundCircle.begin(); - l_itPoint != pointsAroundCircle.end(); - l_itPoint++) + for(HeeksObj* object = theApp.m_program->Tools()->GetFirstChild(); object; object = theApp.m_program->Tools()->GetNextChild()) { - - glVertex3d( l_itPoint->X(), l_itPoint->Y(), l_itPoint->Z() ); + if(object->GetType() == ToolType) + { + CTool* tool= (CTool*)object; + if(tool->m_tool_number == m_tool_number) + { + + for (std::list::iterator It = m_points.begin(); It != m_points.end(); It++) + { + HeeksObj* object = heeksCAD->GetIDObject(PointType, *It); + double p[3]; + if(!object->GetEndPoint(p))continue; + gp_Pnt point = make_point(p); + + GLdouble start[3], end[3]; + + start[0] = point.X(); + start[1] = point.Y(); + start[2] = m_depth_op_params.m_start_depth; + + end[0] = point.X(); + end[1] = point.Y(); + end[2] = m_depth_op_params.m_final_depth; + + glBegin(GL_LINE_STRIP); + glVertex3dv( start ); + glVertex3dv( end ); + glEnd(); + + std::list< CNCPoint > pointsAroundCircle = DrillBitVertices( make_point(start), tool->m_params.m_diameter / 2, m_depth_op_params.m_start_depth - m_depth_op_params.m_final_depth); + + glBegin(GL_LINE_STRIP); + CNCPoint previous = *(pointsAroundCircle.begin()); + for (std::list< CNCPoint >::const_iterator l_itPoint = pointsAroundCircle.begin(); + l_itPoint != pointsAroundCircle.end(); + l_itPoint++) + { + + glVertex3d( l_itPoint->X(), l_itPoint->Y(), l_itPoint->Z() ); + } + glEnd(); + } + break; + } + } } - glEnd(); } // End for } // End if - then } diff --git a/src/DrillingDlg.cpp b/src/DrillingDlg.cpp index f826fc45..1472d883 100644 --- a/src/DrillingDlg.cpp +++ b/src/DrillingDlg.cpp @@ -118,7 +118,7 @@ void DrillingDlg::OnPointsPick( wxCommandEvent& event ) void DrillingDlg::OnHelp( wxCommandEvent& event ) { - ::wxLaunchDefaultBrowser(_T("http://heeks.net/drilling")); + ::wxLaunchDefaultBrowser(_T("http://heeks.net/help/drilling")); } bool DrillingDlg::Do(CDrilling* object) diff --git a/src/HeeksCNC.cpp b/src/HeeksCNC.cpp index d6d1b361..c7138b7c 100644 --- a/src/HeeksCNC.cpp +++ b/src/HeeksCNC.cpp @@ -180,6 +180,7 @@ static void NewProfileOp() if(sketches.size() > 0)sketch = sketches.front(); CProfile *new_object = new CProfile(sketch, (tools.size()>0)?(*tools.begin()):-1); + new_object->SetID(heeksCAD->GetNextID(ProfileType)); new_object->AddMissingChildren(); // add the tags container if(new_object->Edit()) @@ -218,6 +219,8 @@ static void NewPocketOp() if(sketches.size() > 0)sketch = sketches.front(); CPocket *new_object = new CPocket(sketch, (tools.size()>0)?(*tools.begin()):-1 ); + new_object->SetID(heeksCAD->GetNextID(PocketType)); + if(new_object->Edit()) { heeksCAD->StartHistory(); @@ -269,6 +272,7 @@ static void NewDrillingOp() { CDrilling *new_object = new CDrilling( points, 0, -1 ); + new_object->SetID(heeksCAD->GetNextID(DrillingType)); if(new_object->Edit()) { heeksCAD->StartHistory(); @@ -288,6 +292,7 @@ static void NewDrillingOpMenuCallback(wxCommandEvent &event) static void NewScriptOpMenuCallback(wxCommandEvent &event) { CScriptOp *new_object = new CScriptOp(); + new_object->SetID(heeksCAD->GetNextID(ScriptOpType)); if(new_object->Edit()) { heeksCAD->StartHistory(); @@ -301,6 +306,7 @@ static void NewScriptOpMenuCallback(wxCommandEvent &event) static void NewPatternMenuCallback(wxCommandEvent &event) { CPattern *new_object = new CPattern(); + if(new_object->Edit()) { heeksCAD->StartHistory(); @@ -385,8 +391,19 @@ static void NewStockMenuCallback(wxCommandEvent &event) static void AddNewTool(CToolParams::eToolType type) { + // find next available tool number + int max_tool_number = 0; + for(HeeksObj* object = theApp.m_program->Tools()->GetFirstChild(); object; object = theApp.m_program->Tools()->GetNextChild()) + { + if(object->GetType() == ToolType) + { + int tool_number = ((CTool*)object)->m_tool_number; + if(tool_number > max_tool_number)max_tool_number = tool_number; + } + } + // Add a new tool. - CTool *new_object = new CTool(NULL, type, heeksCAD->GetNextID(ToolType)); + CTool *new_object = new CTool(NULL, type, max_tool_number + 1); if(new_object->Edit()) AddNewObjectUndoablyAndMarkIt(new_object, theApp.m_program->Tools()); else @@ -423,12 +440,6 @@ static void NewChamferMenuCallback(wxCommandEvent &event) AddNewTool(CToolParams::eChamfer); } -static void MakeScriptMenuCallback(wxCommandEvent &event) -{ - // create the Python program - theApp.m_program->RewritePythonProgram(); -} - void CHeeksCNCApp::RunPythonScript() { { @@ -454,7 +465,7 @@ void CHeeksCNCApp::RunPythonScript() } #ifdef FREE_VERSION - ::wxLaunchDefaultBrowser(_T("http://heeks.net/buy-heekscnc-1-0")); + ::wxLaunchDefaultBrowser(_T("http://heeks.net/help/buy-heekscnc-1-0")); #endif HeeksPyPostProcess(m_program, m_program->GetOutputFileName(), true ); @@ -762,11 +773,17 @@ static void AddToolBars() heeksCAD->EndToolBarFlyout((wxToolBar*)(theApp.m_machiningBar)); - heeksCAD->AddToolBarButton((wxToolBar*)(theApp.m_machiningBar), _("Tool"), ToolImage(_T("drill")), _("New Tool Definition..."), NewDrillMenuCallback); + heeksCAD->StartToolBarFlyout(_("Tools")); + heeksCAD->AddFlyoutButton(_("drill"), ToolImage(_T("drill")), _("Drill..."), NewDrillMenuCallback); + heeksCAD->AddFlyoutButton(_("centredrill"), ToolImage(_T("centredrill")), _("Centre Drill..."), NewCentreDrillMenuCallback); + heeksCAD->AddFlyoutButton(_("endmill"), ToolImage(_T("endmill")), _("End Mill..."), NewEndmillMenuCallback); + heeksCAD->AddFlyoutButton(_("slotdrill"), ToolImage(_T("slotdrill")), _("Slot Drill..."), NewSlotCutterMenuCallback); + heeksCAD->AddFlyoutButton(_("ballmill"), ToolImage(_T("ballmill")), _("Ball End Mill..."), NewBallEndMillMenuCallback); + heeksCAD->AddFlyoutButton(_("chamfmill"), ToolImage(_T("chamfmill")), _("Chamfer Mill..."), NewChamferMenuCallback); + heeksCAD->EndToolBarFlyout((wxToolBar*)(theApp.m_machiningBar)); heeksCAD->StartToolBarFlyout(_("Post Processing")); heeksCAD->AddFlyoutButton(_("PostProcess"), ToolImage(_T("postprocess")), _("Post-Process"), PostProcessMenuCallback); - heeksCAD->AddFlyoutButton(_("Make Python Script"), ToolImage(_T("python")), _("Make Python Script"), MakeScriptMenuCallback); heeksCAD->AddFlyoutButton(_("Run Python Script"), ToolImage(_T("runpython")), _("Run Python Script"), RunScriptMenuCallback); heeksCAD->AddFlyoutButton(_("OpenNC"), ToolImage(_T("opennc")), _("Open NC File"), OpenNcFileMenuCallback); heeksCAD->AddFlyoutButton(_("SaveNC"), ToolImage(_T("savenc")), _("Save NC File"), SaveNcFileMenuCallback); @@ -955,7 +972,7 @@ class NewPocketOpTool:public Tool class NewDrillingOpTool:public Tool { // Tool's virtual functions - const wxChar* GetTitle(){return _("New Drilling Operatio");} + const wxChar* GetTitle(){return _("New Drilling Operation");} void Run(){ NewDrillingOp(); } @@ -1056,7 +1073,6 @@ void CHeeksCNCApp::OnStartUp(CHeeksCADInterface* h, const wxString& dll_path) heeksCAD->AddMenuItem(menuMachining, _("Add New Milling Operation"), ToolImage(_T("ops")), NULL, NULL, menuMillingOperations); heeksCAD->AddMenuItem(menuMachining, _("Add Other Operation"), ToolImage(_T("ops")), NULL, NULL, menuOperations); heeksCAD->AddMenuItem(menuMachining, _("Add New Tool"), ToolImage(_T("tools")), NULL, NULL, menuTools); - heeksCAD->AddMenuItem(menuMachining, _("Make Python Script"), ToolImage(_T("python")), MakeScriptMenuCallback); heeksCAD->AddMenuItem(menuMachining, _("Run Python Script"), ToolImage(_T("runpython")), RunScriptMenuCallback); heeksCAD->AddMenuItem(menuMachining, _("Post-Process"), ToolImage(_T("postprocess")), PostProcessMenuCallback); #ifdef WIN32 diff --git a/src/PocketDlg.cpp b/src/PocketDlg.cpp index 18447725..04ab4fa9 100644 --- a/src/PocketDlg.cpp +++ b/src/PocketDlg.cpp @@ -131,7 +131,7 @@ void PocketDlg::EnableZigZagControls() void PocketDlg::OnHelp( wxCommandEvent& event ) { - ::wxLaunchDefaultBrowser(_T("http://heeks.net/pocket")); + ::wxLaunchDefaultBrowser(_T("http://heeks.net/help/pocket")); } bool PocketDlg::Do(CPocket* object) diff --git a/src/ProfileDlg.cpp b/src/ProfileDlg.cpp index 803e565f..50dbc6ee 100644 --- a/src/ProfileDlg.cpp +++ b/src/ProfileDlg.cpp @@ -201,7 +201,7 @@ void ProfileDlg::OnCheckFinishingPass(wxCommandEvent& event) void ProfileDlg::OnHelp( wxCommandEvent& event ) { - ::wxLaunchDefaultBrowser(_T("http://heeks.net/profile")); + ::wxLaunchDefaultBrowser(_T("http://heeks.net/help/profile")); } void ProfileDlg::SetSketchOrderAndCombo() diff --git a/src/Program.cpp b/src/Program.cpp index 9e0c5e69..2af2de8d 100644 --- a/src/Program.cpp +++ b/src/Program.cpp @@ -521,7 +521,7 @@ void ApplySurfaceToText(Python &python, CSurface* surface, std::set & python << _T("attach.units = ") << theApp.m_program->m_units << _T("\n"); python << _T("attach.attach_begin()\n"); python << _T("nc.creator.stl = stl") << (int)(surface->m_id) << _T("\n"); - python << _T("nc.creator.minz = ") << surface->m_min_z << _T("\n"); + python << _T("nc.creator.minz = -10000.0\n"); python << _T("nc.creator.material_allowance = ") << surface->m_material_allowance << _T("\n"); theApp.m_attached_to_surface = surface; diff --git a/src/ScriptOpDlg.cpp b/src/ScriptOpDlg.cpp index c6c3b069..aac13212 100644 --- a/src/ScriptOpDlg.cpp +++ b/src/ScriptOpDlg.cpp @@ -65,5 +65,5 @@ void ScriptOpDlg::OnScriptText( wxCommandEvent& event ) void ScriptOpDlg::OnHelp( wxCommandEvent& event ) { - ::wxLaunchDefaultBrowser(_T("http://heeks.net/scriptop")); + ::wxLaunchDefaultBrowser(_T("http://heeks.net/help/scriptop")); } diff --git a/src/Simulate.cpp b/src/Simulate.cpp index b40eeb0d..4227449c 100644 --- a/src/Simulate.cpp +++ b/src/Simulate.cpp @@ -105,7 +105,7 @@ const wchar_t* GetOutputFileNameForPython(const wchar_t* in) void RunVoxelcutSimulation() { #ifdef FREE_VERSION - ::wxLaunchDefaultBrowser(_T("http://heeks.net/buy-heekscnc-1-0")); + ::wxLaunchDefaultBrowser(_T("http://heeks.net/help/buy-heekscnc-1-0")); #endif // write initial.py diff --git a/src/Surface.cpp b/src/Surface.cpp index 72f85e29..09c6465f 100644 --- a/src/Surface.cpp +++ b/src/Surface.cpp @@ -28,7 +28,6 @@ void CSurface::WriteXML(TiXmlNode *root) heeksCAD->LinkXMLEndChild( root, element ); element->SetDoubleAttribute( "tolerance", m_tolerance); - element->SetDoubleAttribute( "minz", m_min_z); element->SetDoubleAttribute( "material_allowance", m_material_allowance); element->SetAttribute( "same_for_posns", m_same_for_each_pattern_position ? 1:0); @@ -51,7 +50,6 @@ HeeksObj* CSurface::ReadFromXMLElement(TiXmlElement* element) CSurface* new_object = new CSurface; element->Attribute("tolerance", &new_object->m_tolerance); - element->Attribute("minz", &new_object->m_min_z); element->Attribute("material_allowance", &new_object->m_material_allowance); int int_for_bool = 1; if(element->Attribute( "same_for_posns", &int_for_bool))new_object->m_same_for_each_pattern_position = (int_for_bool != 0); @@ -83,7 +81,6 @@ void CSurface::WriteDefaultValues() { CNCConfig config; config.Write(wxString(GetTypeString()) + _T("Tolerance"), m_tolerance); - config.Write(wxString(GetTypeString()) + _T("MinZ"), m_min_z); config.Write(wxString(GetTypeString()) + _T("MatAllowance"), m_material_allowance); config.Write(wxString(GetTypeString()) + _T("SameForPositions"), m_same_for_each_pattern_position); } @@ -92,13 +89,11 @@ void CSurface::ReadDefaultValues() { CNCConfig config; config.Read(wxString(GetTypeString()) + _T("Tolerance"), &m_tolerance, 0.01); - config.Read(wxString(GetTypeString()) + _T("MinZ"), &m_min_z, 0.0); config.Read(wxString(GetTypeString()) + _T("MatAllowance"), &m_material_allowance, 0.0); config.Read(wxString(GetTypeString()) + _T("SameForPositions"), &m_same_for_each_pattern_position, true); } static void on_set_tolerance(double value, HeeksObj* object){((CSurface*)object)->m_tolerance = value; ((CSurface*)object)->WriteDefaultValues();} -static void on_set_min_z(double value, HeeksObj* object){((CSurface*)object)->m_min_z = value; ((CSurface*)object)->WriteDefaultValues();} static void on_set_material_allowance(double value, HeeksObj* object){((CSurface*)object)->m_material_allowance = value; ((CSurface*)object)->WriteDefaultValues();} static void on_set_same_for_position(bool value, HeeksObj* object){((CSurface*)object)->m_same_for_each_pattern_position = value; ((CSurface*)object)->WriteDefaultValues();} @@ -107,7 +102,6 @@ void CSurface::GetProperties(std::list *list) AddSolidsProperties(list, m_solids); list->push_back(new PropertyLength(_("tolerance"), m_tolerance, this, on_set_tolerance)); - list->push_back(new PropertyLength(_("minimum z"), m_min_z, this, on_set_min_z)); list->push_back(new PropertyLength(_("material allowance"), m_material_allowance, this, on_set_material_allowance)); list->push_back(new PropertyCheck(_("same for each pattern position"), m_same_for_each_pattern_position, this, on_set_same_for_position)); diff --git a/src/Surface.h b/src/Surface.h index a6f1153e..4519d9d6 100644 --- a/src/Surface.h +++ b/src/Surface.h @@ -14,14 +14,13 @@ class CSurface: public IdNamedObj { public: std::list m_solids; double m_tolerance; - double m_min_z; double m_material_allowance; bool m_same_for_each_pattern_position; static int number_for_stl_file; // Constructors. CSurface(); - CSurface(const std::list &solids, double tol, double min_z, double mat_allowance):m_solids(solids), m_tolerance(tol), m_min_z(min_z), m_material_allowance(mat_allowance), m_same_for_each_pattern_position(true){} + CSurface(const std::list &solids, double tol, double mat_allowance):m_solids(solids), m_tolerance(tol), m_material_allowance(mat_allowance), m_same_for_each_pattern_position(true){} // HeeksObj's virtual functions int GetType()const{return SurfaceType;} diff --git a/src/SurfaceDlg.cpp b/src/SurfaceDlg.cpp index 6fb7e259..039d680e 100644 --- a/src/SurfaceDlg.cpp +++ b/src/SurfaceDlg.cpp @@ -17,7 +17,6 @@ SurfaceDlg::SurfaceDlg(wxWindow *parent, HeeksObj* object, const wxString& title { // add all the controls to the left side leftControls.push_back(MakeLabelAndControl(_("tolerance"), m_lgthTolerance = new CLengthCtrl(this))); - leftControls.push_back(MakeLabelAndControl(_("minimum Z"), m_lgthMinZ = new CLengthCtrl(this))); leftControls.push_back(MakeLabelAndControl(_("material allowance"), m_lgthMaterialAllowance = new CLengthCtrl(this))); leftControls.push_back( HControl( m_chkSameForEachPosition = new wxCheckBox( this, ID_SAME_FOR_EACH_POSITION, _("same for each pattern position") ), wxALL )); @@ -31,7 +30,6 @@ SurfaceDlg::SurfaceDlg(wxWindow *parent, HeeksObj* object, const wxString& title void SurfaceDlg::GetDataRaw(HeeksObj* object) { ((CSurface*)object)->m_tolerance = m_lgthTolerance->GetValue(); - ((CSurface*)object)->m_min_z = m_lgthMinZ->GetValue(); ((CSurface*)object)->m_material_allowance = m_lgthMaterialAllowance->GetValue(); ((CSurface*)object)->m_same_for_each_pattern_position = m_chkSameForEachPosition->GetValue(); SolidsDlg::GetDataRaw(object); @@ -40,7 +38,6 @@ void SurfaceDlg::GetDataRaw(HeeksObj* object) void SurfaceDlg::SetFromDataRaw(HeeksObj* object) { m_lgthTolerance->SetValue(((CSurface*)object)->m_tolerance); - m_lgthMinZ->SetValue(((CSurface*)object)->m_min_z); m_lgthMaterialAllowance->SetValue(((CSurface*)object)->m_material_allowance); m_chkSameForEachPosition->SetValue(((CSurface*)object)->m_same_for_each_pattern_position != 0); SolidsDlg::SetFromDataRaw(object); @@ -54,7 +51,6 @@ void SurfaceDlg::SetPicture(const wxString& name) void SurfaceDlg::SetPictureByWindow(wxWindow* w) { if(w == m_lgthTolerance)SetPicture(_T("tolerance")); - else if(w == m_lgthMinZ)SetPicture(_T("min z")); else if(w == m_lgthMaterialAllowance)SetPicture(_T("material allowance")); else if(w == m_chkSameForEachPosition) { @@ -66,7 +62,7 @@ void SurfaceDlg::SetPictureByWindow(wxWindow* w) void SurfaceDlg::OnHelp( wxCommandEvent& event ) { - ::wxLaunchDefaultBrowser(_T("http://heeks.net/surface")); + ::wxLaunchDefaultBrowser(_T("http://heeks.net/help/surface")); } bool SurfaceDlg::Do(CSurface* object) diff --git a/src/SurfaceDlg.h b/src/SurfaceDlg.h index 1c664038..8c03b1e0 100644 --- a/src/SurfaceDlg.h +++ b/src/SurfaceDlg.h @@ -20,7 +20,6 @@ class SurfaceDlg : public SolidsDlg }; CLengthCtrl *m_lgthTolerance; - CLengthCtrl *m_lgthMinZ; CLengthCtrl *m_lgthMaterialAllowance; wxCheckBox *m_chkSameForEachPosition;