Well, looked into it.
You will almost always have to include some or other qcad resourses.
Round.js would be one.
Code: Select all
include("scripts/Modify/Round/Round.js");
>> ECMAScript is very picky about typos !!
>> Again: As such you are save even if it won't work overthere without the file physically in place.
After publication, FlexPainter worked without the files in place.
BUT Starting a new endeavour I am back at moving resources back in
Taking the ModifyCorner.js route, again itself:
Code: Select all
include("scripts/Modify/ModifyCorner.js");
Taking the math route if your good at it like it seems:
Code: Select all
new RArc(centerRv, Radius, startAngle, endAngle, reversed)
Then, you still have to cast the arc into the drawing.
The easy way would be:
Code: Select all
simple_create.js
addArc(center, radius, startAngle, endAngle, reversed)
And then you have to include simple.js:
Code: Select all
include("scripts/simple.js"); // Added for simple API
//# Issue Solved # Use "scripts/simple.js" instead of "simple.js"
// See; https://qcad.org/rsforum/viewtopic.php?t=6528
That will include all 'simple' subs itself.
Just get it working with proper includes and it will work for everyone.
If the function you use fails to locate itself:
Copy the file from GIT in place with its parent structure up to 'scripts'.
I understand you would like to isolate your work for now.
finally it will need a proper place in the Qcad project following the project manner.
You can swim upstream if you want to, downstream is a lot easier.
Don't take this the hard way, I mean this as practical.
And BTW it should work perfect with bulges too:
Lets take any somewhat closed form as a string of Lines.
Adding a rounding is simply adding an Arc in between.
Not any Arc but an Arc that is tangent at both neighbours.
Any string of Lines and Arcs is simply a Polyline.
The bulge is then perfectly related at the difference in direction of both neighbours.
The neighbours themselves needs to be shortenned reffering the centerpoint perpendicular.
Math for bulge-arc-center is pritty forward.
Math for bulges is already a part of the Qcad resourses.
For that you have to include ..... got it?
Regards,
CVH