UNPKG

gs-modelling

Version:

A set of 3D modelling functions for gs-JSON.

2,213 lines (2,212 loc) 445 kB
{ "id": 0, "name": "gs-modelling", "kind": 0, "flags": {}, "children": [ { "id": 1, "name": "\"attrib\"", "kind": 1, "kindString": "External module", "flags": { "isExported": true }, "originalName": "D:/Dropbox/Files/Software/GitHub/gs-modelling/src/typescript/attrib.ts", "children": [ { "id": 16, "name": "Create", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 17, "name": "Create", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Adds an attribute to a model", "returns": "New attribute\n" }, "parameters": [ { "id": 18, "name": "model", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Model to add to" }, "type": { "type": "reference", "name": "IModel" } }, { "id": 19, "name": "name", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Name of new attribute" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 20, "name": "geom_type", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "shortText": "Data type for attribute values. (number, string, boolean, number[], string[], boolean[])" }, "type": { "type": "reference", "name": "EGeomType" } }, { "id": 21, "name": "data_type", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", "name": "EDataType" } } ], "type": { "type": "reference", "name": "IAttrib" } } ], "sources": [ { "fileName": "attrib.ts", "line": 66, "character": 22 } ] }, { "id": 2, "name": "Get", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 3, "name": "Get", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Gets attribute that apply for a specified geometry type from a model", "returns": "List of attributes\n" }, "parameters": [ { "id": 4, "name": "model", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Model to get attribute from" }, "type": { "type": "reference", "name": "IModel" } }, { "id": 5, "name": "name", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "The attribute name" }, "type": { "type": "intrinsic", "name": "string" } }, { "id": 6, "name": "geom_type", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Type of geometry to get attribute from" }, "type": { "type": "reference", "name": "EGeomType" } } ], "type": { "type": "reference", "name": "IAttrib" } } ], "sources": [ { "fileName": "attrib.ts", "line": 18, "character": 19 } ] }, { "id": 22, "name": "del", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 23, "name": "del", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Deletes an attribute", "returns": "True if successful\n" }, "parameters": [ { "id": 24, "name": "attrib", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Attribute to delete" }, "type": { "type": "reference", "name": "IAttrib" } } ], "type": { "type": "intrinsic", "name": "boolean" } } ], "sources": [ { "fileName": "attrib.ts", "line": 85, "character": 19 } ] }, { "id": 7, "name": "getAll", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 8, "name": "getAll", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Gets all entity attribs", "returns": "List of attributes\n" }, "parameters": [ { "id": 9, "name": "model", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Model to get attribute from" }, "type": { "type": "reference", "name": "IModel" } } ], "type": { "type": "array", "elementType": { "type": "reference", "name": "IAttrib" } } } ], "sources": [ { "fileName": "attrib.ts", "line": 32, "character": 22 } ] }, { "id": 10, "name": "getAllEnts", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 11, "name": "getAllEnts", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Gets all entity attribs", "returns": "List of attributes\n" }, "parameters": [ { "id": 12, "name": "model", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Model to get attribute from" }, "type": { "type": "reference", "name": "IModel" } } ], "type": { "type": "array", "elementType": { "type": "reference", "name": "IAttrib" } } } ], "sources": [ { "fileName": "attrib.ts", "line": 41, "character": 26 } ] }, { "id": 13, "name": "getAllTopos", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 14, "name": "getAllTopos", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Gets all topo attribs", "returns": "List of attributes\n" }, "parameters": [ { "id": 15, "name": "model", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Model to get attribute from" }, "type": { "type": "reference", "name": "IModel" } } ], "type": { "type": "array", "elementType": { "type": "reference", "name": "IAttrib" } } } ], "sources": [ { "fileName": "attrib.ts", "line": 50, "character": 27 } ] }, { "id": 32, "name": "getEntValue", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 33, "name": "getEntValue", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Gets the value of a ent attribute for a specified geometry", "returns": "Value of attribute\n" }, "parameters": [ { "id": 34, "name": "attrib", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Attribute" }, "type": { "type": "reference", "name": "IEntAttrib" } }, { "id": 35, "name": "ent", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Geometry" }, "type": { "type": "union", "types": [ { "type": "reference", "name": "IPoint" }, { "type": "reference", "name": "IObj" } ] } } ], "type": { "type": "intrinsic", "name": "any" } } ], "sources": [ { "fileName": "attrib.ts", "line": 116, "character": 27 } ] }, { "id": 25, "name": "getName", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 26, "name": "getName", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Gets the name of an attribute", "returns": "Name of specified attribute\n" }, "parameters": [ { "id": 27, "name": "attrib", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Attribute to get name of" }, "type": { "type": "reference", "name": "IAttrib" } } ], "type": { "type": "intrinsic", "name": "string" } } ], "sources": [ { "fileName": "attrib.ts", "line": 94, "character": 23 } ] }, { "id": 41, "name": "getTopoValue", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 42, "name": "getTopoValue", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Gets the value of a topo attribute for a specified geometry", "returns": "Value of attribute\n" }, "parameters": [ { "id": 43, "name": "attrib", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Attribute" }, "type": { "type": "reference", "name": "ITopoAttrib" } }, { "id": 44, "name": "topo", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Geometry" }, "type": { "type": "reference", "name": "ITopo" } } ], "type": { "type": "intrinsic", "name": "any" } } ], "sources": [ { "fileName": "attrib.ts", "line": 137, "character": 28 } ] }, { "id": 36, "name": "setEntValue", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 37, "name": "setEntValue", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Sets the value of a ent attribute for a specified geometry", "returns": "Old value of specified attribute\n" }, "parameters": [ { "id": 38, "name": "attrib", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Attribute" }, "type": { "type": "reference", "name": "IEntAttrib" } }, { "id": 39, "name": "ent", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Geometry" }, "type": { "type": "union", "types": [ { "type": "reference", "name": "IPoint" }, { "type": "reference", "name": "IObj" } ] } }, { "id": 40, "name": "value", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "New value of attribute" }, "type": { "type": "intrinsic", "name": "any" } } ], "type": { "type": "intrinsic", "name": "any" } } ], "sources": [ { "fileName": "attrib.ts", "line": 127, "character": 27 } ] }, { "id": 28, "name": "setName", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 29, "name": "setName", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Sets the name of an attribute", "returns": "Old name of specified attribute\n" }, "parameters": [ { "id": 30, "name": "attrib", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Attribute to set name" }, "type": { "type": "reference", "name": "IAttrib" } }, { "id": 31, "name": "name", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "New name of attribute" }, "type": { "type": "intrinsic", "name": "string" } } ], "type": { "type": "intrinsic", "name": "string" } } ], "sources": [ { "fileName": "attrib.ts", "line": 104, "character": 23 } ] }, { "id": 45, "name": "setTopoValue", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 46, "name": "setTopoValue", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Sets the value of a topo attribute for a specified geometry", "returns": "Old value of specified attribute\n" }, "parameters": [ { "id": 47, "name": "attrib", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Attribute" }, "type": { "type": "reference", "name": "ITopoAttrib" } }, { "id": 48, "name": "topo", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Geometry" }, "type": { "type": "reference", "name": "ITopo" } }, { "id": 49, "name": "value", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "New value of attribute" }, "type": { "type": "intrinsic", "name": "any" } } ], "type": { "type": "intrinsic", "name": "any" } } ], "sources": [ { "fileName": "attrib.ts", "line": 148, "character": 28 } ] } ], "groups": [ { "title": "Functions", "kind": 64, "children": [ 16, 2, 22, 7, 10, 13, 32, 25, 41, 36, 28, 45 ] } ], "sources": [ { "fileName": "attrib.ts", "line": 1, "character": 0 } ] }, { "id": 270, "name": "\"calc\"", "kind": 1, "kindString": "External module", "flags": { "isExported": true }, "originalName": "D:/Dropbox/Files/Software/GitHub/gs-modelling/src/typescript/calc.ts", "comment": { "shortText": "Function for doing various geometric calculations." }, "children": [ { "id": 271, "name": "distBetweenPoints", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 272, "name": "distBetweenPoints", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Calculate the distance between two points.", "returns": "The distance.\n" }, "parameters": [ { "id": 273, "name": "point1", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "The first point." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 274, "name": "point2", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "The second point." }, "type": { "type": "reference", "name": "IPoint" } } ], "type": { "type": "intrinsic", "name": "number" } } ], "sources": [ { "fileName": "calc.ts", "line": 25, "character": 33 } ] }, { "id": 275, "name": "vectorBetweenPoints", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 276, "name": "vectorBetweenPoints", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Creates a vector (a list of 3 numbers) from point 1 to point 2.", "returns": "A list of three numbers.\n" }, "parameters": [ { "id": 277, "name": "point1", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "The first point." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 278, "name": "point2", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "The second point." }, "type": { "type": "reference", "name": "IPoint" } } ], "type": { "type": "reference", "name": "gs.XYZ" } } ], "sources": [ { "fileName": "calc.ts", "line": 39, "character": 35 } ] } ], "groups": [ { "title": "Functions", "kind": 64, "children": [ 271, 275 ] } ], "sources": [ { "fileName": "calc.ts", "line": 1, "character": 0 } ] }, { "id": 342, "name": "\"circle\"", "kind": 1, "kindString": "External module", "flags": { "isExported": true }, "originalName": "D:/Dropbox/Files/Software/GitHub/gs-modelling/src/typescript/circle.ts", "comment": { "shortText": "Functions for working with circles.\nCircles are geometric objects definded by a single vertex and a set of parameters.\nThe circle object can be either a closed circle or an open arc." }, "children": [ { "id": 347, "name": "Copy", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 348, "name": "Copy", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Create a copy of a circle object.", "returns": "Circle object.\n" }, "parameters": [ { "id": 349, "name": "circle", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "The circle object to copy." }, "type": { "type": "reference", "name": "ICircle" } }, { "id": 350, "name": "copy_attribs", "kind": 32768, "kindString": "Parameter", "flags": { "isOptional": true }, "comment": { "text": "If true, attributes are copied to the new circle." }, "type": { "type": "intrinsic", "name": "boolean" } } ], "type": { "type": "reference", "name": "ICircle" } } ], "sources": [ { "fileName": "circle.ts", "line": 49, "character": 20 } ] }, { "id": 351, "name": "CopyToModel", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 352, "name": "CopyToModel", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Copies a circle from one model into another model.", "returns": "The copied circle object in the model.\n" }, "parameters": [ { "id": 353, "name": "model", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "The model to copy to." }, "type": { "type": "reference", "name": "IModel" } }, { "id": 354, "name": "circle", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "The circle object to copy." }, "type": { "type": "reference", "name": "ICircle" } } ], "type": { "type": "reference", "name": "ICircle" } } ], "sources": [ { "fileName": "circle.ts", "line": 63, "character": 27 } ] }, { "id": 387, "name": "From3Points", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 388, "name": "From3Points", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Create a circle that passes through three points.\nIf is_closed is false, an arc is created. Otherwise, an arc is created.", "returns": "New circle object.\n" }, "parameters": [ { "id": 389, "name": "point1", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Point object, on the circle." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 390, "name": "point2", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Point object, on the circle." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 391, "name": "point3", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Point object, on the circle." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 392, "name": "is_closed", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "If false, an arc is generated that starts at point1 and end at point3, passing through point 2." }, "type": { "type": "intrinsic", "name": "boolean" } } ], "type": { "type": "reference", "name": "ICircle" } } ], "sources": [ { "fileName": "circle.ts", "line": 212, "character": 27 } ] }, { "id": 361, "name": "FromOrigin2Points", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 362, "name": "FromOrigin2Points", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Create a circle at the origin point parallel to a plane that passes through two other points.\nThe radius will be equal to the distance from the origin to point1.\nIf angle is undefined, a circle is created. Otherwise, an arc is created, with the specified angles\nstarting at point1 in an anti-clockwise direction.", "returns": "Circle object.\n" }, "parameters": [ { "id": 363, "name": "origin", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Point object, the center of the circle." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 364, "name": "point1", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Point object, on the circle perimeter, and defining teh x-axis of the plane." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 365, "name": "point2", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Point object, on the plane." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 366, "name": "angles", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Two angles between 0 and 360, or null for a circle." }, "type": { "type": "tuple", "elements": [ { "type": "intrinsic", "name": "number" }, { "type": "intrinsic", "name": "number" } ] } } ], "type": { "type": "reference", "name": "ICircle" } } ], "sources": [ { "fileName": "circle.ts", "line": 109, "character": 33 } ] }, { "id": 355, "name": "FromOrigin2Vectors", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 356, "name": "FromOrigin2Vectors", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Creates a circle from an origin point parallel to a plane defined by the two X and Y vectors.\nThe radius will be equal to the length of the X vector.\nIf no angle is defined, a circle is created. Otherwise, an arc is created, with the specified angles\nstarting at the x-axis in an anti-clockwise direction.", "returns": "Circle object.\n" }, "parameters": [ { "id": 357, "name": "origin", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Point object, the center of the circle." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 358, "name": "vec_x", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "X-axis of the circle plane. (The length of the vecor described the radius.)" }, "type": { "type": "reference", "name": "gs.XYZ" } }, { "id": 359, "name": "vec", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Vector on the circle plane." }, "type": { "type": "reference", "name": "gs.XYZ" } }, { "id": 360, "name": "angles", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Two angles between 0 and 360, or null for a circle." }, "type": { "type": "tuple", "elements": [ { "type": "intrinsic", "name": "number" }, { "type": "intrinsic", "name": "number" } ] } } ], "type": { "type": "reference", "name": "ICircle" } } ], "sources": [ { "fileName": "circle.ts", "line": 88, "character": 34 } ] }, { "id": 367, "name": "FromOriginXY", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 368, "name": "FromOriginXY", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Create a circle at the origin point parallel to the WCS XY plane, with the specified radius.\nIf angle is undefined, a circle is created. Otherwise, an arc is created, with the specified angles\nstarting at point1 in an anti-clockwise direction.", "returns": "Circle object.\n" }, "parameters": [ { "id": 369, "name": "origin", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Point object, the center of the circle." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 370, "name": "radius", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Radius of circle." }, "type": { "type": "intrinsic", "name": "number" } }, { "id": 371, "name": "angles", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Two angles between 0 and 360, or null for a circle." }, "type": { "type": "tuple", "elements": [ { "type": "intrinsic", "name": "number" }, { "type": "intrinsic", "name": "number" } ] } } ], "type": { "type": "reference", "name": "ICircle" } } ], "sources": [ { "fileName": "circle.ts", "line": 131, "character": 28 } ] }, { "id": 372, "name": "FromOriginYZ", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 373, "name": "FromOriginYZ", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Create a circle at the origin point parallel to the WCS YZ plane, with the specified radius.\nIf angle is undefined, a circle is created. Otherwise, an arc is created, with the specified angles\nstarting at point1 in an anti-clockwise direction.", "returns": "Circle object.\n" }, "parameters": [ { "id": 374, "name": "origin", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Point object, the center of the circle." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 375, "name": "radius", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Radius of circle." }, "type": { "type": "intrinsic", "name": "number" } }, { "id": 376, "name": "angles", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Two angles between 0 and 360, or null for a circle." }, "type": { "type": "tuple", "elements": [ { "type": "intrinsic", "name": "number" }, { "type": "intrinsic", "name": "number" } ] } } ], "type": { "type": "reference", "name": "ICircle" } } ], "sources": [ { "fileName": "circle.ts", "line": 151, "character": 28 } ] }, { "id": 377, "name": "FromOriginZX", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 378, "name": "FromOriginZX", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Create a circle at the origin point parallel to the WCS ZX plane, with the specified radius.\nIf angle is undefined, a circle is created. Otherwise, an arc is created, with the specified angles\nstarting at point1 in an anti-clockwise direction.", "returns": "New circle (or arc).\n" }, "parameters": [ { "id": 379, "name": "origin", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Point object, the center of the circle." }, "type": { "type": "reference", "name": "IPoint" } }, { "id": 380, "name": "radius", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Radius of circle." }, "type": { "type": "intrinsic", "name": "number" } }, { "id": 381, "name": "angles", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Two angles between 0 and 360, or null for a circle." }, "type": { "type": "tuple", "elements": [ { "type": "intrinsic", "name": "number" }, { "type": "intrinsic", "name": "number" } ] } } ], "type": { "type": "reference", "name": "ICircle" } } ], "sources": [ { "fileName": "circle.ts", "line": 171, "character": 28 } ] }, { "id": 382, "name": "FromPlane", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 383, "name": "FromPlane", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Create a circle from a plane, with the specified radius.\nIf angle is undefined, a circle is created. Otherwise, an arc is created, with the specified angles\nstarting at point1 in an anti-clockwise direction.", "returns": "New circle object.\n" }, "parameters": [ { "id": 384, "name": "plane", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Plane object to construct circle on." }, "type": { "type": "reference", "name": "IPlane" } }, { "id": 385, "name": "radius", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Radius of circle." }, "type": { "type": "intrinsic", "name": "number" } }, { "id": 386, "name": "angles", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Two angles between 0 and 360, or null for a circle." }, "type": { "type": "tuple", "elements": [ { "type": "intrinsic", "name": "number" }, { "type": "intrinsic", "name": "number" } ] } } ], "type": { "type": "reference", "name": "ICircle" } } ], "sources": [ { "fileName": "circle.ts", "line": 191, "character": 25 } ] }, { "id": 343, "name": "Get", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 344, "name": "Get", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Gets a circle from the model based on an ID number.\nIn the viewer, the object label can display (it starts with 'o'), which contains the ID.\nFor example, if the label is \"o123\", then the ID is the number 123.", "returns": "Circle object.\n" }, "parameters": [ { "id": 345, "name": "model", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Model to get circle object from." }, "type": { "type": "reference", "name": "IModel" } }, { "id": 346, "name": "id", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "ID number of circle object." }, "type": { "type": "intrinsic", "name": "number" } } ], "type": { "type": "reference", "name": "ICircle" } } ], "sources": [ { "fileName": "circle.ts", "line": 35, "character": 19 } ] }, { "id": 412, "name": "calcLength", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 413, "name": "calcLength", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Returns the perimeter length of a circle.\nIf the circle is an open arc, then the length of the arc is returned.", "returns": "Length of circle or arc.\n" }, "parameters": [ { "id": 414, "name": "circle", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Circle object to calculate length for." }, "type": { "type": "reference", "name": "ICircle" } } ], "type": { "type": "intrinsic", "name": "number" } } ], "sources": [ { "fileName": "circle.ts", "line": 310, "character": 26 } ] }, { "id": 409, "name": "close", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 410, "name": "close", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Closes the arc, so that it becomes a circle.", "returns": "True if the open circle was closed, false if the circle was already closed.\n" }, "parameters": [ { "id": 411, "name": "circle", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Circle object to close." }, "type": { "type": "reference", "name": "ICircle" } } ], "type": { "type": "intrinsic", "name": "boolean" } } ], "sources": [ { "fileName": "circle.ts", "line": 292, "character": 21 } ] }, { "id": 415, "name": "evalParam", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 416, "name": "evalParam", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Returns a point by evaluating the position along a circle.\nThe position is specified by a t parameter that starts at 0 and ends at 1.\nIf the circle object is closed, 0 and 1 will have the same position.\nValues for of t<0 and t>1 are valid, they will loop around.\nIf the circle object is an open arc, the 0 will be the start of the arc, and 1 will be the end of the arc.\nValues for of t<0 and t>1 are automatically converted to 0 and 1 respectively.", "returns": "Point.\n" }, "parameters": [ { "id": 417, "name": "circle", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Cricle object to evaluate." }, "type": { "type": "reference", "name": "ICircle" } }, { "id": 418, "name": "t", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Parameter to evaluate (0 is the start of the circular arc, 1 is the end of the circular arc)" }, "type": { "type": "intrinsic", "name": "number" } } ], "type": { "type": "reference", "name": "IPoint" } } ], "sources": [ { "fileName": "circle.ts", "line": 327, "character": 25 } ] }, { "id": 419, "name": "evalParamTangent", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 420, "name": "evalParamTangent", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Returns a tangent unit vector by evaluating the position along a circle.\nThe position is specified by a t parameter that starts at 0 and ends at 1.\nIf the circle object is closed, 0 and 1 will have the same position.\nValues for of t<0 and t>1 are valid, they will loop around.\nIf the circle object is an open arc, the 0 will be the start of the arc, and 1 will be the end of the arc.\nValues for of t<0 and t>1 are automatically converted to 0 and 1 respectively.", "returns": "Tangent unit vector (a list of three numbers).\n" }, "parameters": [ { "id": 421, "name": "circle", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Cricle object to evaluate." }, "type": { "type": "reference", "name": "ICircle" } }, { "id": 422, "name": "t", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Parameter to evaluate (0 is the start of the circular arc, 1 is the end of the circular arc)" }, "type": { "type": "intrinsic", "name": "number" } } ], "type": { "type": "reference", "name": "gs.XYZ" } } ], "sources": [ { "fileName": "circle.ts", "line": 352, "character": 32 } ] }, { "id": 423, "name": "evalPoint", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 424, "name": "evalPoint", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Returns a t parameter by projecting a point onto a circle.\nThe t parameter represents a position on the circle.\nThe parameter starts at 0 and ends at 1.\nIf the circle object is closed, 0 and 1 will have the same position.\nIf the circle object is an open arc, the 0 will be the start of the arc, and 1 will be the end of the arc.\nThe point is projected onto the closest point on the circle, and t is then caclulated for that point.", "returns": "t parameter.\n" }, "parameters": [ { "id": 425, "name": "circle", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Cricle object to evaluate." }, "type": { "type": "reference", "name": "ICircle" } }, { "id": 426, "name": "point", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "The point to be projected onto the circle or arc." }, "type": { "type": "reference", "name": "IPoint" } } ], "type": { "type": "intrinsic", "name": "number" } } ], "sources": [ { "fileName": "circle.ts", "line": 377, "character": 25 } ] }, { "id": 399, "name": "getArcAngles", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 400, "name": "getArcAngles", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Gets the arc angles of the circle.", "returns": "The angles, or null if it is a closed circle.\n" }, "parameters": [ { "id": 401, "name": "circle", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Circle object to get angles from." }, "type": { "type": "reference", "name": "ICircle" } } ], "type": { "type": "tuple", "elements": [ { "type": "intrinsic", "name": "number" }, { "type": "intrinsic", "name": "number" } ] } } ], "sources": [ { "fileName": "circle.ts", "line": 257, "character": 28 } ] }, { "id": 396, "name": "getAxes", "kind": 64, "kindString": "Function", "flags": { "isExported": true }, "signatures": [ { "id": 397, "name": "getAxes", "kind": 4096, "kindString": "Call signature", "flags": {}, "comment": { "shortText": "Gets the X and Y vectors of the circle plane. The circle radius is equal to the length of the X vector.", "returns": "Two vectors, the X and Y vectors of teh circle plane.\n" }, "parameters": [ { "id": 398, "name": "circle", "kind": 32768, "kindString": "Parameter", "flags": {}, "comment": { "text": "Circle object to get vectors from." }, "type": { "type": "reference", "name": "ICircle" } } ], "type": { "type": "array", "elementType": { "type": "reference", "name": "gs.XYZ" } } } ], "sources": [