Jump to content
Developer Wiki and Function Reference Links ×

Roofs


Recommended Posts

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

Link to comment

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;

Link to comment

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

Link to comment

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);

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...