Jump to content

Pi_

Member
  • Posts

    73
  • Joined

  • Last visited

Everything posted by Pi_

  1. I mean 3d Polygons or nurb curves, I want to create a rebar hoop, we have a 2d PIO but now I want to create a 3d section
  2. Can you please add functionality to edit 3d polylines in vectorscipt. No it is not possible to fillet (afronden) a 3d polyline in vectorscript (in vectorworks it works) in vectorscript you can edit 2d polyline by FOR i := 1 TO num_vertices DO BEGIN GetPolylineVertex(polyHd, i, x, y, vertexType, vertexRadius); SetPolylineVertex(polyHd, i, x, y, 3, kFilletRadius, TRUE); END; but this doesn't work for 3d polylines...
  3. Ok, thanks, it's a pity, strangly it works in vectorworks itself fillet / afronden of a 3d polyline... I'll put it on the wishlist
  4. Wouter, Is this working on 3D Polygon (gettype=25)? What you suggested I tried before but it is not working. It seems GetPolylineVertex/SetPolylineVertex is not working on 3D Polygon. When I use GetPolylineVertex on 3D Polygon (and also on a nurb curve) then x,y,vertextype,vertexRadius are all '0' for all vertexes
  5. hi Wouter, did you find a sollution to this? I have the same problem (and tried the same code)
  6. Hi bcd, that works fine with horizontal plates but recently we worked on 2 parking lots with inclined floors. I created the floors with roof slabs (because I don't know a way to draw inclined floor slabs) the walls I can automaticaly stretch to the roof slabs but not the columns...
  7. It seems walls can only end in a perpendicular way. Would it be possible to add more options? curved inclined
  8. it would be nice to have a tool like 'fit wall to object' (verleng muur tot aan object) for columns. it would also be more practical if you could choose to witch object you want to extend (and not to all objects in one layer)
  9. I would like to have the ability to create a floor plate (vloerplaat) that is not horizontal. Like the roofplate (dakvlak) It would also be nice to have an extra choice for the input of the inclination. Now with roofplate (dakvlak) you have to enter an angle or width/height. For us it would be handy if you could given het z-height of 3 controlpoint, and you could even label these coordinates
  10. Pi_

    create ifc beam

    I got something working by setting an 'IfcElementAssembly' label to the PIO (3d poly) and an IfcBeam label to the extrusions inside the PIO. This works fine but I need one extra thing: I want to label the profile (2d poly used for extrusion) as a 'IfcIShapeProfileDef' This means that in other programs a HEA100-beam will still be a HEA100-beam and not a beam with 'grafical' geometrie attached to it. With 'IfcIShapeProfileDef' you have a beam with width, depth, webthickness,... BTW I got an answer of design express (destributor in benelux) on how to fill in the IFCbeam parameters: ok:=IFC_SetIFCEntity(pioHandle, 'IfcBeam'); ok:=IFC_SetEntityProp(pioHandle,'Name','Piet');
  11. Pi_

    create ifc beam

    I learned that the best way to export an IFC-beam is to just label it as ifc-beam! (you don't have to fill in any other parameters) It works fine with extrusions but not in a PIO. When you put an extrusion inside a PIO and label it as ifc-beam it is not recognized in other aplications. When you ungroup the PIO, the ifc-beam is recognized... Is there anyone who can help me?
  12. thanks Miguel, I got the orientation controled now, chamfering works also (intersectsolid). Next is extruding a symbol containing the loftprofile and adding IFC label.
  13. Pi_

    create ifc beam

    Now I succeeded to fill in the material tag but not I'm still having trouble with the IFCbeam properties (fill in ifcbeam.name is not working...) ok:=IFC_ClearIFCInfo(pioHandle); ok:=IFC_SetIFCEntity(pioHandle, 'IfcBeam'); ok:=IFC_AttachPSet(pioHandle, 'IfcBeam'); ok:=IFC_SetPsetProp(pioHandle, 'IfcBeam', 'Name','piet'); ok:=IFC_SetPsetProp(pioHandle, 'IfcBeam', 'Description','piet'); >>>not working ok:=IFC_AttachPSet(pioHandle, 'Material'); ok:=IFC_SetPsetProp(pioHandle, 'Material', 'Component 1','staal'); >>> working
  14. Pi_

    create ifc beam

    hi Wouter, thanks again for responding, but I'm not getting any wiser. in the ifc entity 'IfcBeam' you have several properties GlobalId/ Description /ObjectType/... if you want to acces them in a spreadsheet you use: =GETIFCPROPERTY('IfcBeam.Name') I want to fill in this data using something like this: ok:=IFC_ClearIFCInfo(pioHandle); ok:=IFC_SetIFCEntity(pioHandle, 'IfcBeam'); ok:=IFC_AttachPSet(pioHandle, 'IfcBeam.Name'); ok:=IFC_SetEntityProp(pioHandle, 'IfcBeam.Name','piet'); but nothing happens... If you are used to work with IFC can you just explain how to fill in for example IfcBeam.Name?
  15. Hi, I'm working on a 3dpolyline PIO to draw steelmembers. I want to attach the right ifc data so I can export it to Scia engineer. (ifc export of VW 'dakonderdeel', I think it is called framing member in the english version, works good...). I'm able to make a Ifcbeam (ok:=IFC_SetIFCEntity(pioHandle, 'Ifcbeam') but I can't fill in the ifc properties (Ifcbeam type, name, ...) ok:=IFC_SetEntityProp(pioHandle, 'IfcBeam.Name','piet'); doesn't work. any ideas?
  16. thanks for the answers, making a straight extrude and then orient in 3d is a good idea, that is why I want to understand the XYZrot of the vectorscript commands (Set3DRot / GetWorkingPlane / SetWorkingPlane). Set3DRot(h, xAngle, yAngle, zAngle, xDistance, yDistance, zDistance) what is x/y/zAngle? A 3d-point is defined with 2 angles (spherical coordinates) so it is something else? is it a vector? I know you can get the xyzAngle with Get3DOrientation but this doesn't work for a 3dpoly. How can I easily get the xyzAngle of my axis? In my script I read all the points in a dynarray of point3d, I also make a dynarray of vector. Now I want to make a straight extrude (easy) and then orient the extrude along the first vector in my array.(no succes so far) I could make arrays of spherical coordinates, but I have the feeling it is allready in the vectorscript commands, that I just don't understand it...
  17. thanks for the reply Wouter, I tried everything, the vector functions give mostly 2d information or 1 angle to the x-vector. I didn't succeed in finding the wright angle to rotate the profile before extrusion. Some commands in vectorscript use 3 angles (Set3DRot / GetWorkingPlane / SetWorkingPlane). I don't know what they stand for or how to use them. For now I solved it by first rotating the axis parallel with the x-axis, then extruding, then rotating the extrusion back... I would be nice if I was able to controle the extrude along path function so I can extrude a profile over multiple segments and keep the profile horizontal constrained
  18. Hi all, I want to create a 3d-path PIO that draws steel-profiles. The tools VW delivers are 2d tools with an 'incline' option. With this tools I can't snap in 3d to connect all the steel members. This is the first time I am writing a 3d-path PIO and I can not get the 'orientation along the axis' in a proper way. When I use createcustomObjectPath or ExtrudeAlongPath or CreateExtrudeAlongPath the 'orientation along the axis' depends on the orientation of the axis. I can change it by rotating the profile-curve but I don't know by what angles... I tried to get the orientation of (the first segment) of my 3d-path PIO by 'Get3DOrientation' but this doesn't seem to work. any suggestions?
  19. Hey Dieter, thank you so much for all the good tips and tricks you gave me, I'll have to take my time to read and learn it all. I think it is clear to you that I'm not a professional programmer. I just started with some small scripts here at my new job and after a month I was writing this more complex stuff...(my supervisor got enthousiastic about PIOs). You are absolutely wright about structuring the code! After your first answer I took a whole new approach to the problem with a new input that made it easier to code. Now the input for bending a reinforcement bar is like this: 100+500+200-300-200... positive values meaning turning 90? left and negative values meaning turning right. that made it much easier to calculate the inside and outside line of the reinforcement bar! I'll try your code and let you know how it works but I have a working PIO allready so there is no hurry anymore. But like I said, your general tips and tricks are more important for me now! When we meet in Gent you've earned definitely a Westmalle triple or any other belgian beer!
  20. this is the code so far...: {/////////////////////////////////////////// Wapening_plooi door Piet Lelieur voor studieburo Mouton okt 2009 creer een wapeningsplooi met bijbehorende tekst //////////////////////////////////////////// } PROCEDURE Wapening_plooi; VAR thoogte,i,j,k,l,vertexType,straal,plooidia,labelhoogte,positie : INTEGER; breedte,hoogte,x,y, vertexRadius,rotatie,tekstX,tekstY : REAL; labelx1,labelx2,labely1,labely2 : REAL; result,tekst,afronden,labelaan : BOOLEAN; objname,labelplooi,tekstplooi,zicht,tekenstijl,prefix,suffix,plooidata,plooidata2 : STRING; coordinaat1,coordinaat2,teststring : STRING;{lengtes in tekst vorm} oh,rh,wh,th,th2,polyh1,polyh2,polyh3,layerh ,parenth,grouph : HANDLE; objevent,eventdata,X1,Y1,X2,Y2,test : LONGINT; LAYOUTplooi,LAYOUTLAYOUT : BOOLEAN; data,datateken,asx,asy : DYNARRAY of LONGINT; BEGIN { retrieve custom object information } result:= GetCustomObjectInfo(objname,oh,rh,wh); { if object information was successfully retrieved } IF result THEN BEGIN { retrieve predefined parameter values } tekstX :=PControlPoint01X; tekstY :=PControlPoint01Y; { retrieve user-defined parameter values } tekst :=Ptekst; thoogte := Pteksthoogte; plooidia := Pplooidia; afronden:=Pafronden; straal:=(Pstraal/2);{gebruiker geeft de buigdoorndiameter op} labelplooi:=Plabelplooi; tekenstijl:=Ptekenstijl; labelaan:=Plabelaan; labelhoogte:=Plabelhoogte; LAYOUTPLOOI:=PLAYOUTPLOOI; LAYOUTLAYOUT:=PLAYOUTLAYOUT; prefix:=Pprefix; suffix:=Psuffix; plooidata:=Pplooidata; {reken andere variabelen uit} layerh:= getlayer(oh); parenth:=GetParent(oh); if parenth<>layerh then rotatie :=GetSymRot(parenth){als deze PIO gebruikt wordt binnen een andere PIO gebruik dan de parent hoek} else rotatie:=GetSymRot(oh); {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {zet alles volgens klasse} PushAttrs; {Stores current attribute, tool, text, and constraint settings for later retrieval} FPatByClass; FillcolorByClass; LsByClass; LwByClass; PenColorByClass; {tekst aan of uit} if (NOT(tekst)) THEN SetParameterVisibility(oh,'teksthoogte',FALSE); {label aan of uit} if (NOT(labelaan)) THEN SetParameterVisibility(oh,'labelhoogte',FALSE); {automatisch afronden} if afronden THEN BEGIN if (plooidia<20) Then straal:=(2*plooidia) Else straal:=(3.5*plooidia); SetParameterVisibility(oh,'straal',FALSE); setRfield(oh,'Wapening_plooi','straal',CONCAT(2*straal)); END; {LAyout} if not LAYOUTPLOOI THEN BEGIN SetParameterVisibility(oh,'plooidata',FALSE); SetParameterVisibility(oh,'Labelplooi',FALSE); SetParameterVisibility(oh,'plooidia',FALSE); SetParameterVisibility(oh,'afronden',FALSE); SetParameterVisibility(oh,'straal',FALSE); END; if not LAYOUTLAYOUT THEN BEGIN SetParameterVisibility(oh,'tekenstijl',FALSE); SetParameterVisibility(oh,'labelaan',FALSE); SetParameterVisibility(oh,'tekst',FALSE); SetParameterVisibility(oh,'labelhoogte',FALSE); SetParameterVisibility(oh,'teksthoogte',FALSE); SetParameterVisibility(oh,'tekstplooi',FALSE); END; {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {berekenen van coordianten} j:=1; plooidata2:=plooidata; While ((pos('+',plooidata2)<>0) or (pos('-',plooidata2)<>0)) Do Begin {tellen van het aantal coordinaten} if min((pos('+',plooidata2)),(pos('-',plooidata2)))=0 then positie:= max((pos('+',plooidata2)),(pos('-',plooidata2))){er is geen min of plus teken meer maar wel een plus of min teken} else positie:= min((pos('+',plooidata2)),(pos('-',plooidata2)));{vind het eerst volgende + of - teken} delete(plooidata2,1,positie); j:=j+1; END; ALLOCATE data[1..j+1]; ALLOCATE datateken[1..j+1]; plooidata2:=plooidata; positie:=1; i:=1; k:=1;{geeft het teken aan de coordinaat , altijd beginnen met een positieve coordinaat} {vul een array data met de waarden en een arrat datateken met het teken (+1 of -1)} While i<= j Do Begin if min((pos('+',plooidata2)),(pos('-',plooidata2)))=0 then positie:= max((pos('+',plooidata2)),(pos('-',plooidata2))){er is geen min en plus teken meer maar wel ??n plus of min teken} else positie:= min((pos('+',plooidata2)),(pos('-',plooidata2)));{vind het eerst volgende + of - teken} if positie=0 then coordinaat1:=copy(plooidata2,1,len(plooidata2)){copier de laatste coordinaat} else begin coordinaat1:=copy(plooidata2,1,(positie-1));{copier de coordinaat} coordinaat2:=copy(plooidata2,positie,1);{copier de + of -} delete(plooidata2,1,positie); END; data:=str2num(coordinaat1); datateken:=k; if coordinaat2='+' then k:=1 else if coordinaat2='-' then k:=-1 ;{leg het teken vast voor de volgende coordinaat} i:=i+1; END; i:=1; teststring:='data: '; While (i<=j) do begin teststring:=CONCAT(teststring,CONCAT(data),','); i:=i+1; END; message(teststring); {EINDE berekenen van coordianten} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {TEXTSTRING plooi} i:=1; while i<=j DO BEGIN tekstplooi:=CONCAT(tekstplooi,'+',CONCAT(data)); i:=i+1; END; tekstplooi:=CONCAT('(',labelplooi,') ',' ?',CONCAT(plooidia),prefix,'(',tekstplooi,')',suffix,chr(13)); setRfield(oh,'Wapening_plooi','tekstplooi',tekstplooi); {EINDE TEXTSTRING plooi} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {BEGIN ZET TEKST} IF tekst THEN BEGIN { zet de tekst samen rechts naast de balk } IF tekst THEN BEGIN CASE (ROUND(GetLScale(layerh))) OF {zet op de juiste layer} 0..5: nameclass('6.9 tekst en diverse'); 6..10: nameclass('5.9 tekst en diverse'); 11..10000: nameclass('4.9 tekst en diverse'); END; Textsize(thoogte); CreateText(tekstplooi); th := LNEWOBJ; SetTextJust(th,1); SetTextVerticalAlign(th,1); SetTextOrientation(th,tekstX,tekstY,-rotatie,FALSE); END; END; {EINDE ZET TEKST} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {bepaal eerst de aslijn coordinaten} allocate asx[0..j]; allocate asy[0..j]; asx[0]:=0; asy[0]:=0; asx[1]:=datateken[1]*(data[1]-plooidia/2); asy[1]:=0; i:=2; While i<=j+1 Do BEGIN if i>2 then begin asy[i-1]:=asy[i-2]; asx[i-1]:=asx[i-2]+datateken[i-1]*(data[i-1]-plooidia); END; if i<=j then begin asy:=asy[i-1]+datateken*(data-plooidia); asx:=asx[i-1]; END; i:=i+2; END; i:=1; teststring:=CONCAT(teststring,' coordinaten aslijn: '); While (i<=j) do begin teststring:=CONCAT(teststring,CONCAT(asx),',',CONCAT(asy),'/'); i:=i+1; END; message(teststring); {EINDE bepalen van de buitencontour, als basis voor de rest} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {LABEL plaatsen} if labelaan then begin CASE (ROUND(GetLScale(layerh))) OF {zet op de juiste layer} 0..5: nameclass('6.9 tekst en diverse'); 6..10: nameclass('5.9 tekst en diverse'); 11..10000: nameclass('4.9 tekst en diverse'); END; Textsize(labelhoogte); createtext(labelplooi); th:=LNewOBJ; SetTextJust(th,1); SetTextVerticalAlign(th,5); SetTextOrientation(th,0,0,-rotatie,FALSE); th2:=HDuplicate(th,0,0); SetTextJust(th2,1); SetTextVerticalAlign(th2,1); SetTextOrientation(th2,X1,Y1,-rotatie,FALSE); END; {EINDE LABEL plaatsen} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} { teken de plooi} {aslijn} If tekenstijl='Aslijn' then begin i:=1; OpenPoly; Beginpoly; Addpoint(0,0); While (i<=j) Do Begin Addpoint(asx,asy); i:=i+1; END; Endpoly; polyh1:=LNewObj; END; {aslijn} If tekenstijl='Volledig' then begin SetDLSeparation(plooidia); SetDLOptions(1); calltool(-218); END; {EINDE VAN ZIJAANZICHT} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} {________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________} END; PopAttrs; {Restores the attribute, tool, and constraint settings saved by an earlier call to PushAttrs} END; Run(Wapening_plooi);
  21. Thanks for the reply, seems we are working in the same city as I work at st pieters station! Offcourse I ment polyline instead of line. I have made 2 dynarray of longint, one for the X-coordinates and one for the Y-coordinates. Drawing the centerline is not the problem, but now I want to draw the complete reinforcement bar (Innerline and outside line). If I could just draw a "double polygon" I can use the same coordinates...
  22. Hi, I'm working on a bunch of PIO to draw reinforcemnt bars in concrete colums, beams, ... I need to create a double line that can be selfintersecting. So far I have the coordinates of the centerline and now I want to draw the outerline and the complete contour. I can not use the offset command because it give unpredictable results on selfintersecting lines. I've been trying with the calltool/settool(-218) command but I can't give input coordinates. Is het calltool only for creating objects outside of the PIO? or is there a command like "setpoint" that give an input to the calltool(-218) command. Any help is welcome! VW12.5 on windows XP
×
×
  • Create New...