TBC Macros and Extensions

 View Only

TML - Adjust Area

By Gary Lantaff posted 03-18-2019 11:49

  

This TML will slide a line perpendicular to a reference line until a specified area is computed. There is an option to create a polygon object (containing part of the specified boundary) or just a line.

 

 

The direction of the computed line is determined by which line is selected as the "Reference line". The reference line does not need to be a member of the boundary lines (but can be). This example has two boundary lines and an optional third line to be used as the reference line.

 

 

 

If the solid red line is selected as the reference line, the computed line will be the dashed red line (perpendicular to the red line). If the solid green line is selected as the reference line, the dashed green line will be computed.

 

TIP: If you pick at a control point of the line, the line is computed by pivoting about that location instead of computing a perpendicular line.

 

NOTE: I'm testing the "compile" option so the attached zip file contains a compiled python macro (with a file extension of *.pydll). Just place file in same location as TBC will look for both compiled and non-compiled versions.

 

As I said, this macro is being provided in a compiled form. Windows sometimes "blocks" files that are downloaded. You may need to "unblock" the file after copying it to the macros folder. If you get an error starting TBC after adding the macro, go to properties of the file (AdjustArea.pydll) and see if you need to unblock the file. (you will have a "Security" section at the bottom of the properties dialog). Just check the "Unblock" checkbox if it is present.

 



Attachment(s)

4 comments
6 views

Permalink

Comments

04-04-2019 12:19

Great job Gary. This was exactly what the customer was looking for. Really like the polygon option! I owe you ice cream!

I am just looking to pick a line string and do a boundary around it buy being able to pick the left and right offset distant.

 

 

 

 

 

Sent from my iPad

03-25-2019 11:34

I'm not sure what you are asking for here. Do you want to define the boundary for area calculations to be offsets from the reference line?

Gary,   Is it possible to do a boundary of a reference line where you can pick the left and right offset?