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
Re: NEW Custom Feature: Drape Surface
@Derek_Van_Allen_BD I'm intrigued. I've thought about doing tween surfaces (and curves) but haven't actually run into many use-cases so it keeps getting bumped. I was imagining getting the b-spline surface points for two surfaces and just regenerating new point grids between the two. As long as the inputs are similar it should be straightforward and most of the code of a great feature would be in reapproximating things and making them line up in smart ways. What use-casea are you picturing?
Re: NEW Custom Feature: Drape Surface
@EvanReese The practical use cases for each aren't exactly the most apparent thing for tween surfaces or tween curves until you're working with outside design firms that are run by Rhino jockeys or Adobe users with those functions built into their tool wondering why you find it so hard to find the geometric median of their spliney linework and models. This may be an industry dependent problem.
At the most basic level (and the reason I'm working on tween curve right now) is finding the precise centerline of wavy geometry that needs to have regularly spaced features in the dead center of the parts. Offsetting lines on either side doesn't work because the width is constantly varying across the profile of the part, and this designer is extremely picky and is willing to pay enough for the details to be perfect so one workflow we've used is doing a draft extrude on the face to brute force a median line and project it back to the original surface. We've also done a face sculpt to trick the face to be a spline so UV curves will populate but truly the best method is the one you describe which is to grab the spline definitions of the edges, approximate and/or elevate to match them and build the curve in the middle.
At the further end of the scale are things like the custom flex featurescript floating around that does things piecewise and isn't as clean as other CAD flex features. Theoretically if you were working with a mid-surface you could store the vectors towards the control points for each surface that was used as an input (mapped in UV context), do your twisting and deformation to the median, and then reconstruct the input surfaces at the end and get a more robust flex feature with continuous surfaces. And with it being a tween function you can parameterize for arbitrary k factors as well. Think meta-materials or kerf bending plywood sheets with CNC grooves.
There are more reverse engineering applications as well that I've run into, but the main two are dealing with import geometry from non-parametric software and wanting to bend and unbend non-sheet metal things.
Re: Lofting difficulties
Sketch Top has what seems like an extra line segment. I fixed that and it makes loft 1 and loft 4 behave much more like you might have expected.
I would also highly recommend fully constraining your sketches.
S1mon
Re: Custom Feature: Non-uniform patterns by csv input
@EvanReese I cannot thank you enough!
Re: Logic Driven Feature (New Custom Feature!) 🆕 [Extrude, Revolve, Sweep, and more..!]
He looks happier this time.
I did not realize that Onshape will pass emojis through the text fields in custom scripts like that. That was not a good feature to let me have, there's no way I'll be using that responsibly.
NEW Custom Feature: Drape Surface
Drape Surface essentially takes an input surface, and sticks it to another body like a sticker, which is useful for approximating meshes, and for creating a single surface that approximates a bunch of surface patches. Here's a link to the feature, and here's a video explanation of the feature. If your company needs something custom get in touch with me at theonsherpa.com. Enjoy!
EvanReese
Re: Custom Feature: Non-uniform patterns by csv input
Here's a bare bones draft to get you going! https://cad.onshape.com/documents/5e76707630d6a64b888e564c/w/20d7e510ac219d2f35743419/e/17589401124085e6cee56921
FeatureScript 2656;
import(path : "onshape/std/common.fs", version : "2656.0");
annotation { "Feature Type Name" : "CSV to mate connectors", "Feature Type Description" : "" }
export const csvToMateConnectors = defineFeature(function(context is Context, id is Id, definition is map)
precondition
{
annotation { "Name" : "CSV file" }
definition.csv is TableData;
}
{
const lengthUnits = inch;
const angleUnits = degree;
const tableData = definition.csv.csvData -> removeElementAt(0); // removeElementAt(0) to get rid of columns header row
const coordinateSystems = mapArray(tableData, function(row) {
const xAxis = vector(cos(row[3] * angleUnits), sin(row[3] * angleUnits), 0);
// map CSV columns 0, 1, and 2 to a vector of X, Y, Z
const origin = vector(row[0], row[1], row[2]) * lengthUnits;
return coordSystem(origin, xAxis, Z_DIRECTION);
});
for (var i, coordSystem in coordinateSystems)
{
opMateConnector(context, id + "mateConnector" + i, {"coordSystem" : coordSystem,"owner" : qOrigin(EntityType.BODY)});
}
});
Re: Convert lb to kilo in Mass Properties
Re: Using the Spur Gears featurescript
Oh yeah, the reason why specifying the transverse module is nicer is the pitch circle diameter is traverse module * number of teeth. When you specify the gear profile using the normal module, the gear diameter changes when you change the helix angle.
dbaarda
Re: Using the Spur Gears featurescript
The term "normal module" and "transverse module" can be a bit confusing, and I think NeilCooke is actually wrong above.
The problem is with straight spur gears "normal module" and "transverse module" are the same, and are often called just "module" or "normal module".
But in a helical gear, "transverse module" is technically defined as the module as measured in the plane of gear rotation, and "normal module" is measured in the plane perpendicular to the tooth angle.
I think "normal" refers to the gear-cutting hardware size/shape, and you would use a "normal" 1.0mm module cutter to make a helix gear as you would use to make a straight gear, because you always cut in the direction of the tooth angle. But this does mean the "transverse module" depends on the helix angle for helical gears. You can (and you can get) helical gears with a transverse module of 1.0mm, but these have to be cut with a custom tool that depends on the helix angle, because the "normal module" is not actually that "normal" for those gears.
The Spur Gear featurescript works by first creating the transverse (in the plane of rotation) profile for the gear, and then extruding (for straight gears) or sweeping (for helical gears) that profile. It does not adjust the module of the transverse profile to account for the helix angle, so technically the module setting you enter in the inputs is the transverse module.
Note that the general use of "normal module" for specifying helical gears instead of "transverse module" is an artefact of how they are machined. IMHO you normally want to specify the transverse module. CAD and 3DPrinting don't have the normal machine manufacturing limitations so being able to specify the transverse module is nicer. However, if you intend to get these gears machined somewhere, you probably want to specify the normal module or you'll end up paying more.
dbaarda




