Fence Maker (ver. 1.3)

This is an add-on for Blender.
* Blender 3.0 or later is recommended.

This addon makes structures like fences, guardrail or truss from simple quad polygons.

2021/01/07 ver0.4
2021/01/21 ver0.5
2021/01/30 ver0.6
2021/02/06 ver0.7
2021/02/14 ver0.8
2021/02/26 ver0.9
2021/03/21 ver1.0
2021/06/25 ver1.3 for Blender 3.0

Install

If old version is installed, uninstall it at first.

Unpack downloaded package at first.
Inside it, files for documents (HowToUseE.html and image files), and @addon_name@V*p*.zip exist.
@addon_name@V*p*.zip is the main body of the addon.
Install it as usual addon.



How to Use

Basic Usage

At first, you must make a canvas object.
Next, edit it to make some simple shaped mesh for base structure in mesh edit mode.
And then you can make fence structure from selected faces of the object.
=>

Mesh Edit Mode

If the addon is installed successfully, "FenceMaker" tab and panel are added to the Create tab.



Structures would be constructed from the faces or edges in select.
The argorithm assumes simple quad polygons, with aligned edges.
Small distortions or sheared quad polygons are o.k., but extremely deformed polygon is not assumed.

Make Face

Cross Cross(Qblique) Wire Mesh
Rope Barbed Wire Gurad Pipe

Make Poles
Make Pole Appendix
Make Truss
Make Guard Rail
Make Car Stopper

Make Faces


Make fence structures of various types from selected faces.
The structure is formed as a new object (curve object with bevel).



Facnce Type Selection for types of fence structure.



Cross

Basic fence type with crossed bars.



V Align The base point of vertical distribution
Bevel Depth Line width of the curve.
Width, Height Interval beween wires.
Fit Modify intervals to fit the edge of polygons.
Mergin H Set mergins on left and right side.
When mergin is not 0, additional lines for edge would be formed.
OrnamentMake ornament on the top and bottom edge.
Currently, 7 types of shape is implemented.
Belows is two examples (Ring and Triangular).

SupportHorizontal lines that support the ornaments.

Cap Type are classified by additional sub types.
(Simple, Taper, Round, Hat)




Resolution U Resolution for U direction.
Radius (A,B) Parameters for the size of ornament itself, or its components.
Fill Top/Bottom Set ornament (or just a line without ornament) to the top and bottom of the polygon.

Offset H/VOffset for horizontal and vertical lines respectively.

Hrizontal, Vertical Switches for horizontal and vertical lines respectively.

Copy TransformSet new object at the same position of original one.
If unchecked, new object would be made at origine.

You can use this option to show objects offseted.
Smooth ShadingEnable smooth shading.
ResolutuonResolution for bevel of curve object.
resolution 0 is quadrangular prism.
Copy TransformSet the location of new object to the base object.
If unchecked, the new object would be set at origin (0,0,0).
MaterialCopy material to new object.
(just a copy of material in material slot 0.)
Type Select shape of cross section from cylinder and quadrangular prism.

If you select Rect Object, additional curve object would be formed for bevel object.
You can edit that bevel object later.

You can adjust the shape of rect object like flat boards, changing the object aspect ratio.

Cross (Oblique)

Fence with oblique corssed bars.



Direction A,B Switches for lines of each direction respectively.
Offset A,B Offset for each lines respectively.


Wire Mesh

Fence with wired mesh.

The wires are made in both side of the faces, so that using semi-transparent material is better for base object.
(Otherwise, a half of wires would be hidden by the base object...)



Most parameters are similar to that for cross structure.

Curve Type Select between Poly and Bezier. Bezier curve has more smooth looking.
Distortion,FrequencyMake a distorted fence.
The parameters determines degree and frequency of noise.
OffsetOffset > 0 leads to incline that distortion is to the normal direction of the face.
Support,NumberAdd horizontal wires that supports the fence.

Rope

Simple fence with ropes between poles.
You can set multiple ropes evenly spaced, or a single rope with arbitral position.



SingleMakes number of ropes to 1.
aCatenary paramter.
The smaller a makes rope the more loose.
TerminalChange the shape of terminals of ropes.

Use with other parts like rings on poles.
You must adjust the position of terminals by several parameters. (Not automatic).

Barbed Wire

Fence with horizonal barbed wires.




Most parameters are similar to that for previous structures.
Twist Radius, Width A single wire is composed of twisted two lines.
These parameters determines the radius and width of twisting.
Barb Interval Interval between barbs.
Distortion, Frequency Degree and frequency for distortion on wires.


Guard Pipe

Fence strucure composed of curved pipes.



TypeFour types are prepared.
Offset HSpace between guard pipe and poles. Adjust this parameter according to the radius of poles.

Make Poles

Make lines (curve objects) along the selected edges.

This is for making frames of fence or truss structurre.



Many options are similar with or same to that for faces.
But followings operators are for poles.

TiltAlign the direction of the pole to the edge normal.

Actually speaking, a single edge can not have a "normal" direction, so that the normal is that of neibouring faces.
Thus, at the corner edge, the pole's direction is determined by the averaged direction of faces.
Distortion, FrequencyDistort the shape of poles.
USAGE/Usage for for simple wood log fence is assumued.

Vertical/NotVertical Enable and disables for vertical and non vertical egdes.
Threshold Threshould to distinguish between vertical and not-vertical pole.
Offset Offset for horizontal pole.
Radius Ratio Set size for non vertical poles in ratio.

If size (ratio) is 1, overlapping faces occur when the shape is quadrangular prism.
Small difference in radius leads to better results.
Extend Top/Bottom/Rim)Extend pole or horizontal beams.

With Offset parameter, you can arrange shapes of corner.
Cap TypeMake ornament parts at the top of poles.
The cap type parts is almost similar to that for the cross fences.
Base Type
Size
Aspect
Set parts for basement at the bottom of poles.

Block and Cylinder is implemented for basement type.
Its shape is adjustable by size and aspect ratio parameters.
Merge, ThresholdMerge segmented straight lines to one line.
And the threshold value for judge whether the lines are straight or not.

L-Shape Object

You can select L-Shape object as a type of the pole.
The shape (L-Shape frames and V-shape poles) is commonly used one for wire mesh fence.
Since its shape is special one, different argorithm is used.
Only horizontally connected meshes can be used.
(See explanation for guardrail setting).




Solidify, Thickness Option for to use solidify modifer, and parameter for thickness.
Vis Option for vis setting. They would be set at corners and middle of vertical poles.
Offset A,B Parameter for adjustment of vis location.
The shape of vis is fixed. (Can not ajdust its length).

Make Pole Appendix

Add extra object that attaches to the poles.
For currently, reflector and support poles areimplemented.

Refrector Add reflectors on the vertical poles.
Currently 3 types (A,B,C) are implemented.
Connector Add connector parts for fence.
Currently, only two types are is implemented.
One is clip type connector for fence, and one is a ring for ropes.


Aspect Aspect ratio of clip parts

Proper shape for this parts denends on various parameters.
So I gave upped to automatic adjustment...
Connector For Ring This Changes top and bottom parts to cylindrical connectors for ring shaped ornaments.

(This type of fence is very common in the region I lives. So I especially implemented this type.)
Ring This type of connector attach rings to the pole.

Use with rope type fence.


Size and position can be controlled by above parameters.
Support Add additinal oblique support poles.


Size, Angle, Offset The shape of support poles are adjustable by these parameters.
Extend Extent support to downward.
This paramete is for the cases that poles do not reaches to the ground.
(For inclined fence or terrains).

Make Truss

Makes truss diagonal structure.

This function makes diagonal parts only.
The poles are made by Make Poles function.



Many options are similar with or same to that for faces.
But followings operators are for truss.

Angle Select the angle of diagonal structure, step length in numerial or aspect ratio.
Aspect Ratio Ratio is based on the length of narrower edege.
When aspect ratio is 1, the angle is 45 degree.
Offset Factor Set offset for diagonal structure, to take a space for the width of poles and structure itself.

The unit is self widh.
(If set to 2, offset is two-times of width.
Joint SizeThe structure would not be bent directly.
A horizontal (vertical) space is added.
This parameter adjust the size of the space.

Note. In current implementation, oblique shape for truss does not lead to a good result.

To use for a oblique structuere, the base object should be an inclined rectangular.


Make Guardrail

Makes long fence like guardrails.


Since structure is not independent for each face, you must use horizontally connected faces as a base shape.
If not so, the resulting shape would be unpredictable.
(The result would be depend on the order of face indices.)

This addon can handle a little distortion of base shape, but it can not handle properly too much distortion or string curvature.

Type Select for fence with pipes or with rail structure.




Pipe type and rail type fence.

This function makes only horizontal structure.
Use 'Make Pole' function for making poles.

Resulutin U Resolution for U direction.
If fence is not straight one, some large number for resolution is required (about 8 or 12).
Number Number of pipes
Offset Offset for rail structre.
Adjust to not overlap with poles.

With too large offset, a structure becomes like this.
Mergin, Slide Mergin and offset for vertical direction.

Connector Connector parts between poles and pipes.
In current version, only one type of connector is implemented.
Radius A,B,C These parameters controls the shape of connector parts.

OppositeThis parameter >0 extends connector parts to the opposite directtion.
With proper settings, it looks like vis screw head on the pole.

Vis
Size
Direction
Number
Add vis to the connector part.
And parameters for its distribution.

EndCap
Add cap object to the end.
As special types, two curved pipe sphapes are implemented.

Adjust Bezier Tips
Using Auto handle settings, the end tips of bezier curve becomes somewhat unnatural.
This option set handle type to be not auto, and correct the curves at the end tips.

Rail type fence looks like a commonly used guard rail.
In current version, only one type is implemented.
The shape is determined by the curve bebel object.
So that you can edit the shape afterward.


End Cap, Radius Makes a end cap parts of the guardrail.

This is made by beveled curved object. (Not a mesh).
So the shape is simple onewithout details.
(This is for future improvement)
Connector Makes a connector parts between rail and poles.

VisASize(Vis, Size)Makes a vis-screw at connection parts.

Make Carstopper

Makes a sequence of car stoppers.





Currently only one type of stopper is implemented.

Margin HMake margin.
This parameter is to avoid overlappings of sequential stoppers.

SupportSet a supporting horizontal pole.
RingAdd a ring parts to the stopper.
This ring can be used to set ropes between,

Object Mode

You can make template canvas object in object mode.

Set Template

Set a tmplate objects for several types of fence.
The parameters for interval and height are typical scale for that type of fences.

The canvas object is made at origin (or at the location of 3D cursor if "Use Cusor" obption is enabled)

If Face Orientation option is enabled, you can see the orientation of face in red or blue color.

(This is just an alias for face oriantation option in viewport overlay options)

Convert from Annotation

You can make a curved canvas object from annotation curve instead of straight one.



It is difficult to control the total length of free-hand annotation curves.
When a curve is segmented with constant intervals, a small segment can be formed at tha end of the curve.
To prevent this, if last two control points are closer than the threthold parameter, they would be merged.
inserted by FC2 system