Operator of fold. This operator allows user to mark a mountain fold between two defined vertices. The mountain line style is a dot-dot-dash line. The implicit result of this operator is the addition of a new mountain edge to the global edge structure. Two optional parameters can be added to allow user to define pinch. User gives percentages of total length of blank for both extremities. Each percentage given can be negative to make the fold line be larger than the original edge defined between both vertices. It can be useful when fold is very short or if the fold is hide by a paper layer (note that for define a fold under a layer the \xray_fold can be used cf. §).
As others fold operators \mountain_fold is opportunist. It only creates a new edge stored in the internal edge structure if there isn't yet an edge (whatever its type) defined with the same two vertices.
In fact, all line operators (except \cut cf. §) are built on the same scheme. They can take two additional parameters to indicate visual limit for each extremities of the line. Indeed, both first parameters represent the physical vertices limit of the new edge, but it is often useful to draw only a portion of the entire edge. Thus, you can imagine that a certain part of the line around of each extremity is hidden as if the line was defined shorter. We will see further that one can also draw a longer line than the real distance separating both vertices.
There are two different ways to express each extremity:
In the first case, an integer percentage is given as an extra parameter. If both limits are computed with percentages, \mountain_fold operator ends with two integer values which respectively represent the part hidden around the first and second vertex. For example, suppose you want to make a pinch around the first point, you will set the first value (third parameter) to 0 and the second one (fourth parameter) to 80 or 90.
The second case presented above allows to easily define partial lines. Indeed, the goal is to hide a part of an edge but we want that new edge ends exactly on a particular edge (which often represents a paper layer). Finding which percentage of the total length it correspond is quite impossible. Line operators can thus take edges to indicate each extremity limit.
For both limit determination ways, the way to draw a new edge is the same. Knowing both real end vertices, Doodle computes the first and second limit according to the third and fourth parameter (integer or edge) and make a line between those computed points. This way, it is impossible to draw two parts of an unique edge, there is always just one line drawn for an edge.
If one uses negative percentage the drawn line is longer than the real one. Continuing our first example of the pinch, it's often useful to extend the line beyond the real end point to make the diagram clearer. In case the third parameter is not set to 0 but to -15 or -25.
Percentage and edge limits can be mixed into a same edge definition
(as shown in the third and fourth syntax form below).
There are two forms whether the edge limit concerns the first point or
the second one.
This operator should only appear within a step block.
\mountain_fold(B, D); % mountain fold the diagonal \mountain_fold(B, D, 40, 40); % make a pinch in the middle of the diagonal \mountain_fold(B, D, 0, -40); % mountain line is larger at D
\mountain_fold(VERTEX_1, VERTEX_2); \mountain_fold(VERTEX_1, VERTEX_2, V1_PERCENTAGE, V2_PERCENTAGE); \mountain_fold(VERTEX_1, VERTEX_2, EDGE_1, V2_PERCENTAGE); \mountain_fold(VERTEX_1, VERTEX_2, EDGE_1, EDGE_2);
VERTEX_1 Description : Indicates the first vertex of the mountain fold. Type : Symbol, vertex identifier. Allowed values : Any vertex identifier previously defined. VERTEX_2 Description : Indicates the second vertex of the mountain fold. Type : Symbol, vertex identifier. Allowed values : Any vertex identifier previously defined. V1_PERCENTAGE (optional) Description : Indicates the percentage of total edge length we have to left blank close to VERTEX_1. Type : Integer. Allowed values : Any value. Default value : 0. V2_PERCENTAGE (optional) Description : Indicates the percentage of total edge length we have to left blank close to VERTEX_2. Type : Integer. Allowed values : Any value. Default value : 0. EDGE_1 (optional) Description : Indicates the limit edge close to VERTEX_1. The blank part starts at VERTEX_1 and ends to the intersection between [VERTEX_1, VERTEX_2] and EDGE_1. Type : Edge, couple of vertex identifiers Allowed values : Any couple of vertex identifiers already defined. Physical edge is not mandatory. EDGE_2 (optional) Description : Indicates the limit edge close to VERTEX_2. The blank part starts at VERTEX_2 and ends to the intersection between [VERTEX_1, VERTEX_2] and EDGE_2. Type : Edge, couple of vertex identifiers Allowed values : Any couple of vertex identifiers already defined. Physical edge is not mandatory.