Patrice, i dont know how to give you the files.. things are all so complicated now..
i can put them on a CD, and post them.. i.e the whole program with the new interfaces, all working and post that to an address you give me by PM... ?
i dont know how to upload the whole new program
maybe mbasagli can help i need instructions..
i have the files in my website, but i dont know how to give them to you.
incony.org / web / plugins / circle / circle.js
incony.org / web / plugins / circle / dialog_insert_circle.ui
incony.org / web / plugins / circle / plugin_circle.json
if you know how to use visual studio code, i can post the three circle scripts... here.. for example here is the first circle java script if you look in the plugins folder.. this would go in a folder called circle the first of three files needed.. you sense how complicated things are if you dont know how to create a file.
if ( Dialog_Insert_Circle.exec() )
{
var graph = new Graph();
var last = null;
var first = null;
var multipleqty = null;
var radiustart = Dialog_Insert_Circle.Circleradius.value + Dialog_Insert_Circle.Circleradiusinc.value;// initial inbox value of radius from 0,0
var radius = radiustart;// updates radius to initial start - which is variable each time
var sides = Dialog_Insert_Circle.Qofnodes.value;
var middle = null;
if ( Dialog_Insert_Circle.check_middle_node.checked )
middle = graph.add_node(0,0);
var circlenodeslink = null;
var circlenodesunlink = null;
if ( Dialog_Insert_Circle.check_connect_nodes.checked )
var circlenodeslink =1
var circlenodesunlink = null;
if (Dialog_Insert_Circle.check_connect_nodes.unchecked )
var circlenodeslink = null
var circlenodesunlink = 1;
var circlerotate = (Dialog_Insert_Circle.Circlerotation.value * Math.PI / 180);
var angle = null
var multipleqty = Dialog_Insert_Circle.Circlemultipleqty.value;// how many multiple circles to make, since inbox is a variable
if ( circlenodeslink )// if true link nodes
{
Dialog_Insert_Circle.Circlediameter.value = 2*radius;// diameter updated
for ( var i = 0; i < sides; i++ )
{
var angle = (2*Math.PI*i/sides) + circlerotate;
var next = graph.add_node(radius*Math.cos(angle),-radius*Math.sin(angle));
if ( !first )
first = next;
if ( middle )
graph.connect(middle,next);
if ( last )
graph.connect(last,next);
last = next;
}
graph.connect(last,first);
};
if ( circlenodesunlink )// if true do not link nodes - just put nodes in
{
//Dialog_Insert_Circle.Circlediameter.value = 2*radius; // updates diameter
Dialog_Insert_Circle.Circlediameter.value = graph;
for ( var i = 0; i < sides; i++ )
{
var angle = (2*Math.PI*i/sides) + circlerotate;
var next = graph.add_node(radius*Math.cos(angle),-radius*Math.sin(angle));
if ( !first )
first = next;
if ( middle )
graph.add_node(middle,next);
if ( last )
graph.add_node(last,next);
last = next;
}
graph.add_node(last,first);
};
if ( Dialog_Insert_Circle.checkmultiplecircles.checked )// if true make inbox number of shapes from 0 to 10 possible, 0 makes none but can add a node (wildcard)
{
var graph = new Graph()
var middle = null;
if ( Dialog_Insert_Circle.check_middle_node.checked )
middle = graph.add_node(0,0)
graph.add_node ( 0,0 );
var circlenodeslink = null;
var circlenodesunlink = null;
if ( Dialog_Insert_Circle.checksteprotatecircles.unchecked )
var circleangleinc = null;
if ( Dialog_Insert_Circle.checksteprotatecircles.checked )
var circleangleinc = 1;
if ( Dialog_Insert_Circle.check_connect_nodes.checked )
var circlenodeslink = 1
var circlenodesunlink = null;
if (Dialog_Insert_Circle.check_connect_nodes.unchecked )
var circlenodeslink = null
var circlenodesunlink = 1;
if ( circlenodeslink )// if true link nodes with default shape
{
var radius = radiustart + Dialog_Insert_Circle.Circleradiusinc.value;// sets initial radius before loop
var last = null//makes sure loop variables do not exist (including 0 i.e 0 doesnt exist)
var first = null
for( var m = 0; m < multipleqty; m++ )// makes m loop inbox number of times
{
var radius = radius + Dialog_Insert_Circle.Circleradiusinc.value;// radius = itself (which is radiustart) + step which means radius increases each time m increases
var diu = 2*radius;
Dialog_Insert_Circle.Circlediameter.value = diu; // updates diameter
if ( circleangleinc )
var circlerotate = (m*Dialog_Insert_Circle.Circlerotation.value);
Dialog_Insert_Circle.Circlerotationtot.value = circlerotate;
for ( var i = 0; i < sides; i++ )
{
var angle = (2*Math.PI*i/sides) + circlerotate;
var next = graph.add_node(radius*Math.cos(angle),-radius*Math.sin(angle));
if ( !first )
first = next;
if ( middle )
graph.connect(middle,next);
if ( last )
graph.connect(last,next);
last = next;
} // for i loop end
graph.connect(last,first);
var last = null;
var first = null;
var middle = null;
};// for m loop end
};// if circlenodeslink loop end
if ( circlenodesunlink )// if true do not link nodes
{
var radius = radiustart + Dialog_Insert_Circle.Circleradiusinc.value;// sets initial radius before loop
var last = null//makes sure loop variables do not exist (including 0 i.e 0 doesnt exist)
var first = null
for( var m = 0; m < multipleqty; m++ )// makes m loop inbox number of times
{
var radius = radius + Dialog_Insert_Circle.Circleradiusinc.value;// radius = itself (which is radiustart) + step which means radius increases each time m increases
var diu = 2*radius;
Dialog_Insert_Circle.Circlediameter.value = diu; // updates diameter
if ( circleangleinc )
var circlerotate = (m*Dialog_Insert_Circle.Circlerotation.value);
Dialog_Insert_Circle.Circlerotationtot.value = circlerotate;
for ( var i = 0; i < sides; i++ )
{
var angle = (2*Math.PI*i/sides) + circlerotate;
var next = graph.add_node(radius*Math.cos(angle),-radius*Math.sin(angle));
if ( !first )
first = next;
if ( middle )
graph.add_node(middle,next);
if ( last )
graph.add_node(last,next);
last = next;
} // for i loop end
graph.add_node(last,first);
var last = null;
var first = null;
var middle = null;
};// for m loop end
};// if circlenodesunlink end
}// for insert multiple circle end
document.insert(graph,"Insert Circle");
}