Copy link to clipboard
Copied
Copy link to clipboard
Copied
I would like to know how to make the innermost curved rings made using right parenthesis.
Copy link to clipboard
Copied
Two ways. One is to use the vertical text tool on a path. The other way is to create a pattern and use the scripted fill with place pattern along a path.
Copy link to clipboard
Copied
I would suggest that either Adobe Illustrator or Adobe InDesign are better places than Adobe Photoshop for this task. Not that you can't do it in Photoshop, however, if this is art for a physical rubber stamp, the service provider may require vector data, not raster. It is easy to turn vector into raster if required.
Copy link to clipboard
Copied
One could also create Smart Objects instances and distribute them via a Script.
// xonverts to smart object, copies and rotates a layer;
// for photoshop cs5 on mac;
// 2011; use it at your own risk;
#target photoshop
////// filter for checking if entry is numeric and positive, thanks to xbytor //////
posNumberKeystrokeFilter = function() {
this.text = this.text.replace(",", ".");
this.text = this.text.replace("-", "");
if (this.text.match(/[^\-\.\d]/)) {
this.text = this.text.replace(/[^\-\.\d]/g, '');
}
};
posNumberKeystrokeFilter2 = function() {
this.text = this.text.replace(",", "");
this.text = this.text.replace("-", "");
this.text = this.text.replace(".", "");
if (this.text.match(/[^\-\.\d]/)) {
this.text = this.text.replace(/[^\-\.\d]/g, '');
};
if (this.text == "") {this.text = "2"}
if (this.text == "1") {this.text = "2"}
};
////////////////////////////////////
var theCheck = photoshopCheck();
if (theCheck == true) {
// do the operations;
var myDocument = app.activeDocument;
var myResolution = myDocument.resolution;
var originalUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
////////////////////////////////////
var dlg = new Window('dialog', "set circle-radius for arrangement", [500,300,840,450]);
// field for radius;
dlg.radius = dlg.add('panel', [15,17,162,67], 'inner radius');
dlg.radius.number = dlg.radius.add('edittext', [12,12,60,32], "30", {multiline:false});
dlg.radius.numberText = dlg.radius.add('statictext', [65,14,320,32], "mm radius ", {multiline:false});
dlg.radius.number.onChange = posNumberKeystrokeFilter;
dlg.radius.number.active = true;
// field for number;
dlg.number = dlg.add('panel', [172,17,325,67], 'number of copies');
dlg.number.value = dlg.number.add('edittext', [12,12,60,32], "30", {multiline:false});
dlg.number.value.onChange = posNumberKeystrokeFilter2;
dlg.number.value.text = "12";
// buttons for ok, and cancel;
dlg.buttons = dlg.add('panel', [15,80,325,130], '');
dlg.buttons.buildBtn = dlg.buttons.add('button', [13,13,145,35], 'OK', {name:'ok'});
dlg.buttons.cancelBtn = dlg.buttons.add('button', [155,13,290,35], 'Cancel', {name:'cancel'});
// show the dialog;
dlg.center();
var myReturn = dlg.show ();
////////////////////////////////////
if (myReturn == true) {
// the layer;
var theLayer = smartify(myDocument.activeLayer);
app.togglePalettes();
// get layer;
var theName = myDocument.activeLayer.name;
var theBounds = theLayer.bounds;
var theWidth = theBounds[2] - theBounds[0];
var theHeight = theBounds[3] - theBounds[1];
var theOriginal = myDocument.activeLayer;
var theHorCenter = (theBounds[0] + ((theBounds[2] - theBounds[0])/2));
var theVerCenter = (theBounds[1] + ((theBounds[3] - theBounds[1])/2));
// create layerset;
var myLayerSet = myDocument.layerSets.add();
theOriginal.visible = false;
myLayerSet.name = theName + "_rotation";
// create copies;
var theNumber = dlg.number.value.text;
var theLayers = new Array;
for (var o = 0; o < theNumber; o++) {
var theCopy = theLayer.duplicate(myLayerSet, ElementPlacement.PLACEATBEGINNING);
theLayers.push(theCopy);
};
// calculate the radius in pixels;
var theRadius = Number(dlg.radius.number.text) / 10 * myResolution / 2.54;
myDocument.selection.deselect();
// get the angle;
theAngle = 360 / theNumber;
// work through the layers;
for (var d = 0; d < theNumber; d++) {
var thisAngle = theAngle * d ;
var theLayer = theLayers[d];
// determine the offset for outer or inner radius;
var theMeasure = theRadius + theHeight/2;
// var theMeasure = theRadius + theWidth/2;
var theHorTarget = Math.cos(radiansOf(thisAngle)) * theMeasure;
var theVerTarget = Math.sin(radiansOf(thisAngle)) * theMeasure;
// do the transformations;
rotateAndMove(myDocument, theLayer, thisAngle + 90, - theHorCenter + theHorTarget + (myDocument.width / 2), - theVerCenter + theVerTarget + (myDocument.height / 2));
};
};
// reset;
app.preferences.rulerUnits = originalUnits;
app.togglePalettes()
};
////////////////////////////////////
////////////////////////////////////
////////////////////////////////////
////// function to determine if open document is eligible for operations //////
function photoshopCheck () {
var checksOut = true;
if (app.documents.length == 0) {
alert ("no open document");
checksOut = false
}
else {
if (app.activeDocument.activeLayer.isBackgroundLayer == true) {
alert ("please select a non background layer");
checksOut = false
}
else {}
};
return checksOut
};
////// function to smartify if not //////
function smartify (theLayer) {
// make layers smart objects if they are not already;
if (theLayer.kind != LayerKind.SMARTOBJECT) {
myDocument.activeLayer = theLayer;
var id557 = charIDToTypeID( "slct" );
var desc108 = new ActionDescriptor();
var id558 = charIDToTypeID( "null" );
var ref77 = new ActionReference();
var id559 = charIDToTypeID( "Mn " );
var id560 = charIDToTypeID( "MnIt" );
var id561 = stringIDToTypeID( "newPlacedLayer" );
ref77.putEnumerated( id559, id560, id561 );
desc108.putReference( id558, ref77 );
executeAction( id557, desc108, DialogModes.NO );
return myDocument.activeLayer
};
else {return theLayer}
};
////// radians //////
function radiansOf (theAngle) {
return theAngle * Math.PI / 180
};
////// rotate and move //////
function rotateAndMove (myDocument, theLayer, thisAngle, horizontalOffset, verticalOffset) {
// do the transformations;
myDocument.activeLayer = theLayer;
// =======================================================
var idTrnf = charIDToTypeID( "Trnf" );
var desc3 = new ActionDescriptor();
var idFTcs = charIDToTypeID( "FTcs" );
var idQCSt = charIDToTypeID( "QCSt" );
var idQcsa = charIDToTypeID( "Qcsa" );
desc3.putEnumerated( idFTcs, idQCSt, idQcsa );
var idOfst = charIDToTypeID( "Ofst" );
var desc4 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
var idPxl = charIDToTypeID( "#Pxl" );
desc4.putUnitDouble( idHrzn, idPxl, horizontalOffset );
var idVrtc = charIDToTypeID( "Vrtc" );
var idPxl = charIDToTypeID( "#Pxl" );
desc4.putUnitDouble( idVrtc, idPxl, verticalOffset );
var idOfst = charIDToTypeID( "Ofst" );
desc3.putObject( idOfst, idOfst, desc4 );
var idAngl = charIDToTypeID( "Angl" );
var idAng = charIDToTypeID( "#Ang" );
desc3.putUnitDouble( idAngl, idAng, Number(thisAngle) );
executeAction( idTrnf, desc3, DialogModes.NO );
};