Camexporter request

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

Camexporter request

Post by srl » Mon May 02, 2016 12:41 am

Hi Andrew

I'm working on a better config.

I found the line

Code: Select all

simEntity.setColor(RColor.isByLayer());
in exportLineSegment(). Its not in exportArcSegment().

Can it be removed as it limits the createLayer function.

Could the following be changed in createLayer to allow for linetypes?
Test1.prototype.createLayer = function(layerName, color, lineType) {// change
	if (lineType == null)// change
		lineType = "continuous";// change
    var layerId = this.newDocument.getLayerId(layerName);
    if (layerId!==RObject.INVALID_ID) {
        return layerId;
    }

    var layer = new RLayer(
        this.newDocument,
        layerName,
        false, false,
        color,
        this.newDocument.getLinetypeId(lineType),// change
        RLineweight.Weight000
    );

    var op = new RAddObjectOperation(layer);
    this.newDocumentInterface.applyOperation(op);

    return this.newDocument.getLayerId(layerName);
};
srl

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

Re: Camexporter request

Post by andrew » Mon May 02, 2016 9:25 am

Looks good, thanks.

BTW: you can override all these functions in your own configuration for now to get that functionality immediately, before the next update.

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

Re: Camexporter request

Post by srl » Thu Jun 09, 2016 9:21 am

Hi Andrew

Could I have the following line types added to QCad?. It would save me entering them in with each new release.
They are half "Drainage" to show a offset cut in Cam preview using the above code changes.

Code: Select all

/*

To use offset line types in the qcad-cam preview add the following lines to a file and place it in the Qcad/linetypes/metric/ directory-

*CUTLEFT,G41 ----\----\----\----
A,5.08,[LRIGHT_ARROW,qcadshp.shx,S=2.54,R=180],5.08
*CUTLEFT2,G41 reversed----/----/----/----
A,5.08,[LRIGHT_ARROW,qcadshp.shx,S=2.54],5.08
*CUTRIGHT,G42 ----/----/-----/---
A,5.08,[HRIGHT_ARROW,qcadshp.shx,S=2.54,R=180],5.08
*CUTRIGHT2,G42 reversed----\----\----\----
A,5.08,[HRIGHT_ARROW,qcadshp.shx,S=2.54],5.08

Also add the following to the /fonts/qcadshp.cxf file leaving a line space between each group of lines-

[0090] HRIGHT_ARROW
L 1,0.5,0,0

[0091] LRIGHT_ARROW
L 0,0,1,-0.5



*/

srl

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

Re: Camexporter request

Post by andrew » Fri Jun 10, 2016 10:24 am

OK, I'll add these to the next QCAD/CAM release (linetypes in file linetypes/metric/qcadcam.lin).

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

Re: Camexporter request

Post by srl » Tue Jun 14, 2016 1:16 am

Thanks for the line additions Andrew.
It looks great. :D
Screenshot from 2016-06-14 07-32-27.png
Screenshot from 2016-06-14 07-32-27.png (50.65 KiB) Viewed 9809 times
srl

Post Reply

Return to “QCAD/CAM”