Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Units in filter query string #17

Open
4 tasks
CADBIMDeveloper opened this issue Feb 18, 2023 · 1 comment
Open
4 tasks

Units in filter query string #17

CADBIMDeveloper opened this issue Feb 18, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request query language
Milestone

Comments

@CADBIMDeveloper
Copy link
Owner

CADBIMDeveloper commented Feb 18, 2023

Would be nice to have an ability to provide units directly in the filter query, something like *.propery = 100 mm

Needs #12

Also relates to #2

Tasks:

  • add new semantics to LMV-QL grammar
  • collect all the required info from source query string
  • enchance engine
  • update readme
@CADBIMDeveloper CADBIMDeveloper added the enhancement New feature or request label Feb 18, 2023
@CADBIMDeveloper CADBIMDeveloper added this to the Version 1.0.0 milestone Feb 18, 2023
@CADBIMDeveloper CADBIMDeveloper self-assigned this Feb 18, 2023
@CADBIMDeveloper
Copy link
Owner Author

Developer note:

Millimeters
mm mm² mm³

Centimeters
cm cm² cm³

Meters
m m² m³

Inches
" in² in³

Feet
' ft² ft³

Feet and fractional inches
81' 5" - 414' 0" ² - 577' 2-3/4" ³

Feet and decimal inches
81' 5.2" - 413'² 141.1"² - 577'³ 407.61"³

Decimal Inches = Inches

Decimal Feet = Feet

Fractional inches
775-1/2" - 67108-1/2"² - 497345"³

Meters and centimeters
19 m 70.2 cm - 43 m² 2957.0 cm² - 8 m³ 150024.86 cm³

Points
55848.2 pt - 347890304.4 pt² - 185633038361.71 pt³

// 11' 2-5/16"
const feetsWithInchesWithFractionalPartRegex = /^(?<feets>[\d]+)'[\s]+(?<inch>[\d]+)-(?<fracinchintpart>[\d]+)\/(?<fracinchdenominator>[\d]+)"$/
// 11' 1/2"
const feetsWithFractionalInchesRegex = /^(?<feets>[\d]+)'[\s]+(?<fracinchintpart>[\d]+)\/(?<fracinchdenominator>[\d]+)"$/
// 11' 3"
const feetsWithInchesRegex = /^(?<feets>[\d]+)'[\s]+(?<inch>[\d]+)"$/
// 1"
const inchesOnlyRegex = /^(?<inch>[\d]+)"$/
// 11' or simple 11
const feetsOnlyRegex = /^(?<feets>[\d]+)('|)$/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request query language
Projects
None yet
Development

No branches or pull requests

1 participant