Author Topic: help extruding in a 3d path  (Read 3112 times)

0 Members and 1 Guest are viewing this topic.

nekonihonjin

  • Newt
  • Posts: 103
help extruding in a 3d path
« on: January 04, 2016, 01:14:34 PM »
Hello everyone.

I'm using the "Mextrude" lisp made by gile
It's been very usefull with lwpolilnes (in fact is an excelent routine)

I have a problem when using the "3dPolyFillet" made by Gilles Chanteau

if I extrude a profile in a previously 3dfilleted 3dpolylne it ends up a little twisted and I need it to continue horizontal.

I'll attach a file for detalis. and the lisp routines that I mentioned above.


ribarm

  • Gator
  • Posts: 3274
  • Marko Ribar, architect
Re: help extruding in a 3d path
« Reply #1 on: January 04, 2016, 04:30:21 PM »
Maybe you can try this posted here :

http://www.theswamp.org/index.php?topic=49959.0

But I suppose it'll be also quirky, but test it, you'll never know...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

nekonihonjin

  • Newt
  • Posts: 103
Re: help extruding in a 3d path
« Reply #2 on: January 04, 2016, 04:55:40 PM »
Maybe you can try this posted here :

http://www.theswamp.org/index.php?topic=49959.0

But I suppose it'll be also quirky, but test it, you'll never know...


I was testing with your modifications to this routine and I realized that the problem is the mextrude.lsp
Even when the 3dpolyline has not been filleted yet, it still result a twisted extrusion. Guile worked with circles to create a pipe, so I guess he did not notice this behaviour.


gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: help extruding in a 3d path
« Reply #3 on: January 05, 2016, 12:13:50 PM »
Hi,

Yes I noticed this behaviour which is not due to the mextrude LISP but to the way the AutoCAD extrusion works with non planar paths (the native _SWEEP command gives the same result).
To to what you want, you have to use the _LOFT command.
Speaking English as a French Frog

nekonihonjin

  • Newt
  • Posts: 103
Re: help extruding in a 3d path
« Reply #4 on: January 05, 2016, 05:03:30 PM »
Hi,

Yes I noticed this behaviour which is not due to the mextrude LISP but to the way the AutoCAD extrusion works with non planar paths (the native _SWEEP command gives the same result).
To to what you want, you have to use the _LOFT command.


loft joins 2 or more profiles to make the solid, I don't know how to use it to extrude it along the 3dpolyline.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: help extruding in a 3d path
« Reply #5 on: January 25, 2016, 03:42:32 PM »
Hi,

This is a quite old LISP which dispach a profile (section) along a path.
The profile must be a block containing a single planar entity oriented so that its X axis will be aligned to the path tangents (see the example in the attached dwg file.

A little video.
« Last Edit: January 25, 2016, 04:01:15 PM by gile »
Speaking English as a French Frog

nekonihonjin

  • Newt
  • Posts: 103
Re: help extruding in a 3d path
« Reply #6 on: January 31, 2016, 12:57:28 PM »
Hi,

This is a quite old LISP which dispach a profile (section) along a path.
The profile must be a block containing a single planar entity oriented so that its X axis will be aligned to the path tangents (see the example in the attached dwg file.

A little video.


This is perfect, thank you again.

ChrisCarlson

  • Guest
Re: help extruding in a 3d path
« Reply #7 on: February 01, 2016, 11:41:45 AM »
Try converting the polyline to a spline

Code - Auto/Visual Lisp: [Select]
  1. (defun C:PL2SPL ( / ss i)
  2.         (if
  3.                 (setq ss (ssget '((0 . "*POLYLINE"))))
  4.                 (repeat (setq i (sslength ss))
  5.                         (make_spline
  6.                                 (pl_list (ssname ss (setq i (1- i))))
  7.                         )
  8.                 )
  9.         )
  10. )
  11. (defun pl_list (e / r i j lg)
  12.         (setq lg (* 0.05 (vlax-curve-getdistatparam e (vlax-curve-getendparam e))))
  13.         (repeat (setq i (1+ (fix (vlax-curve-getEndParam e))))
  14.                 (setq r (cons (cons 11 (vlax-curve-GetPointAtParam e (setq i (1- i)))) r))
  15.                 (if
  16.                         (and
  17.                                 (> i 0)
  18.                                 (> (- (vlax-curve-getdistatparam e i) (vlax-curve-getdistatparam e (1- i))) lg)
  19.                         )
  20.                         (repeat (setq j 3)
  21.                         (setq r (cons (cons 11 (vlax-curve-GetPointAtParam e (+ (1- i) (* 0.25 j)))) r) j (1- j))
  22.                         )
  23.                 )
  24.         )
  25.         r
  26. )
  27. (defun make_spline (l)
  28.         (entmake
  29.                 (append
  30.                         (list
  31.                                 '(0 . "SPLINE")
  32.                                 '(100 . "AcDbEntity")
  33.                                 '(100 . "AcDbSpline")
  34.                                 '(70 . 1)
  35.                                 '(71 . 3)
  36.                                 (cons 74 (length l))
  37.                                 '(44 . 1.0e-005)
  38.                         )
  39.                         l
  40.                 )
  41.         )
  42. )

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-polyline-to-polyline-to-spline-with-max-1mm-tolerance/m-p/4446325#M315222