JSCAD User Group
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Beginner Questions

    Scheduled Pinned Locked Moved General Discussions
    23 Posts 4 Posters 8.3k Views 2 Watching
    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.
    • z3devZ Offline
      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 FordyceD 1 Reply Last reply Reply Quote 0
      • z3devZ Offline
        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
        • Dunk FordyceD Offline
          Dunk Fordyce @z3dev
          last edited by

          @z3dev Thanks!

          This works great!

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

          z3devZ hrgdavorH 2 Replies Last reply Reply Quote 0
          • z3devZ Offline
            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 FordyceD Offline
              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?
              z3devZ 4 Replies Last reply Reply Quote 0
              • Dunk FordyceD Offline
                Dunk Fordyce
                last edited by

                Also:

                • how can I use the parameter defaults from another file? It seems getParameterValuesFromParameters should be exposed somewhere?
                z3devZ 1 Reply Last reply Reply Quote 0
                • z3devZ Offline
                  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
                  • z3devZ Offline
                    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
                    • z3devZ Offline
                      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
                      • z3devZ Offline
                        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 FordyceD 1 Reply Last reply Reply Quote 0
                        • z3devZ Offline
                          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 FordyceD 1 Reply Last reply Reply Quote 0
                          • Dunk FordyceD Offline
                            Dunk Fordyce @z3dev
                            last edited by Dunk Fordyce

                            @z3dev Ok, I just wondered if I was missing something.

                            Personally it seems a shame that the defaults are tied to the parameters function instead of where they should be ie:

                            const main = ({radius=10}) => { }
                            // or
                            const main = (radius=10)  => {}
                            // etc
                            

                            But how that would work with parameter definitions is a another thing...

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

                              @z3dev

                              I didnt get very far...

                              {
                                "name": "machinez1",
                                "version": "1.0.0",
                                "description": "",
                                "main": "index.js",
                                "scripts": {
                                  "run": "...cmd to launch a webserver with the viewer"
                                },
                                "author": "",
                                "license": "ISC",
                                "dependencies": {
                                  "@jscad/modeling": "^2.0.0-alpha.9"
                                },
                                "devDependencies": {
                                  "@jscad/web": "^2.0.0-alpha.9"
                                }
                              }
                              
                              • scripts: is there a command that runs a web server with a viewer? I know about npm run dev in the www package but that's not what we want.
                              • dependencies: It seems correct to include this so that is a totally valid package, but perhaps it should just include the typescript definitions. I'm not sure
                              • devDependencies: a viewer seems like a good thing for development, certainly for a template
                              z3devZ 2 Replies Last reply Reply Quote 0
                              • z3devZ Offline
                                z3dev @Dunk Fordyce
                                last edited by z3dev

                                @Dunk-Fordyce your points are fair.

                                The parameters are still closely tied to HTML input types. There’s a whole new world now with V2 so please be frank and propose some innovative changes.

                                There should be reinforcement of the JavaScript language, so defaults should be useable. Definitely an area to explore.

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

                                  • scripts: is there a command that runs a web server with a viewer? I know about npm run dev in the www package but that's not what we want.

                                  I think this would be the desktop application, which doesn’t exist yet for V2.

                                  • dependencies: It seems correct to include this so that is a totally valid package, but perhaps it should just include the typescript definitions. I'm not sure

                                  It probably depends on the IDE.
                                  Does anyone have a suggestion?

                                  • devDependencies: a viewer seems like a good thing for development, certainly for a template

                                  CLI is an alternative, but viewing the results makes more sense.

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

                                    @z3dev a desktop viewer requires a whole lot of desktop whereas a web viewer can be viewed from any machine on the same network trivially. I'm guessing here: a web server setup is going to be alot smaller than requesting electron or whatever else is used. I'd go even further and say that the desktop viewer should always just be the web viewer wrapped up in electron with any features that cant be done in a browser.

                                    Having the CLI tools there would certainly be good, I had forgotten about those.

                                    z3devZ 1 Reply Last reply Reply Quote 0
                                    • hrgdavorH Offline
                                      hrgdavor @Dunk Fordyce
                                      last edited by

                                      @Dunk-Fordyce

                                      There is a discord channel on ELMER server. Somebody there created lots of channels for different cad projects.

                                      here is invite link for #openjscad
                                      https://discord.gg/mGKESsy3

                                      Dunk FordyceD 1 Reply Last reply Reply Quote 0
                                      • Dunk FordyceD Offline
                                        Dunk Fordyce @hrgdavor
                                        last edited by

                                        @hrgdavor wow! thats a lot of cool things in the same place hehe thanks!

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

                                          @Dunk-Fordyce just another thought...

                                          Installing live reload is an option. The web application has support for live reload, which is enabled after a file or a project is dropped to the web page.

                                          I actually run tests of live reload using small projects.

                                          1 Reply Last reply Reply Quote 0
                                          • wildjerryW Offline
                                            wildjerry
                                            last edited by

                                            In errors, what is the blob url? Going to them just yields a 404.

                                            z3devZ 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • First post
                                              Last post
                                            Powered by NodeBB | Contributors