Jump to content

polyline, polygon and rectangles


Recommended Posts

What is the difference between a polyline and a polygon in VW?

I know that a polygon is a closed shape made up of straight lines and that the polyline can include curves and be open but I am unsure of the difference in VW and can different operations be taken on polygons vs polylines.

I can also have a rectangle which is a polygon but VW calls it a rectangle and it is not editable so why the difference between rectangle and polygon and even rounded rectangle and polyline?

all a bit confusing at the moment so any clarification would be great

thank you

Link to comment

Think of the Polyline as a free form polygon.

To get same result otherwise, you need to use lines and arcs.

Rectangle is just a kind of polygon as is Hexagon and such.

You can curve the corners of a rectangle using the Fillet Tool.

Rectangles may be editied to change size.

Round Rectangle is a rectangle with predefined corners.

Polygons and polylines may be Model > Extruded, AEC > floor, pillar.

All may be used as Extrude Along Path with profile.

2D polygons may also be used with Duplicate Along Path.

Link to comment

thanks taoist,

In the basic panel I have a 2D polygon and a 2D polyline. A polygon is a closed shape but the 2D polygon allows me to draw an open shape and in the object info it still calls it a polygon.

I can take the polyine tool and draw a shape and then Modify > Convert > convert to polygons so now I have a curved shape which is also called a polygon (which should have straight sides).

I guess that a polygon in VW is not what I think of as a polygon.

is there any difference at all between a polyline and a polygon (either open or closed) in VW with regard to what operations can be carried out?

thanks again

Link to comment

Operations should be the same. Some tools may require a polygon, or transform the polyline base shape to a polygon.

A polygon is a shape made of lines and is closed or open. Open means here that it has one line missing. When more lines are missing, the shape will become a polyline.

A polyline is a shape made of lines, arcs and curves. Every piece can be shown/hidden. So a polyline isn't actually open or closed, but sides are hidden.

A rectangle is just a special polygon. In archituctural drawings, in most cases, it's easier to work with rectangles. You can adjust them quicker, and when rotated, they still are rectangles.

  • Like 1
Link to comment

A polygon is a shape made of lines and is closed or open. Open means here that it has one line missing. When more lines are missing, the shape will become a polyline.

Hey Dworks,

How does VW know when there is more than one line missing?

Link to comment

This is my understanding in a broader sense of 3d modelling -

Polygon - all sides are straight and on a single plane. As was pointed out certain shapes have their own names (rectangle, triangle, n-gon)

Polyline - essentially what other programs call a spline. A curve defined by various types of control points (the standard being Adobe Illustrator style, Vectorworks points are a knock off version and not quite as elegant or intuitive)). In Vectorworks all points need to be on a single plane. Allows for smooth curves.

Open and closed polygons or polylines are still closed surfaces, one or more segments are just hidden. This becomes apparent if you give it a fill.

For rendering all 3d objects are broken down internally by Vectorworks into quads (for sided polygons) or triangles.

KM

Edited by Kevin McAllister
Link to comment

A polygon (outside of VW) has straight sides and is closed. In VW it can be open and can have curves. This is what threw me. I can create an open shape with the polyline tool and then convert it to a polygon. Being new I then thought that there must be a difference between a polygon and a shape created with the polyline tool. This thought was reinforced by having a 2D polygon tool (draw straight lines but do not have to close the shape) and a polyline tool (draw straight lines and curves).

I believe that after the answers I have there really is not difference in terms of what you can do between a polygon 'shape' and a polyline 'shape'. The OIP displays which type you have (polygon or polyline) but they are so interchangeable it is confusing.

If there is no difference then why have a 2D polygon tool (draw straight lines) and a polyline tool? I can see the sense in being able to create rectangles, circles (not a polygon but included anyway) and other polygons (enter the number of sides) for ease of use (just like illustrator).

thanks

Link to comment

Just adding to the mix here.

There is a huge difference in functionality. Polygons contain only corner vertices. All segments are straight. As indicated above, Polylines can have both corner vertices with straight segments and the various curve vertices/segments.

Draw a polyline with curves made from 4 or 5 points. Modify>Convert>Convert to Polygons and find that it is now represented by hundreds or thousands of corner points. This makes a difference in file size, efficiency of 3d commands with 2d profiles (extrudes, EAP, others), and general editability of the 2d shape.

In 3d drawing the NURBS curve is similar to the polyline but can go off plane. Convert a curved NURBS to 3d poly and get LOTS of vertices where the curves were. Or, convert a 2d polyline to NURBS Curve and to 3d Poly. NURBS retains about same point count. 3d Poly may have hundreds or thousands for the same curve conversion.

Also pointed out above, some processes in Vectorworks demand polygons while others allow polylines. End users may need some experience to know which is required.

-B

Link to comment

As the others have confirmed, a polygon is only straight segments.

But if you use the Paint Buck or Lasso mode of the Polygon tool to create surfaces, it will create Polylines if the boundary includes curves....

Circles / ovals are specialty polylines. (Create a circle, group it, stretch the group in one direction and ungroup it again. It becomes a polyline.)

I think the idea of an "open" polyline or polygon is a bit of cheat by Vectorworks. All it means is that one or more segments doesn't have a pen fill. The underlying shape is still there. Create a polyline with a curved side and choose that side to be the open side. The line of the curve disappears but if you give the object a fill it follows the curve. In various rendering modes these "open" curves don't necessarily play well...... Only NURBS curves can truly be open.

If you take a 3D polygon that has a hidden edge across into Cinema 4D, the hidden polygon shows up again.

KM

Link to comment

Create a polyline with a curved side and choose that side to be the open side. The line of the curve disappears but if you give the object a fill it follows the curve. In various rendering modes these "open" curves don't necessarily play well......

This is not an open polyline. All you did is hide that side pen width but it is still a closed polyline. You will need to remove one segment for it to become open. You can tell a polygon/polyline is open if the area is zero in the OIP.

Link to comment

This is not an open polyline. All you did is hide that side pen width but it is still a closed polyline. You will need to remove one segment for it to become open. You can tell a polygon/polyline is open if the area is zero in the OIP.

I don't believe this is actually true. Same polygon, drawn by double clicking on the last point so its open. Fill turned on (left) and fill turned off (right). Vectorworks sees both as being "open" polygons. The area is not actually zero but instead missing because there is no area...

Same result if I draw the complete polygon and hide one side. This is why I call it a cheat on Vectorworks part. As far as I know you can't actually remove one segment.

KM

ubbthreads.php?ubb=download&Number=7833&filename=Open%20Polygon.jpg

Link to comment
I think the idea of an "open" polyline or polygon is a bit of cheat by Vectorworks. All it means is that one or more segments doesn't have a pen fill.

A polygon/polyline is only open when one side has no fill (= hidden):

- Polygon closed = all sides visible

- Polygon open = one side invisible

- Polyline closed = all sides visible or more than one side hidden

- Polyline open = one side hidden

You have no other options and a polygon with more than one side hidden doesn't exists, it will convert to a polyline. Talk about strange....

I had trouble with this when coding in Vectorscript because of this open/closed condition. It is really a strange thing and I suspect it comes from some early version where they had to do it, but never did it better afterwards.

I think they should change the above list to:

- Polygons = All straight segments, visible or hidden.

- Polylines = Straight/Curved segments, visible or hidden.

Why have open/closed? They all can have a fill and aren't really open/closed (like mentioned above). Only sides can be hidden (not shown) and that's a great power VW have over other programs. So by simplifying these shapes, it will make life easier.

Plus: all path based objects should be able to use polylines. The dtm texture bedding drives me crazy, it can only use polygons.

Edited by DWorks
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...