Search found 84 matches

by wildspidee
Tue Feb 10, 2015 10:31 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Spline from Fit Points in Code
Replies: 1
Views: 4568

Spline from Fit Points in Code

Andrew, I can't seem to locate anything on drawing a Spline from fit points (as opposed to control points). I currently have some control point splines such as : var sleeveCapB = new RSpline([mA,mI,m3,mH,mE],2); This works beautifully, of course. However, I have some splines that need to use fit poi...
by wildspidee
Mon Feb 09, 2015 3:31 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: getMiddlePoint Question
Replies: 2
Views: 5385

Re: getMiddlePoint Question

Overcomplicating seems to be something I do consistently. The obvious often eludes me.

Thanks Andrew.
by wildspidee
Fri Feb 06, 2015 7:20 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: getMiddlePoint Question
Replies: 2
Views: 5385

getMiddlePoint Question

I'm using the middle point of a line to define a new RVector. My first inclination was to code: var mO = new RVector(lD_K.getMiddlePoint()); This created an error. I did qDebug to see if something was wrong with the line: qDebug(lD_K + ' ldk'); qDebug(lD_K.getMiddlePoint() + ' lD_K middle') The resu...
by wildspidee
Tue Feb 03, 2015 2:19 am
Forum: QCAD Programming, Script Programming and Contributing
Topic: Setting Sort Orders for New Multi-Level Menus
Replies: 2
Views: 5293

Setting Sort Orders for New Multi-Level Menus

I've created a menu hierarchy for my add-on and the attached image illustrates the structure. The menu system works fine and I'm not getting any errors. However, I've created this by copying existing QCAD menu items. I've tried to understand the sort order numbering system by reading existing QCAD f...
by wildspidee
Sat Jan 31, 2015 12:13 am
Forum: QCAD Programming, Script Programming and Contributing
Topic: Create Multi-Line RTextData with ECMA
Replies: 3
Views: 5879

Re: Create Multi-Line RTextData with ECMA

Worked perfectly, of course. Thanks Andrew. By the way, I have the entire sequence running. It opens the QT dialog for measurements, saves them to XML, opens the XML file, reads all the data and draws the pattern. I had to make some changes to the XML formatting to set my variables, but it runs perf...
by wildspidee
Fri Jan 30, 2015 11:26 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Create Multi-Line RTextData with ECMA
Replies: 3
Views: 5879

Create Multi-Line RTextData with ECMA

One of my dynamic text additions to my drawing requires a line return. I found reference to the "\P" in another forum post and tried to incorporate it. Unfortunately, it just prints out and doesn't generate a line return. I am concatenating two variables as the QString and would like the second one ...
by wildspidee
Fri Jan 23, 2015 7:32 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: XML Import Fails
Replies: 9
Views: 10053

Re: XML Import Fails

I got the XML export in the proper format. I've marked up the importer code with a switch statement for setting values on my variables. And now I'm completely lost. The attached importer.js is basically just the body of your ExXmlImport.js with my switch. The FMBodice.js is my page that draws the pa...
by wildspidee
Fri Jan 23, 2015 6:42 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: XML Import Fails
Replies: 9
Views: 10053

Re: XML Import Fails

I was just testing and stumbled on part of the problem I was having yesterday. I was using your export xml file code when building mine. I copied it over "as-is" because that's the way I like to start, assuming it is correct before I start messing with it. The problem is the comment - stream.writeCo...
by wildspidee
Fri Jan 23, 2015 4:47 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: XML Import Fails
Replies: 9
Views: 10053

Re: XML Import Fails

Changing the structure is no problem. Since I'm creating it with ExXmlExport I can make it any way I choose. I'll change my code and use your recommendation.

Thank you.
by wildspidee
Fri Jan 23, 2015 4:25 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: XML Import Fails
Replies: 9
Views: 10053

Re: XML Import Fails

Our time zone difference is bad (it's 7:20am here), so I'm trying to anticipate my issues for the day. Another issue I'm anticipating is using the ExXmlImport scripts in my code. With the ExXmlExport, I was able to copy out the necessary code and just put it on one of my .js pages. I was surprised i...
by wildspidee
Fri Jan 23, 2015 4:08 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: XML Import Fails
Replies: 9
Views: 10053

Re: XML Import Fails

I think the issue was me (big surprise). I was playing with the files in Text Edit, instead of my IDE (PHPStorm) and I think it was corrupting the file somehow. I just picked a random XML file off my machine and it worked. So I created a test file in the IDE based on that. This is what I get back: i...
by wildspidee
Fri Jan 23, 2015 12:43 am
Forum: QCAD Programming, Script Programming and Contributing
Topic: XML Import Fails
Replies: 9
Views: 10053

XML Import Fails

Success! I have created the QT form and am saving the data in a persistent widget and in a new XML file (based on the ExXmlExport). I have tried every type of XML file using the IOExamples>ExXmlImport and everything returns import failed at the command line. I tried XML with attributes and XML with ...
by wildspidee
Thu Jan 22, 2015 4:18 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Line with Relative Angle in Code
Replies: 3
Views: 6503

Re: Line with Relative Angle in Code

With that, it was easy to fix my problems. One entire pattern is now being generated accurately from script. I've hard coded my variables at the top, so the next step is the QT XML work.

Thank you Andrew.
by wildspidee
Thu Jan 22, 2015 3:40 am
Forum: QCAD Programming, Script Programming and Contributing
Topic: Line with Relative Angle in Code
Replies: 3
Views: 6503

Re: Line with Relative Angle in Code

Here's a couple more instances of my angle problems. I've taken images of the property editor after the entities are draw and here's the corresponding code snippets (there is a line and a text entity). var grainText = new RTextData( lgrain.getMiddlePoint(), // position lgrain.getMiddlePoint(), // al...
by wildspidee
Wed Jan 21, 2015 7:26 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Line with Relative Angle in Code
Replies: 3
Views: 6503

Line with Relative Angle in Code

I need to draw a line with a relative angle of 90 degrees to an existing line. I output the angle of the existing line with getAngle(), which returns 3.372995491. When I view the line properties in the drawing the Angle is 193.258406. I referred to the LineRelativeAngle.js for help and saw the getRe...

Go to advanced search