Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
@evDistance, what @ means ?
hervé_pipon
Member Posts: 60 ✭✭
Hello
When I look at the evDistance function définition in evaluate.fs, there is a callback to @evDistance...
What does that means?
Is the source code available ?
When I look at the evDistance function définition in evaluate.fs, there is a callback to @evDistance...
What does that means?
Is the source code available ?
export function evDistance(context is Context, arg is map) returns DistanceResult { var result = @evDistance(context, arg); ...
0
Comments
@ functions are faster. If calling the function thousands of times, this can make a difference.
See this comment from Jacob explaining more on evDistance vs @ evDistance
https://forum.onshape.com/discussion/comment/88979/#Comment_88979
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
We wrap our built-ins in FS functions in part because the results may need some massaging to be more nicely consumable. evDistance itself is a good example.
(Michael is right, though - the function call overhead is nonzero, and you don't always need the wrapper.)