Jump to content

MullinRJ

Member
  • Posts

    1,987
  • Joined

  • Last visited

Everything posted by MullinRJ

  1. Guy, Can you reproduce it? If so, would you describe what you are doing when it happens? The Gnd Plane is one of the default Working Planes. It's possible the Working Plane is getting changed by something you are doing, so the menu may be displaying correctly. More info would help dispel some of the confusion. Raymond
  2. Grant, ???Set the drawing mode to Layer Plane. It's in a menu at the top of the drawing window between the Layers and Saved Views menus. Now when you draw you'll be drawing on the Layer Plane, regardless of your view. ???Also, if you want to draw on a 3D layer that already has 2D Planar objects on it, double click on one of the 2D Planar objects and its 3D plane will become the active Working Plane. Select you tool, and make sure the Drawing Plane menu says "Working Plane". Now when you draw you will be drawing on that 3D Plane, regardless of your view. ???To set a 3D working plane, use the Working Plane tool to place a working plane on the face of a 3D object. HTH, Raymond (From the home of Super Bowl XLV - better suited for the Winter Olympics this week)
  3. Hi Mark, ???It's working as it always has, but there is a bug where SetRot3D moves some objects back to the origin (like your cone) and other objects back to the place they were created (like Extrudes) before applying the rotation. This is better seen with an Extrude that is created in one position then moved to another. If you perform SetRot3D on it, it will jump back to it's creation position then rotate. I thought I submitted a bug several years ago, but I may be mistaken. In either case nothing's changed. The good news is you can work around it. In your case, you can rotate first then move it to get the cone's base at (2, 0, 2). hnd := CreateCone(0, 0, 0, 0, 0, 1, .5); SetRot3D(hnd, 0, 45, 0, 0, 0, 0); Move3DObj(hnd, 2, 0, 2); Or you can use Set3DRot() which applies an incremental rotation: hnd := CreateCone(0, 0, 0, 0, 0, 1, .5); Move3DObj(H, 2, 0, 2); Set3DRot(H, 0, 45, 0, 2, 0, 2); Remember to specify the point of rotation in the Set3DRot() call if you move it or create it away from the origin. HTH, Raymond
  4. You can also use the 2D Reshape tool. First convert the Rectangle to a Polygon, under menu Modify->Convert->Convert to Polygons. Then select the 2D Reshape tool and use the second mode in the first group and the last mode in the second group. That's the Change Vertex Mode and the Fillet (Circular Arc) Point Mode, respectively. Set the radius to 0 with the Fillet Preferences... (last tool mode icon on the right). Now, click on the corners you what rounded. By setting the radius to 0, you will automatically get the largest radius possible for that corner. No math required. Raymond
  5. Hello Piero, This line puts the text on the Layer Plane (Ground Plane): ???SetObjectVariableBoolean(objectHandle, 1160, false); which may not be visible when you click in a 3D view. If you set it to TRUE it will draw on the Screen Plane and show where you click: ???SetObjectVariableBoolean(objectHandle, 1160, false); If you DO want it to move with the view then you DO want it on the Layer Plane. I haven't figured out how to do that yet. Can you explain how you want it to look? Raymond
  6. I was just playing in a new project with the colors I picked earlier and I left out a step that bcd outlined. Picking the colors as I described does not save them in any VW document unless you also apply them to something. The system remembers them, though, at least on the Mac. Defining a color palette is also required if you want to easily access them in multiple files. Raymond
  7. Actually, you can pick colors from your screen. I've done it on the Mac with the OS Colors palette. I can only assume there is a similar facility on Windows. In VW's Attributes Palette, click on the Fill Color or the Pen Color rectangle. The VW color palette appears. At the top is a color wheel icon which launches the OS Colors palette. (On the Mac) there is a Magnifying Glass icon that is the equivalent of the Eyedropper tool you referred to. Click on the Magnifying Glass icon and select your color. Then drag your color from the large rectangle at the top to one of the little white squares at the bottom. You can add more white squares by dragging the dot at the bottom of the row of white squares to resize this area of the palette. I can get up to 300 squares. I don't know what you do if you need more. If you get this far, remember to save often. In VW Help, search for "Selecting Standard Operating System Colors". HTH, and Happy New Year, Raymond
  8. But Peter, your picture shows the opposite (0.4 < 0.5). So, is your picture correct or your description? Raymond
  9. James, ???Try this line at the end of your script. ResetObject(LActLayer); HTH, Raymond
  10. You can toggle it with this one line script SetPref(1099, not GetPref(1099)); { toggle Screen/Layer Plane mode } To make it run off a hotkey, see Robert Anderson's post (it's the last option): What do I do with a VectorScript, anyway? If you need help with the Workspace Editor, check the online help or write back here. HTH, Raymond
  11. Don, ???Are you in a Rotated Plan View? If so, this is a known bug. I believe it will be fixed in the next SP release. Raymond PS - If you would, please fill out a signature that lists your machine specs and VW version information. It will help others answer you more quickly without having to ask the obvious first questions. Thanks - R.
  12. No, User Functions will not slow down a PIO's regen time, especially if they are not executed. Poorly written one's will, as will ones that contain a lot of loops, or ones that search through a lot of objects, etc. If you are worried about file size, you could split your functions by type, but you'll have to be careful about the order they load. In Pascal, a function must be defined before it is called. Another thing you could do, when you are finished developing a PIO, make a copy of everything in another folder and remove all the code you don't use. Then compile it so everything gets copied into the PIO. If the files end in .px a copy of the code will be loaded into the PIO and it will be stand alone. Keep your original files with all the $Included files so you can make easy changes. You'll have to read more about it in the VS manual to get a better feel for your compile options. Raymond
  13. How many UNDO levels have you specified in your VW Preferences? How many objects do you have in your file? If both numbers are large, that might explain the slowdown. Closing the file and restarting the program erase your history and speed things up. This is not the only cause of a slowdown, but it's a predictable one. To test, set your undo count to 0 or 1, close the Preferences dialogue, then reset your count. If things speed up, that's probably it. If you can live with a lower number, try it. I use 20 and rarely, if ever, see unexplained slowdowns. Your mileage may vary. Raymond
  14. Another thing to note, the color space for RGB is not 0..255, but rather 0..65535. You can convert easily by multiplying each 0..255 value by 257. As TBE points out, you need to get a handle to your object. The easiest one is FSActLayer. It can get much more complicated if you want your script to work off the active layer, but for most uses H := FSActLayer; will work. Raymond
  15. Hi David, If you send me the files offline, I would be happy to update them to the version of your choosing. (mullinrj@aol.com) I keep all the older versions on a G4 running OS9 for just such an event. Raymond
  16. Vlado, ???I'm having an inordinate amount of trouble getting meaningful data from objects with the standard 2D VS calls. With all the new drawing environments there needs to be an easier way to get and set object parameters to get what you want. ???This started to become a problem in VW 2008 with the introduction of the Rotated Plan View (RPV), but has escalated to a nightmare. Now with Screen Plane, Layer Plane and 3D Plane objects - in conjunction with the RPV - there isn't one call that returns consistent data in all combinations of the above. Move the User Origin and you're in for a mind altering experience. Raymond
  17. Thank you, Vlado. Raymond
  18. Justin, ???Your way should work. I think it's a bug. This will do the same thing, without the elegance of concise code. Procedure MyDuplicate; Var Boo :Boolean; Htemp, GrpHnd: HANDLE; BEGIN BEGINPOLY; Moveto(0, 0); Line(100, 0); LIne(0, -100); ENDPOLY; Htemp := LnewObj; GrpHnd := nil; BEGINGROUPN(GrpHnd); Locus(0, 0); { dummy object } ENDGROUP; Htemp := Hduplicate(Htemp, 100, 0); Boo := SetParent(HTemp, GrpHnd); { move inside group } Htemp := Hduplicate(Htemp, 100, 0); { dups stay in group } DelObject(FinGroup(GrpHnd)); { Delete locus } Message('Htemp: ', Htemp, ' Group: ', GrpHnd); END; RUN (MyDuplicate);
  19. Try using the Save View command. You can set View, Layers and Class visibilities with names that mean something to you. Switching is just a double click away. Cmd-Shift-Period and Cmd-Shift-Comma are even faster. Raymond
  20. Sean, ???Yes, you can have a larger radius at a vertex than one that would fit. VW will draw the smaller one in such a case. You can set a value with VS, or manually apply a larger value with the 2D Reshape tool (2nd mode button in the first group, and 4th mode button in the second group). One way to get there without realizing it is to have a larger Polyline and shrink it. VW does not adjust the radii after the shrink, it just draws the smaller of the programmed value, or the largest value that will fit. ???Where you'll run into problems is when you use VS to query the radius value and it tells you 10, because that's what's programmed, but really it's 6, because that's the largest radius that will fit. There's a lot of math needed to ferret out the 6 value if you intend to KNOW what the actual value is in a program. If you just want to see the value, the OIP will display the correct radius if you step through the vertices and look at the radius. NSITH*, Raymond * Not sure if this helps
  21. The safest way I've found is to create a plugin with one line: {$INCLUDE \Your\script\file\pathname\here } Also, set VW Preference 407 to TRUE, which you can toggle with a script or with menu Tools > Scripts > VS Compiler Mode. This tells the compiler to recompile your code each time it is run. Use any text editor to make changes. You don't even have to close your editor window, just save after your changes and run again. Reshaper is over 1MB in source code and has 55 $INCLUDES. No signs of hitting any limits yet. This works equally well for menu commands, tools and plug-in objects. When you are done developing, you can have the compiler copy all your code into your plugin for distribution, or you can leave it as a multi-file $INCLUDE'd collection. The choice is yours. Raymond
  22. You can also use the Sweep command, which is also under the Model menu. Place a locus to the side of the object you want to sweep by at least the radius of the cylinder you want it to wrap around. This assumes you want it wrapped around the outside of the cylinder Select both the locus and your object and invoke the Sweep command. To get it to spiral up, enter a positive value for the pitch. For the number of wraps, enter 360 * 7 (for 7 full turns). This saves you from having to do the math in your head, or elsewhere. Render in OpenGL or better to see it as a solid. You may have to assign colored fills to see detail. Raymond
  23. In your Event Loop, the variable ITEM identifies the exact control that was pressed. You can trap it with: case item of ???1: begin end;???{ OK Button } ???2: begin end;???{ Cancel Button } ???21..40: begin ???{ do stuff here if control 21 - 40 gets pressed } ???end; end;???{ case } This will work even if you only populate 15 of the 20 possible control numbers. HTH, Raymond
  24. Preston, Are you using PASTE, or PASTE IN PLACE? The latter keeps items registered even when pasting on layers at different scales. Also, you can change the scale of any layer at any time and not lose your registration. Lastly, are you importing DXF Layers as CLASSES (default) or as LAYERS? That setting is under the Graphic Attributes tab, which you will find behind the Set Custom Options... button if you are importing multiple DXF/DWG files at once. If you use the As Layers option it should split your data to design layers for you. HTH, Raymond
  25. Hi Who, You can get the handle of the 1st object in a group with: ???h2a := FinGroup(GrpHand); and get a handle to the next object in the group with: ???h2b := NextObj(h2a); If they happen to be Polys, so much the better. OR, you can duplicate the group with: ???Grouplic8Hand := hDuplicate(GrpHand, 0, 0); OR, move pieces into a Group with: ???boo := SetParent(h2, GrpHand); or out of a Group with: ???boo := SetParent(h2, GetParent(GrpHand)); If you want to merge the two polys in your group into one (assuming they overlap), you might use: ???h3 := AddSurface(h2a, h2b); and then ungroup it with: ???hUngroup(GrpHand); I'm not sure which approach, if any, would work for you. I'll let you pick. Have fun, Raymond
×
×
  • Create New...