Jump to content

Speeding up code. Using command calls vs vl/vla methods


MJLM

Recommended Posts

I 'm trying to optimize my code which parse through many line elements (representing 3D piping network) which may be of ten of thousands of lines. In order to perform various tasks I am using the ucs command to align some items (e.g. blocks) that need to be attached for each line inside a while loop. This greatly reduces calculations and code size but it has its downside of taking a considerable amount of time (for a system of 2000 lines it took 5 min calling ucs and insert commands through command "_.ucs"... & command "_insert"... for all lines). The following line is what I use most

 

(command "_.ucs" "_3p" p1 p2 p3)

or

(command "_.ucs" "za" p1 p2)

and

 (command "_.insert" path pt 1 1 0)

For large networks this can, however, take a substantial amount of time to finish parsing through all elements. The following snippet, which is only some kind of benchmark, takes 22 sec on my system to finish.

 

(defun c:test (/)
   
   (setq pt10 (getpoint))
   (setq pt11 (getpoint))
   (setq origin (getpoint))

   (repeat 1000
      (command-s "_.ucs" "_3p" origin pt10 pt11)
      (command-s "_.ucs" "w")
   )
  
   (alert "Done!")
)

To optimize the code, I though that using vla procedures and methods would speed up things. I tried therefore the following,

 

(defun c:test (/)

   (setq pt10 (vlax-3d-point (getpoint)))
   (setq pt11 (vlax-3d-point (getpoint)))
   (setq origin (vlax-3d-point (getpoint)))
   (setq UCSs (vla-get-userCoordinateSystems (setq doc (vla-get-activeDocument (vlax-get-acad-object)))))

   (repeat 1000
       (setq newUCS (vla-add UCSs origin pt10 pt11 "_test"))
       (vla-put-ActiveUCS doc newUCS)
       (vla-put-ActiveUCS doc (vla-add (vla-get-usercoordinatesystems doc) (vlax-3D-point '(0. 0. 0.)) (vlax-3D-point '(1. 0. 0.)) (vlax-3D-point '(0. 1. 0.)) "TempWord_UCS"))
   )

   (alert "Done!")
)

The classic method utilizing 'command' calls, took 23 sec on my system. The second utilizing vla methods, took 19. It seems to me that rewriting the code to switch to vla methods (which by the way increases code size and complexity) is not worth it.

 

At the bottom line, is it worth it to use vl & vla methods instead of the command calls to standard autocad commands? Do you share the same opinion? It would be worth hearing opinions of much more experienced programmers/developers of Auto/Visual Lisp.

 

Thank you.

Link to comment
Share on other sites

ucs command is known for its speed lacks... Do you need to work in various ucs necessarily... If you can do things in wcs, maybe transforming entities from wcs to imaginary ucs is somewhat faster, maybe by using (vla-transformby) function with supplied transformation matrix of your "ucs" which is now imaginary... If you need calculations like (trans) or similar, it's also far more efficient that you use matrix calculations than setting ucs with "ucs" command and then (trans pt 0 1) or (trans pt 1 0); in this situations I suggest that you search for my (transptucs) function and (transptwcs) function... You can strip those sub functions from here for ex. :

https://www.theswamp.org/index.php?topic=42773.msg479708#msg479708

Link to comment
Share on other sites

Thanks. I guess the solution is to delve into transformation of points more than taking any of the direction I wrote above. I believe Lee Mac posted for me the solution to the problem in my previous thread. Thank you for your code too. I only need to study it carefully. After not having used all I learned on vector maths and transformations 22 years ago, I need to sit down on the school bench again. Let's see how that goes...

Link to comment
Share on other sites

Well, school, but actually, you shouldn't really need much more than this snippet :

 

(defun c:transform ( / x y z e m )

 (vl-load-com)

 (setq x (getvar 'ucsxdir))
 (setq y (getvar 'ucsydir))
 (setq z (trans '(0 0 1) 1 0 t))
 (setq e (car (entsel "\nPick entity to transform it from WCS to UCS")))
 (setq m (list (list (car x) (car y) (car z) (car (trans '(0 0 0) 1 0))) (list (cadr x) (cadr y) (cadr z) (cadr (trans '(0 0 0) 1 0))) (list (caddr x) (caddr y) (caddr z) (caddr (trans '(0 0 0) 1 0))) '(0.0 0.0 0.0 1.0)))
 (vla-transformby (vlax-ename->vla-object e) (vlax-tmatrix m))
 (princ)
)

 

M.R.

Link to comment
Share on other sites

I normally dont worry about speed as the number of iterations is small, pretty sure there was some discussion about using entmake as being faster maybe for your command insert, make it a defun. I am sure if I am wrong others will soon advise. Any other repeated lines of code think about making a defun of it, again not sure but as this code is already loaded within the lisp proceedure should be faster. Re ucs changes you can make new UCS's and just change to them, note need one called say "myworld" as "World" is not a name directly supported.

 

; from autodesk
(vl-load-com)
(defun c:Example_ActiveUCS()
   ;; This example returns the current saved UCS (or saves a new one dynamically)
   ;; and then sets a new UCS.
   ;; Finally, it returns the UCS to the previous setting.
   (setq acadObj (vlax-get-acad-object))
   (setq doc (vla-get-ActiveDocument acadObj))
   (setq UCSs (vla-get-UserCoordinateSystems doc))
 
   ;; Get the current saved UCS of the active document. If the current UCS is
   ;; not saved, then add a new UCS to the UserCoordinateSystems collection
   (if (= (vlax-variant-value (vla-GetVariable doc "UCSNAME")) "")
       (progn
           (setq utility (vla-get-Utility doc))
           (setq currUCS (vla-Add UCSs
                                  (vla-GetVariable doc "UCSORG")
                                  (vla-TranslateCoordinates utility (vla-GetVariable doc "UCSXDIR") acUCS acWorld :vlax-false)
                                  (vla-TranslateCoordinates utility (vla-GetVariable doc "UCSYDIR") acUCS acWorld :vlax-false)
                                  "OriginalUCS"
		                       )
           )
       )
       (setq currUCS (vla-get-ActiveUCS doc))  ;; current UCS is saved
   )
   
   (alert (strcat "The current UCS is " (vla-get-Name currUCS)))
   
   ;; Create a UCS and make it current
   (setq origin (vlax-3d-point 0 0 0)
         xAxis (vlax-3d-point 1 1 0)
         yAxis (vlax-3d-point -1 1 0))

   (setq newUCS (vla-Add UCSs origin xAxis yAxis "TestUCS"))
   (vla-put-ActiveUCS doc newUCS)
   (alert (strcat "The new UCS is " (vla-get-Name newUCS)))
   
   ;; Restore the previous UCS
   (vla-put-ActiveUCS doc currUCS)
   (alert (strcat "The UCS is restored to " (vla-get-Name currUCS)))
)

Link to comment
Share on other sites

I have used the 'entmake' of blocks instead of insert and indeed works much faster. However I quited using it when I realized that the 'entmake' does not respect an active ucs orientation and the insertion happens in respect to the WCS only. That means that I need to start rotating in 3D after. By using the insert command this is not an issue. However it is the lazy way. As far as concern saving UCSs, I believe the nature of my problem does not allow for any benefit. The network can have any 3D form and each line is processed only once. Of course many lines have the same orientation but again I would have to translate from one ucs to the other etc.

 

I believe the solution to my problem is to simply use the one and only WCS, insert all my blocks to various points with the default orientation as it comes itself and then translate some points on the line the block is attached to by using these functions and rotate the block to bring it in the correct orientation.

 

By the way, I use the snippet below when using the entmake. It seems I cannot use it for the first time but for all the rest.

 

(if (not (tblobjname "block" "S3D_U"))
                           (progn
                               (setq path (strcat path "C:\\S3D_U.dwg"))
                               (command-s "_.ucs" "za" pst pnd)
                               (command-s "_.insert" path "_non" inspt "1" "1" "0")
                               (command-s "_.ucs" "w")
                           )
                           (progn
                               (entmake
                                   (list
                                       (cons 0 "INSERT")
                                       (cons 2 "S3D_U")
                                       (cons 8 "3d")
                                       (cons 10 '(0.0 0.0 0.0))
                                       (cons 70 0)
                                       (cons 66 1)
                                       (cons 50 45)
                                   )
                               )
                               (entmake '((0 . "SEQEND")))
                           )
                       )

Is there a way to use the entmake even for the first instance that eludes me?

Edited by MJLM
Link to comment
Share on other sites

MJLM,

Take note that if you want to entmake an attributed block reference, you'll have to entmake its attribute references aswell,

So if in the block definition there are located attribute definitions with "TAG1" and "TAG2", that fragment will look like:

 

(entmake
 (list
   (cons 0 "INSERT")
   (cons 2 "S3D_U")
   (cons 8 "3d")
   (cons 10 '(0.0 0.0 0.0))
   (cons 70 0)
   (cons 66 1)
   (cons 50 45)
 )
)
(entmake 
 (list 
   (cons 0 "ATTRIB")
   (cons 2 "TAG1")
   (cons 1 "VAL1")
   ...
 )
)
(entmake 
 (list 
   (cons 0 "ATTRIB")
   (cons 2 "TAG2")
   (cons 1 "VAL2")
   ...
 )
)
(entmake '((0 . "SEQEND")))

 

I don't remember which are the mandatory "ATTRIB" group codes, so you might want to check here.

I guess it would be a good idea to write a generic (_VanillaInsert) function, that checks for "ATTDEF" in the "BLOCK" definition and auto-entmakes the INSERT's "ATTRIB"-s. [sadly I don't have time to play with that]

Link to comment
Share on other sites

Thank you. I am aware of that. In this case however all blocks have no attributes. This is only for visual representation (2D to 3D volumetric representation model).

 

At the moment I am trying to figure out the necessary points to define axis of rotations in 3D to align the blocks inserted. I may come back about this.

Link to comment
Share on other sites

  • 2 weeks later...
However I quited using it when I realized that the 'entmake' does not respect an active ucs orientation and the insertion happens in respect to the WCS only.
Not that it doesn't respect the active ucs, it just works with WCS coordinates
That means that I need to start rotating in 3D after. By using the insert command this is not an issue. However it is the lazy way.
Rotating after or using the insert command is either one too many step or just way slower
As far as concern saving UCSs, I believe the nature of my problem does not allow for any benefit. (...) I believe the solution to my problem is to simply use the one and only WCS, insert all my blocks to various points with the default orientation as it comes itself and then translate some points on the line the block is attached to by using these functions and rotate the block to bring it in the correct orientation.

It is like tying logs together to make a raft to cross a river right beside a bridge. You have the coordinates in UCS and need them in WCS, just use the trans function :)

 

I have a point randomly placed. In WCS here'S the coordinate

Command: (getpoint)

(-0.829038 0.498245 -0.253868)

Now I change the UCS, and click randomly. Getpoint, which returns a point in the current UCS, could still be used to provide a coordinate to any function working in WCS (such as Entmake),

Command: (setq samepoint (getpoint))

(1.70819 -0.683566 1.40014)

Command: (trans samepoint 1 0)

(-0.829038 0.498245 -0.253868)

 

Entmaking directly where you need it, oriented correctly right away is easy, and way faster than using insert, or having to insert, figuring out the points to define the axis of rotation in 3d, calculating a matrix, applying it or worse, using 3d rotate command. Look Trans

 

Cheers

Link to comment
Share on other sites

oriented correctly right away is easy, and way faster than using insert, or having to insert, figuring out the points to define the axis of rotation in 3d, calculating a matrix, applying it or worse, using 3d rotate command.

Cheers

 

Can you elaborate a bit on that please? Have a look at the pictures below. Let us assume the red lines are a block inserted where they touch the white line. The block needs to be oriented as shown in the pictures, aligned with the white line. The insertion point as well as the three angles the block needs to be rotated are all known. How could I accomplish that without the use of command calls to standard Autocad commans? The only way I found is to use Lee Mac's routine "rotateobject" (link in my post Nr. 6 above) but that requires to define an axis and I m having problem defining an axis perpendicular to the plane defined by the white line and perpendicular to the xy plane. The other two rotation are easy, one around z and one around the white line.

 

Any help would be appreciated.

 

First picture is same as second. I only included two from different perspective to make it easier to understand the orientation of the model.

20171005-13-27-48.png

 

 

20171005-13-16-53.png

Link to comment
Share on other sites

It would be also nice if you attached your DWG with those 2 blocks...

But from my perspective, theoretically, you'll need to multiply 2 matrices to get correct transformation matrix... Multiplication should be performed in correct order (matrix of transformation x matrix of current block orientation and position) - order must always be reversed of actual procedure of transformation... When you get correct matrix, it's not hard to apply my (c:transform) example to desired block/entity... But the problem what I see here is how to determine correct transformation matrix... Maybe if you could write down what commands would you use to get the result, then you could create those transformation matrices according to commands you used, but to get final one, remember that you must multiply them one by one in reversed order of actual order you would apply those commands...

Link to comment
Share on other sites

The drawing was just an example. I didn't even save it. Just a line from 0,0,0 to 3,4,5 in WCS. The red lines are drawn on xy plane and brought up to point 3,4,5. But for the sake of the example, consider the red lines a block. The commands I use is

 

(command-s "_.ucs" "_3p" pt1 pt2 pt3)

 

where pt1 and pt2 are the two ends of the white line and pt3 is the free end of the short red line coming perpendicular to the other red. Hope that's clear.

Link to comment
Share on other sites

According to your posted picture, try this :

 

(defun c:matrixtransblock ( / LM:Rotate3D-matrix unit m+m mxs vxs trp mxv mxm ptpos mat1 mat2 mat3 mat4 mat5 mat )

 (vl-load-com)

 ;;----------------=={ 3D Rotate by Matrix }==-----------------;;
 ;;  Author: Lee Mac, Copyright © 2011 - www.lee-mac.com       ;;
 ;;------------------------------------------------------------;;
 ;;  Arguments:                                                ;;
 ;;  p1,p2  - Two 3D points defining the axis of rotation      ;;
 ;;  ang    - Rotation Angle                                   ;;
 ;;------------------------------------------------------------;;

 (defun LM:Rotate3D-matrix ( p1 p2 ang / u ux uy uz m )

   (mapcar 'set '(ux uy uz) (setq u (unit (mapcar '- p2 p1))))

   (setq m
     (m+m
       (list
         (list (cos ang) 0. 0.)
         (list 0. (cos ang) 0.)
         (list 0. 0. (cos ang))
       )
       (m+m
         (mxs
           (list
             (list 0. (- uz) uy)
             (list uz 0. (- ux))
             (list (- uy) ux 0.)
           )
           (sin ang)
         )
         (mxs (mapcar '(lambda ( e ) (vxs u e)) u) (- 1. (cos ang)))
       )
     )
   )
   m
 )

 (defun unit ( v / d )
   (if (not (equal (setq d (distance '(0.0 0.0 0.0) v)) 0.0 1e-)
     (mapcar '(lambda ( x ) (/ x d)) v)
   )
 )

 ;; Matrix + Matrix  -  Lee Mac
 ;; Args: m,n - nxn matrices

 (defun m+m ( m n )
   (mapcar '(lambda ( r s ) (mapcar '+ r s)) m n)
 )

 ;; Matrix x Scalar  -  Lee Mac
 ;; Args: m - nxn matrix, n - real scalar

 (defun mxs ( m s )
   (mapcar '(lambda ( r ) (mapcar '(lambda ( n ) (* n s)) r)) m)
 )

 ;; Vector x Scalar  -  Lee Mac
 ;; Args: v - vector in R^n, s - real scalar

 (defun vxs ( v s )
   (mapcar '(lambda ( n ) (* n s)) v)
 )

 ;; Matrix Transpose  -  Doug Wilson
 ;; Args: m - nxn matrix

 (defun trp ( m )
   (apply 'mapcar (cons 'list m))
 )

 ;; Matrix x Vector  -  Vladimir Nesterovsky
 ;; Args: m - nxn matrix, v - vector in R^n

 (defun mxv ( m v )
   (mapcar '(lambda ( r ) (apply '+ (mapcar '* r v))) m)
 )

 ;; Matrix x Matrix  -  Vladimir Nesterovsky
 ;; Args: m,n - nxn matrices

 (defun mxm ( m n )
   ((lambda ( a ) (mapcar '(lambda ( r ) (mxv a r)) m)) (trp n))
 )

 (setq ptpos (getpoint "\nPick or specify new position point in 3D of blocks reference insertion point in WCS : "))
 (setq mat1 (list (list 1.0 0.0 0.0 0.0) (list 0.0 1.0 0.0 0.0) (list 0.0 0.0 1.0 0.0) (list 0.0 0.0 0.0 1.0))) ;_main matrix of block in 0,0,0 of WCS and aligned with X axis
 (setq mat2 (list (list (cos (angle '(0.0 0.0) ptpos)) (- (sin (angle '(0.0 0.0) ptpos))) 0.0 0.0) (list (sin (angle '(0.0 0.0) ptpos)) (cos (angle '(0.0 0.0) ptpos)) 0.0 0.0) (list 0.0 0.0 1.0 0.0) (list 0.0 0.0 0.0 1.0))) ;_rotation around Z of WCS
 (setq mat3 (append (mapcar '(lambda ( x ) (append x (list 0.0))) (LM:Rotate3D-matrix '(0.0 0.0 0.0) (polar '(0.0 0.0 0.0) (- (angle '(0.0 0.0) ptpos) (* 0.5 pi)) 1.0) (atan (caddr ptpos) (distance '(0.0 0.0) ptpos)))) (list (list 0.0 0.0 0.0 1.0))))
 (setq mat4 (append (mapcar '(lambda ( x ) (append x (list 0.0))) (LM:Rotate3D-matrix '(0.0 0.0 0.0) ptpos (* 0.5 pi))) (list (list 0.0 0.0 0.0 1.0))))
 (setq mat5 (list (list 1.0 0.0 0.0 (car ptpos)) (list 0.0 1.0 0.0 (cadr ptpos)) (list 0.0 0.0 1.0 (caddr ptpos)) (list 0.0 0.0 0.0 1.0))) ;_translation
 
 (setq mat (mxm mat5 (mxm mat4 (mxm mat3 (mxm mat2 mat1)))))
 (vla-transformby (vlax-ename->vla-object (car (entsel "\nPick block reference inserted in 0,0,0 of WCS and aligned with X axis - rotation 0.0"))) (vlax-tmatrix mat))
 (princ)
)

This one far simpler, based on my (c:transform), and I think you'll like it more as it's obvious how matrices actually represent various coordinate systems... This one is constructed using 2 subs (unit) and (v^v) - cross product, given the fact that main vector is known - vector (0,0,0 ptpos), or just ptpos... Other axis are determined by using arbitrary calculation of - firstly x axis - actual main vector (unit ptpos), then z axis - (unit (v^v '(0.0 0.0 1.0) x)) - normal vector to both x axis (main vector) and Z vector of WCS, and finally y axis - (unit (v^v x z)) - normal vector to both x axis (main vector) and z axis calculated in previous step (note that by switching axis x and z in calculation {(unit (v^v z x))} would produce that y axis orientation would be downwards - right hand 3 fingers rule must always be true - coordinate system must always be regular...

 

(defun c:matrixtransblock-new ( / unit v^v ptpos x y z mat )

 (vl-load-com)

 (defun unit ( v / d )
   (if (not (equal (setq d (distance '(0.0 0.0 0.0) v)) 0.0 1e-)
     (mapcar '(lambda ( x ) (/ x d)) v)
   )
 )

 (defun v^v ( u v )
   (list
     (- (* (cadr u) (caddr v)) (* (caddr u) (cadr v)))
     (- (* (caddr u) (car v)) (* (car u) (caddr v)))
     (- (* (car u) (cadr v)) (* (cadr u) (car v)))
   )
 )

 (setq ptpos (getpoint "\nPick or specify new position point in 3D of blocks reference insertion point in WCS : "))
 (setq x (unit ptpos))
 (setq z (unit (v^v '(0.0 0.0 1.0) x)))
 (setq y (unit (v^v x z)))
 (setq mat (list (list (car x) (car y) (car z) (car ptpos)) (list (cadr x) (cadr y) (cadr z) (cadr ptpos)) (list (caddr x) (caddr y) (caddr z) (caddr ptpos)) (list 0.0 0.0 0.0 1.0)))
 (vla-transformby (vlax-ename->vla-object (car (entsel "\nPick block reference inserted in 0,0,0 of WCS and aligned with X axis - rotation 0.0"))) (vlax-tmatrix mat))
 (princ)
)

HTH., M.R.

 

giphy.gif

Edited by marko_ribar
added additional code...
Link to comment
Share on other sites

Can you elaborate a bit on that please? Have a look at the pictures below. Let us assume the red lines are a block inserted where they touch the white line. The block needs to be oriented as shown in the pictures, aligned with the white line. The insertion point as well as the three angles the block needs to be rotated are all known. How could I accomplish that without the use of command calls to standard Autocad commans? The only way I found is to use Lee Mac's routine "rotateobject" (link in my post Nr. 6 above) but that requires to define an axis and I m having problem defining an axis perpendicular to the plane defined by the white line and perpendicular to the xy plane. The other two rotation are easy, one around z and one around the white line.

 

First point is that in your images you seem to be in WCS. I don't know how and when the lines are created. You originally said that you stopped using entmake because it wasn't "respecting" ucs, and another thing that I don't know is if the UCS have anything to do with the line. From the images I think it is correct to assume that the line represent the X axis for the insert, but from an UCS we could extract the Y axis as well. It is hard to provide a working solution (or anything) when we don't have the complete picture of what is needed, the steps taken. ie: yes you "have problem defining an axis perpendicular to the plane defined by the white line and perpendicular to the xy plane", because mathematically speaking you can't. An infinity of planes can be defined by one line from 0,0,0 to 3,4,5, (even if we say that that line corresponds to the X axis) but none that a Z axis would arrive perpendicular to the world xy plane (or any other). Parallel to Wxy plane, maybe, however you would have some exceptions in which a single orientation would be impossible to calculate, like with a line from 0,0,0 to 0,0,1. If you were to take that as the X axis of the block, for any given orientation of the block both the Y and Z axis would remain parallel to the Wxy plane.

 

You say the 3 angles the block needs to be rotated are known. You calculated them using coordinates? Long story short, you need 3 points. The line only gives you 2. You have to determine the 3rd one somehow. Once that is done, you can establish a coordinate system. The tip of the line is the origin, the extension of the line give the X axis. The 3rd point gives either the Y or Z axis. From there you can calculate the missing one. When you have the Z axis, you can calculate the OCS vector (inserts dxf 210). With the OCS vector, you can trans the insertion point from WCS to OCS (dxf 10), and calculate the rotation of the insert comparing the angle between x axis and the trans of the point 0,1,0 (dxf 50). Then you can feed that directly to your entmake/entmakex to get the desired result right away. OCS can be painfull, but hey! Food for thoughts. :)

 

Cheers.

Link to comment
Share on other sites

Thank you Marko. It seems to be working fine although I haven't implemented it in my code yet. One thing I do not understand how is the angle around the white line is defined. In other words, how is the block oriented around the axis '(0 0 0) and ptpos.

In my model the tip of the block is known (see image). How could that be fed as a variable to orient it as desired?

 

attachment.php?attachmentid=62390&cid=1&stc=1

2017-10-09 16_31_12-Autodesk AutoCAD 2017 - [Drawing1.dwg].jpg

Link to comment
Share on other sites

I would suggest that you always insert block in 0,0,0 with rotation 0.0... Then you only have to apply correct matrix that represent your new position/orientation coordinate system, and for finding that matrix I suggest that you look into my second example... You need to visualize relation of new block position/orientation with WCS main CS as you've inserted block just in WCS origin with angle 0.0, so basically your block has matrix ((1 0 0) (0 1 0) (0 0 1)) - ((Xaxisort Yaxisort Zaxisort)), but in transformation matrix that's transposed : ((XcoordXaxisort XcoordYaxisort XcoordZaxisort Xcoordorigin) (YcoordXaxisort YcoordYaxisort YcoordZaxisort Ycoordorigin) (ZcoordXaxisort ZcoordYaxisort ZcoordZaxisort Zcoordorigin) (0.0 0.0 0.0 1.0))... So if block is in WCS and has WCS matrix ((1 0 0 0) (0 1 0 0) (0 0 1 0) (0 0 0 1)), you need to find new matrix using scheme of transformation matrix 4x4 matrix according to my description of coordinates of orts and origin... When you find that matrix either using vector calculus like my second example or multiplication of matrices in reversed order than you would apply them like in my first example, you just have to apply it to that block with (vla-transformby (vlax-ename->vla-object block) (vlax-tmatrix matrix))... I hope it's clear enough, and for orientation of while line - it's just simple vector ort (unit (mapcar '- ptpos '(0.0 0.0 0.0))) and that's equal to just (unit ptpos), so you don't need to know angles of that white line - everything is defined by vector ort coordinates in 3d space...

Link to comment
Share on other sites

Understood, more or less in theory, although it s been quite many years since the last time I was dealing with vector theory. The issue here is that this matrix must be generated based on specific topology and orientation. Take a look at the picture below where you can see my intent. The 'tee' in the circle (right) will need to get oriented in accordance with the perpendicular line. But that would need to define the rotation angle around the main line (white line in my previous post).

 

attachment.php?attachmentid=62394&cid=1&stc=1

2017-10-09 19_49_03-Autodesk AutoCAD 2017 - [3D_Drawing1.dwg_2 - Read Only].jpg

Link to comment
Share on other sites

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...