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.

[FeatureScript] Flex (Taper/Twist/Deform)

vesa_timonenvesa_timonen Member Posts: 4

I made a new FeatureScript to flex entities like in SolidWorks:



  • MichaelPascoeMichaelPascoe Member Posts: 1,121 PRO
    edited July 2022
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,755 PRO
  • S1monS1mon Member Posts: 1,236 PRO
    Of course I try it on something a little more complex and Onshape is thinking...........................................................and fails.

    There are a lot of small fillets on this and I guess I didn't really expect it to work, but Creo is able to do it. I'll have to try something a little more tame.

  • MichaelPascoeMichaelPascoe Member Posts: 1,121 PRO
    edited July 2022
    Flex test 1 - Onshape document
    I'm impressed. Pretty good considering this is a complex surface / part. Some tangency issues with the faces.

    @S1mon I'm thinking for complex parts like these there will need to be options for sample techniques. This drop down could be placed in an array parameter so that multiple faces can have different techniques.

    Surface conditions
    • top - match tangent
    • sides - match position
    • bottom - match tangent
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,755 PRO
    So, it's turning into a mixed model then?
    Is there a way to increase the mesh density?
  • MichaelPascoeMichaelPascoe Member Posts: 1,121 PRO
    edited July 2022
    No, it is attempting to enclose or something, in this case the enclose failed and I created a composite part of the surfaces that it left.

    Yes there is a way to increase that. I think the feature even remembers the previously used values, very legit. However, that won't solve the issue I was showing.
  • S1monS1mon Member Posts: 1,236 PRO
    I'm pretty sure what Solidworks and Creo (and Rhino, Alias, etc) do for this type of feature is taper/twist/deform the control points of the surfaces (likely with some raising of the degree of the NURBS). This would be far more efficient/robust than creating a ton of small fill surfaces. It's possible to extract the CVs from a curve in FeatureScript but I don't think that's available for surfaces yet.

    As it stands, this implementation could be very useful to create an underlay to rebuild something manually, or perhaps for a quick 3D print or CAD space study, but it's not likely to be useful for production geometry directly.

    I look forward to seeing further developments.
  • S1monS1mon Member Posts: 1,236 PRO
    Another possible way to do this: take a similar approach to what is done in 2D for RectToPolar (and the others in this document). It seems to take a ton of samples of points on the input curves and then deform them and do a FitSpline through them. It's not terribly efficient, but it does work (here I'm curving a logo along an arc):

  • vesa_timonenvesa_timonen Member Posts: 4
    @MichaelPascoe I tried to tackle tangency issues on V2 by adding one sampling point on the middle of faces. (This makes feature a bit slower but results are better.)


  • MichaelPascoeMichaelPascoe Member Posts: 1,121 PRO
    Very nice improvement!

    I would say this is 20x better than previous face tangency. Some tangency issues still. I would say this is now a machinable part if it were to be machined on a corbel. Many thanks for this update!

    Flex test 2 - Onshape document

Sign In or Register to comment.