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
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
(no subject) (by Paul)
That should be ok.
What are you up to? :-)
What are you up to? :-)
(no subject) (by Cean)
I am trying to export Gmsh's geo file. It is point first.
(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.
(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.
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.
(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.
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.
(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
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
(no subject) (by Paul)
Why are you doing this? Just take solvespace model and file->export as STEP. Load that in Gmsh.
(no subject) (by cean)
It works on 3D.
Tried a 2d, after import, Gmsh shows nothing.
Tried a 2d, after import, Gmsh shows nothing.
Post a reply to this comment: