Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Best Of
any "unique sculpting" scripts?
I've been on the lookout for scripts that can add "uniqueness" or "life" to some models.
To explain my question:
This is "wood grain" script (mainly used to "show" that a part is "wood-like") But if you don't use it for its "Intended Purposes" you can make intresting models…
If you know any script that have such possibilities, please write their name 🙏🏼
Re: Extrude depth angle
I think what you need is 'Draft' which is an option in the Extrude Dialogue window. Click the curved arrow to reverse the result
GWS50
Re: Anyone have an FS that can convert a decimal length to a (reduced) fractional equivalent
Thanks @Caden_Armstrong ,
Ended up writing something with some help from ChatGPT (for the algorithm part)…
Seems to work and looks like this if anyone is wondering:
FeatureScript 2780;
import(path : "onshape/std/common.fs", version : "2780.0");
annotation { "Feature Type Name" : "Decimal to Fraction", "Feature Type Description" : "Convert a decimal length to a fraction string" }
export const DectoFrac = defineFeature(function(context is Context, id is Id, definition is map)
precondition
{
annotation { "Name" : "Decimal Length" }
isLength(definition.decLength, LENGTH_BOUNDS);
annotation { "Name" : "Smallerst Denom, eg: 16 for 1/16", "UIHint" : UIHint.REMEMBER_PREVIOUS_VALUE }
isInteger(definition.precision, POSITIVE_COUNT_BOUNDS);
annotation { "Name" : "Variable Name" }
definition.varName is string;
}
{
const decValue = definition.decLength/inch;
const precision = definition.precision;
var whole=floor(decValue);
var frac = decValue - whole;
var denominator= precision;
var numerator = round(frac * denominator);
println(whole~" "~numerator~" / "~denominator);
if (numerator !=0)
{
var a=numerator;
var b=denominator;
var r=1;
while (b!=0)
{
r=a%b;
a=b;
b=r;
}
var GCD=a;
println(GCD);
numerator= floor(numerator/GCD);
denominator = floor (denominator/GCD);
}
else
{
denominator=1;
}
if (numerator==denominator)
{
whole += 1;
numerator=0;
}
/*
println(whole);
println(numerator);
println(denominator);
*/
var theString;
if (whole==0)
{
theString=numerator~"/"~denominator;
}
else
{
theString=whole~"-"~numerator~"/"~denominator;
}
setVariable(context, definition.varName, theString);
// Define the function's action
});
Re: Don't know how to delete a post
Well it was a very niche and silly little problem that I overlooked. Thought the maxPathDeviation wasn't working correctly. But I was thinking in 2D when it only analyses things in a very rudimentary way.




