Jump to content
Developer Wiki and Function Reference Links Read more... ×

Recommended Posts

I wrote a script that creates a grid of rectangles (to be a column grid) based on points a set distance away from each other within a polyline boundary. How can I rotate the grid so that rather than the rectangles being rotated relative to the world XY, the GRID is rotated to align with the polyline (i.e., the grid's rotation is the same as the polyline, so the rectangles are rotated 0deg relative to the polyline). Part 1 is the script as it stands and Part 2 is the script when it's run.

Part 1.JPG

Part 2.JPG

Share this post


Link to post

This may not be the most elegant solution, but I would rotate the poly to be orthogonal, create the grid, then rotate it back. Here is an example.

 

Forum question.vwx

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

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.

×