Best way to cut holes in pipes?

Started by samdavo, March 21, 2014, 04:27:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prl

#30
Quote from: samdavo on March 24, 2014, 10:37:11 AM
just a bit MORE artwork :)

Hey you added some more artwork to your previous post. That's what I'm talking about. 

prl

#31
You may be thinking I've been hitting the weed again, but l needed a complex model.  Since we talked about the FSM a day or so ago, I'm thinking noodles.  So let's unwrap this.


If you want to view the animated FSM gif, click here.  https://dl.dropboxusercontent.com/u/81100792/FSM.gif   Note the gif is about 2mb and for some reason it doesn't animate when I attach it to the forum directly.  For you technical guys, that is 438 DesignCAD snapshots. 

Dean

Great job! prl. how'd ya do that?
You must be from the future :)
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

samdavo

#33
Yep prl, how'd you do that lol.
I mean, you must be using a macro to take those jpegs surely - 438 off, sheesh. 

As a complete irrelevancy lol, I recently toured parts of California (Yosemite etc) (!!)  (!!!!) - with a couple or relatives, one of whom (believe it or not) still uses Kodachrome 35mm celluloid. :)    And you post 438 photos as a throwaway line  -  My, how the world wags, - as Shakespeake might say ( sorry, feeling philosophical :) )

prl

#34
Dean, Sam.  Glad you like it.  My code for selecting things is improving.  As for making the movies, here is how you can do it.  Of course I do it with basiccad.  I added a general explanation in the Tips and Tricks section - http://forum.designcad.com/index.php?topic=5475

And I include a sample file (Sam's heat exchanger) for the sample gif attached.


prl

#35
As I am continuing to think through the unwrapping code, once the facets are all in one geometric plane (the first graphic)  I decided to convert the planes to vectors and thought the polygon addition command would clean up (get rid of) all the adjacent vertical facet lines.  Well interestingly, the polygon addition command doesn't work for that but if I define the planes as improper solids and use the solid add command, I get the second graphic.

Really does look like swiss cheese.

And what's interesting about the second graphic, that is one DesignCAD line entity with 641 points.

samdavo

#36
fantastic prl.
I tried to modify Dempsey's pushapart.  I believe I could simply have modified his subroutine that moves entities - but I thought that was being lazy, so I tried "significant changes". 
Unfortunately my BasicCAD skills were not up to the task.
I tried writing it as a draft within Outlook (which autosaves in the Drafts folder) - mistake #1.
   
The first problem I found (lol) was that the apostrophe ( ' ) - which is necessary to define "comment follows" - wasn't the correct font for some reason - and the macro hangs up on each and every one.  Despite me copying and pasting the style of Dempsey's aspostrophe ( ' )  with Ctrl+Shift+C and Ctrl+Shift+V   - The first time I've struck that one. (!)  I literally had to cut and paste his apostrophes, lol.   Geepers wept!   

Then I wanted to delete references to "silent mode" ( because I suspected that was optional).
Then I wanted to select planes only  (Sys (90) = ?? - unknown to me,  0 maybe?).
At that point I realised it was time to do something more productive in the sense of earning a living.

Gee but it would be good if there was a simple book on Basic CAD (!)   Or that I had written more BasicCad when I was more "into" programming  (I learnt with Fortran lol).

But well done - brilliant.

PS When you add solids to get the final shape, I assume you have to add one at a time to the accumulated total to that point?   I'm also surprised that the holes in your final shape don't have two lines through them, the way most holes cut in planes behave.  (2 cents, and seriously trivial comments). 

PS As I said previously, I was just gonna move the planes by (R*alpha) along the developed rollout direction, and then roll them back (individually and locally) by alpha - where alpha is the spoke direction.   If they didn't touch, I wasn't gonna worry -  the reason would be that it was more accurate because of the arc vs chord effect.  (0.12% whatever).     

PS Even the heat exchanger red pipe could be unrolled - firstly straightening the pipe ( large bend radius = outer radius made straight, like the hunchback of Notre Dame standing tall after a North Kor-ean massage), then a series or unrolled (now flexible) ribs each side of those planes -   All it would take would be a weekend of mathematical contortions, and a massive two-directional swearing match between me and BasicCad.   Trouble is I never design heat exchangers lol.   And if I did, it would be quicker to develop it from first principles than to use a macro :)

Speaking of heat exchangers, to write a macro like that, I would need to wait till mid winter - to minimise heat buildup in the room due to my (**^%^%$^*)'ing


prl

Quote from: samdavo on March 27, 2014, 10:31:06 AM
. . .  I assume you have to add one at a time

I did the solid addition with code.  Too lazy to do it one at a time.  Besides, if you had 120 facets instead of 36, you'd jump off the roof first before you took the time to add them all together.

Dr PR

prl,

That is pretty slick! Good thinking about using "Solid Add." "Improper" solids do have a use!

Do you have this all working in a macro now?

Phil
DesignCAD user since 1987

prl

Quote from: Dr PR on March 27, 2014, 11:51:59 AM
Do you have this all working in a macro now?

Pretty close.  There are some "rules" I'm trying to make less "unruly".

Here is another observation regarding the second graphic where I talk about the improper solid additions etc. and that the resulting improper solid is a single multipoint line.  If this where indeed a sheet of metal or fabric, all the cutting would occur in one smooth pass (from point 1 to point 641).  In the places where there are switchback paths (two lines on top of each other either going to or from an interior shape), the CNC machine would be programmed to "lift" the cutting head/laser.  Like the old pen/vinyl cutting plotters.

prl

Note to the basicCAD guys out there.  IMSI is tightening up some of the "rules" regarding improper solids.   I notice version 23 complains about some of the tricks I'm doing with basiccad which have worked up to version 22.

prl

#41
Sam, attached are two horror movies for you.  The solid entities get skinned.  Kind of like your canoe joke.

It explains the rules.  I will summarize.

- The final pipe with the various holes (any number) in it is made from proper solid subtractions. I tried it on your original model (I fixed the pipes to real solids with caps) with one intersection and my flying spaghetti monster version with many many holes.  Seems to work.
-  The final pipe to be unfolded is to stand vertically (Y is vertical) in 3d mode in the default workplane.
-  The final pipe must have a lower capping plane that is level.  A proper DesignCAD solid should be made that way by default.
-   In advance, you should know the number of facets the original pipe had.  Remember all DesignCAD cylinders are approximations of circles.
-  You should know in advance what the true circular diameter of the pipe is.  The program will scale the unfolded segments to the proper perimeter length of the true diameter.

When you run the code, you must reach up with your left hand up behind your head and hold your lower earlobe on your right ear.  :)

If after all this you must be pretty limber and if you're still game, send me a pm note and I will forward the experimental code to you.  If the planet blows up, I didn't do it.

Edit:  Some of you are probably wondering if this is another prank.  No, I'm back to normal today or as normal as usual.  This is about Sam's unfolding pipe challenge.

samdavo

Some aspire to greatness tomorrow - some inspire with greatness today.
well done.

prl


prl

#44
Okay, behind the scenes, Sam and I have been hashing out better code.  He's pushing the envelope as usual.  Of course my bent is to "see" what I can make of it.  In skinning the flying spaghetti monster pipe, I was curious what could be rendered.  Well more dreamy what-the-heck-am-I-looking-at album cover art. Colorado cookies stuff.