Trying to query for edge betwen a loft and an extrude

In featurescape I am trying to add a fillet on an edge between a rocket in and body (loft and extrude).

I've manually put in in the fillet, but I would like to do it in featurescript ("TODO" in the feature script).

I need form a query to find the edge. I've tried a bunch of things, but no avail.  Something like ...

 var filletedge = qNthElement(qEdgeAdjacent(   qCreatedBy(id + "loft1", EntityType.FACE) , EntityType.EDGE),0);






Best Answer

  • lana
    lana Onshape Employees Posts: 782 image
    Answer ✓
    @curtis_heisey
    I'd recommend using opFillet for better performance. 
    The edge highlighted by
     debug(context, filletedge);
    is the bottom edge of loft. You want to fillet the edge created by Boolean merge post-operation in circularPattern.
    Please see how I handled it here.

Answers

  • MBartlett21
    MBartlett21 Member, OS Professional, Developers Posts: 2,064 ✭✭✭✭✭
  • curtis_heisey
    curtis_heisey Member Posts: 3 ✭
    edited December 2018
    So I can now pick out the edge via featurescript   debug(context, qNthElement(qCreatedBy(id + "loft1", EntityType.EDGE), 0));

    When I try to do a loft via featurescript, I get an error (I picked this snipped out from doing the feature manually then looking at the code):
         var filletedge = qNthElement(qCreatedBy(id + "loft1", EntityType.EDGE), 0);
          debug(context, filletedge);


            var fillet_radius = 0.2*inch;          
            var rho=0.5;
            var magnitude = 0.5;
            opFillet(context, id + "fillet_1", { "entities" : filletedge  ,
            "tangentPropagation" : true,
            "crossSection" : FilletCrossSection.CIRCULAR,
            "radius" : fillet_radius,
            "rho" : rho,
            "magnitude" :  magnitude,
            "defaultsChanged" : false,
            "isVariable" : false,
            "vertexSettings" : [],
            "smoothTransition" : false });


    @opFillet: FILLET_FAILED

    267:12   
    onshape/std/geomOperations.fs (opFillet)


    258:9   
    Rocket Fin Can generator (const FC_Generator)

    54:17   
    onshape/std/feature.fs (defineFeature)

       
    Test FC

       
    Test FC

  • lana
    lana Onshape Employees Posts: 782 image
    Answer ✓
    @curtis_heisey
    I'd recommend using opFillet for better performance. 
    The edge highlighted by
     debug(context, filletedge);
    is the bottom edge of loft. You want to fillet the edge created by Boolean merge post-operation in circularPattern.
    Please see how I handled it here.