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.
skConstraint / Newbie to featurescript
I'm just starting to work with featurescript and I have no programming experience so there are some large gaps in my knowledge.
I've been working off of a script written by someone who actually knew what they were doing which imports solid tool-bodies from a separate context and uses them to create machining details at specified sketch points. I've successfully adapted it a few times for different types of hardware, but now I'm trying something more advanced.
The purpose of the script is to create CNC machining details for mounting hinges in a cabinet door. The exact distance of the door edge to the side of the cabinet can vary, so (thinking like a CAD user, not a programmer) I'm attempting to locate the hinges using points sketched on the back of the door, then have the script project the points onto the side of cabinet and place the machining details based on the projected points.
Searching discussion questions led me to skConstraint. The discussions in those posts made me understand skConstraint might not be the best way to solve my problem, but I couldn't find any alternative solutions. In any case, I almost have it working now - the script is successfully creating a new point in a new sketch for every point in the queried sketch, but it's constraining all of them to a single point of the queried sketch.
This is the script:
Open to any suggestions (including not using skConstraint)!