> I suspected that's how the GUI worked but didn't realize that it would be
> cleanest to implement it in the XSec code.
> Just a heads up, I showed Andy and he didn't like it. ;)
The GUI is one place it would show up -- but that isn't too bad.
The really nasty part is all the code that watches the 'C0,C1,C2'
settings and the '=' settings and uses the L value to override the R
value. To make the R value work for the first XSec, I'd need to make
all that code aware of the current XSec number and handle the special
cases throughout.
I'll look at it, but I strongly suspect that there will be higher
priority things to work on. There are lots of opportunities for bike
shedding and I generally try to avoid them.
> Cool, I have fairly functional XSec, and Airfoil Tabs.
> I have to gray out unused GDEVs for the different XS_types so I can only fit
> fuselage or airfoil controls on one tab.
> The only issue left is that I need to have a toggle button to control the 2
> modes.
> If I'm changing which XSec is current I copy XSec values to my parms.
> If I'm changing the what the XSec looks like I apply my parms to the XSec.
> Is there a way to tell which GDEV device triggered the update, so I can just
> tell if the GDEV_INDEX_SELECTOR has changed?
> If not can the id be passed to the UpdateGui and UpdateSurf methods?
I'll let J.R. answer this question -- all the custom component and
corresponding GUI stuff is his genius.
I'm curious, what are you trying to accomplish? Custom geom is pretty
powerful, but we've also made it a lot easier to build VSP and to make
new geometry types inside VSP. We would like for Custom Geom to be
flexible enough that you 'could' recreate the built-in components
using it, but that probably isn't quite true today.
In general, I think the custom components will really shine when
someone has a class of shape that they want to describe with a handful
of parameters. The TransportFuse example is a great example of this
-- using a very small number of parameters, it can represent a large
class of shapes of interest.
If you're making a custom component so flexible that you are
recreating the XSec/Airfoil type tabs, my gut says that it may make
more sense to do that in C++ inside VSP.
Of course, I can also see that you might want to set out to accomplish
something really ambitious with Custom Component -- it is a great way
to understand its limits and to teach yourself how to work with it.
J.R. and I will gladly take that feedback as a way to improve custom
components and remove limitations.
None of these things are hard lines. J.R. implemented the Duct type
as an example. I've thought about extending that idea to handle any
XSec type (or possibly TBLR XSecs). I'm not sure whether that should
be done as a custom component or a native C++ one.
2.9.5 has the bleeding edge Advanced Parameter Linking added. I
suspect that you and Erik will have a heyday with it. If you haven't
checked it out yet, give it a shot. No documentation or examples have
been prepared yet (:
Rob