“Parametric” Disassemble – Tool

I have explained earlier the way for a “parametric” breaking up of a curve into components. I immediately thought, that I should create a template for that function, so as to avoid situation, in which formulas would have to be entered manually.

This time it ended up successful thanks to the functionality of Knowledge Pattern, that lets you create Datum curves in a loop. That gave a little tiny script :


which resulted in a contour, broken down into component curves :

I would call that method “half-parametric”, because it gives us Datum-type curves without the possibility to reach the Parent through Parents/Children analysis. Therefore, KP also generates a parameter assigned to each elementary curve with a Parent name… Well, better than nothing 🙂

 

And here’s the method in action :

Comments: (1)

Ryan P Binter September 4, 2019 o 7:15 pm

wow i thought this was impossible for so long. thank you. i made this more generic version if anyone finds it useful

Let i(Integer)
Let disassemble_list(List)
Let current_list_item(Feature)
Let type_string(String)
Let new_feature(Feature)
Let unknown_type(Boolean)

if Mode ==”Cell_Mode”
{
disassemble_list = disassemble(`INPUT\ELEMENT TO DISSASEMBLE`, true )
}
else
{
disassemble_list = disassemble(`INPUT\ELEMENT TO DISSASEMBLE`, false )
}

i =1

for i while i IsASortOf(“point”){type_string = “point”}
Else If current_list_item->IsASortOf(“circle”){type_string = “circle”}
Else If current_list_item->IsASortOf(“line”){type_string = “line”}
Else If current_list_item->IsASortOf(“curve”){type_string = “curve”}
Else If current_list_item->IsASortOf(“plane”){type_string = “plane”}
Else If current_list_item->IsASortOf(“surface”){type_string = “surface”}
Else If current_list_item->IsASortOf(“volume”){type_string = “volume”}
Else {unknown_type = true}

If unknown_type == false
{
set new_feature = CreateOrModifyDatum(type_string, DISASSEMBLE , `Relations\Knowledge Pattern.1\OUTPUT_LIST` , i)
new_feature = current_list_item
}

i = i+1
}


Recent Posts

I welcome everyone interested in CATIA . I will […]

Each Part in CATIA has its own UUID identification. It’s […]

The matter might seems trivial… it gets a bit […]

In the previous entry, I have described some of […]

And now an entry for Fetishistic B-Rep Dodgers 🙂 […]

Contact

catiatricks@gmail.com