Jump to content

How can I modify the amount of points on a Polyline?


Recommended Posts

Posted

 So I'm currently working on a proyect where I need all my circles and round shaped to be easy to edit on 3ds max if needed.

 

The problem is that I have some polylines on these CADs with over 100 points, making them very hard to use.

 

The question is: Is there any way to modify the amount of points there that isn't manually?

Error.jpg

Posted

Have a look for weed.lsp never used it but I think it does what you want.

  • Like 1
Posted
18 hours ago, Alanus said:

 So I'm currently working on a proyect where I need all my circles and round shaped to be easy to edit on 3ds max if needed.

 

The problem is that I have some polylines on these CADs with over 100 points, making them very hard to use.

 

When you import the dwg to 3ds Max, in the import options dialog, you can choose to weld nearby vertices by setting the weld threshold. This can help reduce some of the vertices that are really close together.

 

After you import the dwg and extrude the shapes, you can apply the "ProOptimizer" modifier and reduce the poly count on each object by whatever percentage you want.

 

 

Posted
15 hours ago, BIGAL said:

Have a look for weed.lsp never used it but I think it does what you want.

This is EXACTLY what I've been looking for for months!

Thank you very much!

Posted
59 minutes ago, Cad64 said:

 

When you import the dwg to 3ds Max, in the import options dialog, you can choose to weld nearby vertices by setting the weld threshold. This can help reduce some of the vertices that are really close together.

 

After you import the dwg and extrude the shapes, you can apply the "ProOptimizer" modifier and reduce the poly count on each object by whatever percentage you want.

 

 

I've tried this before but had quite a bit of trouble with the result of the autoweld, and as for the optimizer altough it does help reduce it has trouble reducing as much as a need (for a phone app) while maintaining the shape enough.

Posted (edited)

If your shape is say a polygon in Autocad then you could just get all the vertices, and remake it with some factor like 2 3 ie every second vertice  is removed. Will have a look at put obj 'coordinates. Or just use a simple make a new one.

Edited by BIGAL
Posted
11 hours ago, Alanus said:

This is EXACTLY what I've been looking for for months!

 

While the Weed lisp routine is great for reducing the number of points on a polyline, I'm not sure it would be a good solution for something like a polygon that needs to be symmetrical. For the example of a circle with 100 points, the Weed routine would certainly be able to reduce the number of points, but there's no guarantee that it will maintain the shape correctly. It might remove more points on one side and less on another side and you could end up with some lopsided circles. If it were up to me, I would redraw the polygons manually to insure proper symmetry.

Posted (edited)

Not sure what happened but lost code from here. Will redo again.

 

Please note the CMDactive crashes Briscad. Will look into it.

 

; reduce polygon facets by AlanH OCT 2019
(defun c:polred ( / x R lst co-ord plent)
(setq plent (entsel "pick polygon"))
(if plent (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent))))))

(setq  R (getint "Enter reduction factor 2 3 4 etc"))

(setq x 0)
(setq lst '())
(setq lst (cons (nth x co-ord) lst))
(repeat  (- (/ (length co-ord) R) 1)
(setq lst (cons (nth (setq x (+ x R)) co-ord) lst))
)

(setvar 'clayer "0") ; add your layer or else erase plent
;(command "erase" plent "")

(command "_pline")
(while (= (getvar "cmdactive") 1 )
(repeat (setq x (length lst))
(command (nth (setq x (- x 1)) lst))
)
(command "C")
)
)
(c:polred)

 

 

 

 

Edited by BIGAL
  • Like 1
Posted

Do you have an example drawing?

 

You may have better luck with PLDIET.LSP and the Express Tool OVERKILL will clean up some things as well. Could the drawings need to be flattened?

Posted
3 hours ago, SLW210 said:

Do you have an example drawing?

 

You may have better luck with PLDIET.LSP and the Express Tool OVERKILL will clean up some things as well. Could the drawings need to be flattened?

Actually, I didn't even find the WEED.lsp one, but when I searched for it this one came up as the only result and worked perfectly

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...