Getting contour lines from a mesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-03-26
05:29 PM
- last edited on
2023-05-25
05:09 PM
by
Rubia Torres
That is if I start with a mesh and manipulate the mesh by elevating nodes, just generally shifting parts of the mesh around can I then have it tell me what the contour lines are? I am reminded of a tool, which I believe was called "contour", in Form-Z which I always used for making cnc templates out of irregular objects.
Basically, I'd like to be able to just grab points on a mesh, move them where ever the new architecture suggests they should be and then have ArchiCAD tell me what the contours would be.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-03-30 11:19 PM
And finally tested... Found it is fast enough, also if the script is not so clever. It issues a "CALL" and a SEO operation for each contour line.
I think it can be done with only ONE call, using a series of planes as operator, but the planes needs to be large enough to cover the Mesh. Maybe this could be done using the RETURNED_PARAMETERS to know the A and B sizes of the mesh-object?.
Did a test of what happens if the original Mesh is updated... Simply selected it and re-saved as library object, overwriting the previous one. And the contour lines magically updates accordingly.

--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-03-31 03:46 AM
I downloaded your object and looked at the script
and found that you used the CUTPLANE command
to do the cutting of the object called in the script
rather than SEO (or the group operations equivalent)
as you stated. I changed the "contour line step"
parameter from 3'-3 3/8" to 1'-0" and got an error
saying "group operations error at line 21 of the 3D
script of...etc". I checked script but no errors are reported.
Looking at the script I can't see what the problem might be.
Why is calling the object more than once not desirable ?
I can see using a series of slabs separated by a very small
space and using group operations to leave very thin slices
of the object could be done but why ? The way you have done
it seem perfectly reasonable and economical.
Thanks,
Peter Devlin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-03-31 08:22 AM
Peter wrote:The SEO operation I was referring to is ISECTLINES. It is a special form of intersection, not present in ArchiCAD itself but only in GDL, that generate the intersection lines, without surfaces. I use it with the full mesh as the target and the cut mesh as the operator. This way I can do the whole thing without knowing the mesh size (the cutplane is infinite).
Hello Roberto,
I downloaded your object and looked at the script
and found that you used the CUTPLANE command
to do the cutting of the object called in the script
rather than SEO (or the group operations equivalent)
as you stated.
I changed the "contour line step"Sorry... it was metric.
parameter from 3'-3 3/8" to 1'-0" and got an error
saying "group operations error at line 21 of the 3D
script of...etc". I checked script but no errors are reported.
Looking at the script I can't see what the problem might be.

I get the same error when I try to cut some other library element. It should work with any element, but I've tested it with a sofa and 3D people, to get some new representation... but with no luck. It worked with some of the basic shapes (cone, sphere).
Line 21 has the ISECTLINES command. It can have something to do with "no solid" operator (wireframe or simple surface).
Why is calling the object more than once not desirable ?Only for the "waste" of time and computing resources!


I can see using a series of slabs separated by a very smallAs I said , this requires to know the size of the Mesh, in order to make the slabs big enough.
space and using group operations to leave very thin slices
of the object could be done but why ?
--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-03-31 11:19 PM
Thanks everybody for your tips.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-04-09 01:59 PM
Extracting Contour Lines From a Mesh
David
900
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-04-09 03:43 PM
I really like this object - thanks alot.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-04-09 09:19 PM
Mark wrote:Thanks for the appreciation. And it is so simple to make, that I'm surprised no one (including me) did it before
Roberto,
I really like this object - thanks alot.

--Roberto Corona--
www.archiradar.com
AC18 - ITA full on Win10
_________________
_________________
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-04-10 01:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-11-05 08:15 PM
I tried the library part, but no luck using it in AC13 (it hangs ArchiCAD on my Mac).
David, your cutting planes method worked, but I am clumsy using the cutting planes dialog box and I wanted something more automatic. I am working on a steep 10-acre site and need to draw 16 or more contour lines to evaluate various grading options.
I used a vertical stack of slabs to generate the contour lines, with SEO to automatically update them as the mesh changes. This generates all 16 contour lines in one step. It allows me to concentrate on the high points, valleys, and various spot elevations that I want to see on the site, and let the contours draw themselves.
Here are the instructions that I wrote for myself, so I can remember what I did the next time I need it. David, I have incorporated your technique for getting scaled lines out of a 3D view. I would never have come up with this all by myself.
1. Decide on your contour interval. For this discussion, I will assume a 2’ contour interval. Define the elevations of your lowest and highest contour lines. For this example, I will assume the lowest contour is 102’ and the highest is 124’.
2. On a separate layer, create a slab of the same thickness as the contour interval, with the bottom of the slab at the elevation of your lowest contour. For this example, this is a 2’ thick slab with top elevation 104’. Note that the top of this slab will generate a line for elevation 104’ and the bottom will generate a line for elevation 102’. Set the pen color and line type for the slab outlines to match what you want for your contour lines. The slab should completely cover your mesh, but it does not need to be trimmed to the mesh shape.
3. Multiply the slab to create slabs at elevation 108’, 112’, 116’, etc. You want to have a gap of one contour interval between each successive slab. Each slab will generate two contour lines: one for its top surface, and one for the bottom surface. Group the vertical array of slabs.
4. Use solid element operations to intersect the slabs with the mesh. The slabs are the target, the mesh is the operator.
5. Set 3D window settings to internal engine, hidden line. Set 3D projection settings to parallel, top view.
6. Select the group of slabs (but not the mesh), right click, show selection in 3D. You will see your contours. (See note below if you do not see any contours.)
7. Save this 3D view, with a name such as “generate mesh contours”.
8. Using the marquee tool (flat geometry method) in the 3D window, select the contours. Copy. In the copy dialog box, choose “Scaled Drawing”, “Edges”, “Remove Redundant Lines”.
9. Go to your 2D view, set the layer setting to your site plan. Paste. The contour lines will come in on the ArchiCAD layer at the original mesh/ slab location, which should be where you want them to be. In some cases they will come in behind other elements, and you won’t see them yet.
10. Undo/ redo the Paste to select all the contour lines, bring to the front if necessary, and assign to your chosen layer. You may wish to group the lines.
11. If you change your mesh, all you need to do is click on your “generate mesh contours” view to regenerate the new contours. Then erase the current contours and repeat steps 8-10 to revise the contours in the plan.
Note: if you do not see any contours in step 6, it may be because your slabs are touching, rather than gap-toothed. You want to omit alternate slabs, as noted in step 3. ArchiCAD removes the intersection lines in 3D view between two slabs where the top of one is the same as the bottom of the next.
Leave the group of slabs in your model, as a way of automatically revising your contours if you change your mesh.
AC 28 USA (20+ years on ArchiCAD)
MBP 64GB Apple M1 Max OS 15 Sequoia

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-04-19 08:14 PM
I'm fully aware that this topic is old, and could be considered even solved, but I just have seen it now, and I think I can contribute solving this issue.
This solution is easy to implement, and it's done in a step by step manner, but it requires the use of Grasshopper.
You can check at here
Anyway, I hope that with it you will get the result that you hoped for.
