This we added another UDF protocol and CATIA script to A.009 to add another level of intricacy. Panels were created from two extracted curves. These two curves acted as a frame work
We used these two curves to create 4 points and a fill surface. We then add 4 new parameters which were made into a user feature creation and instantiated from the new UDF to the original roof file.
let p1(roofudfsurf)
let i (integer)
let j (integer)
let cn (integer) /*number of curves*/
let sn (Integer) /* number of surfaces*/
cn = curvenumber
sn = surfnumber
i = 1
for i while i <= cn-1
{
j=1
for j while j<=sn
{
p1=CreateOrModifyTemplate("roofdesign|roofudfsurf", SURF ,`Relations\Knowledge Pattern.3\roofudfsurf` , (i-1)*sn+j) /*generates the panels*/
p1.CRV9= `Relations\Knowledge Pattern.1\roofudfcurve` ->GetItem(i) /*use curve list from previous knowledge template*/
p1.CRV10= `Relations\Knowledge Pattern.1\roofudfcurve` ->GetItem(i+1) /*uses same list but the next curve with the plus 1 funtion*/
p1.surfposition = j-1
p1.surfnumber = sn
EndModifyTemplate(p1)
p1.Name= "panel." + ToString((i-1)*sn+j)
p1.Color = ToString(round(j*(255/sn)))+","+ToString(round(i*(255/cn)))+",255"
}
}
A new script (above) was used and the final result is posted below.