JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Alasdair McAndrew
    • Profile
    • Following 0
    • Followers 0
    • Topics 9
    • Posts 18
    • Best 2
    • Controversial 0
    • Groups 0

    Alasdair McAndrew

    @Alasdair McAndrew

    2
    Reputation
    1
    Profile views
    18
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Alasdair McAndrew Unfollow Follow

    Best posts made by Alasdair McAndrew

    • Cylinder between points?

      At the risk of being a pain in the neck (or choose other part of the body) with all my current enquiries, I have another one. In V1, and in CSG, we had the (for me) very useful functionality of being able to construct a cylinder between two given points. This does not seem to exist in V2. Now I know that a cylinder between two points can be constructed first by determining a height as the Euclidean distance between the points, and width, and then using appropriate rotations and a translation to move it into its place. But this is a non-trivial task (how would you construct a cylinder between (-2,3,5) and (-4,-1,7) for example?) which would be rendered much easier by being able to construct a cylinder between two points. Will this be added, or is this one of those libraries to be added by users to make up any loss of functionality from V1 and CSG? (We expect REMOVED functionality to be supported via small user libraries.) If so, I'd better get to work!

      Thanks,
      Alasdair

      posted in General Discussions cylinder v2 primitives
      Alasdair McAndrew
      Alasdair McAndrew
    • Debugging: values of variables?

      If I want to do a little development work - which in my case is simply creating a few small functions - some debugging facility is necessary. I know that (at least in Firefox) I can write to the Web Console with the JavaScript function console.log - but are there are other debugging facilities? This might seem like a dumb question, but I've only ever used JavaScript in the context of (Open)JSCAD, so I know nothing about generic JavaScript debugging. How do you step through a script or program, checking values of variables on the way? Add breakpoints?

      As always, many thanks!
      Alasdair

      posted in Development Discussions
      Alasdair McAndrew
      Alasdair McAndrew

    Latest posts made by Alasdair McAndrew

    • RE: Curves described by parametric equations?

      Thank you very much - and I think that hand-building a polygon from a list of points may be my best bet at the moment. I can easily create points from my parametric equations, and then join them up.

      posted in General Discussions
      Alasdair McAndrew
      Alasdair McAndrew
    • Student projects?

      As a few of you may know, I am a university academic, and currently I am collecting topics suitable for final year capstone projects. I have several personal "vanity" projects I can give students, which would both keep the teams busy and produce useful results, but in fact projects work better with an external sponsor. If nothing else, students feel that they are genuinely involved in a useful project, which encourages greater engagement.

      If anybody has projects which you think may be suitable for a team of final year IT students, please let me know!

      Of course, it may be that no team chooses that project, but it's always nice to extend the range of our projects.

      This year I supervised two teams: one created a proof-of-concept for an app for Aged Care management (specifically so that loved ones could check up on the health and care of their relatives); the other team worked on a method for automatic identification of individual specimens of the striped legless lizard (Delma impar), a local endangered species.

      Thanks very much,
      Alasdair

      posted in Development Discussions
      Alasdair McAndrew
      Alasdair McAndrew
    • Curves described by parametric equations?

      Is it possible (in JSCAD) to draw a curve in space defined by parametric equations x = x(t), y = y(t), z = z(t) over an interval of t? What I want to do is to draw a cylinder with a sort of "wavy" top; in my case the shape of the edge can be given as a parametric curve.

      Thanks!

      posted in General Discussions
      Alasdair McAndrew
      Alasdair McAndrew
    • RE: Two questions about projections

      @z3dev Thank you very much. I would particularly like the option of orthographic viewing or rendering, but both the documentations and websites (for the new V2, and the original) seem quiet on the topic.

      posted in General Discussions
      Alasdair McAndrew
      Alasdair McAndrew
    • Two questions about projections
      1. I have several shapes which are best viewed in one particular position. Normally I just create the shape centered (more-or-less) about the origin, and then move it around until it looks the way I want. Is there any way of finding the current position and orientation of the shape (with respect to the camera) so that I can write the position into the original script?
        (I know that I can have rotations and translations as parameters, and use the results of that, but I'm wondering if there's a simpler way.)

      2. In the web viewer (jscad.xyz, or its local version demo.html) I can't seem to switch between perspective and orthographic views. The settings claim that the keys "p" and "o" move to each projection, but I can't get my keys to have any affect at all. How can I obtain an orthographic projection in the web viewer, and/or can the projection be written into the original JavaScript file?

      Thank you all!

      posted in General Discussions projection orientation key commands webinterface
      Alasdair McAndrew
      Alasdair McAndrew
    • RE: Cylinder between points?

      @hrgdavor That looks terrific! I'm working on a similar one, but trying to see what happens if two of the coordinates are equal, or zero. That is, if the x-coordinates of p1 and p2 are equal, or the y-coordinates, etc. Or if some of them are zeros. For example, in your computations of ay and az, you're using an inverse tangent, but what happens if either dx = 0, or dz = 0?

      I decided to first translate p1 and p2 to 0 and p2-p1 or p1-p2, depending on which had a positive z-coordinate. Then we are simply rotating things in the z>=0 half-space, which reduces everything to two rotations (as you have).

      But I do like the simplicity and elegance of your code: clearly you're a more advanced JavaScript programmer than me. Did you work all this out from scratch, or are you taking another program and rewriting it?

      The other possible issue is that the result should be independent of the order of p1 and p2: it may be that your function does that automatically, but I found it tricky with mine.

      Thank you very much indeed.

      posted in General Discussions
      Alasdair McAndrew
      Alasdair McAndrew
    • Debugging: values of variables?

      If I want to do a little development work - which in my case is simply creating a few small functions - some debugging facility is necessary. I know that (at least in Firefox) I can write to the Web Console with the JavaScript function console.log - but are there are other debugging facilities? This might seem like a dumb question, but I've only ever used JavaScript in the context of (Open)JSCAD, so I know nothing about generic JavaScript debugging. How do you step through a script or program, checking values of variables on the way? Add breakpoints?

      As always, many thanks!
      Alasdair

      posted in Development Discussions
      Alasdair McAndrew
      Alasdair McAndrew
    • Cylinder between points?

      At the risk of being a pain in the neck (or choose other part of the body) with all my current enquiries, I have another one. In V1, and in CSG, we had the (for me) very useful functionality of being able to construct a cylinder between two given points. This does not seem to exist in V2. Now I know that a cylinder between two points can be constructed first by determining a height as the Euclidean distance between the points, and width, and then using appropriate rotations and a translation to move it into its place. But this is a non-trivial task (how would you construct a cylinder between (-2,3,5) and (-4,-1,7) for example?) which would be rendered much easier by being able to construct a cylinder between two points. Will this be added, or is this one of those libraries to be added by users to make up any loss of functionality from V1 and CSG? (We expect REMOVED functionality to be supported via small user libraries.) If so, I'd better get to work!

      Thanks,
      Alasdair

      posted in General Discussions cylinder v2 primitives
      Alasdair McAndrew
      Alasdair McAndrew
    • RE: Camera position, V2?

      Nice - thank you! Should this be listed in the various shortcuts under the settings menu?

      posted in General Discussions
      Alasdair McAndrew
      Alasdair McAndrew
    • Camera position, V2?

      I believe this might have been asked before in respect of V1 somewhere: but is it possible to change the initial camera (viewing) position? I know I can get the same effect by judiciously placing the figure with translations and rotations, but sometimes it's much easier to move the camera, as it were. Thanks!

      posted in General Discussions camera viewing
      Alasdair McAndrew
      Alasdair McAndrew