troubleshooting Question

VB.net: How to use nested ListOf to create Jagged List ?

Avatar of jlaidlaw
jlaidlaw asked on
ProgrammingVisual Basic.NET
5 Comments1 Solution452 ViewsLast Modified:
I'm writing a program to create simple G-code for CNC machining based on creating a chain of lines and arcs.   The basic element is a cContour class which defines a single segment (LINE or ARC).    I then have a class, cChain, which contains a ListOf (cContour), which defines a single Chain or Loop.    

So, I have the capabliltiy to define a boundary or toolpath to machine.    Now, for machining a pockiet, I'll need to have a series of chains to remove all the material at the boundary and all areas within.   For simple shapes such as a circle (2 semi-circles), the pocket consists of a single chain at each offset layer.   This could be handled by having a Class called cToolPath containing a ListOf(cChain).

However, for more complex shapes the toolpath may be separated into multiple chains at each offset layer.  For example, let's consider a shape like a butterfly or bowtie which narrows in the middle.  At successive offset layers to generate the toolpath,  the offset path will yield two chains as the middle section collapses.    So, now, I need a jagged list of cChains at each layer.   Eseentially, I have a nested ListOf.   Unfortunately, I don't know how to get this to work.  

I tried to create a new Class called LayerOfChains which contains a ListOf(cChain).   I can't seem to be able to retrieve the data from the class using CTYPE.       How do I handle having a ListOf ( List Of (cContour)) ??



Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros