Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Building models using only FeatureScript

William_BarronWilliam_Barron Member Posts: 5
I'm in the process of building a somewhat extensive but simple model. I've decided to do it using only FeatureScript programming, and to that end have written a utility feature studio.

Perhaps this will be of interest to others. The (public) document name is "FS wbUtils". It includes some documentation. The following is an extract from its overview...

The "FS wbUtils" OnShape feature studio supports definition of models using only (reasonably brief) FeatureScript code - not using screen gestures on an evolving model.

It has very limited facilities: extrusions parallel to the X, Y or Z axis at single positions in world space; filleting of a single edge; creation of mate connectors; one geometric calculation function. It envisages that the parts of multi-part models will not overlap in world space (they will probably be defined at their assembled positions). It was created for a sheet metal project at a time when OnShape had not yet implemented sheet metal facilities.

Comments

  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    edited January 2017
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,068 PRO
    Nicely done & well documented, is there a reason for separating your inputs from your logic?

    Eventually, what's this going to do? Are you done? Are you building a configurator? Will the next thing be a bimba cylinder with all it's options?


  • William_BarronWilliam_Barron Member Posts: 5
    Sorry billy2, I don't understand what you mean by "separating your inputs from your logic" - perhaps you could point at specific things in my example.

    As far as the project I am working on now (which is more or less a hobby) is concerned, yes I probably am done. The utilities are supporting all the needs I have so far found in the project. (I said it was a simple project :)  )
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,068 PRO
    edited January 2017
    I might be wrong, but you have one FS with the input stuff and then another FS with logic. You import one into the other. 

    I like your style, thought you were going for the mvc pattern.

    Beware, featurescript is addicting, I'm sure this isn't your last project.

    Thanks for posting,


  • William_BarronWilliam_Barron Member Posts: 5
    Thanks. Yes, if "Example FS" were my project, "FS wbUtils" is imported into it. But I'm thinking the project contains both input stuff and logic. The utilities enable the project FS to be more concise and readable.
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,068 PRO
    edited January 2017
    William-
    You do realize you are onto something here, right? I've been working on an online configurator for a while and think it could be of value to some companies.

    Because of Onshape's cloud infrastructure, you can build a geometry builder that's accessible to everyone. Any company that wants to make their products available online, well, you can ask onshape to build this and the user will never know where the geometry came from. Current web configurators are based on rules engines that are clumsy. I got it working in Onshape based on a parametric engine and it's working really well.

    My point, don't stop, you're on to something.....



Sign In or Register to comment.