Friday, March 26, 2010

Final Project - knowledge patterns








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)
}

2 comments:

  1. Hi,
    I don't know how to contact you, but I am currently doing a master degree in biomedical engineering. I found your blog because my project team was thinking of using the hoberman sphere as a sort of stent to treat collapsed vertebra and we were looking whether somebody had already done a CAD drawing of the structure or force analysis. It looks like you guys put an incredible amount of work into the drawing and we were wondering whether you would have any hints for us (who have no CAD experience) on how to start this or if you know whether there are CAD drawings that are accessible somewhere for students.

    I know this is probably not the right place to contact you, but i didn't know how else to do so.

    All your projects look very impressive by the way :)

    ReplyDelete