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: how can I change the scroll-wheel step value for numerical inputs?
Control will give you 1/10 the step, and Shift will give you 10x the step.
New FeatureScript: Spring Creator
Hi everyone,
I know I just posted the Plastic Thread FeatureScript about a week ago but I had an idea for a new script and came up with a working release version that I want to share with you all. The idea behind the new script is to make creating parameterized springs easy so you don’t have to do all the steps of making a spring from scratch. In attempting this, I found a huge amount of customization with springs, so there are a lot of inputs into the code, but even with all the customization right now extension and torsional springs are not possible directly from this script.
You can find the code here: Spring Creator
Features:
- Four spring wire cross sections available (circular, ovate, square, rectangular)
- Cylindrical and Conical Springs
- Five end styles (no end coil, partial coil, machined partial coil, multi-coil, machined multi-coil)
- Create mate connectors at each end for easy assembly
- Three end type selections (blind, up to face, up to vertex)
To make a spring you have two initial inputs, a Point or Circular Edge:
There are many options in the Spring Definition section including cylindrical vs conical springs, 4 different cross sections, different spring size definitions, number of coils, and adding mate connectors:
Next, you can change the end type and end style of the spring:
The length of the spring is always maintained no matter the end style so there is no need to compensate for them.
Also because this script is parameterized you can create multiple configurations of the same spring to define each position of its motion:
The main goal of this FeatureScript is to remove the need to download and import parts from manufacturers. Here’s an example of how the tool can recreate a real spring (specifically spring 9573K11 from McMaster-Carr) :
Limitations:
- Expansion springs are currently impossible to create in full with this code. You can get around this by using this code to make the base helix with a given profile and then adding hooks to the end.
- None of the end styles have a smooth transition from the center helix to the end so there is a kink and a tangent line shows up.
Future Updates:
- Expansion spring capability (probably a drop-down and then a list of end styles that can be selected specifically for expansion springs)
- Torsional spring capability (maybe just taking in a starting and ending axis or a starting axis and angle between them and then extruding the coils out in a straight line)
- Curved springs defined by an input path
- New selections including axis and cylinder/cone
You can find the code here: Spring Creator
I hope this is a useful enough code for everyone and if you have any questions or suggestions for me, let me know in the comments and I’ll respond as quickly as possible. Also, let me know if the functionality of which axis is chosen as the axis of the spring is intuitive. I didn't do too much work to make it feel intuitive but it will override the selected axis with whichever axis is needed to complete the "up to" end types.
Fully-defined sketches: what are they, and why care?
I've seen a few comments and questions about the new feature list badge that says "Sketch is not fully defined" and I wanted to give an Onshape developer perspective.
TL;DR. Fully defined sketches don't protect us from Onshape, they protect us from co-workers and our future selves.
A sketch is a bunch of geometry, plus a bunch of constraints and dimensions that tell that geometry what its size is or where it should be. A "fully defined" sketch is a sketch that has enough constraints that there is no ambiguity at all as to where the geometry should be, or its size. There is only one way to "solve" the sketch. In contrast an "under defined" sketch is one where there is some ambiguity, multiple choices of where things could be. There is a subtle color scheme used in the sketch, black means something is fully defined, and blue means it is under defined (in light mode, at least).
Why did we add the indicator? Because customers asked us to.
Why did customers ask us to add the indicator? Because it matters that a sketch is not fully defined.
Why does it matter? Maybe you've made a bunch of sketches that are showing as "not fully defined" and you've never had issues with them (that you know of). That will be because Onshape does its best to move geometry as little as possible and it is quite possible that sketches haven't moved for you. However, any time you change a feature before that sketch, and that change affects the sketch in some way then the sketch must re-solve to meet the constraints. Onshape will try to move things as little as possible but if a sketch is not fully defined Onshape doesn't know where everything should be.
Here's a simple example. I started out with a rectangle, 100mm x 150mm. I then added a circle for a hole in a second sketch, it needs to be 40mm in diameter and midway between the top and bottom, and I constrained it like that but I left the distance between the circle center and right hand edge unconstrained. It happens to be 50mm, which is what I wanted, and I effectively eyeballed it in.
Now, maybe weeks or months later I go back into this design and I need a part that is larger, with the base being 150mm x 200mm. So I change the dimensions in the base sketch.
Onshape has done exactly what I said, it moved geometry as little as possible. The rectangle went 50mm wider to the right and 50mm wider upwards. Onshape kept the line's horizontal position exactly where it was, indeed it is 100mm from the right-hand side. The problem is that isn't where I wanted it to be. Where did I want it to be? Well, the best person to answer that is the me that originally made the sketch. Maybe by now I have forgotten the design intent. Much better for me to add that dimension when I make the sketch, not when I break it later. If you now complicate this situation with co-workers that are also making changes to this design, well then it gets even more tricky.
So that's why we have the badge. There are customers that want to know that the sketch could move in an unexpected way later, or that want to ensure that every bit of design intent is captured as early as possible. But if you want to ignore the badge, feel free, nothing bad will happen right then and there, just know that future you may wish you hadn't.
Can I add notes to a sketch within a part studio
Example:
Say I add some drawing lines for a component I want to use, a simple outline of the part to show size and location. It would be nice to be able to point to it with a note that contains the parts details. something like a drawing number, part number or details such as clearance requirements or reasons for the sketch position etc
or am i just going about it wrong.
Scott
Re: What does Fully Defined mean?
It's like cutting up yarn into small lengths and laying the individual pieces on a piece of paper to form a picture with. It's all good, until a breeze comes by and blows all the pieces off.
Re: Delete all sketch constraints at once
I don't normally delete all constraints, but I do delete all dangling or all external constraints.
CADSharp FeatureScript Course (Free Video Lessons!) 🆕
Hey all! I've been working on FeatureScript video lessons that teach you by example on the fly.
These videos assume you have zero coding experience and they walk you through everything you need to know. By the end of the course you will have the knowledge to write useful custom features to help automate your daily Onshape workflow.
They are a work in progress so expect to see more lessons soon, and happy Onshaping! 😎
-
CADSharp FeatureScript Video Lessons:
-
-
Also, if you are getting into automating your Onshape workflow with FeatureScript, remember to complete Onshape's Learning Center FS Course as well. Both courses have different teaching techniques and cover different topics. So it will be good to take both if you are learning FS.
-
Special thanks to @Konst_Sh and @Jacob_Corder for the valuable input on these lessons and the course outline.