



I finally figured out how to use a knowledge pattern on my project instead of a document template. I was able to set up two udfs which place a number of planes along two splines which are always perpendicular to the lofted surface. A third udf then intersects the planes from the first spline with the lofted surface, and creates a series of profiles. The udf then measures the distance between the planes of the second spline, and extrudes the profile curve that distance. The result of this is that by adjusting the splines I can control both the density and width of the bands. The more extreme the curve of the splines are, the closer the planes are together. If a I want a portion of the surface to become dense, I can adjust the splines so that they are steep at that portion of the surface.
Script for plotting planes on spline:
let d1(planeudfcurve)
let i (integer)
i=1
for i while i <= curvenumber
{
d1 = CreateOrModifyTemplate("planedesigncatalog|planeudfcurve", curves ,`Relations\Knowledge Pattern.1\planeudfcurve` ,i)
d1.axis = `yz plane`
d1.curve = `Geometrical Set.6\Sketch.1\Output.1 (Spline.1)`
d1.curvernumber = curvenumber - 1
d1.curveposition = i - 1
EndModifyTemplate(d1)
d1.Name = "CRV" + ToString(i)
}
Script for plotting planes on spline 2:
let d1(planeudfcurve2)
let i (integer)
i=1
for i while i <= curvenumber
{
d1 = CreateOrModifyTemplate("planedesigncatalog|planeudfcurve2", planes2 ,`Relations\Knowledge Pattern.4\planeudfcurve2` ,i)
d1.axis = `yz plane`
d1.curve = `Geometrical Set.6\Sketch.1\Output.5 (Spline.2)`
d1.curvernumber = curvenumber - 1
d1.curveposition = i - 1
EndModifyTemplate(d1)
d1.Name = "CRV" + ToString(i)
}
Script for intersecting planes with surface, and then extruding them
let d1(planeudfsec2)
let i (integer)
i=1
for i while i <= (curvenumber-1)
{
d1 = CreateOrModifyTemplate("planedesigncatalog|planeudfsec2",extrusions , `Relations\Knowledge Pattern.5\planeudfsec2` ,i)
d1.surface =`Surface\Multi-sections Surface.4`
d1.line = context\Line.19
d1.plane = `Relations\Knowledge Pattern.1\planeudfcurve` ->GetItem(i)
d1.planeA = `Relations\Knowledge Pattern.4\planeudfcurve2` ->GetItem(i)
d1.planeB = `Relations\Knowledge Pattern.4\planeudfcurve2` ->GetItem(i+1)
i = i+1
EndModifyTemplate(d1)
d1.Name = "CRV" + ToString(i)
}