Browse Source

initial commit

titi 5 years ago
commit
54e057e234
9 changed files with 412 additions and 0 deletions
  1. 97 0
      fab/169.nc
  2. BIN
      fab/169gobo.FCStd
  3. BIN
      fab/169gobo.FCStd1
  4. BIN
      fab/camHolder.FCStd
  5. BIN
      fab/camHolder.FCStd1
  6. BIN
      fab/camHolder.stl
  7. 173 0
      soft/doublePrecision.js
  8. 141 0
      soft/keyframes.js
  9. 1 0
      soft/lyreCam.noisette

+ 97 - 0
fab/169.nc

@@ -0,0 +1,97 @@
+(Exported by FreeCAD)
+(Post Processor: grbl_post)
+(Output Time:2020-02-17 13:24:56.070868)
+(begin preamble)
+G17 G90
+G21
+(begin operation: T1: Default tool)
+(Path: T1: Default tool)
+(T1: Default tool)
+(begin toolchange)
+; M6 T2
+M3 S10000.0000
+(finish operation: T1: Default tool)
+(begin operation: Profile_Edges)
+(Path: Profile_Edges)
+(Profile_Edges)
+(Compensated Tool Path. Diameter: 1.0)
+G0 Z7.0000
+G0
+G0 Z0.0000
+G1 X0.0000 Y4.6187 Z-0.4500 F30.00
+G1 X8.6000 Y4.6187 Z-0.4500 F60.00
+G1 X8.6000 Y-4.6187 Z-0.4500 F60.00
+G1 X-8.6000 Y-4.6187 Z-0.4500 F60.00
+G1 X-8.6000 Y4.6187 Z-0.4500 F60.00
+G1 X0.0000 Y4.6187 Z-0.4500 F60.00
+G1 X0.0000 Y4.6187 Z-0.9000 F30.00
+G1 X8.6000 Y4.6187 Z-0.9000 F60.00
+G1 X8.6000 Y-4.6187 Z-0.9000 F60.00
+G1 X-8.6000 Y-4.6187 Z-0.9000 F60.00
+G1 X-8.6000 Y4.6187 Z-0.9000 F60.00
+G1 X0.0000 Y4.6187 Z-0.9000 F60.00
+G1 X0.0000 Y4.6187 Z-1.0000 F30.00
+G1 X8.6000 Y4.6187 Z-1.0000 F60.00
+G1 X8.6000 Y-4.6187 Z-1.0000 F60.00
+G1 X-8.6000 Y-4.6187 Z-1.0000 F60.00
+G1 X-8.6000 Y4.6187 Z-1.0000 F60.00
+G1 X0.0000 Y4.6187 Z-1.0000 F60.00
+G0 Z7.0000
+(finish operation: Profile_Edges)
+(begin operation: TagDressup)
+(Path: TagDressup)
+G0 Z7.0000
+G0 X0.0000 Y13.0000 Z7.0000
+G0 X0.0000 Y13.0000 Z3.0000
+G1 X0.0000 Y12.2496 Z-0.4500 F34.09
+G2 X1.4715 Y-12.1609 Z-0.4500 I0.0000 J-12.2496 F60.00
+G2 X-1.4965 Y12.1579 Z-0.4500 I-1.4715 J12.1609 F60.00
+G2 X0.0000 Y12.2496 Z-0.4500 I1.4965 J-12.1579 F60.00
+G1 X0.0000 Y12.2496 Z-0.9000 F30.00
+G2 X6.9830 Y10.0643 Z-0.9000 I0.0000 J-12.2496 F60.00
+G1 X7.3086 Y9.8304 Z-0.5000
+G2 X9.3729 Y7.8869 Z-0.5000 I-7.3086 J-9.8304 F60.00
+G1 X9.4077 Y7.8453 Z-0.5542
+G1 X9.6259 Y7.5760 Z-0.9000
+G2 X10.4663 Y-6.3648 Z-0.9000 I-9.6259 J-7.5760 F60.00
+G1 X10.2524 Y-6.7038 Z-0.5000
+G2 X8.4366 Y-8.8813 Z-0.5000 I-10.2524 J6.7038 F60.00
+G1 X8.1415 Y-9.1526 Z-0.9000
+G2 X1.4715 Y-12.1609 Z-0.9000 I-8.1415 J9.1526 F60.00
+G2 X-6.0414 Y-10.6562 Z-0.9000 I-1.4715 J12.1609 F60.00
+G1 X-6.3868 Y-10.4528 Z-0.5000
+G2 X-8.6188 Y-8.7045 Z-0.5000 I6.3868 J10.4528 F60.00
+G1 X-8.8990 Y-8.4179 Z-0.9000
+G2 X-10.6624 Y6.0304 Z-0.9000 I8.8990 J8.4178 F60.00
+G1 X-10.4594 Y6.3761 Z-0.5000
+G2 X-8.7134 Y8.6099 Z-0.5000 I10.4594 J-6.3761 F60.00
+G1 X-8.4270 Y8.8904 Z-0.9000
+G2 X-1.4965 Y12.1579 Z-0.9000 I8.4270 J-8.8904 F60.00
+G2 X0.0000 Y12.2496 Z-0.9000 I1.4965 J-12.1579 F60.00
+G1 X0.0000 Y12.2496 Z-1.0000 F30.00
+G2 X6.9004 Y10.1211 Z-1.0000 I0.0000 J-12.2496 F60.00
+G1 X7.3086 Y9.8304 Z-0.5000
+G2 X9.3729 Y7.8869 Z-0.5000 I-7.3086 J-9.8304 F60.00
+G1 X9.4077 Y7.8453 Z-0.5542
+G1 X9.6876 Y7.4969 Z-1.0000
+G2 X10.5180 Y-6.2789 Z-1.0000 I-9.6876 J-7.4969 F60.00
+G1 X10.2524 Y-6.7038 Z-0.5000
+G2 X8.4366 Y-8.8813 Z-0.5000 I-10.2524 J6.7038 F60.00
+G1 X8.0663 Y-9.2189 Z-1.0000
+G2 X1.4715 Y-12.1609 Z-1.0000 I-8.0663 J9.2189 F60.00
+G2 X-5.9539 Y-10.7053 Z-1.0000 I-1.4715 J12.1609 F60.00
+G1 X-6.3868 Y-10.4528 Z-0.5000
+G2 X-8.6188 Y-8.7045 Z-0.5000 I6.3868 J10.4528 F60.00
+G1 X-8.9677 Y-8.3447 Z-1.0000
+G2 X-10.7114 Y5.9429 Z-1.0000 I8.9677 J8.3447 F60.00
+G1 X-10.4594 Y6.3761 Z-0.5000
+G2 X-8.7134 Y8.6099 Z-0.5000 I10.4594 J-6.3761 F60.00
+G1 X-8.3539 Y8.9591 Z-1.0000
+G2 X-1.4965 Y12.1579 Z-1.0000 I8.3539 J-8.9591 F60.00
+G2 X0.0000 Y12.2496 Z-1.0000 I1.4965 J-12.1579 F60.00
+G0 X0.0000 Y12.2496 Z7.0000
+(finish operation: TagDressup)
+(begin postamble)
+M5
+G17 G90
+; M2

BIN
fab/169gobo.FCStd


BIN
fab/169gobo.FCStd1


BIN
fab/camHolder.FCStd


BIN
fab/camHolder.FCStd1


BIN
fab/camHolder.stl


+ 173 - 0
soft/doublePrecision.js

@@ -0,0 +1,173 @@
+
+/* ********** GENERAL SCRIPTING **********************
+
+		This templates shows what you can do in this is module script
+		All the code outside functions will be executed each time this script is loaded, meaning at file load, when hitting the "reload" button or when saving this file
+*/
+
+
+// You can add custom parameters to use in your script here, they will be replaced each time this script is saved
+var myFloatParam = script.addFloatParameter("My Float Param","Description of my float param",.1,0,1); 		//This will add a float number parameter (slider), default value of 0.1, with a range between 0 and 1
+var LSB;
+var MSB;
+//Here are all the type of parameters you can create
+/*
+var myTrigger = script.addTrigger("My Trigger", "Trigger description"); 									//This will add a trigger (button)
+var myBoolParam = script.addBoolParameter("My Bool Param","Description of my bool param",false); 			//This will add a boolean parameter (toggle), defaut unchecked
+var myFloatParam = script.addFloatParameter("My Float Param","Description of my float param",.1,0,1); 		//This will add a float number parameter (slider), default value of 0.1, with a range between 0 and 1
+var myIntParam = script.addIntParameter("My Int Param","Description of my int param",2,0,10); 				//This will add an integer number parameter (stepper), default value of 2, with a range between 0 and 10
+var myStringParam = script.addStringParameter("My String Param","Description of my string param", "cool");	//This will add a string parameter (text field), default value is "cool"
+var myColorParam = script.addColorParameter("My Color Param","Description of my color param",0xff0000ff); 	//This will add a color parameter (color picker), default value of opaque blue (ARGB)
+var myP2DParam = script.addPoint2DParameter("My P2D Param","Description of my p2d param"); 					//This will add a point 2d parameter
+var myP3DParam = script.addPoint3DParameter("My P3D Param","Description of my p3d param"); 					//This will add a point 3d parameter
+var myTargetParam = script.addTargetParameter("My Target Param","Description of my target param"); 			//This will add a target parameter (to reference another parameter)
+var myEnumParam = script.addEnumParameter("My Enum Param","Description of my enum param",					//This will add a enum parameter (dropdown with options)
+											"Option 1", 1,													//Each pair of values after the first 2 arguments define an option and its linked data
+											"Option 2", 5,												    //First argument of an option is the label (string)
+											"Option 3", "banana"											//Second argument is the value, it can be whatever you want
+											); 	
+*/
+
+
+//you can also declare custom internal variable
+//var myValue = 5;
+
+/*
+ The init() function will allow you to init everything you want after the script has been checked and loaded
+ WARNING it also means that if you change values of your parameters by hand and set their values inside the init() function, they will be reset to this value each time the script is reloaded !
+*/
+function init()
+{
+	//myFloatParam.set(5); //The .set() function set the parameter to this value.
+	//myColorParam.set([1,.5,1,1]);	//for a color parameter, you need to pass an array with 3 (RGB) or 4 (RGBA) values.
+	//myP2DParam.set([1.5,-5]); // for a Point2D parameter, you need to pass 2 values (XY)
+	//myP3DParam.set([1.5,2,-3]); // for a Point3D parameter, you need to pass 3 values (XYZ)
+}
+
+/*
+ This function will be called each time a parameter of your script has changed
+*/
+function scriptParameterChanged(param)
+{
+	//You can use the script.log() function to show an information inside the logger panel. To be able to actuallt see it in the logger panel, you will have to turn on "Log" on this script.
+	script.log("Parameter changed : "+param.name); //All parameters have "name" property
+	if(param.is(myTrigger)) script.log("Trigger !"); //You can check if two variables are the reference to the same parameter or object with the method .is()
+	else if(param.is(myEnumParam)) script.log("Label = "+param.get()+", data = "+param.getData()); //The enum parameter has a special function getData() to get the data associated to the option
+	else script.log("Value is "+param.get()); //All parameters have a get() method that will return their value
+	if (param.name == "myFloatParam"){
+		script.log("sending back");
+		var ccValue = param.get()*16383;
+		MSB = Math.floor(ccValue/128);
+		MSB=Math.round(MSB);
+		LSB = Math.floor(ccValue % 128);
+		MSB=Math.round(MSB);
+		LSB=Math.round(LSB);
+		script.log(MSB+ " "+ LSB);
+		local.sendCC(channel, 0, MSB);
+		local.sendCC(channel, 32, LSB);
+	
+	}
+}
+
+/*
+ This function, if you declare it, will launch a timer at 50hz, calling this method on each tick
+*/
+/*
+function update(deltaTime)
+{
+	script.log("Update : "+util.getTime()+", delta = "+deltaTime); //deltaTime is the time between now and last update() call, util.getTime() will give you a timestamp relative to either the launch time of the software, or the start of the computer.
+}
+*/
+
+
+
+/* ********** MODULE SPECIFIC SCRIPTING **********************
+
+	The "local" variable refers to the object containing the scripts. In this case, the local variable refers to the module.
+	It means that you can access any control inside  this module by accessing it through its address.
+	For instance, if the module has a float value named "Density", you can access it via local.values.density
+	Then you can retrieve its value using local.values.density.get() and change its value using local.values.density.set()
+*/
+
+/*
+ This function will be called each time a parameter of this module has changed, meaning a parameter or trigger inside the "Parameters" panel of this module
+ This function only exists because the script is in a module
+*/
+function moduleParameterChanged(param)
+{
+	if(param.isParameter())
+	{
+		script.log("Module parameter changed : "+param.name+" > "+param.get());
+	}else 
+	{
+		script.log("Module parameter triggered : "+value.name);	
+	}
+	
+}
+
+/*
+ This function will be called each time a value of this module has changed, meaning a parameter or trigger inside the "Values" panel of this module
+ This function only exists because the script is in a module
+*/
+function moduleValueChanged(value)
+{
+	if(value.isParameter())
+	{
+		script.log("Module value changed : "+value.name+" > "+value.get());	
+	}else 
+	{
+		script.log("Module value triggered : "+value.name);	
+	}
+}
+
+/* ********** MIDI MODULE SPECIFIC SCRIPTING ********************* */
+/*
+
+MIDI Modules have specific methods that can be used to send MIDI events such as noteOn, noteOff, controlChange and sysEx messages from Script.
+If you want to send a MIDI event from this script, you can do the following :
+
+local.sendNoteOn(1, 12, 127); //This will send a NoteOn Event on channel 1, pitch 12, velocity 127
+local.sendNoteOff(1, 12); //This will send a NoteOff Event on chanenl 1, pitch 12
+local.sendCC(3, 20, 65); //This will send a ControlChange on channel 3, number 20, value 65
+local.sendSysEx(15,20,115,10); //This will send 4 bytes as a SysEx message
+local.sendSysEx(15,20,115,10); //This will send 4 bytes as a SysEx message
+*/
+
+/*
+You can intercept MIDI Events with the functions below
+*/
+
+function noteOnEvent(channel, pitch, velocity)
+{
+	script.log("Note on received "+channel+", "+pitch+", "+velocity);
+}
+
+
+function noteOffEvent(channel, pitch, velocity)
+{
+	script.log("Note off received "+channel+", "+pitch+", "+velocity);
+}
+
+function ccEvent(channel, number, value)
+{
+	script.log("ControlChange received "+channel+", "+number+", "+value);
+	//feedback to BCF
+	local.sendCC(channel, number, value);
+	if(number==0){
+		MSB = value;
+		myFloatParam.set((128*MSB+LSB)/16384.0);
+	}
+	if(number==32){
+		LSB = value;
+		myFloatParam.set((128*MSB+LSB)/16384.0);
+	}
+}
+
+function sysExEvent(data)
+{
+	script.log("Sysex Message received, "+data.length+" bytes :");
+	for(var i=0; i < data.length; i++)
+	{
+		script.log(" > "+data[i]);
+	}
+}

+ 141 - 0
soft/keyframes.js

@@ -0,0 +1,141 @@
+
+/* ********** GENERAL SCRIPTING **********************
+
+		This templates shows what you can do in this is module script
+		All the code outside functions will be executed each time this script is loaded, meaning at file load, when hitting the "reload" button or when saving this file
+*/
+
+
+// You can add custom parameters to use in your script here, they will be replaced each time this script is saved
+var myFloatParam = script.addFloatParameter("My Float Param","Description of my float param",.1,0,1); 		//This will add a float number parameter (slider), default value of 0.1, with a range between 0 and 1
+var myFile = script.addFileParameter("textFile", "this is a text file");
+//Here are all the type of parameters you can create
+
+var myTrigger = script.addTrigger("My Trigger", "Trigger description"); 									//This will add a trigger (button)
+/*
+var myBoolParam = script.addBoolParameter("My Bool Param","Description of my bool param",false); 			//This will add a boolean parameter (toggle), defaut unchecked
+var myFloatParam = script.addFloatParameter("My Float Param","Description of my float param",.1,0,1); 		//This will add a float number parameter (slider), default value of 0.1, with a range between 0 and 1
+var myIntParam = script.addIntParameter("My Int Param","Description of my int param",2,0,10); 				//This will add an integer number parameter (stepper), default value of 2, with a range between 0 and 10
+var myStringParam = script.addStringParameter("My String Param","Description of my string param", "cool");	//This will add a string parameter (text field), default value is "cool"
+var myColorParam = script.addColorParameter("My Color Param","Description of my color param",0xff0000ff); 	//This will add a color parameter (color picker), default value of opaque blue (ARGB)
+var myP2DParam = script.addPoint2DParameter("My P2D Param","Description of my p2d param"); 					//This will add a point 2d parameter
+var myP3DParam = script.addPoint3DParameter("My P3D Param","Description of my p3d param"); 					//This will add a point 3d parameter
+var myTargetParam = script.addTargetParameter("My Target Param","Description of my target param"); 			//This will add a target parameter (to reference another parameter)
+var myEnumParam = script.addEnumParameter("My Enum Param","Description of my enum param",					//This will add a enum parameter (dropdown with options)
+											"Option 1", 1,													//Each pair of values after the first 2 arguments define an option and its linked data
+											"Option 2", 5,												    //First argument of an option is the label (string)
+											"Option 3", "banana"											//Second argument is the value, it can be whatever you want
+											);
+*/
+
+
+//you can also declare custom internal variable
+//var myValue = 5;
+
+/*
+ The init() function will allow you to init everything you want after the script has been checked and loaded
+ WARNING it also means that if you change values of your parameters by hand and set their values inside the init() function, they will be reset to this value each time the script is reloaded !
+*/
+function init()
+{
+	//myFloatParam.set(5); //The .set() function set the parameter to this value.
+	//myColorParam.set([1,.5,1,1]);	//for a color parameter, you need to pass an array with 3 (RGB) or 4 (RGBA) values.
+	//myP2DParam.set([1.5,-5]); // for a Point2D parameter, you need to pass 2 values (XY)
+	//myP3DParam.set([1.5,2,-3]); // for a Point3D parameter, you need to pass 3 values (XYZ)
+	script.log(myFile.getAbsolutePath());
+}
+
+/*
+ This function will be called each time a parameter of your script has changed
+*/
+function scriptParameterChanged(param)
+{
+	//You can use the script.log() function to show an information inside the logger panel. To be able to actuallt see it in the logger panel, you will have to turn on "Log" on this script.
+	script.log("Parameter changed : "+param.name); //All parameters have "name" property
+	if(param.is(myTrigger)){
+		 script.log("Trigger !"); //You can check if two variables are the reference to the same parameter or object with the method .is()
+		 var testJSON = {} ;
+		 testJSON['A']='truc';
+		 testJSON['B']=12;
+		 myFile.writeFile(JSON.stringify(testJSON), 1);
+	}
+
+	else if(param.is(myEnumParam)) script.log("Label = "+param.get()+", data = "+param.getData()); //The enum parameter has a special function getData() to get the data associated to the option
+	else script.log("Value is "+param.get()); //All parameters have a get() method that will return their value
+	script.log(myFile.readFile());
+}
+
+/*
+ This function, if you declare it, will launch a timer at 50hz, calling this method on each tick
+*/
+/*
+function update(deltaTime)
+{
+	script.log("Update : "+util.getTime()+", delta = "+deltaTime); //deltaTime is the time between now and last update() call, util.getTime() will give you a timestamp relative to either the launch time of the software, or the start of the computer.
+}
+*/
+
+
+
+/* ********** MODULE SPECIFIC SCRIPTING **********************
+
+	The "local" variable refers to the object containing the scripts. In this case, the local variable refers to the module.
+	It means that you can access any control inside  this module by accessing it through its address.
+	For instance, if the module has a float value named "Density", you can access it via local.values.density
+	Then you can retrieve its value using local.values.density.get() and change its value using local.values.density.set()
+*/
+
+/*
+ This function will be called each time a parameter of this module has changed, meaning a parameter or trigger inside the "Parameters" panel of this module
+ This function only exists because the script is in a module
+*/
+function moduleParameterChanged(param)
+{
+	if(param.isParameter())
+	{
+		script.log("Module parameter changed : "+param.name+" > "+param.get());
+	}else
+	{
+		script.log("Module parameter triggered : "+value.name);
+	}
+}
+
+/*
+ This function will be called each time a value of this module has changed, meaning a parameter or trigger inside the "Values" panel of this module
+ This function only exists because the script is in a module
+*/
+function moduleValueChanged(value)
+{
+	if(value.isParameter())
+	{
+		script.log("Module value changed : "+value.name+" > "+value.get());
+	}else
+	{
+		script.log("Module value triggered : "+value.name);
+	}
+}
+
+/* ********** OSC MODULE SPECIFIC SCRIPTING ********************* */
+/*
+
+OSC Modules have specific methods that can be used to send OSC message from Script.
+If you want to send an OSC Message from this script, you can do the following :
+
+local.send("/myAddress",1,.5f,"cool"); //This will send an OSC Message with address "/myAddress" and 3 arguments <int>, <float> and <string>
+
+*/
+/*
+You can intercept OSC message with the function oscEvent(address, args)
+*/
+
+function oscEvent(address, args)
+{
+	//param "address" is the address of the OSC Message
+	//param "args" is an array containing all the arguments of the OSC Message
+
+	script.log("OSC Message received "+address+", "+args.length+" arguments");
+	for(var i=0; i < args.length; i++)
+	{
+		script.log(" > "+args[i]);
+	}
+}

File diff suppressed because it is too large
+ 1 - 0
soft/lyreCam.noisette