Jump to content

MullinRJ

Member
  • Posts

    2,004
  • Joined

  • Last visited

Posts posted by MullinRJ

  1. No the Bezier curve is a different sort of curve altogether. I'm not so great on my maths any more either, so I can't tell you all the technical ins and outs of different curve types.

    Hi Richard,

    ???The Bezier curve segment used in VW is a real Bezier curve, but it is a subset of the generic Bezier curves you are probably used to editing in programs like Freehand (loved that program) or Illustrator. The generic Bezier curve segment has two end points (on the curve) and two control points (off the curve). VW uses a simplified construct that combines the two control points into one. This configuration is also used heavily in TrueType font outlines (and others).

    ???In the VW Bezier curve segment the control points you are used to seeing are situated 2/3 of the way between the Corner points and the single "Bezier" control point and are not individually selectable. The reason for this model is it greatly simplifies the math for drawing the curves.

    ???Without getting into too much minutiae, the general equations for Bezier curve segments are cubic polynomials (powers of 3). The version of Bezier curves used in VW simplifies the equations to quadratic polynomials (powers of 2), which reduces the formulae by two multiplication operations for each point on the curve (one for X and one for Y) and is a HUGE time saver when thousands of curves need to be redrawn with possibly a hundred points in each segment. It's most likely all documented nicely in a text book somewhere, but I stumbled on this the slow way. Needless to say, I found the math quite interesting.

    ???Though I would also like to see Bezier curves fully implemented in VW, I have not run into a situation where the VW version doesn't work. The only major thing you can't do with the VW Bezier that you can with the more generic variety is create a loop with one curve segment. Since everything I have ever needed Bezier curves for was drawing outlines of physical objects, this has never been a serious problem, but if you're used to editing the general kind I can see where you might get frustrated.

    HTH,

    Raymond

  2. Charles, if you use Tabs to indent your lines, replace all Tabs with 3 or 4 NBS characters (Non-Breaking Space - ASCII 0xCA or 202) before pasting the code in the window.

    NBS is Option-Space on the Mac. Not sure on Windows. Assuming I indent like you, your code will look something like this (w/ 4 NBS per Tab):

    Procedure classWork;

    Var

    ????pickit :Handle;

    ????x,y :Real;

    ????Procedure ShowAllClass;

    ????Var

    ????????i: integer;

    ????Begin

    ????????FOR i:=1 to ClassNum DO

    ????????????ShowClass(ClassList(i));

    ????End;

    Begin

    ????GetPt(x,y);

    ????pickit:=PickObject(x,y);

    ????IF pickit=NIL THEN ShowAllClass

    ????ELSE HideClass(GetClass(pickit));

    End;

    Run(classWork);

    {***************}

    Raymond

  3. Have you tried "TrueType To Polyline" under the Text menu? It's an extra step and increases the file size a lot if you are doing Tons O' Text, but for banners and headlines, it's perfect. If you will need to edit the text after the conversion, duplicate the original text and convert the copy. You can't go back to text from the outline.

    Raymond

  4. 1) There is an object preference that can be set, SetPrefInt(55, #);

    where # is a power of 2 and #/2 is the number of segments a full circle will be divided into. SetPrefInt came into use in VW8, but I don't know when 55 was made available.

    2) Yes. Some analytical geometry is required.

    3) Yes. Are you lookng for a manual method or a VS solution? If the latter, more analytical geometry is required, but I have used VS to solve the one-circle-tangent-to-3-other-circles problem. As you mention, up to 8 solutions are possible. With different colors assigned to the various solutions, it's quite pleasing to the eye. I haven't tried it for two arbitrary objects (lines) and a circle, but it should be solvable.

    Solutions for 3 circle tangents are posted on the internet. I found some after I did all the algebra. You might try looking for other algorithms there. Scripting is a lot easier with a well defined plan, but a lot less fun.

    Raymond

  5. Larry,

    ???You did what I always do - you changed the application name to reflect the version. And then I always forget to change it back until AFTER I run an updater at least once.

    ???Change the application name back to "VectorWorks" and run the updater again. Then to check the version, launch VW and look at the About VW splash screen. It should have 80532 as the build number. Ignore the man behind the curtain and the Get Info window in the Finder. It lies.

    ???Give it one more try.

    Raymond

  6. FUNCTION vsmDialogXYZZY(a : INTEGER; b: LONGINT; c: REAL; d : REAL; e : REAL; f : STRING; g: STRING; h : CHAR, i : DYNARRAY OF INTEGER; j : A_VARTYPE_WE_DO_NOT_REVEAL_TO_YOU_SUCKERS_HA_HA_HA;): BOOLEAN;

    It sounds as if you are on the verge of a sad realization, or about to enter a maze of twisty passageways, all alike.

  7. If a piece in B is needed in A, why not move the piece to A and it will always be there when A is used (with or without B). As long as B loads after A (when you $Include B) all should be well, which assumes A is always there when B is used.

    OR

    If you you use both A & B independently, sometimes A, sometimes B and sometimes A & B, then remove the common part of B used in A and make a third $Include file with the common part and place it before A and/or B as:

    {$Include 'CommonPart' }

    {$Include 'A' }

    or:

    {$Include 'CommonPart' }

    {$Include 'B' }

    or:

    {$Include 'CommonPart' }

    {$Include 'A' }

    {$Include 'B' }

    Yes, you can have $Include files nested in other $Include files (I do it at least 3 files deep in my Reshaper program) but for the most part you will get name conflicts if you $Include the same file twice.

    Remember, all $Include references are expanded before compiling begins. The result is one giant temporary text file with everything expanded. Any naming conflicts will kick an error.

    My advice is do not use $Includes twice in your program, even though it is technically possible if great care is taken to avoid naming conflicts. Structure your program in the simplest fashion to avoid future headaches.

    Raymond

  8. Petri,

    ???PIO scripts for objects execute at least twice when they are placed, one to determine the ghost outline and one to finally draw the object when you click. Could one of the executions be more guilty than the other, or affecting the other? From what you've written I wouldn't think so, but it may be worth a look.

    ???On the first execution no objects within the PIO exist and there are no reference points: active layer, handle to your PIO, etc. Are you using IsNewCustomObject() to isolate setup issues?

    Raymond

  9. ... but how many of us (I know that I do) still have install disks for all the old versions of VW/MC and the old Mac OSs?

    Hi Pat,

    ???If people haven't kept copies of their old software around they will need old software disks and a machine with a floppy drive to install them. I can attest that a Mac G4 running Classic will run versions back to MC+2.0 (my oldest copy). Anyone on a Mac with old copies of MiniCad or VectorWorks on a hard drive can copy the application folder to a newer machine running Classic (on a G3, G4 or G5) and use them to access their older files. All you'll need is your Serial Number to get it going on the newer machine. If forgotten, the SN can be found in the preference file in the old system folder, which can also be copied to the preference folder in the Classic system folder. Not sure how the PC side will fare with legacy apps.

    Raymond

  10. Special (high ordered ASCII) characters are font dependent. Different fonts display different glyphs (character outlines) for the same ASCII codes above 127. Unless you can control the font that is used in the listbox, you are at the mercy of only having available the glyphs within the font that is used. Off the top of my head I don't know what font is used on Windows or even if it can be user defined. I suspect not. I know that doesn't answer your question. Perhaps another will elaborate more.

    Raymond

  11. Arguments similar to Benson's also apply to the drafting of circuit boards, which VW excels at, even given its heavy bias toward Architecture. Line widths drawn 1:1 represent the widths of electrical traces. Spacing is exceptionally critical, especially around filleted corners, and there's no easier way to draw than at 1:1 using the Line and Poly tools this way.

    Raymond

  12. You're welcome, Ion. Had you looked in the VS Appendix you still wouldn't have found it, unless you looked at one of the "special" appendices maintained offline. Thank VCOR for publishing a more "special" list.

    Raymond

  13. Ion,

    ???Try using:

    SetPrefReal(68, newXvalueOfPageCenter);

    SetPrefReal(69, newYvalueOfPageCenter);

    ???I've not used them before, but in a very cursory trial it appears you might really want to use:

    SetPrefReal(69, -YvalueOfPageCenter);

    ???Not sure why, but it appears positive values of X move the page right (as expected) but positive values of Y move it down. This may be a throwback to screen coordinates where (0, 0) is in the upper left corner and all values on the screen are positive (just guessing).

    ???Be careful if the page and the user origin were both moved. I think Pref68 & Pref69 reference absolute coordiantes, not User coordinates. Some subtractions may be required.

    Good luck,

    Raymond

×
×
  • Create New...