Jump to content

LarryO

Member
  • Posts

    346
  • Joined

  • Last visited

Posts posted by LarryO

  1. Is there a VS function that I'm just not seeing that changes decimal (a Real) to a character string in either fractional inches and or feet and inches notation?

    I am hoping to present the value of an internal variable via a static parameter (String) in fractional inches or feet & inches if the user has selected that setting for their dimensioning.

  2. HandletoObject1 := FunctionThatCreates3DObject(parameter1);

     

    HandletoObject2 := FunctionThatCreates3DObject(parameter2);

    Move3DObj(HandletoObject2, 100, 0, 0);

     

    The parameter sent to the second call of FunctionThatCreates3DObject does not generate a 3D object and therefore does not return a handle to the variable.

    The call to Move3DObj(); with no value assigned into the handle variable HandletoObject2 will move a 3D object that was created prior.

     

    Is NIL a valid handle result to test for? Or would this work-around only work due to a fluke of luck?

    IF (HandletoObject2<>NIL) THEN Move3DObj(HandletoObject2, 100, 0, 0);

     

    <edit>

    Actually it may not be a bug. The Function may still be assigned the value generated from the first call because the second call doesn't replace it due to the parameter in the second instance telling the function nothing is required of it. </edit>

  3. Yes additional control point parameters only seem to appear when the plug-in is viewed top/plan.

    I was hoping that in any ortho view they would appear.

    I was going to reset the y-axis to zero internally each time so that it would only move in an x-axis direction for sliding elements along a linear plugin.

    There being no Z adjustment was conceptually helpful.

  4. Thanks Michael for the suggestion, that didn't make a difference.

    I suspect that the control point parameter is only functional in Top/Plan view.

    Too bad really. That seems to be the only interactive input with the object when using Vectorscipt beyond the pre-defined end points in the case of a linear object.

  5. As an anchor, an assembly sheet would typically display them between 1:5 and 1:12 but I've had to show them at 1:2 before.

    As a tie rod the detail will not be as important as being able to record the parts in use and the threading required for each end. I'm not sure how well I'll pull that off the first try around but I got to start somewhere.

     

    I am trying to think how a plugin could call up a texture if the texture/image was not already present in a drawing file. Would the image have to be in the plugin folder? I'm thinking first instance use in a new drawing file.

     

    If this object was embedded into a base plate symbol under a steel column there could be hundreds of them. Granted the symbol will only be defined once but I can't imagine the potential lag if I don't drop the modeled thread detail at some level for something less GraphicProcessorUnit intensive.

  6. My PIO script assembles this object so far. A configuration useful for a common concrete anchor or a tie rod assembly.

    Other than the rod, which it creates, the script is simply managing parameters, collecting data and then calling and placing the various built-in objects available to the VW_Arch and VW_Designer installations.

    image.thumb.png.67bbe606ca8d2e26552490d4c157da97.png

  7. The image was my test subject for applying a texture. I took a 3D bolt with nut and washer and ungrouped them before applying a texture that approximates the look of threads. My own object is a simple threaded rod with various nuts and washers potentially at each end.

     

    Seeing the texture wrap across the end of the solid was the part I'm not sure how best to eliminate.

     

    I could slap a flat disk over the end and hope that it would mask the texture but whenever I've placed items in the same or nearly same location in the past the results were glitchy. Maybe a sweep to look like a chamfered end thrown on the end. Or would a tubular mesh be the object to use? I might be creating memory management issues. I don't know having not used them before.

     

    Are sub-parts the place where a texture image would be embedded into the plugin definition?

     

  8. I'm definitely starting from square one here when using textures.

     

    Any suggestions for or against embedding a texture into a plugin object?

    Any examples of the technique?

    Are there any improvements in memory use or rendering speed by using a texture in lieu of actually carving out surface details such as threads?

    How does one prevent parts of a solid from being textured? Like the circular end of this solid modeled to look like a bolt.

    image.png.e5d8400354ff2d45cef76d883f4f74d0.png

  9. While I don't use that tool, it maybe taking a cue from the VW preference/Display/"Create text without fill" setting and incorporating embedded text with a background fill.

    Change the background setting temporarily from None to Solid and confirm/change the colour to be white before changing the background setting back to None or ByClass.

     

    Another technique with basic text blocks is to select all the text within the particular text block and then change the background to none. Text blocks support mixed point sizes and some other characteristics that would not be apparent when checking the text block's information.

  10. I'm a bit late to this discussion, but if you still are interested. A 3D nut also gives one a look a method into using a sweep to tap a hole with threads.

    If the Fastener tool exists in Fundamentals? Check on the show threads before ungrouping the plugin. The designer of this object used a two step approach for the hole so the detail level could be adjusted to show threads in hole, show hole or no internal detail.

    • Like 1
  11. The function reference suggests that a group of nurbs can be converted to a nurbs object.

    Would it not simply be a matter of creating a 2d arc on a plane, rotating it, convert to nurbs, group the resulting nurb with the abutting nurbs and convert to nurbs again to produce the continuous nurbs object?? If it works in that manner you would not need to invoke the compose menu command. I didn't try it out myself. I just based the idea upon this statement from the Script Function Reference for the ConvertToNURBS function. It may not accept a handle to a group of nurbs as input. I think the only way for the result to be a group of nurbs would be for the input handle to somehow represent more than one object.

    "Description:

    This function converts the input object into a new NURBS object or a group of NURBS objects in the document."

  12. This is the device I was using. They probably don't make them anymore.

    It was a big improvement in my workflow. I'm primarily lefthanded but use a mouse effectively with my right hand.

    The ergonomics of an extended keyboard with navigation keys on the right almost requiring you to let go of the mouse to operate them is counter-productive.

    IMG_20220622_080459_9.thumb.jpg.a69cfed0d770acef84f2e521040c3390.jpg

    • Like 1
  13. When I was using an imac and the keyboard without the numeric keypad. I was most happy with having purchased an inexpensive keypad that I placed to the left of the keyboard. It had the arrow keys, home, end and a forward delete. No longer was I bumping into an oversized keyboard with my mouse, nor having to release the mouse to press the navigation and view keys when my left arm got tired of reaching over to the right side numeric keys. And I now had an enter key on both sides of the keyboard even though there are some functional differences between return and enter.

    I have been thinking and looking for reasonable priced option for scripted keys for some time. I recall when I first started drafting in the early 90's on Autocad that in addition to keyboard entry many workstations had a graphic tablet with a puck for input and those tablets had flexible and programmable menus. Plastic overlays to identify different functional areas. Menus that could change depending upon the current context or a modifier key was being pressed.

    Somehow a lot of that functionality was lost or ignored when magnetic tablets went to the grave and these new touch screens simply have not caught up to the past. Or at least not within a typical workstation budget.

    • Like 2
  14. Thank Pat,

     

    So for anyone wanting a look at what is possible with a little help from our friends here you can take a look at this Concrete Screw Anchor plugin script in VW2022.

    I have a feeling that I may be a little weak in protection of attributes. I'm not sure if Push and Pop cover all the bases anymore.

    Note there is some extra code where the use of RegularPolygon is concerned due to what I perceive as a couple of bugs. It doesn't produce a closed polygon, adds an extra point at the end overlapping the start point and it divides the input radius by 25.4 when the document is set to imperial.

     

    Plugin goes in C:\Users\....\AppData\Roaming\Nemetschek\Vectorworks\2022\Plug-ins

    ConcreteScrewAnchor.vso

    Data file goes in C:\Users\....\AppData\Roaming\Nemetschek\Vectorworks\2022\Plug-ins\Data

    ConcreteAnchor.txt

     

    So the caveat to using this is that the data file needs to be flushed out for the pitch and turn columns. I didn't have one of each of their sizes on hand here at the shop. The columns can be identified by the data structure note in the main file. Hilti's north american product offering is the product line I set out incorporate. It has a more simplistic shape than that of the Simpson's product. The latter having a tapered insertion end. I also believe Hilti's product is natively an imported metric product with a number of nominal designations for its imperial sales lineup. Hence why I used the metric system of measuring threads by spacing and not by turns per inch.

     

    Have fun.

  15. Thanks Matt,

     

    I got it working!

    I will PM you the result of my concrete screw anchor plugin.

    The data file is a bit shy because the manufacturer (Hilti) that I attempted to emulate doesn't publish the thread pitch and number of turns of thread. I only had a selection of 1/2" profiles on hand and the pitch data listed in the file for the 3/8" diameter is from a different manufacturer (Simpson).

  16. Thanks Pat,

     

    Upon a slower examination I did eventually notice them. By bad.

     

    While I was able to implement LOD upon a completed object, I was not able to do so upon a subordinate object.

    The solids operation continues regardless of these variables. The following operation completes the chamfer in all three settings.

    After the step shown the washer flange is added via AddSolid. Looks like I may have to produce all three head variations and label them separately.

    Don't suppose that there is an alternative approach that would permit the use of an IF statement to simply not do the chamfer before adding the washer flange?

     

    Quote

    {construct bolt head}
    BeginXtrd(0,ConstructionData.hh);
        RegularPolygon(0,0, ConstructionData.hd/2, 6,2);
        DelVertex(LNewObj,7);
        SetPolyClosed(LNewObj,boolResult);
        SetObjectVariableBoolean(LNewObj, 1160, FALSE);
        boolResult:= SetEntityMatrix(LNewObj,0,0,0,0,0,0);
    EndXtrd;
    ResetOrientation3D;
    Rotate3D(#0.000000d,#-90.000000d,#0.000000d);
    hObjHandle1:= LNewObj;

     

    {chamfer bolthead}
    BeginSweep(#0.000000d,#360.000000d,#10.000000d,0);
        ClosePoly;
        Poly(0,0,
            0,ConstructionData.hh,
            ConstructionData.hd/2,ConstructionData.hh,
            (ConstructionData.hd/2/Cos(Deg2Rad(30.000000))), ConstructionData.hh-(((ConstructionData.hd/2/Cos(Deg2Rad(30.000000)))-ConstructionData.hd/2+0.5mm)*Tan(Deg2Rad(30.000000))),
            (ConstructionData.hd/2/Cos(Deg2Rad(30.000000))),0);
        SetObjectVariableBoolean(LNewObj, 1160, FALSE);
        boolResult:= SetEntityMatrix(LNewObj,0,0,0,0,-0,0);
    EndSweep;
    ResetOrientation3D;
    Rotate3D(#90.000000d,#-90.000000d,#0.000000d);
    SetZVals(0,0);
    SetObjectVariableBoolean(LNewObj,752,FALSE); {LOD: LOW setting, LOD variables (750,751,752) seem to default to TRUE}
    SetObjectVariableBoolean(LNewObj,751,FALSE); {LOD: MEDIUM setting}
    SetObjectVariableBoolean(LNewObj,750,TRUE); {LOD: HIGH setting}

     

    iResult:=IntersectSolid(LNewObj,hObjHandle1,hObjHandle2);

     

    {add washer flange to bolt head}
    BeginSweep(#0.000000d,#360.000000d,#10.000000d,0);
        ClosePoly;
        Poly(0,ConstructionData.fht+Tan(Deg2Rad(#16.8d))*ConstructionData.fd/2,
        ConstructionData.fd/2,ConstructionData.fht,
        ConstructionData.fd/2,0,
        0,0);
        SetObjectVariableBoolean(LNewObj, 1160, FALSE);
        boolResult:= SetEntityMatrix(LNewObj,0,0,0,0,0,0);
    EndSweep;
    ResetOrientation3D;
    Rotate3D(#90.000000d,#-90.000000d,#0.000000d);

     

    iResult:=AddSolid(LNewObj,hObjHandle2,hObjHandle1);
     

     

     

√ó
√ó
  • Create New...