G2 Fillet API Call?

G2 Fillet API Call?

dylanTEV9W
Advocate Advocate
495 Views
2 Replies
Message 1 of 3

G2 Fillet API Call?

dylanTEV9W
Advocate
Advocate

Hello everyone, 

I'm wondering if there's a way to create a G2 fillet via an API call? I haven't figured it out yet myself an I'm hoping someone on here knows how. 

0 Likes
Accepted solutions (1)
496 Views
2 Replies
Replies (2)
Message 2 of 3

HideoYamada
Advisor
Advisor

Hello

 

It seems people include me couldn't find the solution, thus there would be no way.

Why don't you post on Inventor Ideas?

 

=====

Freeradical

 Hideo Yamada

 

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp
0 Likes
Message 3 of 3

dylanTEV9W
Advocate
Advocate
Accepted solution

Then you'll be happy to know I stumbled upon a solution early this morning. 

 

Here is my solution it works just fine although it seems rather strange that this is how a fillets continuity has to be set:

 

private void CreateG2Fillet(PartDocument part_doc, TransientObjects trans_objects)

{

 

FilletFeatures fillets = device_part_doc.ComponentDefinition.Features.FilletFeatures; //Get the fillet features object

 

FilletDefinition = fillet_def = fillets.CreateFilletDefinition(); //Create a new fillet definition

 

EdgeCollection fillet_edges = trans_objects.CreateEdgeCollection(); 

 

fillet_edges = RetrieveEdges(); //Get the edges to fillet through whatever method you prefer / need

 

//Create a Constant radius edge set from the Fillet definition

 

FilletConstantRadiusEdgeSet fillet_edge_set = fillet_def.AddConstantRadiusEdgeSet(fillet_edges, fillet_radius);

 

//Set the continnuity type to curvature continuity using the Continuity Type enumerator. 

 

fillet_edge_set.ContinuityType = ContinuityTypeEnum.kCurvatureContinuity; 

 

fillets.Add(fillet_def); //Create a new fillet using the fillet definition we just created

 

//Update the part doc to process adding the fillet, this call could also be made from the block of code that calls 

//this function.

 

part_doc.Update(); 

 

}

 

0 Likes