Creare riempimenti personalizzati; programazione in javascri

Si prega di utilizzare questo forum per porre domande, commenti, analisi guasti e problemi legati al QCAD professionale

Moderator: andrew

pietro_72_
Active Member
Posts: 30
Joined: Fri Apr 17, 2015 6:40 am
Location: http://pietro72li.altervista.org/

Creare riempimenti personalizzati; programazione in javascri

Postby pietro_72_ » Fri Apr 17, 2015 7:13 am

Salve

Volevo sapere se è possibile con QCAD realizzare dei riempimenti personalizzati?

Inoltre ho l'hobby per la programazione http://pietro72li.altervista.org, se volessi provare a realizzare qualche estensione per QCAD in javascript quali guide di riferimento potrei consultare?

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

Re: Creare riempimenti personalizzati; programazione in java

Postby andrew » Fri Apr 17, 2015 7:45 am

Per tradurre in italiano, si prega di utilizzare http://translate.google.com, grazie.

You can find the documentation for developers (script / C++) at:
http://www.qcad.org/doc/qcad/latest/dev ... index.html

The best resource are probably the scripts which are included with every QCAD installation in the scripts directory. Note that every tool in QCAD is implemented as script at least on the highest level.

Some simple examples can be found under scripts/Misc/Examples.

pietro_72_
Active Member
Posts: 30
Joined: Fri Apr 17, 2015 6:40 am
Location: http://pietro72li.altervista.org/

Re: Creare riempimenti personalizzati; programazione in java

Postby pietro_72_ » Fri Apr 17, 2015 8:32 am

Grazie della risposte riguardo la programmazione.

Per quanto riguarda la realizzazione di riempimenti personalizzati intendo la realizzazione di tratteggi personalizzati.

Translation by Google

Thanks for the answer about programming.

With regard to the realization of custom fills mean the realization of custom hatches.

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

Re: Creare riempimenti personalizzati; programazione in java

Postby andrew » Fri Apr 17, 2015 8:38 am

Hatch patterns are defined in standard .pat files located in patterns/metric of your QCAD installation directory.

The .pat file format is well documented:
https://www.google.com/#q=autocad+hatch ... ile+format

pietro_72_
Active Member
Posts: 30
Joined: Fri Apr 17, 2015 6:40 am
Location: http://pietro72li.altervista.org/

Re: Creare riempimenti personalizzati; programazione in java

Postby pietro_72_ » Tue Apr 21, 2015 6:35 am

Un'altra domanda riguardo l'estensione di qcad in ECMAScript, è possibile gestire gli eventi del mouse down, move, up, tipo ottenere la posizione del puntatore quando si verificano tali eventi?

Translation by Google

Another question regarding the extension of qcad in ECMAScript, you can handle the mouse events down, move, up, type get the location of the pointer when these events occur?

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

Re: Creare riempimenti personalizzati; programazione in java

Postby andrew » Tue Apr 21, 2015 8:14 am

pietro_72_ wrote:Another question regarding the extension of qcad in ECMAScript, you can handle the mouse events down, move, up, type get the location of the pointer when these events occur?


Yes:

MyAction.prototype.mousePressEvent = function(event) {
if (event.button() === Qt.LeftButton) {
qDebug("left button clicked at: ", event.getModelPosition());
}
};

MyAction.prototype.mouseReleaseEvent = function(event) {
};

MyAction.prototype.mouseDoubleClickEvent = function(event) {
};

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

Re: Creare riempimenti personalizzati; programazione in java

Postby andrew » Wed Apr 22, 2015 1:09 pm

Please start new threads for new, unrelated questions. I've split this topic. You can find your latest post at:
viewtopic.php?f=95&t=3450


Return to “QCAD professional”

Who is online

Users browsing this forum: No registered users and 1 guest