Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

projecting geometry onto a helical surface?

acadadmin3KNUF
Advocate

projecting geometry onto a helical surface?

acadadmin3KNUF
Advocate
Advocate

Hello to all, please see the attched dwg:

 

This is a spiral conveyor bed section.  Is there a simple way to imprint/project, etc the blue and magneta geometry onto the top of the c-channel surfaces on both sides?  I'd rather not have to constantly adjust a local UCS and rotate in multiple axes to get the magenta and blue parts to be approximately the right orientation.  Thanks in advance for any help!

0 Likes
Reply
Accepted solutions (1)
526 Views
5 Replies
Replies (5)

leeminardi
Mentor
Mentor

If you can access the helix spline then you can use the array command follwed by PAth.

Position the shape at the beginning of the helix (spline) and experiment with it a bit.  YOu can adjust the spacing or the number of items r chose to fill the spline, or use the grip to drag the arrayed item.

lee.minardi
0 Likes

acadadmin3KNUF
Advocate
Advocate

An interesting idea...but after trying it, the resulting, arrayed obects (in orange here) do not change their orientation, they are still flat-to the world-UCS

arraying doesnt change objects' orientation ZOOMED.JPG

0 Likes

leeminardi
Mentor
Mentor

For another project that I was working on last year I wrote a LISP proogram to position blocks along a spline with the option to control the twist as they progressed along the spline.

 

I've modified the code slightly and it may do what you want.  It positions the blocks so that the block's y axis is parallel to the spline's tangent.  Since the code uses the first and second derivatives of the curve the block's x  axis point towards the instantaneous center of curvature at the point it is added.

 

Try it out.  Enter values of 0 for the beginning and end twist angles for your application and when prompted to Select Object select the spline.

 

In the attached file use the block named tri1 as an example.

leeminardi_1-1712452976462.png

 

leeminardi_0-1712452944321.png

 

(defun C:test (/)  ;  draft version
;;(defun C:qq (/ path inc n osm	par der1 der2 curva p perp normv p2 sf
;  adds blocks along a spline.  The user specifies the number of blocks and
; the total amount of twist over the length of the spline.   The Y axis of the block
; is tangent to the spline.  
; LRM 5/1/2023 revised 4/6/2024  
(command "ucs" "w")
(setvar 'osmode 0)
(setq nsec (getint "\nEnter number of sections: "))
(setq nsec (- nsec 1))  
(setq blockname (getstring "\nEnter block name: "))
(setq twist (getreal "\nEnter start twist angle: "))
(setq tottwist (getreal "\nENter total twist start to end: "))  
(setq
  path (car (entsel))
  inc  (/ (vlax-curve-getEndParam path) nsec)
  n    0
  osm  (getvar 'osmode)
)
;(setvar "cmdecho" 0)
(repeat	(+ nsec 1)
  (setq par (* inc n))
  (setq	der1 (vlax-curve-getfirstDeriv path par)
	der2 (vlax-curve-getSecondDeriv path par)
	p    (vlax-curve-getPointAtParam path par)
  )
  (setq p1 (mapcar '+ p (unitv (cross der1 der2))))
  (setq p2 (mapcar '+ p (unitv der1)))
  (setq vy (unitv (mapcar '- p1 p)))
  (setq vz (unitv (mapcar '- p2 p)))
  (setq vx (unitv (cross vy vz)))
  (setq p3 (mapcar '+ p vx))

  (command "-insert" blockname '(0 0 0) 1 1 0)
  (command "_align" "last" "" '(0 0 0) p '(0 1 0) p2 '(1 1 0) p3 "n")
  (if (> (abs twist) 0.00001)
    (command "rotate3d" "last" "" "2" p p2 twist)
  )
  (setq twist (- twist (/ tottwist nsec)))
  (setq n (1+ n))
)					; end repeat
(setvar 'osmode osm)
;(setvar "cmdecho" 1)
(princ)
)

  ;;; Compute the cross product of 2 vectors a and b
(defun cross (a b / crs)
  (setq	crs (list
	      (- (* (nth 1 a) (nth 2 b))
		 (* (nth 1 b) (nth 2 a))
	      )
	      (- (* (nth 0 b) (nth 2 a))
		 (* (nth 0 a) (nth 2 b))
	      )
	      (- (* (nth 0 a) (nth 1 b))
		 (* (nth 0 b) (nth 1 a))
	      )
	    )				;end list
  )					;end setq c
)					;end cross
(defun unitV (v / d)
  (setq	d (distance '(0 0 0) v)
	d (mapcar '/ v (list d d d))
  )
)

 

lee.minardi
0 Likes

parkr4st
Advisor
Advisor
Accepted solution

The thought is to get the shape to lie on the surface.  The shape is curved with the spiral surface so the slice gives the shape on the surface with the curve.  I.e. you can't use a flat shape.

 

see attached.  is that the result desired?  (not the shape you may want, but is it on the surface where & as wanted?)

first  saved a back up copy of the file and exploded the block.

 

Drew recatangle and extruded aways down, then moved the solid straight up so it would pass through the flange surface when arrayed polar.  drew the blue circle for the  center reference of polar array.

 

Polar array and explode the array, erase unwanted solids, union the ones intersecting the  flange back together and slice using the flange surface,  erase the solids and the shapes are now on the surface.

 

those shapes could be copied back to the original block dwg with a reference point common to both dwg.

 

for the triangles all that is needed is a wider flang to slice with.

 

 

 

 

0 Likes

acadadmin3KNUF
Advocate
Advocate

Thanks very much to everyone who responded.  I ended up drawing the whole thing in 2D under the helix-created rails for positioning the card X-Y, extruding it up through the rail, using INTERSECT to get the needed card shape from that, then going back and subtracting to get the card's position along the rail, then using that piece with COPYBASE to position it on a virgin-copy-without-holes of the rail.  Whew, awesome!! 😁

SLICED THRU SPIRAL RAILS.JPG

0 Likes