Author Topic: (help)"union" Many entities with very slow  (Read 2273 times)

0 Members and 1 Guest are viewing this topic.

Q1241274614

  • Guest
(help)"union" Many entities with very slow
« on: November 23, 2012, 04:34:31 AM »

(command "union" ssrow "")
There are no fast way!

(defun c:tt ( / )(vl-load-com)
(command "undo" "begin")
(setq e2 nil ssrow (ssadd) I -1 e1 nil)
(setq SS (ssget  '((0 . "3DFACE"))))
(entmakex (list (cons 0 "LINE")(cons 10 '(0 0 0))(cons 11 '(0 0 1))))(setq path (entlast))
  (WHILE (setq ent (ssname ss (setq i(1+ i))))
  (command "_extrude" ent "" "p" path )
  (if (setq e1 (entlast)) (ssadd e1 ssrow)))
  (command "union" ssrow "")
  (entdel path)
  (command "undo" "end")
  (princ)
  )
« Last Edit: November 23, 2012, 05:11:53 AM by Q1241274614 »

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: (help)"union" Many entities with very slow
« Reply #1 on: November 23, 2012, 04:54:37 AM »
I don't think you can get that particular line to go faster. Is it a lot slower than when you do this manually?

Could you post the rest of your code? Perhaps the slow going is due to something else (like how you generate the selection set).
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Q1241274614

  • Guest
Re: (help)"union" Many entities with very slow
« Reply #2 on: November 23, 2012, 06:32:07 AM »
In the C:\Documents and Settings\Administrator\Local Settings\Temp   generated a lot of temporary files

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: (help)"union" Many entities with very slow
« Reply #3 on: November 23, 2012, 07:01:36 AM »
As I thought - it's because of how you're using the selection set. Try this instead:
Code - Auto/Visual Lisp: [Select]
  1. (defun c:test  (/ ss path en)
  2.   (if (setq ss (ssget '((0 . "3DFACE"))))
  3.     (progn (command "._undo" "_Begin")
  4.            (entmakex '((0 . "LINE") (10 0. 0. 0.) (11 0. 0. 1.)))
  5.            (setq path (entlast))
  6.            (command "._EXTRUDE" ss "" "_Path" path)
  7.            (setq ss (ssadd)
  8.                  en path)
  9.            (while (setq en (entnext en)) (ssadd en ss))
  10.            (entdel path)
  11.            (command "._UNION" ss "")
  12.            (command "._undo" "_End")))
  13.   (princ))
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Lee Mac

  • Seagull
  • Posts: 12906
  • London, England
Re: (help)"union" Many entities with very slow
« Reply #4 on: November 23, 2012, 07:25:58 AM »
Would the vla-boolean method be any quicker?

Q1241274614

  • Guest
Re: (help)"union" Many entities with very slow
« Reply #5 on: November 23, 2012, 07:34:40 AM »
1:vla-boolean      Like little difference
2:C:\Documents and Settings\Administrator\Local Settings\Temp         a lot of temporary files
File in the following, we test.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: (help)"union" Many entities with very slow
« Reply #6 on: November 23, 2012, 09:01:46 AM »
That DWG is slow because it will be slow extruding 2600+ triangles. Let alone unioning them afterwards.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: (help)"union" Many entities with very slow
« Reply #7 on: November 23, 2012, 09:03:30 AM »
And BTW if you want to have a solid, then why not use Loft to generate that instead of surfaces and then extrude & union?
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Q1241274614

  • Guest
Re: (help)"union" Many entities with very slow
« Reply #8 on: November 23, 2012, 09:24:32 AM »
1.And BTW if you want to have a solid, then why not use Loft to generate that instead of surfaces and then extrude & union?
This way I don't understand, consult!
2.extruding 2600+ triangles  ,fast!
3.union,Slow!(Solution method)

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: (help)"union" Many entities with very slow
« Reply #9 on: November 24, 2012, 03:59:51 AM »
How did you draw the mesh of triangle faces? Rulesurf or so? Is this something like a net-structure or are you attempting to model a tensile-structure?

If tensile, then the Loft command would directly create a nurbs solid for you: Basically you draw profiles along a path. So your path could be the arc as the tensile spans from left-to-right. Draw a profile as a section through the structure at each end and perhaps at the middle to indicate how it "shrinks" in width.

If you need the triangles (i.e. this is something like a curtain wall), then I'd take this loft into Revit as a mass. Then create a curtain wall on its face. Allows for all sorts of profiles per grid / panels per triangle.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: (help)"union" Many entities with very slow
« Reply #10 on: November 27, 2012, 12:46:29 AM »
As an example, the attached has a lofted surface made from 4 arcs drawn on your original. Here's a copy of the command-line to make such:
Code: [Select]
Command:  LOFT
Current wire frame density:  ISOLINES=4, Closed profiles creation mode = Solid
Select cross sections in lofting order or [POint/Join multiple edges/MOde]: 1 found
Select cross sections in lofting order or [POint/Join multiple edges/MOde]: 1 found, 2 total
Select cross sections in lofting order or [POint/Join multiple edges/MOde]: 1 found, 3 total
Select cross sections in lofting order or [POint/Join multiple edges/MOde]:
 3 cross sections selected
Enter an option [Guides/Path/Cross sections only/Settings] <Cross sections only>: g
Select guide profiles or [Join multiple edges]:1 found
Select guide profiles or [Join multiple edges]:
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.