feat: limit max guides generated per feature via an option#271
Open
megawac wants to merge 1 commit intogeops:masterfrom
Open
feat: limit max guides generated per feature via an option#271megawac wants to merge 1 commit intogeops:masterfrom
megawac wants to merge 1 commit intogeops:masterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
oterral
reviewed
Jun 20, 2024
oterral
reviewed
Jun 20, 2024
oterral
reviewed
Aug 2, 2024
650c2bb to
feb03ce
Compare
feb03ce to
f4e3aa5
Compare
Contributor
Author
|
I've switched to the simple solution without sortedIndex, these arrays hopefully are not that large to make it make a significant difference. |
f4e3aa5 to
8ae233f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How to
Create some absurd shapes as described in #267 or allow a high nbFeatures. Set
limitGuidesPerFeatureon your cad control (defaults to 3). Observe that the max number of snapping guides ever shown on the screen isnbFeatures X limitGuidesPerFeaturesNotes on Implementation
I included lodash here as a peer dependency as my project uses it anyway. The main need was to get access to
sortByIndexwhich allows theincludedCoordsarray to be built optimally in theparseCoordListfunction. This can easily be replaced by something like the following with efficiency tradeoffsOthers
Fixes #267