-
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…
-
Shadow from point source?
Hey! Does anyone know if there are featurescripts out there that generate a shadow of a part from a point source? I've tried all of the related featurescripts (Shadow, Outline, Project Body), but they all seem to project the edges of a part from a planar light source as opposed to a point source. I can certainly do this…
-
Weird Extra Mate Connectors Added by addInstance()
I have a featurescript that inserts a part from a configurable part studio at a specific mate connector. The feature brings along any mate connectors in the part studio as well. I'm using an instantiator with a partQuery specified. Like this: const instantiator = newInstantiator(id + "blockBody", {"partQuery" :…
-
More Direct Documentation for updateSheetMetalGeometry?
I've got a sheet metal tab and slot feature that originally was written to generate geometry using some more obvious methods that didn't require me to understand the intricacies of the black box of the sheet metal functions in Featurescript, but unfortunately due to a bug with Move Face and Modify Joint breaking edge…
-
Can FeatureScript use a document name to set part attributes?
I recently made a FeatureScript to help color code parts according to a company SOP. It basically has a drop down of the part type and then sets the appearance of the part accordingly. Is it possible to have FeatureScript read the name of a document (the documents this would apply to all follow a strict naming procedure)…
-
Referencing Array Parameter Index in Item Label Template
Is it possible to access and include the index of each array parameter in its label? Something like "Item label template" : "Line #index" ?
-
Emojis within feature notifications 😀☠️💣
Nothing new, but I would like to point out that we can put emoji within feature warnings! .