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.

Debug Manipulators?

I had been attempting to write a Feature that creates a hole on the selected face of an existing part. There had been no errors after I had committed the code, but the hole still was not appearing. After a long while of trying to debug my code, I noticed that before I selected the face of an existing part, the hole appeared to be extruding from the origin. As soon as I clicked the part face, the hole would disappear. I then realized that the hole was cutting in the wrong direction. Would it be possible to have debugging manipulators implemented through FeatureScript? This way, if a Feature is seen in an unexpected way, the user has a tool to find out why and rule out there being a bug. This would be great for highlighting faces/planes that have been queried, seeing the direction and form of extrusions, sweeps, etc. I never noticed, as a person who CADs often, that I rely so heavily on manipulators. 


Comments

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 910
    Lauren, your post sparked some good discussion about what we need to do to make debugging easier.  We will want some sort of visualization capability for this type of debugging so you can see query results or just visualize points, lines, etc.  I'm not sure manipulators are the right tool for this, but you can certainly create them -- see the source code of features that have manipulators (replaceFace is probably the simplest one).
    Ilya Baran \ Director of FeatureScript \ Onshape Inc
  • Emily_Qi_WangEmily_Qi_Wang Member Posts: 13 EDU
    @ilya_baran ;
    Clarification: When @Lauren_Froschauer ;and I were discussing this in person, I thought of the manipulator arrow clearly showing the direction of an extrude as an example. We are not necessarily suggesting the drag-to-change manipulator experience for debugging; we are ultimately interested in visual indicators in the graphics area (arrows, highlights, etc). 

    We'd love to hear some insights from your debugging discussions!
  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 429
    @Emily_Qi_Wang ;
    Yeah, I think we're all on the same page here. We're imagining syntax like:
    debug(queryOrGeometry, "some optional info or metadata")

    Which would:
    1. Color the result of the query/point/plane/whatever in red on the graphics view
    2. Print the info/metadata to the console
    3. Cross-highlight between them, so that hovering on one would highlight the other (like features in your feature tree)

    It would be a medium-term thing, which will take some work to get, but also isn't a solution for every debugging workflow.

    We're definitely interested in hearing your input here.
Sign In or Register to comment.