I am currently attempting to write a Python script in Hypergraph to create 2D curves. I have loaded a few curves from an Optistruct PCH file and am writing my own Python module to calculate summary curves…. I think I should be able to get this far but am wondering:
How do I pass in a Python list of x & y values into a function to create the new curve?
Looking at the help doc's, I am not clear:
-what arguments are required and what are optional (is this going to be addressed in a future help doc's update?)
-whether I can do what I want with Python lists.
n.b. I have found an example with defining an XY plot curve… see below:
Curve Basics — HyperMesh Python API 2025 documentation
-how does the script know what "x" is on line 11? Is this referencing some built-in "Math" variables? If so, what are these / where can I find help doc's on them? Not sure I'll need this for my example, but useful to know. I'm also working with complex curves, so not sure if instead of "y" I'd need to reference "yr" & "yi" or "ym" & "yp".
-The xExpression (and y) appear to be lists of strings in the example above, so is there some internal parsing going on here??
@Michal Stefuca -any idea? Happy to have a chat over a call if this is easier.
Thanks,
Kristian