YouTube Howto's

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Indicate the post processor used.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
User avatar
srl
Full Member
Posts: 65
Joined: Tue Aug 09, 2011 4:40 am

YouTube Howto's

Post by srl » Tue Jun 07, 2016 2:53 am

The posts here are not usually positive as not everyone has java script programming and fitter-turning trade experience. With mm / inches and different machine drivers and uses a one config for all is impossible. :cry:

With that out of the way I would like to show you what works for me and what I've learnt the last three or so years .

https://youtu.be/zneEmuUgSMc

srl

User avatar
srl
Full Member
Posts: 65
Joined: Tue Aug 09, 2011 4:40 am

Re: YouTube Howto's

Post by srl » Wed Jun 08, 2016 2:51 am

Setting the direction of a closed shape is important in order to get a climb or normal cut.
Here is a quick fix to set the direction of full circles.
Split full circles must be set for it to work.

https://youtu.be/cZtFOTMKBJ4

The changed function is as follows-

Code: Select all

GCode.prototype.exportSingleContourEntity = function(entity, rampOnPoint, rampOffPoint) {

    this.orientation = this.getPathOrientation();  // enter this line to set the direction of split full circles. 

    this.exportLeadIn(entity);
    if (this.hasLeadIn(entity)) {
        rampOnPoint = undefined;
    }
    if (this.hasLeadOut(entity)) {
        rampOffPoint = undefined;
    }
    this.exportContourEntity(entity, rampOnPoint, rampOffPoint);
    this.exportLeadOut(entity);
};

srl

User avatar
srl
Full Member
Posts: 65
Joined: Tue Aug 09, 2011 4:40 am

Re: YouTube Howto's

Post by srl » Thu Jun 09, 2016 12:31 am

The following function sets the direction of full circles that are not split in two. Just add it to GCode.js or your config.
It doesn't set the direction of full circles that have been split. The above post deals with that.

Code: Select all

GCode.prototype.exportArcSegment = function(arc, allowForZeroLength) {
    var entity = this.getEntity();
    if(isCircleEntity(entity) && this.getPathOrientation() == Contour.Orientation.CW){
	arc.reverse();
    }
    CamExporter.prototype.exportArcSegment.call(this, arc, allowForZeroLength);
};


srl

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: YouTube Howto's

Post by andrew » Thu Jun 09, 2016 7:24 am

Thanks. I've applied both changes to GCode.js for future releases.

Post Reply

Return to “QCAD/CAM”