Jump to content
as_named

Creation of a Roof Face

Recommended Posts

Hi

 

I need to create a Roof Face. It should have rectangular shape with predefined thickness. Here is my code:

vs.BeginRoof(roofAxisPoint0[0], roofAxisPoint0[1], roofAxisPoint1[0], roofAxisPoint1[1], upslopePoint[0], upslopePoint[1], rise, run, 1, 0)
vs.Rect(rectTopLeft[0], rectTopLeft[1], rectBottomRight[0], rectBottomRight[1])
vs.EndGroup()

roofFace = vs.LNewObj()
vs.SetObjectVariableReal(roofFace, 170, roofFaceThickness)
vs.SetFPat(roofFace, 1)

It works and required object is being created. But if I use the 'Clip Tool' (Shift + N) on resulting object then its mesh become ruined (missing faces and edges). I checked it by exporting the object as OBJ and opening in other software. If I set fill style or fill color the mesh become fixed again (same way to check - export to OBJ). Same effect may be achieved by using vs.ClipSurface() function.

 

There is an original tool (AEC/Roof Face...). It works without mentioned issue. I tried to compare created roof faces (my tool and the original): Export/Export Script... and compare {Object Creation Code} sections. First parts are identical but the original tool creates more entities. I don't understand why and I couldn't re-use it in my code properly.

 

So my question is: how to properly create Roof Face objects?

 

I use Vectorworks 2019.

Share this post


Link to post

Confirming this happens to me as well.

A workaround is to apply a roof style to the created roof.  

 

vs.BeginRoof(roofAxisPoint0[0], roofAxisPoint0[1], roofAxisPoint1[0], roofAxisPoint1[1], upslopePoint[0], upslopePoint[1], rise, run, 1, 0)
vs.Rect(rectTopLeft[0], rectTopLeft[1], rectBottomRight[0], rectBottomRight[1])
vs.EndGroup()

roofFace = vs.LNewObj()
vs.SetObjectVariableReal(roofFace, 170, roofFaceThickness)
# vs.SetFPat(roofFace, 1)

style='' # import/create a roof style and add to this variable
vs.SetRoofStyle(roofFace, vs.Name2Index(style))
vs.ResetObject(roofFace)

 

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...