Jump to content

lamberto previati

Member
  • Posts

    15
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Problem fascinating! A more detailed drawing is possible to have it? Also in developed PDF. The image gif does not allow to read measures it and the indications. Ciao Lamberto
  2. An other way, a bit more complicated, for supporting stringers under treads or for rail is.... Create a Nurs curves that they represent the supporting vertical section for each tread ad then use loft command to create a nurbs loft surface or.... after Nurbs curves are created and correctly positionated you can group it and start this little script. It's a little time saving. Ciao Lamberto {copy from this line to .....} Procedure CreateLoftSurfFromGroup; Var HNurbsSurf:Handle; Begin HNurbsSurf:=CreateLoftSurfaces(LSActLayer,False,True,True); End; Run(CreateLoftSurfFromGroup); {....this last}
  3. I think that better pictures are required for a better analisys of the project. people41201.gif to demostrate a complex stair structur. Multiple centerpoints are for rise surfaces. From your gif there is possible to see two circle from top view with different center points. 8" rise for each tread isn't too much for stair? Ciao Lamberto
  4. Ziska, is your stair cylindrical? Can you explain me some value. rise, run, pendecy etc.... of your project? Lamberto
  5. Hi Ziska, the script haven't control for its validation field of existence and i think that some or more values can return non-expected result. I haven't explored the limit of script, sorry. Ciao Lamberto.
  6. Hi to all. Here a new evolutione of my script. This one now create a smoothed surface without face effect. Please try and comment. Thank. Ciao Lamberto {copy from all this line to all.........} {Arch. Lamberto Previati ?2004/08 La procedura consente di disegnare un rettangolo dato in termini di Lunghezza/Larghezza/AngoloDiRotazione, sulla superficie conica data in termini di RaggioDiBase/Altezza. 2004-08-24 News: insert two new option in "Other constant" parameter: 1- kDelCone: if equal to 'Y' then procedure kill cone; 2- kDelCurvGpr: if equal to 'Y' then procedure kill Nurbs curves that generate the surface; Implemented: procedure CreateNurbsCurve(0,0,0,True,2); insteed BeginPoly3D, killed; procedure AddVertex3D(hNurbs,P.x,P.y,P.z);insteed Add3DPt(P.x,P.y,P.z); procedure NurbsDelVertex(hNurbs,0,0); for first point correction; } PROCEDURE RectSurfOverConicSurface; CONST {ATTENZIONE le unit? di misure assunte sono quelle impostate} {CONE PARAMETER} kr= 45; {radius of base cone} kH= 2002; {Height of cone} {RECTANGLE SURFACE PARAMETER} kLu= 330; {Rectangle Length } kAlt=80; {Rectangle Height} kRot= 20; {Rectangle rotation. O degree one side is complanar to the cone base} {Point affination} kn=62; {segment for curve} knRip=10; {number of curves} {Other constant} kPi=3.14159; {Costante PiGreco} kDelCone=' '; {Type Y for killing Cone} kDelCurvGrp='Y'; {Type Y for killing curves group} VAR DistG,DistPV,DeltaL,Ckr,CrG,rP:REAL; {DistG=lunghezza generatrice cono/DistGx=distanza di pX da V} p,O3d,A3d,B3d,C3d :Point3D; {pX= punto generico del perimetro del rettangolo} AngG,AngP,AngP3D :REAL;{AngG=angolo di sviluppo/AngP=angolo} i,ii,PSize :INTEGER; {i=indice per i cicli FOR} OO,O,A,B,C :POINT; hLn,hNurbs,HGroupCurves,HNurbsSurf :Handle; red,green,blue :LONGINT; BEGIN {Set view in Top/Plan mode } PopATTRS; DoMenuTextByName('Standard Views',1); {Disegna il CONO in 3D} {} IF kDelCone<>'Y' THEN BEGIN PenSize(5); BeginMXtrd(0,kH); Oval(-kr,kr,kr,-kr); Locus(0,0); EndMXtrd; END; {} DSelectAll; {} {Calcoli preliminari: lunghezza della generatrice, circonf base cono, circonf.con raggio=generatrice, angolo di sviluppo della superficie conica} DistG:=sqrt(kr^2+kH^2); Ckr:=2*kPi*kr; CrG:=2*kPi*DistG; AngG:=(Ckr/CrG)*360; {Impostazioni preliminari} ANGLEVAR; O.x:=0; O.y:=-DistG; MoveTo(O.x,O.y); LineTo((kLu/kn),#(-kRot)); GetSegPt2(LNewObj,O.x,O.y); DelObject(LNewObj); NOANGLEVAR; {Calcola le coordinate dei vertici del rettangolo cio? i punti 0,A,B,C disegnando i quattro lati 0A, 0B, AC e BC} AngleVar; MoveTo(O.x,O.y);Lineto(kLu,#(180-kRot)); GetSegPt2(LNewObj,A.x,A.y);DelObject(LNewObj); MoveTo(O.x,O.y);Lineto(kAlt,#(90-kRot)); GetSegPt2(LNewObj,B.x,B.y);DelObject(LNewObj); MoveTo(A.x,A.y);Lineto(kAlt,#(90-kRot)); GetSegPt2(LNewObj,C.x,C.y);DelObject(LNewObj); MoveTo(B.x,B.y);Lineto(C.x,C.y);DelObject(LNewObj); NoAngleVar; {INIZIO PROCEDURE PER DISEGNARE I LATI DEL RETTANGOLO SULLA SUPERFICIE CONICA} PenSize(10); {Disegna il segmento OA in 3D calcolando i punti in base al numero indicato in kn e tante parallele ad OA quante indicate da knrip} {} AngleVar; OpenPoly; OO.x:=O.x; OO.y:=O.y; FillFore(100,100,100); For ii:=1 TO knrip DO BEGIN hNurbs:=CreateNurbsCurve(0,0,0,True,2); For i:=1 to kN+1 DO BEGIN MoveTo(OO.x,OO.y); LineTo((kLu/kn)*i,#(180-kRot)); GetSegPt2(LNewObj,P.x,P.y); DelObject(LNewObj); DistPV:=Distance(P.x,P.y,0,0); P.z:=kH*(1-(DistPV/DistG)); AngP:=Rad2Deg(Arcsin(P.x/DistPV)); AngP3D:=(AngP/AngG)*360; rP:=(DistPV/DistG)*kr; MoveTo(0,0); LineTo(rP,#(270+AngP3D)); GetSegPt2(LNewObj,P.x,P.y); DelObject(LNewObj); {Add3DPt(P.x,P.y,P.z);} AddVertex3D(hNurbs,P.x,P.y,P.z); END; NurbsDelVertex(hNurbs,0,0); MoveTo(O.x,O.y); LineTo((kAlt/knrip)*ii,#(180-kRot-90)); GetSegPt2(LNewObj,OO.x,OO.y); DelObject(LNewObj); End; DoMenuTextByName('Group Chunk',1); NoAngleVar; {NURBS procedure} HGroupCurves:=LSActLayer; HNurbsSurf:=CreateLoftSurfaces(HGroupCurves,False,False,False); IF kDelCurvGrp='Y' THEN DelObject(HGroupCurves); SetPenFore(LSActLayer,200,100,100); SetFillFore(LSActLayer,200,100,100); {Reset} PushATTRS; END; RUN(RectSurfOverConicSurface); {... this one}
  7. I'm unable to attach image, sorry. The script. This script traspose the 2D value (like Tom Kyler's cone unfolded explanation) in 3D point. Therefore, this script, approximate the rectangular surface. Well.... You access to the script editor old down Alt and double click on its name when in your script palettes. After SCRIPT EDITOR open, you can edit some paramters, notice that these values are all the constant values. Here my last parameters setting (in mm): {CONE PARAMETER} kr= 25; {radius of base cone} kH= 400; {Height of cone} {RECTANGLE SURFACE PARAMETER} kLu= 130; {Rectangle Length } kAlt=80; {Rectangle Height} kRot= 25; {Rectangle rotation. O? degrees one side is complanar to the cone base} {Point affination} kn=64; {segment for curve} knRip=10; {number of curves} After setting, click OK botton and run script with double click on its name in your palettes script. Ok, this SCRIPT IS PROTOTYPE and FREE, but any suggestions or criticaly are welcome. Good work. Ciao Lamberto {Copy lines bellow} {Arch. Lamberto Previati ?2004/08 La procedura consente di disegnare un rettangolo dato in termini di Lunghezza/Larghezza/AngoloDiRotazione, sulla superficie conica data in termini di RaggioDiBase/Altezza. } PROCEDURE RectSurfOverConicSurface; CONST {ATTENZIONE le unit? di misure assunte sono quelle impostate} {CONE PARAMETER} kr= 25; {radius of base cone} kH= 400; {Height of cone} {RECTANGLE SURFACE PARAMETER} kLu= 130; {Rectangle Length } kAlt=80; {Rectangle Height} kRot= 25; {Rectangle rotation. O degree one side is complanar to the cone base} {Point affination} kn=64; {segment per curve} knRip=10; {number of curves} {Other constant} kPi=3.14159; {Costante PiGreco} VAR DistG,DistPV,DeltaL,Ckr,CrG,rP:REAL; {DistG=lunghezza generatrice cono/DistGx=distanza di pX da V} p,O3d,A3d,B3d,C3d :Point3D; {pX= punto generico del perimetro del rettangolo} AngG,AngP,AngP3D :REAL;{AngG=angolo di sviluppo/AngP=angolo} i,ii,PSize :INTEGER; {i=indice per i cicli FOR} OO,O,A,B,C :POINT; hLn,hNurbs,HGroupCurves,HNurbsSurf :Handle; red,green,blue :LONGINT; BEGIN {Set view in Top/Plan mode } DoMenuTextByName('Standard Views',1); PSize:=FPenSize; FFillFore(red,green,blue); {Disegna il CONO in 3D} {} PenSize(5); BeginMXtrd(0,kH); Oval(-kr,kr,kr,-kr); Locus(0,0); EndMXtrd; {} DSelectAll; {} {Calcoli preliminari: lunghezza della generatrice, circonf base cono, circonf.con raggio=generatrice, angolo di sviluppo della superficie conica} DistG:=sqrt(kr^2+kH^2); Ckr:=2*kPi*kr; CrG:=2*kPi*DistG; AngG:=(Ckr/CrG)*360; {Impostazioni preliminari} ANGLEVAR; O.x:=0; O.y:=-DistG; MoveTo(O.x,O.y); LineTo((kLu/kn),#(-kRot)); GetSegPt2(LNewObj,O.x,O.y); DelObject(LNewObj); NOANGLEVAR; {Calcola le coordinate dei vertici del rettangolo cio? i punti 0,A,B,C disegnando i quattro lati 0A, 0B, AC e BC} AngleVar; MoveTo(O.x,O.y);Lineto(kLu,#(180-kRot)); GetSegPt2(LNewObj,A.x,A.y);DelObject(LNewObj); MoveTo(O.x,O.y);Lineto(kAlt,#(90-kRot)); GetSegPt2(LNewObj,B.x,B.y);DelObject(LNewObj); MoveTo(A.x,A.y);Lineto(kAlt,#(90-kRot)); GetSegPt2(LNewObj,C.x,C.y);DelObject(LNewObj); MoveTo(B.x,B.y);Lineto(C.x,C.y);DelObject(LNewObj); NoAngleVar; {INIZIO PROCEDURE PER DISEGNARE I LATI DEL RETTANGOLO SULLA SUPERFICIE CONICA} PenSize(10); {Disegna il segmento OA in 3D calcolando i punti in base al numero indicato in kn e tante parallele ad OA quante indicate da knrip} {} AngleVar; OpenPoly; OO.x:=O.x; OO.y:=O.y; FillFore(100,100,100); For ii:=1 TO knrip DO BEGIN BeginPoly3D; For i:=1 to kN+1 DO BEGIN MoveTo(OO.x,OO.y); LineTo((kLu/kn)*i,#(180-kRot)); GetSegPt2(LNewObj,P.x,P.y); DelObject(LNewObj); DistPV:=Distance(P.x,P.y,0,0); P.z:=kH*(1-(DistPV/DistG)); AngP:=Rad2Deg(Arcsin(P.x/DistPV)); AngP3D:=(AngP/AngG)*360; rP:=(DistPV/DistG)*kr; MoveTo(0,0); LineTo(rP,#(270+AngP3D)); GetSegPt2(LNewObj,P.x,P.y); DelObject(LNewObj); IF (ii=1) & (i=0) then Add3DPt(0,-kr,0) ELSE Add3DPt(P.x,P.y,P.z); END; EndPoly3D; hNurbs := ConvertToNURBS(LNewObj, false); MoveTo(O.x,O.y); LineTo((kAlt/knrip)*ii,#(180-kRot-90)); GetSegPt2(LNewObj,OO.x,OO.y); DelObject(LNewObj); End; DoMenuTextByName('Group Chunk',1); NoAngleVar; {NURBS procedure} HGroupCurves:=LSActLayer; HNurbsSurf:=CreateLoftSurfaces(HGroupCurves,False,False,False); {DelObject(HGroupCurves);} SetFillFore(LSActLayer,200,100,100); {Reset} PenSize(PSize); FillFore(red,green,blue); END; RUN(RectSurfOverConicSurface); {END OF THE SCRIPT}
  8. Snowman, Tom Kyler have good explaned you the way for script using. If you have still problems i send you a VW file with script. My suggestion is copy text script and save it in any folder on your hard disk as file text. This script is only prototype script for any next better solution as type PIO and ParametricObject, but I haven't time for this and i use the script editor metod for my execution. Is no elegance but functional. Ziska, { Error: Identifier not declared. } This problem type sound like a missing line. Have you copied all lines of the script?
  9. Oopps. How can I insert correctly the pictures? What command? Thank Lamberto.
  10. Hello, i'ave a script for this kind of construction problem. Script i'snt professional and haven't a dialog window for parameter input but a bit confidence with script editor is request. The script draw a rectangular surface (NURBS type) over a conical one. These are two examples: If you are interest in it contact me or reply in this forum. Ciao Lamberto
  11. Can you post front and top/plan views of your project? Lamberto
  12. Well NickB, i'm happy for you. I think VectorScript is one better opportunity for VW user. Best Lamberto
  13. NickB, follow file is the script. It work in VW9 and 10 versione. How it work? In top/plan view to create the tread stair (horizontal surface of your stair) and after the 2D point for center of rotation. If you haven't experience in manage script you can run it via men? File>Import>Import vectorscript.... then reply to the dialog that appare. Also you can save the script in your file with Palettes> Resource Browser. Make this steps: a) open Resource Browser from menu Palettes; b) select "Resources" then "New Resource in....2; c) "Create Resource" window to appare, select "VectorScript" then click "Create"; d) Assign a name in the next dialog and "Ok"; e) Assign a script name in the next dialog and "Ok"; f) Now you are in VectorScript Editor, look at top-left side there are two icons. Click on the left one and select "Text File..."; g) find text file of my script, select and open; h) now text script is pasting in window editor, well, click "Ok". At this time you run the script simply to double click on it name in the palette. Copy text followed in a text editor and save it as a text file. {Copy from this line to.....} {Arch. Lamberto Previati ?2004/Ago/10} {this procedure rotate and duplicate selected object along Z axis if object is a 3D object. This script is prototype script and more better addenda are possible for a profesional look.} {10/08/2004: add TotalStep difference, NumStep. Procedure calcolate SingleStep} {Note: Move3DObj non lavora correttamente se Obj ? un gruppo} {How it work? Make sure that a 3D object and point center of rotation are in your file, then run script and enter values in dialogs. Look a the message window. Good work.} {IMPORTANT: this script don't check if the selected object is a correct one (i.e. a 3D object)} Procedure MoveAndRotateAroundZaxis; VAR h, hMove, hObj,hSymbol:Handle; x,y,z,pObjX,pObjY:Real; i,dummyVar:Integer; {For predefined dialog} kTotDepth:Real; kDupNum:Integer; kAngRot:Real; {/// subroutine ///} Procedure AdjustFirst; VAR pX, pY, zValue: REAL; height,width,depth:REAL; BEGIN Get3DCntr(hObj,pX, pY, zValue); Get3DInfo(hObj,height,width,depth); Move3DObj(hObj, 0, 0, -(zValue+ depth/2)+(kTotDepth/kDupNum)); END; {/// MAIN ///} BEGIN kTotDepth:=DistDialog('Enter a total depth distance value:','300'); kDupNum:=IntDialog('Enter a number of steps (only integer value):','15'); kAngRot:=AngDialog('Enter angle value of rotation:', '0d'); DoMenuTextByName('Standard Views',1); RedrawAll; i:=0; message('Select object that you want to rotate and traslate.....'); WHILE NOT GetPickObjectInfo(pObjX,pObjY,hObj,hSymbol,dummyVar) DO BEGIN GetPt(pObjX,pObjY); END; {hObj:=LSActLayer;} message('Click on Z axis point...'); getpt(x,y); AdjustFirst; For i:=1 To (kDupNum-1) DO BEGIN hMove := HDuplicate(hObj,0,0); HRotate(hMove, X, Y, kAngRot*i); Move3DObj(hMove, 0, 0, (kTotDepth/kDupNum)*i); END; ClrMessage; END; RUN(MoveAndRotateAroundZaxis); {......this one. Good Work}
  14. NickB i have a little script (free) that do that you want. Have you confidence with Script Editor and Resource Pallette? Lamberto
  15. My wishes are: 1) unfold solid object (like TouchCAD) with more parametric option; 2) projection of an object over any generic plane, I'ave my script for this but only for Locus3D and Polys3D; 3) i like section plane dinamic like SketchUp software.
×
×
  • Create New...