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.

A weird Fill Pattern problem

jim_sungjim_sung Member Posts: 3
I'm an experienced software engineer, but I'm new to FeatureScript, Onshape, Onshape standard library, etc.  I made a copy of Fill Pattern so that I can debug it and perhaps add partial patterns to it down the road.

For a simple part, Fill Pattern works just fine.

Here is the link to my document: https://cad.onshape.com/documents/ef4f3114a26fd805747c5959/w/5d416ce85b552a6afb314618/e/69386092e3b94f9253623c12.

So, I get "Array index -1 out of bounds", but I accidentally discovered that if I have a stupid sketch that uses the same target face as the sketch plane, then Fill Pattern works as expected.  The problem seems to stem from startTracking(), and if I comment it out, Fill Pattern works as expected too.

So, what is the intent of startTracking()?

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,714
    Hi Jim, it's failing because the area to fill is before the feature to pattern. Something I hadn't tested and I can't remember for the life of me why I added the whole section starting:
    if (isQueryEmpty(context, qSketchFilter(definition.target, SketchObject.NO)))
    and you're right if you comment out the whole section it works. I will review and update - thanks for the free QA.
    Senior Director, Technical Services, EMEAI
Sign In or Register to comment.