Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Reads STEP file containing 2D surfaces, generates unstructured mesh. Uses advancing front algorithm. (Dropped)

Notifications You must be signed in to change notification settings

jj-foster/2D-unstructured-mesh

Repository files navigation

TODO:

DONE 1. Fill trimmed_curve data
DONE 2. Change obj list to dict with ID as tag
DONE 3. Add parent/child relation to trimmed_curve & circle
DONE 4. Add line equations to geometry objects
DONE 5. Add B-splines
DONE 6. Move plotting to new file

DONE 7. Generate nodes on lines - within geom type class
DONE 8. generate nodes based on edge loops rather than geometry
9. Advancing front panel/node generation
10. Optimise advancing front code

11. mesh smoothing
12. quad dominant mesh
13. fully quad mesh

Advancing Front Algorithm:

  • front composed tri panel sides
  • sides are active or inactive.
    • Active if a new tri can be added onto them
    • Inactive if not and are removed
  • loop through front until no more active sides left
  • each iteration an active side is selected and a tri panel is generated by:
    • connecting to another node
    • 4 types of connection can be made (see add-node-types.png)
      • check for intersection of sides?
      • check for nodes in radius from ideal isoseles triangle
        • rate nearby nodes based on closest to isoseles, r=spacing
        • exclude nodes in vector opposite to orientation
    • create new tri panel

Checks:

  • DONE case 0:
    1. find nodes within r
    2. get ALL adjacent sides (coords for A,B)
    3. seperate by connection point
    4. for each side per connection find smallest angle > select as direct adjacent side
    5. for each node: d=(x−x1)(y2−y1)−(y−y1)(x2−x1) if d<0 point on one side, if d>0 point on the other compare with known point to get side 6. exclude nodes on left of left side, right of right side
  • case 1: if no close nodes
  • DONE case 2: if close node and no close side
  • DONE case 3: close side(s) = sides if a node = close node if one node in close side(s) = current side node
  • DONE case 4: if 2 nodes in close sides = current side node

STEP Datastructure:

ADVANCED_FACE
    PLANE
    FACE_OUTER_BOUND+FACE_BOUND
        EDGE_LOOP
            ORIENTED EDGE
                EDGE_CURVE
                    VERTEX POINT
                    <geometry object>

geometry object:
    LINE
    POLYLINE
    CIRCLE
    BSPLINE

geometry modifiers:
    TRIMMED_CURVE
        <geometry object>

WIP

image

About

Reads STEP file containing 2D surfaces, generates unstructured mesh. Uses advancing front algorithm. (Dropped)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages