Bob Wagner Posted April 16, 2007 Share Posted April 16, 2007 I have a plugin in version 10.5 that builds a house with one dialog box that sets wall height thickness and roof settings. It produces the externals of house in one go. Great for my students. They then add internal walls, doors and windows. Here is the problem the plugin in version 12.5.1 creates the house without the roof. However in my searching for answers I export a vectorscript from 12. In a text editor the roof is there. I then changed the creation to version 10 in the Vector script and read this into version 10.5, and you guessed it, the roof is there. Read it back into 12.5 and no roof, re-export the script and it appears back in version 10. Any ideas would be good, I have already spoken to Julian Carr and I know that my polygons are all clockwise. I have checked the line styles and classes for visibility. This has me baffled, any one out there. This is driving me up the wall - and into the non existent roof. thanks Bob Wagner Quote Link to comment
islandmon Posted April 17, 2007 Share Posted April 17, 2007 Are you referring to a RoofObject created using the Create Roof Tool ? Or is the missing object just a 3Dpoly representing the Roof ? Quote Link to comment
Bob Wagner Posted April 18, 2007 Author Share Posted April 18, 2007 The bit of code looks like this: tempHandle := CreateRoof(TRUE,0,200,1,0); While j>=1 DO BEGIN AppendRoofEdge(tempHandle, px[j],py[j],RoofAngle,Eave,RoofHeight); j:=j-1; end; Nothering appears where the roof should be. Bob Quote Link to comment
islandmon Posted April 18, 2007 Share Posted April 18, 2007 Example: CreateRoof Objects - Roofs Declaration: FUNCTION CreateRoof ( genGableWall :BOOLEAN; bearingInsetDistance :REAL; roofThickDistance :REAL; miterType :INTEGER; vertMiterDistance :REAL ) :HANDLE ; Description: Function CreateRoof creates a new roof object in a VectorWorks document, returning a handle to the object. To define the roof object template, use AppendRoofEdge. Parameters: genGableWall Specifies gable roof generation. bearingInsetDistance Bearing inset distance of wall into roof. roofThickDistance Roof thickness. miterType Miter style of roof. vertMiterDistance Vertical component for double miters. roofHandle := CreateRoof(TRUE,5 1/2",5 1/2",4,0"); AppendRoofEdge(roofHandle, -87'4",-38'4",#45d 0' 0" ,2'0",10'0"); AppendRoofEdge(roofHandle, -30'2",-38'4",#45d 0' 0" ,2'0",10'0"); AppendRoofEdge(roofHandle, -30'2",45'10",#45d 0' 0" ,2'0",10'0"); AppendRoofEdge(roofHandle, -87'4",45'10",#45d 0' 0" ,2'0",10'0"); AppendRoofEdge Objects - Roofs Declaration: PROCEDURE AppendRoofEdge ( theRoof :HANDLE; edgePtX :REAL; edgePtY :REAL; slopeAngle :REAL; projectionDistance :REAL; eaveHeightDistance :REAL ) ; Description: Function AppendRoofEdge creates a new edge in the referenced roof object. Parameters: theRoof Handle to roof. edgePt Definition point of roof edge. slopeAngle Slope of roof edge. projectionDistance Eave overhang. eaveHeightDistance Eave height. ______ BeginRoof Objects - Roofs Declaration: PROCEDURE BeginRoof ( p1X :REAL; p1Y :REAL; p2X :REAL; p2Y :REAL; upslopeX :REAL; upslopeY :REAL; riseDistance :REAL; runDistance :REAL; miter :INTEGER; vertPart :REAL ) ; Description: Procedure BeginRoof creates a simple roof object in a VectorWorks document. Table - Roof Miter Styles Miter Style Constant Vertical 1 Horizontal 2 Double 3 Square 4 3-D View of Roof Parameters: p1 Coordinates of roof axis start point. p2 Coordinates of roof axis end point. upslope Coordinates of upslope definition point. riseDistance Rise distance. runDistance Run distance. miter Edge miter style of roof. vertPart Dimension of vertical miter for double miter style. Example: BeginRoof(1,1,5,1,2,2,0.5,1,1,0); ClosePoly; Poly(1,1,3,1,3.5,2,4,1,5,1,5,5,1,5); EndGroup; Quote Link to comment
ccroft Posted April 19, 2007 Share Posted April 19, 2007 Hey Mon I'm pretty sure Bob is familiar with the function reference. Judging by some of his scripts I'd say he's used it a few thousand times :-) Perhaps you, like me, are thinking that the only thing to do is go back to a simplified version and make sure that this code snip can draw a roof in the new version. Maybe try a simple script palette. Bob I've been watching this post, and I feel your pain. I have some tools that are versions old that are problematic now. Fortunately for me the glitches are much less fatal than yours. I just work around them. Maybe someday I'll go back in there and see what's goin on. I guess there's not much chance that 'Eave' is now a reserved word or something. Just wanted to give a little support. Hope you get some relief. Charles Quote Link to comment
islandmon Posted April 19, 2007 Share Posted April 19, 2007 Perhaps you, like me, are thinking that the only thing to do is go back to a simplified version and make sure that this code snip can draw a roof in the new version. Maybe try a simple script palette. My sentiments exactly ... Quote Link to comment
Bob Wagner Posted April 20, 2007 Author Share Posted April 20, 2007 Well all fixed. I did a work around. I had to insert a dormer, (copied and pasted from reference) and then delete it and all was well. Don't know why, but I aint fixin it now that it works. See below, thanks for all the input. tempHandle := CreateRoof(TRUE,0,200,1,0); While j>=1 DO BEGIN AppendRoofEdge(tempHandle, px[j],py[j],RoofAngle,Eave,RoofHeight); j:=j-1; end; gabID:=CreateGableDormer(tempHandle); SetGableAttributes(tempHandle,gabID,TRUE,6'0",10'0",2'0",#45?0'0",#45?0'0"); {SetDormerAttributes(tempHandle,gabID,3,18'4",TRUE,3'0",63,FALSE,3'0");} {SetDormerThick(tempHandle, 2",1.83333");} RemoveRoofElement(tempHandle,gabID); Quote Link to comment
islandmon Posted April 20, 2007 Share Posted April 20, 2007 Mr. Wagner, your students must love you ... you are one clever sensei ; ) Quote Link to comment
ccroft Posted April 20, 2007 Share Posted April 20, 2007 Hey Bob Did you try ResetObject(tempHandle) in there instead of the dormer creation/deletion? charles Quote Link to comment
Bob Wagner Posted April 20, 2007 Author Share Posted April 20, 2007 (edited) You are indeed brilliant. I tried this and it works great. tempHandle := CreateRoof(TRUE,0,200,1,0); While j>=1 DO BEGIN AppendRoofEdge(tempHandle, px[j],py[j],RoofAngle,Eave,RoofHeight); j:=j-1; end; ResetObject(tempHandle); Bob Edited April 20, 2007 by Bob Wagner Quote Link to comment
ccroft Posted April 21, 2007 Share Posted April 21, 2007 Thanks for trying it out and posting back. later c Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.