Author Topic: Flex Duct Creator  (Read 71627 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Flex Duct Creator
« Reply #60 on: March 30, 2010, 01:27:50 PM »
Very nice Alan :-)

Only suggestion that I would offer is to include the collar length in the GetNextPoint calculation, but then this may not be desirable - I leave it in your capable hands.

Lee

POCKETS

  • Guest
Re: Flex Duct Creator
« Reply #61 on: March 30, 2010, 01:44:07 PM »
Great program, CAB, as always. I go gently around the corners.
Pockets

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Flex Duct Creator
« Reply #62 on: March 30, 2010, 02:26:21 PM »
Thanks fellas.

Lee I'm not seeing how that would work as the collar is intended to show up past the end point.
This might cause the curve to start too soon.
Perhaps I'm not understanding you.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Flex Duct Creator
« Reply #63 on: March 30, 2010, 02:31:58 PM »
Apologies Alan, it's my lack of knowledge of ducting  :oops: for some reason, looking at the original GIF demo, I thought the collar protruded from the object. Thanks for the clarification. Nice work.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Flex Duct Creator
« Reply #64 on: March 30, 2010, 02:41:33 PM »
No apology necessary. I appreciate the interest. 8-)

BTW this is just a test version for those using it. I plan to incorporate the Flex2point into the MyFlex routine after more debugging. :-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

nivuahc

  • Guest
Re: Flex Duct Creator
« Reply #65 on: March 30, 2010, 02:52:02 PM »
How difficult would it be to tweak that code a bit so that it could also be used for flexible conduit?

It basically works when I set the diameter to, say, .75 except that the sleeves are very long and those small bends tend to throw a wrench into the works.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Flex Duct Creator
« Reply #66 on: March 30, 2010, 03:47:14 PM »
What does this do for you?
<edit: old code removed>
« Last Edit: April 03, 2010, 08:11:24 PM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

nivuahc

  • Guest
Re: Flex Duct Creator
« Reply #67 on: March 30, 2010, 04:12:40 PM »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Flex Duct Creator
« Reply #68 on: March 30, 2010, 04:48:52 PM »
Also try this to select the center line when already created:
Code: [Select]
(defun c:Flex() (MyFlex nil ; no pre selected centerline
                        '((duct:dia 0.75)(collar 0.75) (FlexLayer "0")(FlexColor 1)(GroupFlex t)))
                        ))
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Flex Duct Creator
« Reply #69 on: March 30, 2010, 05:02:07 PM »
Here is a quickie :-)
<edit: old code removed>
« Last Edit: April 03, 2010, 08:12:05 PM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

nivuahc

  • Guest
Re: Flex Duct Creator
« Reply #70 on: March 30, 2010, 05:46:43 PM »
That looks great, CAB. 1000 times better than my previous method.

Not knowing the ins-n-outs of flex duct, is there any reason why it extends past the endpoint of the spline? For the "flex2point" bit, it comes pretty close but I'll always trim the excess bits off leaving only what I need (indicated as "THIS" in the attached screen shot). For the "Flex" bit it extends those lines way, way, way past the endpoint. What's the reason for that, if I can ask?

Forgive my ignorance. :)

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Flex Duct Creator
« Reply #71 on: March 30, 2010, 05:53:49 PM »
That looks great, CAB. 1000 times better than my previous method.

Not knowing the ins-n-outs of flex duct, is there any reason why it extends past the endpoint of the spline? For the "flex2point" bit, it comes pretty close but I'll always trim the excess bits off leaving only what I need (indicated as "THIS" in the attached screen shot). For the "Flex" bit it extends those lines way, way, way past the endpoint. What's the reason for that, if I can ask?

Forgive my ignorance. :)

Look at the variable ' collar '.  You can set it to 0, and there will be no collar.  This is for the Flex routine.  Not sure about the ' flex2point ' one.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Flex Duct Creator
« Reply #72 on: March 30, 2010, 06:36:43 PM »
That looks great, CAB. 1000 times better than my previous method.

Not knowing the ins-n-outs of flex duct, is there any reason why it extends past the endpoint of the spline? For the "flex2point" bit, it comes pretty close but I'll always trim the excess bits off leaving only what I need (indicated as "THIS" in the attached screen shot). For the "Flex" bit it extends those lines way, way, way past the endpoint. What's the reason for that, if I can ask?

Forgive my ignorance. :)

That is a rounding error that was hidden when using larger sizes of duct. It is produced when I calc the ribs.
Wasn't an issue before but let me revisit the problem & see if I can find a solution. 8-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Flex Duct Creator
« Reply #73 on: March 30, 2010, 07:00:28 PM »
OK. I think I fixed it. Just had to make the wiggle room proportional to the diameter.
This is a test version.
<edit: old code removed>
« Last Edit: April 03, 2010, 08:12:27 PM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

nivuahc

  • Guest
Re: Flex Duct Creator
« Reply #74 on: March 31, 2010, 09:16:14 AM »
Code: [Select]
Command: flex

Duct diameter is set to 16.0
Select center line of flex duct.[Diameter]<16.0> Enter to quit.d

Specify duct diameter <16.0000>: .75

Duct diameter is set to 0.75
Select center line of flex duct.[Diameter]<0.75> Enter to quit.Backtrace:
[0.60] (VL-BT)
[1.56] (*ERROR* "bad argument type: 2D/3D point: nil")
[2.51] (_call-err-hook #<SUBR @0deae6e0 *ERROR*> "bad argument type: 2D/3D
point: nil")
[3.45] (sys-error "bad argument type: 2D/3D point: nil")
:ERROR-BREAK.40 nil
[4.37] (ax:curve-getParamAtPoint 2107327304 nil)
[5.31] (vlax-curve-getParamAtPoint <Entity name: 7d9b4348> nil)
[6.25] (MYFLEX nil nil)
[7.19] (C:FLEX)
[8.15] (#<SUBR @0deae974 -rts_top->)
[9.12] (#<SUBR @0de5535c veval-str-body> "(C:FLEX)" T #<FILE internal>)
:CALLBACK-ENTRY.6 (:CALLBACK-ENTRY)
:ARQ-SUBR-CALLBACK.3 (nil 0)