diff --git a/quasar_site/src/ViewModel.js b/quasar_site/src/ViewModel.js index 65dafa07..50d4f994 100644 --- a/quasar_site/src/ViewModel.js +++ b/quasar_site/src/ViewModel.js @@ -1,3 +1,4 @@ +import { version } from "core-js"; import ApiInfo from "./api_info.json"; const DataTypes = { @@ -16,6 +17,7 @@ let _searchInstance = null; let _selectedPath = ""; let _lastFound = null; let _pathMap = {}; +let _maxVersion = null; let updateTree = (path, children) => (obj) => { if (obj.path === path) { @@ -45,6 +47,9 @@ const ViewModel = { childType.toLowerCase(), includeInherited ); + if (!members) { + return; + } if (members.length < 1) { return; } @@ -123,14 +128,30 @@ const ViewModel = { } } }, + resetTree() { + _viewmodel = null; + _searchInstance = null; + }, + setMaxVersion(v) { + _maxVersion = v; + }, getTree() { - console.log("start tree"); if (_viewmodel) return _viewmodel; let viewmodel = null; { // console.log('creating viewodel') const namespaceDict = {}; ApiInfo.forEach((type) => { + if ( + _maxVersion && + type.since && + this.sinceIsGreater(type.since, _maxVersion) + ) { + // console.log( + // `not including ${type.name} because ${type.since} is newer than ${_maxVersion}` + // ); + return; + } let summary = ""; if (type.summary) summary = type.summary; if (type.dataType === DataTypes.NAMESPACE) { @@ -193,7 +214,10 @@ const ViewModel = { _selectedItemChangedCallbacks[source] = callback; }, findNodeByPath(path) { - console.log("finding:", path); + if (!path) { + return; + } + // console.log("finding:", path); path = path.toLowerCase(); let found = null; @@ -209,6 +233,9 @@ const ViewModel = { return found; }, setSelectedItem(item, updateRoute = true) { + if (!item) { + return; + } //Global tree selection callback handler let path = item.dataType ? this.itemPath(item) : item; @@ -267,45 +294,53 @@ const ViewModel = { rc.reverse(); return rc; }, + sinceIsGreater(test, existing) { + if (test === existing) return false; + const testVersion = test.split("."); + const existingVersion = existing.split("."); + + if (testVersion[1] == "x") { + testVersion[1] = 999; + } + if (existingVersion[1] == "x") { + existingVersion[1] = 999; + } + + if (testVersion[0] < existingVersion[0]) return false; + if ( + testVersion[0] === existingVersion[0] && + testVersion[1] < existingVersion[1] + ) + return false; + return true; + }, mostRecentSince() { let since = "0.0"; - const sinceIsGreater = function (test, existing) { - if (test === existing) return false; - const testVersion = test.split("."); - const existingVersion = existing.split("."); - if (testVersion[0] < existingVersion[0]) return false; - if ( - testVersion[0] === existingVersion[0] && - testVersion[1] < existingVersion[1] - ) - return false; - return true; - }; ApiInfo.forEach((type) => { if (type.constructors) { type.constructors.forEach((c) => { - if (c.since && sinceIsGreater(c.since, since)) since = c.since; + if (c.since && this.sinceIsGreater(c.since, since)) since = c.since; }); } if (type.properties) { type.properties.forEach((prop) => { - if (prop.since && sinceIsGreater(prop.since, since)) + if (prop.since && this.sinceIsGreater(prop.since, since)) since = prop.since; }); } if (type.methods) { type.methods.forEach((m) => { - if (m.since && sinceIsGreater(m.since, since)) since = m.since; + if (m.since && this.sinceIsGreater(m.since, since)) since = m.since; }); } if (type.operators) { type.operators.forEach((m) => { - if (m.since && sinceIsGreater(m.since, since)) since = m.since; + if (m.since && this.sinceIsGreater(m.since, since)) since = m.since; }); } if (type.fields) { type.fields.forEach((m) => { - if (m.since && sinceIsGreater(m.since, since)) since = m.since; + if (m.since && this.sinceIsGreater(m.since, since)) since = m.since; }); } }); @@ -414,6 +449,16 @@ const ViewModel = { const items = []; ApiInfo.forEach((entry) => { // skip namespaces + if ( + _maxVersion && + entry.since && + this.sinceIsGreater(entry.since, _maxVersion) + ) { + // console.log( + // `not including ${entry.name} because ${entry.since} is newer than ${_maxVersion}` + // ); + return; + } if (entry.dataType === "namespace") return; const dataTypeUrl = (entry.namespace + "." + entry.name).toLowerCase(); const typename = entry.namespace + "." + entry.name; @@ -428,6 +473,13 @@ const ViewModel = { items.push(node); if (entry.properties) { entry.properties.forEach((prop) => { + if ( + _maxVersion && + prop.since && + this.sinceIsGreater(prop.since, _maxVersion) + ) { + return; + } const chunks = prop.signature.split(" "); node = { typename: typename, member: chunks[chunks.length - 1] }; if (items[items.length - 1].member === node.member) return; @@ -441,6 +493,13 @@ const ViewModel = { } if (entry.methods) { entry.methods.forEach((method) => { + if ( + _maxVersion && + method.since && + this.sinceIsGreater(method.since, _maxVersion) + ) { + return; + } let chunks = method.signature.split("("); chunks = chunks[0].split(" "); node = { typename: typename, member: chunks[chunks.length - 1] }; @@ -455,6 +514,13 @@ const ViewModel = { } if (entry.events) { entry.events.forEach((event) => { + if ( + _maxVersion && + event.since && + this.sinceIsGreater(event.since, _maxVersion) + ) { + return; + } const chunks = event.signature.split(" "); node = { typename: typename, member: chunks[chunks.length - 1] }; if (items[items.length - 1].member === node.member) return; @@ -468,6 +534,13 @@ const ViewModel = { } if (entry.operators) { entry.operators.forEach((operator) => { + if ( + _maxVersion && + operator.since && + this.sinceIsGreater(operator.since, _maxVersion) + ) { + return; + } const chunks = operator.signature.split(" "); node = { typename: typename, member: chunks[chunks.length - 1] }; if (items[items.length - 1].member === node.member) return; @@ -482,6 +555,13 @@ const ViewModel = { if (entry.fields) { entry.fields.forEach((field) => { //TODO: review + if ( + _maxVersion && + field.since && + this.sinceIsGreater(field.since, _maxVersion) + ) { + return; + } const chunks = field.signature.split(" "); node = { typename: typename, member: chunks[chunks.length - 1] }; if (items[items.length - 1].member === node.member) return; @@ -503,6 +583,14 @@ const ViewModel = { if (node[memberType]) { for (let i = 0; i < members.length; i++) { + if ( + _maxVersion && + members[i].since && + this.sinceIsGreater(members[i].since, _maxVersion) + ) { + // console.log(`not including ${members[i]}`); + return; + } members[i].parent = node.namespace + "." + node.name; members[i].namespace = node.namespace; const url = this.memberUrl(memberType, members[i]); diff --git a/quasar_site/src/api_info.json b/quasar_site/src/api_info.json index b8aaaf84..4ac5642a 100644 --- a/quasar_site/src/api_info.json +++ b/quasar_site/src/api_info.json @@ -43299,9 +43299,14 @@ "summary": "Restore render material" }, { - "signature": "Unused = 0x1000", + "signature": "SectionStyle = 0x1000", "protected": false, - "summary": "Unused flag" + "summary": "Section style" + }, + { + "signature": "NewDetailOn = 0x2000", + "protected": false, + "summary": "New Detail On" }, { "signature": "All = 0xFFFFFFFF", @@ -54020,7 +54025,7 @@ "property": ["get", "set"] }, { - "signature": "AI_UNITS AiUnits", + "signature": "Units AiUnits", "protected": false, "since": "8.0", "property": ["get", "set"] @@ -54048,27 +54053,27 @@ }, { "namespace": "Rhino.FileIO", - "name": "FileAiReadOptions.AI_UNITS", + "name": "FileAiReadOptions.Units", "dataType": "enum", "since": "8.0", "values": [ { - "signature": "inches = 0", + "signature": "Inches = 0", "protected": false, "summary": "inches" }, { - "signature": "centimeters = 1", + "signature": "Centimeters = 1", "protected": false, "summary": "centimeters" }, { - "signature": "millimeters = 2", + "signature": "Millimeters = 2", "protected": false, "summary": "millimeters" }, { - "signature": "points = 3", + "signature": "Points = 3", "protected": false, "summary": "points" } @@ -54094,7 +54099,7 @@ "property": ["get", "set"] }, { - "signature": "AI_units AiUnits", + "signature": "Units AiUnits", "protected": false, "since": "8.0", "property": ["get", "set"] @@ -54146,27 +54151,27 @@ }, { "namespace": "Rhino.FileIO", - "name": "FileAiWriteOptions.AI_units", + "name": "FileAiWriteOptions.Units", "dataType": "enum", "since": "8.0", "values": [ { - "signature": "inches = 0", + "signature": "Inches = 0", "protected": false, "summary": "inches" }, { - "signature": "centimeters = 1", + "signature": "Centimeters = 1", "protected": false, "summary": "centimeters" }, { - "signature": "millimeters = 2", + "signature": "Millimeters = 2", "protected": false, "summary": "millimeters" }, { - "signature": "points = 3", + "signature": "Points = 3", "protected": false, "summary": "points" } @@ -54861,7 +54866,7 @@ ], "properties": [ { - "signature": "eColorMethod ColorMethod", + "signature": "ColorMethodType ColorMethod", "protected": false, "summary": "pallette index: clrACI, RGB: clrRGB", "since": "8.0", @@ -55094,7 +55099,7 @@ }, { "namespace": "Rhino.FileIO", - "name": "FileDwgWriteOptions.eColorMethod", + "name": "FileDwgWriteOptions.ColorMethodType", "dataType": "enum", "values": [ { @@ -55361,7 +55366,7 @@ "property": ["get", "set"] }, { - "signature": "EPS_UNITS EpsUnits", + "signature": "Units EpsUnits", "protected": false, "since": "8.0", "property": ["get", "set"] @@ -55389,27 +55394,27 @@ }, { "namespace": "Rhino.FileIO", - "name": "FileEpsReadOptions.EPS_UNITS", + "name": "FileEpsReadOptions.Units", "dataType": "enum", "since": "8.0", "values": [ { - "signature": "inches = 0", + "signature": "Inches = 0", "protected": false, "summary": "inches" }, { - "signature": "centimeters = 1", + "signature": "Centimeters = 1", "protected": false, "summary": "centimeters" }, { - "signature": "millimeters = 2", + "signature": "Millimeters = 2", "protected": false, "summary": "millimeters" }, { - "signature": "points = 3", + "signature": "Points = 3", "protected": false, "summary": "points" } @@ -55767,7 +55772,7 @@ "property": ["get", "set"] }, { - "signature": "VIEW_TYPE ViewType", + "signature": "ReadViewType ViewType", "protected": false, "since": "8.0", "property": ["get", "set"] @@ -55783,42 +55788,42 @@ }, { "namespace": "Rhino.FileIO", - "name": "FileGHSReadOptions.VIEW_TYPE", + "name": "FileGHSReadOptions.ReadViewType", "dataType": "enum", "since": "8.0", "values": [ { - "signature": "eBODY = 0", + "signature": "Body = 0", "protected": false, "summary": "BodyView" }, { - "signature": "ePROFILE = 1", + "signature": "Profile = 1", "protected": false, "summary": "Profile View" }, { - "signature": "ePLAN = 2", + "signature": "Plan = 2", "protected": false, "summary": "Plan View" }, { - "signature": "eWIRE = 3", + "signature": "Wire = 3", "protected": false, "summary": "Wireframe" }, { - "signature": "eSOLID = 4", + "signature": "Solid = 4", "protected": false, "summary": "Mesh" }, { - "signature": "eCAMERA = 5", + "signature": "Camera = 5", "protected": false, "summary": "eCAMERA" }, { - "signature": "eCUSTOM = 6", + "signature": "Custom = 6", "protected": false, "summary": "eCUSTOM" } @@ -58696,7 +58701,7 @@ "property": ["get", "set"] }, { - "signature": "SF_Schema Schema", + "signature": "StepSchema Schema", "protected": false, "summary": "Get and set the schema of the step file being written.", "since": "8.0", @@ -58721,7 +58726,7 @@ }, { "namespace": "Rhino.FileIO", - "name": "FileStpWriteOptions.SF_Schema", + "name": "FileStpWriteOptions.StepSchema", "dataType": "enum", "summary": "Step schema.", "since": "8.0", @@ -87638,7 +87643,7 @@ { "signature": "static Polyline[] MeshPlane(Mesh mesh, IEnumerable planes)", "protected": false, - "summary": "Intersects a mesh with a collection of (infinite) planes.", + "summary": "Intersects a mesh with a collection of infinite planes.", "since": "5.0", "parameters": [ { @@ -87652,12 +87657,70 @@ "summary": "Planes to intersect with." } ], - "returns": "An array of polylines describing the intersection loops or None (Nothing in Visual Basic) if no intersections could be found." + "returns": "An array of polylines describing the intersection loops, or None if no intersections could be found." + }, + { + "signature": "static Polyline[] MeshPlane(Mesh mesh, MeshIntersectionCache cache, IEnumerable planes, System.Double tolerance)", + "protected": false, + "summary": "Intersects a mesh with a collection of infinite planes.", + "since": "8.0", + "parameters": [ + { + "name": "mesh", + "type": "Mesh", + "summary": "Mesh to intersect." + }, + { + "name": "cache", + "type": "MeshIntersectionCache", + "summary": "Intersection cache for the mesh." + }, + { + "name": "planes", + "type": "IEnumerable", + "summary": "Planes to intersect with." + }, + { + "name": "tolerance", + "type": "System.Double", + "summary": "Intersection tolerance." + } + ], + "returns": "An array of polylines describing the intersection loops, or None if no intersections could be found." + }, + { + "signature": "static Polyline[] MeshPlane(Mesh mesh, MeshIntersectionCache cache, Plane plane, System.Double tolerance)", + "protected": false, + "summary": "Intersects a mesh with an infinite plane.", + "since": "8.0", + "parameters": [ + { + "name": "mesh", + "type": "Mesh", + "summary": "Mesh to intersect." + }, + { + "name": "cache", + "type": "MeshIntersectionCache", + "summary": "Intersection cache for mesh." + }, + { + "name": "plane", + "type": "Plane", + "summary": "Plane to intersect with." + }, + { + "name": "tolerance", + "type": "System.Double", + "summary": "Intersection tolerance." + } + ], + "returns": "An array of polylines describing the intersection loops, or None if no intersections could be found." }, { "signature": "static Polyline[] MeshPlane(Mesh mesh, Plane plane)", "protected": false, - "summary": "Intersects a mesh with an (infinite) plane.", + "summary": "Intersects a mesh with an infinite plane.", "since": "5.0", "parameters": [ { @@ -87671,7 +87734,7 @@ "summary": "Plane to intersect with." } ], - "returns": "An array of polylines describing the intersection loops or None (Nothing in Visual Basic) if no intersections could be found." + "returns": "An array of polylines describing the intersection loops, or None if no intersections could be found." }, { "signature": "static Point3d[] MeshPolyline(Mesh mesh, PolylineCurve curve, out System.Int32[] faceIds)", @@ -88660,6 +88723,43 @@ } ] }, + { + "namespace": "Rhino.Geometry.Intersect", + "name": "MeshIntersectionCache", + "dataType": "class", + "summary": "Provides a mechanism for lazily evaluating mesh data.", + "interfaces": ["IDisposable"], + "since": "8.0", + "constructors": [ + { + "signature": "MeshIntersectionCache()", + "protected": false, + "summary": "Provides a mechanism for lazily evaluating mesh data. The implementation is private and subject to change.", + "since": "8.0" + } + ], + "methods": [ + { + "signature": "System.Void Dispose()", + "protected": false, + "summary": "Actively reclaims unmanaged resources that this instance uses.", + "since": "8.0" + }, + { + "signature": "System.Void Dispose(System.Boolean disposing)", + "protected": true, + "summary": "Disposes the mesh intersection cache.", + "since": "8.0", + "parameters": [ + { + "name": "disposing", + "type": "System.Boolean", + "summary": "If set totruedispose was called explicitly, otherwise specify False if calling from a finalizer." + } + ] + } + ] + }, { "namespace": "Rhino.Geometry.Intersect", "name": "PlaneCircleIntersection", @@ -104939,7 +105039,7 @@ { "signature": "System.Void Merge(PointCloud other)", "protected": false, - "summary": "Copies the point values of another point cloud into this one.", + "summary": "Merges, or appends, a specified point cloud into this one.", "since": "5.0", "parameters": [ { @@ -110686,6 +110786,25 @@ "since": "7.23", "returns": "The number of face packs." }, + { + "signature": "System.Boolean SetVertexSurfacePoint(System.UInt32 vertexIndex, Point3d surfacePoint)", + "protected": false, + "summary": "Set the location of a single vertex surface point. This function is not suitable for setting the locations of multiple vertex surface points that are topologically near to each other.", + "since": "8.0", + "parameters": [ + { + "name": "vertexIndex", + "type": "System.UInt32", + "summary": "Index of the vertex to modify" + }, + { + "name": "surfacePoint", + "type": "Point3d", + "summary": "New surface point location for that vertex" + } + ], + "returns": "True if a vertex was modified, False otherwise." + }, { "signature": "System.Boolean Subdivide()", "protected": false, @@ -112049,6 +112168,7 @@ "protected": false, "summary": "Location of the \"control net\" point that this SubDVertex represents", "since": "7.0", + "remarks": "The setter of this property will refresh the neighborhood cache around the vertex everytime it is called. This is not efficient if you have multiple vertices to modify. In that case, call vertex.SetControlNetPoint(position, false) for all the vertices you want to modify, then call subd.ClearEvaluationCache()", "property": ["get", "set"] }, { @@ -112107,6 +112227,26 @@ "summary": "Retrieve a SubDFace from this vertex", "since": "7.7" }, + { + "signature": "System.Boolean SetControlNetPoint(Point3d position, System.Boolean bClearNeighborhoodCache)", + "protected": false, + "summary": "Change the location of the \"control net\" point that this SubDVertex represents", + "since": "8.0", + "remarks": "This method is provided to be able to set multiple control vertices, without clearing the neighborhood cache everytime as the ControlNetPoint property setter does. When you are done modifying your SubD, call subd.ClearEvaluationCache() to refresh all caches.", + "parameters": [ + { + "name": "position", + "type": "Point3d", + "summary": "New position for the vertex' control net point." + }, + { + "name": "bClearNeighborhoodCache", + "type": "System.Boolean", + "summary": "If true, clear the evaluation cache in the faces around the modified vertex." + } + ], + "returns": "True if the vertex' control net point was modified." + }, { "signature": "Point3d SurfacePoint()", "protected": false, @@ -147028,7 +147168,7 @@ { "signature": "System.Void ReportDeferredContentAndFile(RenderContent renderContent, System.String pathToFile, System.Int32 flags)", "protected": false, - "summary": "This is called from your implementation of LoadMultiple() to add a 'deferred' content and the file it will be loaded from, when the LoadMultipleFlags.Preload flag is set. See LoadMultiple() for an explanation of this method's use. \\param c is the deferred content. \\param wszFullPath is the full path to the file that 'c' will be loaded from. \\param flags is reserved for future use; you should pass zero. \\param pReserved is reserved for future use; you should pass nullptr. */", + "summary": "This is called from your implementation of LoadMultiple() to add a 'deferred' content and the file it will be loaded from when the LoadMultipleFlags.Preload flag is set. See LoadMultiple() for an explanation of this method's use. \\param c is the deferred content. \\param wszFullPath is the full path to the file that 'c' will be loaded from. \\param flags is reserved for future use; you should pass zero. \\param pReserved is reserved for future use; you should pass nullptr. */", "since": "7.0", "parameters": [ { @@ -147834,6 +147974,30 @@ ], "returns": "A new material - either a \"Custom\" material or a \"Physically Based\" material depending on the return value of material.IsPhysicallyBased." }, + { + "signature": "static System.Boolean ImportMaterialAndAssignToLayers(RhinoDoc doc, System.String file, IEnumerable layer_indices)", + "protected": false, + "summary": "Imports a material file (.RMTL) and assigns the imported material to one or more layers.", + "since": "8.0", + "parameters": [ + { + "name": "doc", + "type": "RhinoDoc", + "summary": "The document to attach the imported material to and which also contains the layers." + }, + { + "name": "file", + "type": "System.String", + "summary": "The full path to the RMTL file to be imported." + }, + { + "name": "layer_indices", + "type": "IEnumerable", + "summary": "An array of indices of the layers to assign the material to." + } + ], + "returns": "True if successful, else false." + }, { "signature": "static StandardChildSlots SlotFromTextureType(DocObjects.TextureType tt)", "protected": false, @@ -160729,6 +160893,20 @@ "protected": false, "summary": "Gets the amount of points in a polyline.", "since": "7.0" + }, + { + "signature": "Polyline PolylineAt(System.Int32 index)", + "protected": false, + "summary": "Gets a polyline at an index.", + "since": "8.0", + "parameters": [ + { + "name": "index", + "type": "System.Int32", + "summary": "The index." + } + ], + "returns": "The polyline if successful, None otherwise." } ] }, diff --git a/quasar_site/src/layouts/MainLayout.vue b/quasar_site/src/layouts/MainLayout.vue index 1ecaeb7c..66250c20 100644 --- a/quasar_site/src/layouts/MainLayout.vue +++ b/quasar_site/src/layouts/MainLayout.vue @@ -11,12 +11,21 @@ + + + + + {{ version }} + + + + + + What's new in version {{ version }} + Toggle dark mode - - What's new in version {{ version }} - {{ apiTitle }} documentation has a new look. The old site can still be found