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)

Is it possible to save Point before Line in slvs file? (by cean wang)
Hi,

ATM, Line entity is saved first, followed by two Point entities. One example:

Entity.h.v=bj-x 00060000
Entity.type=11000
Entity.construction=0
Entity.point[0].v=bj-x 00060001
Entity.point[1].v=bj-x 00060002
Entity.workplane.v=bj-x 80020000
Entity.actVisible=1
AddEntity

Entity.h.v=bj-x 00060001
Entity.type=2001
Entity.construction=0
Entity.workplane.v=bj-x 80020000
Entity.actPoint.x=-9.49999999999999822364
Entity.actPoint.y=35.69999999999999573674
Entity.actVisible=1
AddEntity

Entity.h.v=bj-x 00060002
Entity.type=2001
Entity.construction=0
Entity.workplane.v=bj-x 80020000
Entity.actPoint.x=-38.00000000000000000000
Entity.actPoint.y=-19.69999999999999928946
Entity.actVisible=1
AddEntity

I want to move the points in front of the line.

Regards,

Cean
Tue Dec 22 2020, 02:58:41
(no subject) (by Paul)
That should be ok.

What are you up to? :-)
Tue Dec 22 2020, 11:05:58
(no subject) (by Cean)
I am trying to export Gmsh's geo file. It is point first.
Tue Dec 22 2020, 16:18:03
(no subject) (by Paul)
Oh, but those are SolveSpace sketch entites, not part of the triangle mesh or NURBS surfaces. Gmsh will have no use for them.
Tue Dec 22 2020, 20:58:32
(no subject) (by cean)
From Line, I pick up:

Entity.point[0].v=00060001
Entity.point[1].v=00060002

and from point:

Entity.actPoint.x=-9.49999999999999822364
Entity.actPoint.y=35.69999999999999573674

Also their IDs.
Tue Dec 22 2020, 22:01:19
(no subject) (by cean)
And the exported geo file is like this:

point(00060001)={-9.49999999999999822364,35.69999999999999573674,0.0};
point(00060002)={-38.00000000000000000000,-19.69999999999999928946,0.0};

line(00060000)={00060001,00060002};

kind of converting slvs file into geo file.
Tue Dec 22 2020, 22:20:08
(no subject) (by cean)
for(auto &e : SK.entity) {
e.CalculateNumerical(/*forExport=*/true);
sv.e = e;
SaveUsingTableGeo(filename, 'e');
fprintf(fh, "AddEntity\n\n");
}

Inside this for{}, I need to check if it is Line or Point. If Line, get the two Points, save Points, then save the Line.


https://github.com/ceanwang/solvespace/blob/Geo/src/export.cpp#L1318
Wed Dec 23 2020, 05:11:38
(no subject) (by Paul)
Why are you doing this? Just take solvespace model and file->export as STEP. Load that in Gmsh.
Wed Dec 23 2020, 18:08:20
(no subject) (by cean)
It works on 3D.
Tried a 2d, after import, Gmsh shows nothing.
Wed Dec 23 2020, 18:30:59
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.