0

Extrude Polyline

Anonymous 6 years ago 0
This discussion was imported from CodePlex

CesarMayorine wrote at 2013-10-08 10:34:

how I can extrude a polyline?
Anyone have an example?

ErOt79 wrote at 2013-10-17 12:55:

Please, i need the same help. I tried AddExtrudedGeometry but didnt understand well the use of it. A simple sample of extruded polygon geometry could be very helpful. Thanks!!

rinaldin wrote at 2013-10-25 15:48:

See here I hope it helps.

CesarMayorine wrote at 2013-10-25 22:21:

thank you rinaldin, exactly what I need.
Please i need an example in C # or VB, with a curve would be great

rinaldin wrote at 2013-10-28 18:19:

        ' the Path is a Point3DCollection and the Section is a PointCollection
        Dim sect As New PointCollection
        ' rettangolare
        sect.Add(New Point(-1, -1))
        sect.Add(New Point(0, -1))
        sect.Add(New Point(1, 1))
        sect.Add(New Point(-1, 1))
        Dim asse As New Vector3D(1, 0, 0)

        Dim rend As New ExtrudedVisual3D
        rend.Section = sect
        rend.Path.Add(pt)
        rend.Path.Add(pt1)
        rend.SectionXAxis = asse
        rend.Fill = Brushes.Green
        rend.IsPathClosed = True
        rend.IsSectionClosed = True
        HelixViewport3D1.Children.Add(rend)

        container.Children.Add(rend)

CesarMayorine wrote at 2013-10-30 08:51:

Thanks you,
is great, I have a problem with rend.SectionXAxis = asse, you can help me?.

rinaldin wrote at 2013-10-30 14:22:

"asse" is a vector orthogonal to the extrusion axis. You have to orient it to the desired direction , but always othogonal to the vector connecting pt and pt1 (starting and ending points of the extrusion).

CesarMayorine wrote at 2013-10-30 16:51:

Is posibel added caps to the extrusion?

rinaldin wrote at 2013-10-30 19:41:

I didn't try yet, but I think so; add a Polygon using the sect points.