Could I get some input on the parameter types for the project file cut-settings attributes?

Hi, I’m writing a web-app that I want to automatically generate a Lightburn project file, and I just wanted to get some input to make sure that I’d interpreted the field types correctly. I currently have:

@import <Foundation/Foundation.j>

var _currentCutSettingIndex = 0;

@implementation CutSetting : CPObject
	{
	CPString		_type					@accessors(property=type);
	int				_index					@accessors(property=index);
	CPString		_name					@accessors(property=name);
	float			_minPower				@accessors(property=minPower);
	float			_maxPower				@accessors(property=maxPower);
	float			_minPower2				@accessors(property=minPower2);
	float			_maxPower2				@accessors(property=maxPower2);
	float			_speed					@accessors(property=speed);
	float			_kerf					@accessors(property=kerf);
	float			_zOffset				@accessors(property=zOffset);
	BOOL			_enableLaser1			@accessors(property=enableLaser1);
	BOOL			_enableLaser2			@accessors(property=enableLaser2);
	float			_startDelay				@accessors(property=startDelay);
	float			_endDelay				@accessors(property=endDelay);
	float			_throughPower			@accessors(property=throughPower);
	float			_throughPower2			@accessors(property=throughPower2);
	BOOL			_enableCutThrough		@accessors(property=enableCutThrough);
	int				_priority				@accessors(property=priority);
	int				_frequency				@accessors(property=frequency);
	BOOL			_overrideFrequency		@accessors(property=overrideFrequency);
	float			_ppi					@accessors(property=ppi);
	BOOL			_enablePpi				@accessors(property=enablePpi);
	BOOL			_doOutput				@accessors(property=doOutput);
	BOOL			_hide					@accessors(property=hide);
	BOOL			_runBlower				@accessors(property=runBlower);
	BOOL			_blowerSpeedOverride	@accessors(property=blowerSpeedOverride);
	float			_blowerSpeedPercent		@accessors(property=blowerSpeedPercent);
	BOOL			_overcut				@accessors(property=overcut);
	float			_rampLength				@accessors(property=rampLength);
	int				_numPasses				@accessors(property=numPasses);
	float			_zPerPass				@accessors(property=zPerPass);
	BOOL			_perforate				@accessors(property=perforate);
	float			_perfLen				@accessors(property=perfLen);
	float			_perfSkip				@accessors(property=perfSkip);
	BOOL			_dotMode				@accessors(property=dotMode);
	float			_dotTime				@accessors(property=dotTime);
	float			_dotSpacing				@accessors(property=dotSpacing);
	CPString		_scanOpt				@accessors(property=scanOpt);
	BOOL			_biDir					@accessors(property=biDir);
	BOOL			_crossHatch				@accessors(property=crossHatch);
	BOOL			_overscan				@accessors(property=overscan);
	float			_overscanPercent		@accessors(property=overscanPercent);
	BOOL			_floodFill				@accessors(property=floodFill);
	float			_interval				@accessors(property=interval);
	float			_angle					@accessors(property=angle);
	}

/******************************************************************************\
|* Return the data for a row/column combination
\******************************************************************************/
- (id) initWithIndex:(int)index
	{
	if (self = [super init])
		{
		_type					= @"Cut";
		_index					= index;
		_name					= [CPString stringWithFormat:@"C%02d", index];
		_minPower				= 0;
		_maxPower				= 53;
		_minPower2				= 10;
		_maxPower2				= 20;
		_speed					= 50;
		_kerf					= 0;
		_zOffset				= 0;
		_enableLaser1			= YES;
		_enableLaser2			= NO;
		_startDelay				= 0;
		_endDelay				= 0;
		_throughPower			= 0;
		_throughPower2			= 0;
		_enableCutThrough		= NO;
		_priority				= 0;
		_frequency				= 20000;
		_overrideFrequency		= NO;
		_ppi					= 0;
		_enablePpi				= NO;
		_doOutput				= YES;
		_hide					= NO;
		_runBlower				= YES;
		_blowerSpeedOverride	= NO;
		_blowerSpeedPercent		= 100;
		_overcut				= NO;
		_rampLength				= 0;
		_numPasses				= 1;
		_zPerPass				= 0;
		_perforate				= NO;
		_perfLen				= 80.0;
		_perfSkip				= 0.2;
		_dotMode				= NO;
		_dotTime				= 1;
		_dotSpacing				= 0.1;
		_scanOpt				= @"mergeAll";
		_biDir					= YES;
		_crossHatch				= NO;
		_overscan				= NO;
		_overscanPercent		= 2.5;
		_floodFill				= NO;
		_interval				= 0.1;
		_angle					= 0;
		}
	return self;
	}

/******************************************************************************\
|* Factory method to create a new CutSetting
\******************************************************************************/
+ (CutSetting) newCutSetting
	{
	var cs = [CutSetting new];
	[cs setIndex:_currentCutSettingIndex];
	_currentCutSettingIndex ++;
	return cs;
	}

@end

These are just the properties taken from an almost-empty project file I saved to disk and opened in a text editor. I just want to make sure I’ve interpreted the types correctly :slight_smile:

Overcut is a float (distance, in mm)

I think everything else is correct.

Ta very much :slight_smile:

The web-app isn’t ready yet - there’s a few bugs to fix, and a few features to implement, but there’s a snapshot available here :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.