News:

Be sure your post is relevant to the current discussion.  Create a new topic within the appropriate board if you are unsure.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Calculate cut length

Started by PCSteel, June 14, 2023, 09:18:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PCSteel

The attached file is an example of the type of file I would like to be able to do the following with.

I would like to be able to calculate the length of the cuts only on each end of the pipe for the purpose of costing. I know the square end is easy maths but often both ends will be profiled.

I can use unfold face, explode the result, join polyline and get the length from 'selection Info'. What I would like to know is if there is an easier way or if the method I have described can be automated in any way. I'm willing to learn scripting or whatever I need to get the result if someone can point me in the right direction to start.

TIA
John
John@PC Steel

Core i7-6700 CPU
16GB Ram
64 Bit
Windows 10 Home
TurboCAD 2015 Pro Platinum 64 bit Build 90.0
TurboCAD 2023 Platinum 64 bit Build 63.3

nikkipollard

If you wanted to use a script to extract the length of all the pipes in the drawing you would need to have the part tree active, so that each pipe has a history.
You would also need to give the pipe (before the Boolean operations) a name - so that the script can easily find the pipes.
If you are disciplined enough to remember to do that then it is easy to write a script to read your drawing.

I have experimented with this, I can share an example later today.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

sauerkraut2018

#2
Hello,

I used the "Extract entity" command, it's quick and easy. See picture attached.
#-----
Very low knowledge of English - I ask for indulgence - Thanks
Currently installed
TurboCAD Professional 32-bit V.17.2.77.1
TurboCAD 2016 ProPlatinum 64-bit V23.2-61.2 engl.
TurboCAD 2021 Platinum 64-bit V28.0 B.82.3 de.
#-----

PCSteel

#3
Thanks Nikki, I'd be interested in that for sure.
And thanks also SK2018, unfortunately that's not exactly what I need because on the profiled end, it's only reporting the circumstance of the section it points to and not the complete profile. I will look at 'Extract Entity' however because I 'm not familiar with that tool.
My apologies SK, that IS exactly what I need but I can't find the "Extract entity" command. Is it available in TC 2015 PP?
John@PC Steel

Core i7-6700 CPU
16GB Ram
64 Bit
Windows 10 Home
TurboCAD 2015 Pro Platinum 64 bit Build 90.0
TurboCAD 2023 Platinum 64 bit Build 63.3

nikkipollard

#4
I think extract entity came out with the 2016 version.
Looking at Sauerkrauts picture, I misunderstood your original request.
Writing a script to do that would be quite complex.

Sauerkraut did you add the length of each segment after using extract entity?
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

murray dickinson

If the object's orthogonal, ie it's notional axis is parallel to X, Y or Z, the cut length is that measurement in the Inspector Bar.  The bounding box extent is the cut length.  If it isn't orthogonal, in properties, set Selector3D properties to entity CS, the bounding box then reports the object's minimum envelope, cut length implies an axis, X, Y or Z in entity CS will involve the value you're after. I know nothing about automation.

PCSteel

I'm sorry, I didn't explain it well. The length I'm after is the length of each cut at the ends, as shown in blue here.
You cannot view this attachment.
 
Sauerkrauts solution is exactly what I need, so it looks like I need to upgrade if I want to go down this road.
John@PC Steel

Core i7-6700 CPU
16GB Ram
64 Bit
Windows 10 Home
TurboCAD 2015 Pro Platinum 64 bit Build 90.0
TurboCAD 2023 Platinum 64 bit Build 63.3

sauerkraut2018

Hello,

according to my research, the "Extract Entity" command does not (yet) exist in version TC2015.  :'(

#-----
Very low knowledge of English - I ask for indulgence - Thanks
Currently installed
TurboCAD Professional 32-bit V.17.2.77.1
TurboCAD 2016 ProPlatinum 64-bit V23.2-61.2 engl.
TurboCAD 2021 Platinum 64-bit V28.0 B.82.3 de.
#-----

PCSteel

Yes, that's true unfortunately.  :( , but thanks for your help.
John@PC Steel

Core i7-6700 CPU
16GB Ram
64 Bit
Windows 10 Home
TurboCAD 2015 Pro Platinum 64 bit Build 90.0
TurboCAD 2023 Platinum 64 bit Build 63.3

murray dickinson

Sauerkraut, when I used extract entity on John's object, it isolated the individual edges, it didn't supply the total perimeter.  Did you total those yourself, or have you found some way to make TC do it? 
I found that I could get the same result in 2015 using surface intersection to extract those curves.  It doesn't return the total perimeter length, of course, only the individual lengths of the arcs and splines.

PCSteel

Quote from: murray dickinson on June 16, 2023, 08:37:53 PM... I could get the same result in 2015 using surface intersection to extract those curves.

Hey Murray, can you explain this a little futher. I have't been able to work this out.
What I have found is that after doing it a few times, the unfold face, explode the result, join polyline and get the length from 'selection Info' route isn't too bad to do.
John@PC Steel

Core i7-6700 CPU
16GB Ram
64 Bit
Windows 10 Home
TurboCAD 2015 Pro Platinum 64 bit Build 90.0
TurboCAD 2023 Platinum 64 bit Build 63.3

sauerkraut2018

Hello,

QuoteDid you totally those yourself, or have you found some way to make TC do it?

I used "extract entity" and then the command "Join Polyline" with the option "2D/3D" and "Auto joining" (below).
The values are then in the selection palette under Metrics.
To copy the values, I click on "Copy" at the top. it opens
my browser with the copyable data.

#-----
Very low knowledge of English - I ask for indulgence - Thanks
Currently installed
TurboCAD Professional 32-bit V.17.2.77.1
TurboCAD 2016 ProPlatinum 64-bit V23.2-61.2 engl.
TurboCAD 2021 Platinum 64-bit V28.0 B.82.3 de.
#-----

murray dickinson

John, I recorded a short video at https://youtu.be/tsotbGKehTE using your example, there's a description below the video.  I posted it there because even that short clip is 47Mb and it's convenient...It generates the same result as extract entity, so 3D polyline autojoin is how Sauerkraut's done it too. 

PCSteel

Thanks Murray, I'll have a look.
John@PC Steel

Core i7-6700 CPU
16GB Ram
64 Bit
Windows 10 Home
TurboCAD 2015 Pro Platinum 64 bit Build 90.0
TurboCAD 2023 Platinum 64 bit Build 63.3

PCSteel

Thankyou Murray, I've learnt something from you again. That works just as well as the unfold method and possibly a little faster, so thanks again for the trouble you have gone to.
I don't s'pose you want a mature age apprentice, do you?  ;D
John@PC Steel

Core i7-6700 CPU
16GB Ram
64 Bit
Windows 10 Home
TurboCAD 2015 Pro Platinum 64 bit Build 90.0
TurboCAD 2023 Platinum 64 bit Build 63.3

Alvin Gregorio

#15
Quote from: murray dickinson on June 17, 2023, 12:01:02 AMJohn, I recorded a short video at https://youtu.be/tsotbGKehTE using your example, there's a description below the video.  I posted it there because even that short clip is 47Mb and it's convenient...It generates the same result as extract entity, so 3D polyline autojoin is how Sauerkraut's done it too. 
A little further education requested Murray.

In my TC 2022_Platinum, I'm not able to replicate what you did.
At the 34--36 seconds mark, where after you do the 3D_Intersect1, the result is the entity that has the black edges, I don't get that result.  I get almost the entire object, as the original whole object and the copy of it are what is intersecting.

You wrote in the video description "This is how to use surface intersection... ".  What is "surface intersection"?; is that what I am not knowing?

I'm missing something; don't know what.

1(is that the correct Tool I am using?)


I discovered what I was doing wrong.  I was using the wrong Intersection Tool.
I was using 3D_Boolean_Intersect; need to use Insert/Intersection.

I have almost never used that Tool, in my 23 years of TurboCADing.
I think I've played around with a few times.
Thanks for the reminder of this Tool Murray.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Alvin Gregorio

The Intersect and Intersection Tools icons/buttons look almost identical:

You cannot view this attachment.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Alvin Gregorio

A variation on Murray's method:
Copy_in_Place also works as the first step; instead of Generic Transformation.  Either via the Copy_in_Place Tool; or Selection Tool, Make Copy active, Tab+Enter.

After activating the Insertion Tool, but before doing the operation, set its Properties to be on a specific previously-created Layer, and perhaps set to a unique Color, makes it easy to Clear the extraneous Intersection resultant entities.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

PCSteel

Quote from: Alvin Gregorio on June 17, 2023, 05:04:50 AMThe Intersect and Intersection Tools icons/buttons look almost identical:

Yeah, that had me tricked for a while too Alvin.
John@PC Steel

Core i7-6700 CPU
16GB Ram
64 Bit
Windows 10 Home
TurboCAD 2015 Pro Platinum 64 bit Build 90.0
TurboCAD 2023 Platinum 64 bit Build 63.3

murray dickinson

Other transform and copy tools will do it too, I use Generic trans to supplant most assembly, copy and transformation tools without having to search for their buttons, because it's invoked from selection with right-click + G and finished with right-click + F, without customisation.