Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

AutoCAD 2017 Polygon Count

wispoxy
Advisor

AutoCAD 2017 Polygon Count

wispoxy
Advisor
Advisor

Does AutoCAD 2017 have a polygon counter? I need one for my current project.

0 Me gusta
Responder
1.522 Vistas
9 Respuestas
Respuestas (9)

TheCADnoob
Mentor
Mentor

is there a polygon entity?

CADnoob

EESignature

0 Me gusta

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

Does AutoCAD 2017 have a polygon counter? I need one for my current project.


A routine could easily be written to count all closed LWPolylines [which is what the POLYGON command draws], if that's enough of a determinant for you.  It could be made more sophisticated, to check each one as to whether its segments are all the same length, and none of them arc segments, and its vertices all the same distance from its center of gravity, if you need to count only regular Polygons [also characteristic of what the Polygon command makes -- see below].  But a Polygon in mathematical terms doesn't have to be regular, so some more information about what you want to count would be helpful.

 

For something that checks some of those things, look at MakeMore.lsp with its MM command, here.  One of its improvements over the ADDSELECTED command [that was added in later versions of AutoCAD than MakeMore was first written in] is that when you select a Polyline, it doesn't merely call up the PLINE command, but looks at certain characteristics of the selected one, and if it looks like it might have been the result of certain specific commands other than PLINE that draw Polylines, it offers such a command as a default.  If it finds that the Polyline has a global width of zero, and no arc segments, and at least its first two and last two segments are the same length, it offers the Polygon command.  But it doesn't check that they're all the same length, or that the vertices are all the same distance from a common center, or that the angles between them are all the same.

 

For a more sophisticated determinant of whether a Polyline is a regular polygon, try the attached IsRegPoly.lsp function, which could be incorporated into a routine to count them in a drawing, if those are what you're looking for.

Kent Cooper, AIA

wispoxy
Advisor
Advisor

I was interested in doing the Watercraft challenge that came from someone a while back, and we have to follow the max polygon requirement. See link.

https://www.cgtrader.com/challenges/vr-watercraft-challenge 

 

Remember the "Voyage Voyage" song by Desireless?

We'll, I don't really know how that's related to the challenge we're making, but we're about to take a voyage ourselves, with the new VR Watercraft competition.

The concept of the competition is broad, but hopefully you'll love to challenge yourself - ships, boats, canoes, kayaks - everything that can be placed on water (and don't sink) goes. The theme of your design is up to you - whether it's a futuristic, VR fitting boat, a steampunk or an army ship, we'll welcome every original concept to this challenge!

The only rule you have to take - don't make your masterpiece over 50,000 polygons.

We have some great prizes to look for, teaming up with Topogun, Suburb, PixPlant, Exlevel, Fox Renderfarm, Visual Designer, Cheetah3D, Rendering Systems and iCube R&D Group - a great amount of our friends adding some glamour to the challenge and total prize pool reaching $5000.

 

@Kent1Cooper I'll try your LISP and get back to you.

0 Me gusta

wispoxy
Advisor
Advisor
I'm a newbie with LISP. What command do I use to run it?
0 Me gusta

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:
I'm a newbie with LISP. What command do I use to run it?

If you mean IsRegPoly.lsp, it doesn't define a command, but a function with an entity name as an argument.  See the Usage: note in the comments at the top.

 

But it sounds from your prior Post like regular Polygons are not relevant to what you're trying to do, in which case that function would be of no use to you.  If you're going to use it for a count to check whether someone's submission violates the quantity limit, do you need something that simply counts all closed LWPolylines?  Or all of them that have no arc segments?  Should "heavy" 2D and/or 3D Polylines be included?

Kent Cooper, AIA
0 Me gusta

wispoxy
Advisor
Advisor
I'd go with worse-case scenario and say closed polylines, 'heavy' 2D, and 3D Polylines. I assume by 'heavy' you're talking about polysolids, surfaces, please excuse me if I have it wrong.

...So something to count closed polylines and heavy polylines. Exclude line weights.
0 Me gusta

dgorsman
Consultant
Consultant

I suspect the limit is based on a supposition that all entries will be surface meshes (or potentially solids) of some sort.  Theoretically a design could be made in AutoCAD with ZERO polygons but may or may not meet the requirements due to conversion; different curve resolutions would create models with differing numbers of polys.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


wispoxy
Advisor
Advisor
I believe 3DS Max has a counter, google sketchup has a counter, and adobe has a counter.
0 Me gusta

wispoxy
Advisor
Advisor
Nevermind. Google sketchup makes everything one object and adobe breaks it up way too much. Well, if anyone comes up with a solution let me know. I'll be working on the overall model.
0 Me gusta