-
Extrude along a line featureScript
I'm trying to create a feature that allows me to easily create print-in-place hinges for a personal project. One of the features is that I can define the angle the hinge is created at. how can I edit my script to make the extrudes occur along the same path as the line given? Here is the document:…
-
How Does Surface Text Know Where a Circle Starts and Ends and which way is up?
I've had some troubles getting ST to put the text exactly where I want it, right-side up and not in mirror image. I've wrestled it to the ground in the document cited. Ideally the two phrases would be aligned to a single inner circle with Better Luck's bottom sitting on the circle and Next Time's top hanging from it.…
-
Can I have multiple feature studios in one Onshape file?
I have a couple of Featurescript features and want to be able to add them to my toolbar. Rather than creating multiple files, I tried creating multiple feature studios in an Onshape model, each with a separate feature. My thinking is that I could organize all my featurescripts in one place, and version them from there.…
-
Custom table (FeatureScript) for Flat Dimensions of sheet metal parts in a Partstudio
https://cad.onshape.com/documents/5034c5130071ba379c79c5d0/w/c884b8a4fb6436460ae29e0c/e/364b16ed56555282bcb85297
-
Custom Feature: Loft Fillet
Because of @EvanReese's series on equations, variables, etc. in Onshape, I ended up getting sucked into the FeatureScript rabbit hole. Needless to say, I'm hooked. I'm not a real programmer, but I'm still pretty happy with coming up with something that'll automate a pain point in my CAD workflows. Plus, then I get to share…
-
Texture (New Custom Feature!)
Texture (New Custom Feature!) https://cad.onshape.com/documents/46897a2d60ade8dbb04077f3/w/23398bd91a932d1432a5d204/e/201138fdd8eee8cfcd2dcac1 With Texture, you can create solid body textures by clicking a surface or face. Use pre-loaded textures, or use your own custom texture, (See the tutorial gifs below). This feature…
-
Allowing for mate connector selection. What's the correct syntax?
I'm testing out different query types and wanted to allow for users to select a Mate Connector. However, when I wrote out: Filter" : EntityType.BODY && (…|| BodyType.MATE_CONNECTOR), the feature dialog doesn't allow for mate connector selection or show the mate connector symbol until I add || AllowMeshGeometry.NO as well.…
-
Adaptive Finger Joints for Streamlined Design of Laser-Cut Structures
The worst part about designing laser-cut structures in SolidWorks is CADing all of the finger joints between components; even if you use a boolean for half, you need to CAD or pattern one side, and neither is all that nice. Since I dabble in programming (and wanted an excuse to script something), I took a hack at making a…
-
Featurescript: Setting parameters to optional
Let's say I create a feature and then want to import it into another studio feature studio for use. Is there a way to make some of the definition parameters optional? Edit: edited for clarity
-
Custom Feature: Keep Part
-Link to feature up front- I can't believe I never posted about this one. You guys know Delete Part? This feature is nothing like that. Use it on really gross imports with a billion objects you don't care about. Probably don't use it for any other reason.
-
Somehow filter out default planes when using qEverything()
I have a little customized delete feature that lets me delete from the part studio the inverse of what is selected. Sometimes I will import data and there will be alot of stuff in the part studio. So, I derive the studio into other ones and I use this inverses delete feature to select the parts I want to keep and delete…
-
Can anyone show me how to properly use opLoft Connections?
Link to Onshape doc I'm trying to create a loft with a two sets of edges that have a different edge count to add additional functionality to Loft Fillet. I'm not quite sure I understand how to use the connections portion of opLoft correct. I'm selecting one group of edges, querying for the endpoints, and then using…
-
Custom Feature Icon for Dark Mode
I've noticed that std features seem to have two different icons - one for dark mode and one for light mode. Is there some secret to making this work with custom feature icons? For instance, see below how the Derived and Sketch feature change colors, but all that happens to the custom icons is the changed background comes…
-
What improvements can be made to my hex hole FeatureScript for blind rivets?
I wrote a FeatureScript to create specific hex holes for blind rivets. Since we plan to use this feature frequently in our sheet metal parts, I’d like to make the script as stable and robust as possible. I would really appreciate it if someone could review my script and share any feedback or suggestions for improvement.…
-
Serialization
We have a request to 3D print up to 4000 parts that require serialization. Is it possible to write a script that will change the text on a extrude cut and export a stl file so they don't have to be edited and saved individually?
-
New FeatureScript: Mold Guide Pins
Hi everyone, I made a new featurescript to create pyramid and hemisphere guide pins for 3D printed molds. I based the functionality on the hole tool, where you just have to select points. Add points to the parting surface and then select them to add and subtract guide pins from each side. Link: William's 3D Printing…
-
Sharing My Custom Rack Generation Feature
Since I frequently use racks in my designs but couldn’t find a suitable built-in feature in Onshape’s FeatureScript library, I decided to create a custom rack generation tool—inspired by Alex’s Spur Gear script. This tool lets you choose between Module and DP, and supports a range of parameters including: Pressure angle…
-
Query parts by implicit mate connector
Hey everyone, I have a design for 3D printed parts with the parts designed in place. I want to create a feature that will easily let me reorient all the parts in the correct orientation for printing, to save myself the effort of manually reorienting them after exporting. The goal is to select a mate connector on each part,…
-
opBoolean UNIONs
For anyone having difficulties with opBoolean unions, I discovered that adding "targetsAndToolsNeedGrouping" : true to the parameters list caused the operation to be performed successfully. opBoolean(context, getUID(id, "boolean", 2), { "tools" : qCreatedBy(getUID(id, "extrude", 2), EntityType.BODY), "targets" :…
-
opLoft Tangent Constraints
I'm pretty new to FeatureScript, so I don't quite have all of the syntax down yet. I'm trying to play around with opLoft and am having issues setting both ends to match Tangent. Can one of you more knowledgeable folks tell me what I'm doing wrong? The start tangent works just fine, but the end tangent fails entirely…
-
Rounding Measured Values in a Custom Table
I have a basic table code here: FeatureScript 2543; import(path : "onshape/std/table.fs", version : "2543.0"); annotation { "Table Type Name" : "Measured Values Rhett Test" } export const variableTable = defineTable(function(context is Context, definition is map) returns Table precondition { } { var columns = []; columns =…
-
Not a Feature: Luminary Cloud Import Checkpoint
As I develop custom features, I try to stay at the forefront of what new features people publish but recently the public search filters have been crowded with part studios and assemblies that have no featurescript whatsoever inside of them. They all have a release titled "Luminary Cloud Import Checkpoint" which I assume is…
-
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…
-
Wood grain texture Custom Feature
Often when modeling furniture and other objects created from wood I want to communicate the orientation of the wood grain on a part. This eliminates confusion when creating the parts in the workshop. To solve this I created a Wood grain texture custom feature! This low resolution feature is intended to demonstrate the…