On 06/28/2015 02:01 PM, Tom Easterday wrote: > Does anyone know if this issue was resolved? > http://emc-developers.narkive.com/OwGHijSh/error-in-backplot-with-backtool-set-up-in-lathes > <http://emc-developers.narkive.com/OwGHijSh/error-in-backplot-with-backtool-set-up-in-lathes> > > I am having this problem now that I finally have gotten all the > planets (nearly) aligned to display my slant bed lathe correctly. > Everything is working EXCEPT the tool is not displayed in Axis, I > only have a “+” displayed. Not a show stopper, but would be nice to > have working correctly. I have seen several discussions like this > but haven’t found that it was ever resolved… Thanks, -Tom
My guess is that the "+" is the graphic for the tool control point. This "+" is drawn in glcanon.py starting on line 1512 below. I would be tempted to change the gl_triangle_fan drawing, starting at line 1548, to gl_lines. The control point lines show up, so if the tool is drawn with lines, it should show up too. If the tool does show up, then we will know that it is a surface drawing issue. I don't know if the .axisrc file can fix this sort of thing, it might be able to. I would prefer this configuration become part of the main program. http://www.informit.com/articles/article.aspx?p=328646&seqNum=6 https://www.opengl.org/sdk/docs/man2/xhtml/glBegin.xml https://www.opengl.org/wiki/Getting_Started (See How-To Guides, Pre-OpenGL 3.0) http://git.linuxcnc.org/gitweb?p=linuxcnc.git;a=blob;f=lib/python/rs274/glcanon.py;h=6d907d622d5f547df722f80a72da54ab7b95500a;hb=HEAD#l1222 > > 1499 lathe_shapes = [ > 1500 None, # 0 > 1501 (1,-1), (1,1), (-1,1), (-1,-1), # 1..4 > 1502 (0,-1), (1,0), (0,1), (-1,0), # 5..8 > 1503 (0,0) # 9 > 1504 ] > 1505 def lathetool(self, current_tool): > 1506 glDepthFunc(GL_ALWAYS) > 1507 diameter, frontangle, backangle, orientation = current_tool[-4:] > 1508 w = 3/8. > 1509 > 1510 radius = self.to_internal_linear_unit(diameter) / 2. > 1511 glColor3f(*self.colors['lathetool']) > 1512 glBegin(GL_LINES) first line | > 1513 glVertex3f(-radius/2.0,0.0,0.0) > 1514 glVertex3f(radius/2.0,0.0,0.0) second line -- > 1515 glVertex3f(0.0,0.0,-radius/2.0) > 1516 glVertex3f(0.0,0.0,radius/2.0) > 1517 glEnd() > 1518 > 1519 glNormal3f(0,1,0) > 1520 Tip orientation 9 has a round graphic, see 2/3 down here: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Gremlin > 1521 if orientation == 9: > 1522 glBegin(GL_TRIANGLE_FAN) > 1523 for i in range(37): > 1524 t = i * math.pi / 18 > 1525 glVertex3f(radius * math.cos(t), 0.0, radius * > math.sin(t)) > 1526 glEnd() > 1527 else: all other tool orientations have the same round tip shape with front and back angles added > 1528 dx, dy = self.lathe_shapes[orientation] the orientation number is used to look up delta x and delta y from the lathe_shapes list above > 1529 > 1530 min_angle = min(backangle, frontangle) * math.pi / 180 > 1531 max_angle = max(backangle, frontangle) * math.pi / 180 > 1532 > 1533 sinmax = math.sin(max_angle) > 1534 cosmax = math.cos(max_angle) > 1535 tanmax = math.cos(max_angle) > 1536 sinmin = math.sin(min_angle) > 1537 cosmin = math.cos(min_angle) > 1538 tanmin = math.cos(min_angle) > 1539 > 1540 circleminangle = - math.pi/2 + min_angle > 1541 circlemaxangle = - 3*math.pi/2 + max_angle > 1542 d0 = 0 > 1543 > 1544 x1 = (w - d0) > 1545 > 1546 sz = max(w, 3*radius) > 1547 draw the round tip > 1548 glBegin(GL_TRIANGLE_FAN) > 1549 glVertex3f( > 1550 radius * dx + radius * math.sin(circleminangle) + sz * > sinmin, > 1551 0, > 1552 radius * dy + radius * math.cos(circleminangle) + sz * > cosmin) > 1553 for i in range(37): > 1554 #t = circleminangle + i * (circlemaxangle - > circleminangle)/36. > 1555 t = circleminangle + i * (circlemaxangle - > circleminangle)/36. > 1556 glVertex3f(radius*dx + radius * math.sin(t), 0.0, > radius*dy + radius * math.cos(t)) > 1557 draw the front and back angle portion of the tool > 1558 glVertex3f( > 1559 radius * dx + radius * math.sin(circlemaxangle) + sz * > sinmax, > 1560 0, > 1561 radius * dy + radius * math.cos(circlemaxangle) + sz * > cosmax) > 1562 > 1563 glEnd() > 1564 glDepthFunc(GL_LESS) -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/ ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
