Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To address this problem, caching is used (https://en.wikipedia.org/wiki/Cache_(computing) )."Repeat" is a specific object, and under normal circumstances, due to software limitations, we cannot employ caching within "repeat." This is where "StaticParams" comes into play. StaticParams overrides this rule. The parameters written within StaticParams are computed, and their values are manually added to the cache. As a result, when attempting to access these parameters within "repeat," there is no need to reevaluate the parameters; their values are readily available in the cache.

Example:

Code Block
languagexml
<O N="StaticParamsObject1" T="Project" Category="Core Objects">
    <!-- created by ParamML Examples on 8/29/2023 -->
    <P N="StaticParameters" V="10" />
    <O T="Repeat" S="0" E="2" I="1" CTRL="index" index="0" StaticParams="[StaticParameters]">
        <P N="width" V="StaticParameters" />
        <P N="depth" V="StaticParameters" />
        <O N="Rectangular Column" T="Line">
            <O T="Point" X="index * 15" Y="0" Z="0" />
            <O T="Point" X="index * 15" Y="0" Z="width" />
            <O N="Rectangular" T="Section">
                <O T="Shape">
                    <O T="Point" X="-width/2" Y="-depth/2" Z="0" />
                    <O T="Point" X="-width/2" Y="depth/2" Z="0" />
                    <O T="Point" X="width/2" Y="depth/2" Z="0" />
                    <O T="Point" X="width/2" Y="-depth/2" Z="0" />
                </O>
            </O>
        </O>
    </O>
</O>

To view this example in the library, see (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&obj=objidro1flg1c11lprm05wr6kzo )

Parameters of Repeat Object

...