SolveSpace Logo SOLVESPACE -- parametric 2d/3d CAD
Examples
Tutorials
Features
Download
Reference
Technology
Library
Forum
Contact
USER FORUM

(you are viewing a thread; or go back to list of threads)

Help to add Edge into SMesh (by cean wang)
Hi,

I am trying to add Edge into SMesh.

1. class SMesh is defined in polygon.h
I added:
List<SEdge> le;
void AddEdge(const SEdge *se);
void AddEdge(Vector a, Vector b);



2.the code is in mesh.cpp
I added:

void SMesh::Clear() {
l.Clear();
le.Clear();
}
void SMesh::AddEdge(Vector a, Vector b) {
SEdge e = {};
e.a = a;
e.b = b;
AddEdge(&e);
}
void SMesh::AddEdge(const SEdge *se) {
le.Add(se);
}

The code compiled, but when run the program crashed.

Any idea where I should look into?

Regards,

Cean
Tue Dec 15 2020, 18:48:57
(no subject) (by cean wang)
Fixed the crash. Edges are added into a list. How to display them?

Where is the code to display the STriangles?
Tue Dec 15 2020, 22:30:59
(no subject) (by Paul)
Edges of all triangles can be displayed by clicking one of the icons at the top of the text window. These are not separate objects, but there is a lot of code to identify edge types like silhouette edges and such.

Why do you want to create separate edges? I know FEA results, but be more specific than that. What are you trying to show? What shading capabilities does it need? Do you want to add displacements? Color gradients? What? And why edges?

I guess more importantly (to me) do you want to add features to upstream SolveSpace or are you just hacking it on your own?
Wed Dec 16 2020, 09:08:43
(no subject) (by cean wang)
Yeah, that icon is just what I want. Seems I don't need to reinvent the wheel now.

I have tried both 2d(tri and Quad) & 3d element. Also I want to show 1D element with color for truss. For Quad, a SRectangle will be more convenient than drawing with two STriangles.

To show fea result is my next step. Displacement is the first to test. Color gradient is really needed. To add displacement into STriangle seems straight forward, but also need for other type of element. I would be very happy if I could animate the deformation. Is it easy in SS?

Sure I want theses features in upstream.
Wed Dec 16 2020, 17:25:31
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):
© 2008-2022 SolveSpace contributors. Most recent update June 2 2022.