JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Beginner Questions

    General Discussions
    4
    23
    3632
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • z3dev
      z3dev @Dunk Fordyce last edited by

      @Dunk-Fordyce said in Beginner Questions:

      Also:

      • how can I use the parameter defaults from another file? It seems getParameterValuesFromParameters should be exposed somewhere?

      There are several ways but no general practice. I'm porting a project which has several designs for gears (very nice designs). And here's one way to put those together into one BIG design.

      const bevelParams = require('./bevelGear').getParameterDefinitions
      const bevelGear = require('./bevelGear').main
      
      // combine parameters definitions
      
      const getParameterDefinitions = () => {
        const definitions = [
        ]
        // bevel gear parameters
        definitions.push({ name: 'bevelGear', type: 'group', caption: 'Bevel Gear' })
        definitions.push(...bevelParams())
        return definitions
      }
      
      const main = (params) => {
        return bevelGear(params)
      }
      
      module.exports = { main, getParameterDefinitions }
      
      Dunk Fordyce 1 Reply Last reply Reply Quote 0
      • z3dev
        z3dev @Dunk Fordyce last edited by z3dev

        @Dunk-Fordyce said in Beginner Questions:

        I understand how the project structure is meant to be now but is there, or could there be, a template git repo with the correct files included for linting and other nice to have things?

        If I understand correctly, a template for new design projects. Nice idea!

        Just clone and go. 😎

        Maybe a new project on the JSCAD community would be a good place for this.

        Dunk Fordyce 1 Reply Last reply Reply Quote 0
        • z3dev
          z3dev @Dunk Fordyce last edited by

          @Dunk-Fordyce said in Beginner Questions:

          i want to add a vector type to the params, is there anything wrong with adding that into packages/web/src/ui/views/parameterControls.js or are your vue controls about to make it obsolete?

          Interesting. Nothing is planned for the parameters, except some re-factoring of code. A new type of parameter would be fine if it works across CLI/WEB applications.

          1 Reply Last reply Reply Quote 0
          • z3dev
            z3dev @Dunk Fordyce last edited by

            @Dunk-Fordyce said in Beginner Questions:

            will you support js import/export statement instead of require?

            Definitely. Browsers (and Node) are moving forward with import/export, and JSCAD will follow.

            1 Reply Last reply Reply Quote 0
            • z3dev
              z3dev @Dunk Fordyce last edited by

              @Dunk-Fordyce said in Beginner Questions:

              whats happening with the vue components I've seen in your vue-components repo ( I like vue )

              Excellent! I will be maintaining those going forward, but would appreciate any assitance or comments. I'm just a Vue beginner, and probably have a whole lot wrong.

              1 Reply Last reply Reply Quote 0
              • Dunk Fordyce
                Dunk Fordyce last edited by

                Also:

                • how can I use the parameter defaults from another file? It seems getParameterValuesFromParameters should be exposed somewhere?
                z3dev 1 Reply Last reply Reply Quote 0
                • Dunk Fordyce
                  Dunk Fordyce last edited by

                  Ok, I have the following questions, is here appropriate to ask?

                  • whats happening with the vue components I've seen in your vue-components repo ( I like vue )
                  • will you support js import/export statement instead of require?
                  • i want to add a vector type to the params, is there anything wrong with adding that into packages/web/src/ui/views/parameterControls.js or are your vue controls about to make it obsolete?
                  • I understand how the project structure is meant to be now but is there, or could there be, a template git repo with the correct files included for linting and other nice to have things?
                  z3dev 4 Replies Last reply Reply Quote 0
                  • z3dev
                    z3dev @Dunk Fordyce last edited by

                    @Dunk-Fordyce said in Beginner Questions:

                    @z3dev Thanks!

                    This works great!

                    Is there a discord or slack or even IRC channel for jscad?

                    Not that I know about.

                    1 Reply Last reply Reply Quote 0
                    • Dunk Fordyce
                      Dunk Fordyce @z3dev last edited by

                      @z3dev Thanks!

                      This works great!

                      Is there a discord or slack or even IRC channel for jscad?

                      z3dev hrgdavor 2 Replies Last reply Reply Quote 0
                      • z3dev
                        z3dev @Dunk Fordyce last edited by

                        @Dunk-Fordyce Sorry. I forgot to mention that the auto-reload function works really welcome with Chrome.

                        Just enable Auto-reload then drag and drop a file or a folder (project). Any changes will automatically be detected and reloaded.

                        1 Reply Last reply Reply Quote 0
                        • z3dev
                          z3dev @Dunk Fordyce last edited by z3dev

                          @Dunk-Fordyce Welcome!

                          A great question!
                          The management of projects is getting better in V2, and you can find more information on the V2 User Guide. See the Projects section.

                          (It’s been work in progress so please make changes!)

                          Dunk Fordyce 1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Powered by NodeBB | Contributors