Documentation for opCreateOutline

kenn_sebesta167
kenn_sebesta167 Member Posts: 121 ✭✭✭
I learned that there is a neat feature, `opCreateOutline`. However, I cannot find any documentation on it. It isn't listed in https://cad.onshape.com/FsDoc/library.html, and there are only a smattering of results on google. Am I looking in the wrong place, or is this functionality not documented?

The specific reason I am looking is because I want to know if opCreateOutline preserves the original `z` value (where `z` is orthogonal to the projection plane), but in general I would like to know if there are many undocumented FeatureScript operations, or if I'm simply always looking in the wrong spot.

Comments

  • _anton
    _anton Member, Onshape Employees Posts: 555 image
    edited January 2023
    That function is internal and thus undocumented - you can consult the comments in the standard library over yonder: https://cad.onshape.com/documents/12312312345abcabcabcdeff/w/a855e4161c814f2e9ab3698a/e/ddbe7e9c67ca4a44935354fa

    Being undocumented, it's a use-at-your-own-risk deal.
  • kenn_sebesta167
    kenn_sebesta167 Member Posts: 121 ✭✭✭
    _anton said:
    That function is internal and thus undocumented - you can consult the comments in the standard library over yonder: https://cad.onshape.com/documents/12312312345abcabcabcdeff/w/a855e4161c814f2e9ab3698a/e/ddbe7e9c67ca4a44935354fa

    Being undocumented, it's a use-at-your-own-risk deal.
    Hmmmm, there's not a whole lot going on there:

    /**
     * @internal
     * Generates surfaces representing the outlines of parts or surfaces projected onto a surface
     * @param id : @autocomplete `id + "createOutline1"`
     * @param definition {{
     *      @field tools {Query} : The tool parts or surfaces
     *      @field target {Query} : The face whose surface will be used to create outline.
     *              Currently only planes, cylinders or extruded surfaces are supported.
     *      @field offsetFaces {Query} : @optional Faces in tools which are offsets of target face. If `offsetFaces` are
     *              provided, the operation will fail if `target` is non-planar and there are not exactly two offset faces per tool.
     * }}
     */
    export const opCreateOutline = function(context is Context, id is Id, definition is map)
    {
        return @opCreateOutline(context, id, definition);
    };

    It would be nice if it would define the outputs as well as the inputs. Well, thanks for the tip anyway!