Jump to content

Alexandre Villares

Member
  • Posts

    253
  • Joined

  • Last visited

Posts posted by Alexandre Villares

  1. Hi P,

    I believe VectorWorks Classes are the most near thing to ACad Layers and on importing from ACad you should be able to use class visibility & scripts as a way of separating things...

    Strict Class to Group conversion would be impossible because it would violate the container/containded relationship of some objects (i.e. block/symbol of class X contains objects of class Y, Z W...).

    There is a free simple script to merge classes, it's called delete and reassign class.

  2. Here my own Poly Offset studies, it works on n-sided closed polygons and I think it solves the inside/outside problem (this code draws some offset locus on the outside of the selected polygon):

    code:

     Procedure PolyOff;

    VAR

    pHd : HANDLE;

    i, n, Vtype : INTEGER;

    D, A, Vradius : REAL;

    M :VECTOR;

    C, V0,V1, V1A, V1B, V2, VF :POINT;

    B1, B2 : BOOLEAN;

    BEGIN

    {*} pHd:=LSActLayer;

    {*} IF pHd <>NIL THEN BEGIN

    D:=RealDialog('Offset Dist.','1');

    n := getVertNum(pHd);

    FOR i:=1 to n do BEGIN

    IF i=1 THEN BEGIN

    GetPolylineVertex(pHd, n, V0.x, V0.y, Vtype,Vradius);

    GetPolylineVertex(pHd, i, V1.x, V1.y, Vtype,Vradius);

    GetPolylineVertex(pHd, i+1, V2.x, V2.y, Vtype,Vradius);

    END ELSE IF i<n THEN BEGIN

    GetPolylineVertex(pHd, i-1, V0.x, V0.y, Vtype,Vradius);

    GetPolylineVertex(pHd, i, V1.x, V1.y, Vtype,Vradius);

    GetPolylineVertex(pHd, i+1, V2.x, V2.y, Vtype,Vradius);

    END ELSE BEGIN

    GetPolylineVertex(pHd, i-1, V0.x, V0.y, Vtype,Vradius);

    GetPolylineVertex(pHd, i, V1.x, V1.y, Vtype,Vradius);

    GetPolylineVertex(pHd, 1, V2.x, V2.y, Vtype,Vradius);

    END;

    MoveTo (V0.x, V0.y);

    LineTo (V1.x, V1.y);

    HCenter(LNewObj,C.x,C.y);

    A:=HAngle(LNewObj);

    DelObject(LNewObj);

    M:=Ang2Vec(A+90,0.001);

    IF PtInPoly(C.x+M.x,C.y+M.y,pHd)

    THEN M:=Ang2Vec(A-90,D)

    ELSE M:=Ang2Vec(A+90,D);

    V0.x:=V0.x+M.x; V0.y:=V0.y+M.y;

    V1A.x:=V1.x+M.x; V1A.y:=V1.y+M.y;

    LineTo (V2.x, V2.y);

    HCenter(LNewObj,C.x,C.y);

    A:=HAngle(LNewObj);

    DelObject(LNewObj);

    M:=Ang2Vec(A+90,0.001);

    IF PtInPoly(C.x+M.x,C.y+M.y,pHd)

    THEN M:=Ang2Vec(A-90,D)

    ELSE M:=Ang2Vec(A+90,D);

    V1B.x:=V1.x+M.x; V1B.y:=V1.y+M.y;

    V2.x:=V2.x+M.x; V2.y:=V2.y+M.y;

    LineLineIntersection(V0,V1A,V1B,V2, B1,B2, VF);

    Locus(VF.x,VF.y);

    END; {of FOR}

    {*} END;

    END; run(PolyOff);
    [/code]

    PS: Kiwi, I've sent you a private msg! [Wink]

    [ 10-09-2003, 09:52 PM: Message edited by: Alexandre B A Villares ]

  3. Assuming you have a layer called "Normal Referenced Layer" I guess you might do this:

    1. Create a new layer called "Rotaded to Print Layer"

    2. At this new layer, View>Create Layer Link... (choose the "Normal Referenced Layer" and tick project 2D objects)

    3. Select All, Edit>Unlock, and rotate de Layer Link at will.

    [ 09-12-2003, 01:23 PM: Message edited by: Alexandre B A Villares ]

  4. Have a look at this (select a wall first):

    code:

    Procedure WallInfo;

    VAR

    pX, pY, zValue: REAL;

    height,width,depth:REAL;

    BotZ :REAL;

    hWall : HANDLE;

    BEGIN

    hWall:=FSActLayer; {Handle to the First Selected object at the Active Layer}

    Get3DCntr(hWall , pX, pY, zValue);

    Get3DInfo(hWall , height,width,depth);

    BotZ:= zValue - (depth/2);

    Message(Concat('BotZ=',BotZ,' DeltaZ=',depth));

    END;

    Run (WallInfo);

    [/code]

  5. quote:

    Originally posted by justin1974:

    I want my drawing title PIO to always be the same place [...] but how do can I set it so that the object is at an exact point on the page?.

    IF GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand) THEN BEGIN

    GetSymLoc(objectHand, pioX, pioY);

    HMove(objectHand, newX-pioX, newY-pioY);

    END;

  6. I know there is an issue with GetObjectVariableInt (H,17), to get a dimension's text size, and I've seen at the VS-List a workaround with GetObjectVariableReal

    Now, is there a way to get/set the font ID (selector 28) or th text style (selector 19) ?

    [ 08-20-2003, 10:06 PM: Message edited by: Alexandre B A Villares ]

  7. 1. Try

    IF GetCustomObjectInfo(objectName, objectHand, recordHand, wallHand) THEN SetRField(objectHand, Getname(recordHand),'Area',Num2Str(1,A));

    {'Area' is the paramenter name, A is a Real number}

    2. Try

    FUNCTION ??HArea (?h:HANDLE?) :REAL ;

    Description:

    Function HArea returns the area of the referenced object.

  8. There is a way to change a PIO's default values.. then you might make it increment it's value at each insertion. I'll try and see if I can find and post some old code I made for an incrementing PIO.

  9. gMarkers from VectorDepot are a very good start point!

    Just a couple of tips:

    There are many kinds od PIO's, point, linear, rectangular, path... If you are going to copy and tweak an existing one, don't worry about it, but if you are going to create one from scratch you'll have to choose (I guess your hexagonal thing would be best built as a point object).

    Parameter on the OI Palette can be added/edited at the plug-ins panel. The first column is the internal name, but inside the code you have to add a 'p' (i.e. 'LegSize' wil become 'pLegSize' as in 'L:=pLegSize;').

  10. quote:

    Originally posted by limbrost:

    1/ a hidden line view that didn't polygonise all the surfaces. Manually removing non-edge lines is really slow.

    I understand that you can convert to lines either wireframe, hidden etc. but you still get non-edge lines that take a long time to erase.

    Have you seen the smoothing angle settings at the document preferences?

    quote:

    2/ Sweep along 2 rails (often extrusion along a path can twist the objects or you have no control over twisting)


    Could you elaborate on this one? Have you explored the model>sweep? You can use a 2D locus to indicate the vertical rotation axis.

  11. Hi Marietta,

    For the dimension rounding, just go to the Page menu > Units...

    Then on the first pop-up, instead of 'General Display' choose 'Primary Dimension Objects' - or something - and change the rounding...

    If your tangent constraint is on (Constraints palette, last one on the right) you should be able to:

    1. Draw a line with the first point away from the arc and then get the 'tangent' snap-point.

    2. Click with the line tool anywhere on the arc or circle and as you move the mouse the line is automatically constrained to a tangent one.

    [ 06-25-2003, 08:10 PM: Message edited by: Alexandre B A Villares ]

  12. Try this VectorScript sample 'pipeline' code:

    Mac or PC

    You can change the letters to suit your needs, if you can't work it out, mail me and I'll help you.

    [ 05-28-2003, 12:15 AM: Message edited by: Alexandre B A Villares ]

  13. This is not exactly what is being discussed, but I guess few people know that if you enter boomerang mode pan (using the space bar) you can then release the mouse button and continue to move an object... it becomes a sort of click-click moving (but it must have an on-object first-click point).

    1. Put the mouse over an object you want to move.

    2. Press and hold the mouse button.

    3. Press and hold the space bar

    4. Release the mouse button

    5. Release the space bar

    6. Move the mouse (it will cause the object to move)

    7. Click to put down the object.

    But back to the off-object moving thing, I sometimes use Jan15's locus method and I'd like to reinforce Andrew Bell's recomendation on visiting VectorDepot.com

    [ 05-11-2003, 11:08 AM: Message edited by: Alexandre B A Villares ]

×
×
  • Create New...