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.

Learning Curve

Brad_GoodmanBrad_Goodman Member Posts: 38 ✭✭
I'm just trying to get my feet wet with FeatureScript and having an outright miserable time. Other comments I have seen by others in my case have made references to the differences in thinking required to do 3D-CAD type of programming, different concepts etc. And though I don't disagree with any of this - I don't really think that that's the majority of the problem. I do want to ask "productive" questions - but feel the need to post my major pain-points here. I only have about 10 hours or so into FeatureScript - but feel as though I should be a lot further down the road than I am - and that it's more lack of clear information than any kind of mental defect (maybe that too?)

BASIC EXPLANATIONS - I find myself confused over some of the VERY basic fundamentals. Like what a "query" is (I understand the basic definition) - but what you do with it? You ... "evaluate" it into another "object" ... and do stuff with that object?? Even if I had that (queries, evlautions, operations, etc) - I feel as though things are a bit different with Sketches - which most docs/tutorials don't cover in as much detail. (For example, assume you can't query a sketch entity for verticies, like you can a feature??)

DEBUGGING -  I get what a "map" is. Doesn't seem to be a good way to inspect what's in a map. Or if there is - it's not in the "debugging" section of the docs.

DOCUMENTATION - FeatureScript and the standard Libraries are complicated. Having a single-level index of a giant document makes it not only difficult to find stuff (making to resort to "control-F" searches through a GIANT doc - but then not being able to context of where you are IN the doc. (Is the item-in-question a sub-sub-topic - like a parameter of something else?) i.e. when you find something IN the docs - it's hard to tell WHAT you're even looking at.

Most of the docs almost appear like they were written in Doxygen or something - i.e. automatic. No examples or references. 

The absolute worst example of the docs are the part that describes "skConstraint". It says almost nothing. I did find: "We did make a conscious decision to not go down the rabbit hole of externally documenting everything about sketch constraints" -- mission accomplished, I guess.

I don't even know where to categorize this issue - but yes, I understand that more "complex" data-types are derived from "maps" - but that essentially means you can describe [nearly] everything as taking or returning a "map" (and be correct) - but that still says nothing. (This even makes debugging insane - because I can pass something the wrong "kind" of map).

TUTORIALS - Okay - I'm an "experiential" learner - so I'm fine with having to walk through some examples. But there are only two tutorials on this. Albiet they're simple (as they should be) - what they cover is so narrow, that almost anything else you do will inherently not be covered by them. I think there really needs to be a few more tutorials that aim to introducing one to newer and greater topics. 

OTHER LANGUAGES - Other languages can be tough - and have learning curves, too. Sometimes you just have to muttle through with Google and StackOverflow searches until you come across what you're looking for. (Odds are - if you're a newbie - you're not the first one to have ever asked that question!) FeatueScript is much more niche. Not a lot of hits - not a lot of answers (comparatively speaking). Whereas with other languages where you can get stuck - research a question - learn the answer - and move on having gained more knowledge, with FeatureScript the answers are often not-apparent. Simple problem/question can be a long process - maybe a lot of trail-and-error - maybe a lot of giving up and trying something different. Not conducive to expanding your knowledge.

I conclusion, I really like OnShape, and am gunning for it's/your success - but really struggling to be able to work with it - and trying to figure out how to do it.

Comments

  • Brad_GoodmanBrad_Goodman Member Posts: 38 ✭✭
    FWIW - I feel obliged to include a reference to what IMHO is/was the greatest programing guide ever written. A fire-hose of all radically new concepts, but they' did all right.

  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    I treat queries as filter conditions, it is the layer of abstraction which provides associativity through feature history. What you can do with them is basically to construct a sequence of nested query functions so that it only would filter desired entities from some initial wide subset. To check what the query results to you can use debug() function, it will highlight query entities in red in graphic area while feature dialog is open.
    After you are sure your query contains desired entities you can pass it to any function which is supposed to evaluate queries of a certain entity, body or geometry type. 

    Map data type is widely used in FS, it is in internal structure of query type as well as in coordinate system, line, plane and other data types. By the way debug() is also capable to diplay most of those geometry related data types in graphic area as well, so you don't need to read it internal representation in most cases. 

    The difference which you feel with sketches happens because 2d sketch is a separate "synchronous" invironment with a separate constrain solver and internal id system. After sketch is solved all the entities are added to the part studio context as wire or sheet bodies, faces and edges. Another difference from arbitary 3d entity is that sketch entity allows to evaluate its sketch plane directly.
    About sketch constrains - I beleve it is not something that is supposed to be red and edited by humans, so they symply decided to not tease us farther with illusion of undestanding) If you like to see how FS representation of part studio looks like you can right click part studio tab and pick "show code".

    I can generally agree that FS seems not as polished its syntax and in a number of aspects you would expect from the language which operates such high level constructs, but it works!
  • Brad_GoodmanBrad_Goodman Member Posts: 38 ✭✭
    Thanks for the feedback. I've been working since (mostly Sketching in FeatureScript) - but have been heavily relying on skConstraints to do what I need to do. I find it bizarre that it's so undocumented - I can't imagine doing this without the constraints.

    99% of my learning is coming from "show code" at this point.
Sign In or Register to comment.