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)

I added Comment and edit for dimension, useful? (by Vicky)
I was working on modifying property browser for my own use-case and added comment and edit functionality for constraints, do you think its useful to modify value and add comments for other users as well?
Sat Jun 18 2022, 16:18:33, download attachment DimensionComment.PNG
(no subject) (by Paul)
Vicky,

Before going down that path I think you should have a look at:

https://github.com/solvespace/solvespace/issues/77

And in particular Evil-Spirits video here:

https://www.youtube.com/watch?v=r85jSktKrWw

A while back I rebased those patches to master here:

https://github.com/phkahler/solvespace/tree/parameters

But that doesn't automatically rebase to master now. This is a very old and very popular request. It's also a bit incomplete, so if you really want to dig in to solvespace code some help on this would be very welcome. Given the importance of named parameters I think your addition of a comment is premature or even redundant given where we'd like to go.

Thanks!
Sun Jun 19 2022, 17:45:43
(no subject) (by Paul)
I should also say that I like the look of what you did on the drawing here!
Sun Jun 19 2022, 18:01:47
(no subject) (by Vicky)
Thank you for the links, I could see that Alexy did a good job there but not convenient to be able to merge because of solvespace file format, requiring the addition of certain variables.

At the moment I wanted to name a variable to search it conveniently in the C# wrapper, but it would be nice to fetch the value of the variable based on the name and use it for numerical calculations. I'll try this soon and will update if able to code it.
Mon Jun 20 2022, 07:49:39
This feature... (by uberintj)
...given that this seem to be the most recent comment concerning using variables/expressions in constraints, I figured I'd ask this question here:

Is there a version of SolveSpace branched anywhere that solves this problem (through whatever mechanism - Comments as variables, etc) that will actually build?

If not, is there an outline/analysis of what needs to be done to make this a reality in the master? IMO, this is really the major thing lacking in SolveSpace. I love how this tool seems to be a simplistic example of CAD but exhibits lots of power - those designs tend to be the most robust over time. But variables are really needed for sound modelling reuse.

I'm a professional full-stack developer, and would be willing to help with this, though this whole problem domain is out of my wheelhouse. If I had a bit of direction and some time with the code base I might be able to at least help sort things out.
Fri Aug 19 2022, 17:50:12
(no subject) (by Paul)
@uberintj The links above also contain lots of links. I'm not sure why my branch with the Evil-spirit changes doesn't work, I thought it did at the time. You can use github to get patches for commits on a branch if you want to try to apply them to modern master. The solver and expression parsing stuff is largely unchanged in years. You are more than welcome to experiment in this area.

People - including me - get excited when they see that video with variables created and reused in sketches and everybody wants that. It's really easy to overlook whats missing. Some nice way to do assignments "X=5" offset=2.7 or whatever. These could be special comments (which are internally constraints, not sketch entities) or somehow a list in the text window. Another thing is scope rules. A lot of people want an external file to define values for a parametric sketch so it's easy to create variants. One might to this by defining just a bunch of variables in a single sketch, and linking that (or different versions of it) into a part sketch in a group prior to the creation of the part. Again scope rules will need to be worked out. Feel free to experiment, I'm just pointing out some of the stuff people don't think about when they say "I want that, why didn't they just merge it?"

In the future we'd all like to have hierarchical sketches and asseblies with parametric parts that can be instanced with different parameters in each instance, but that will be a major refactoring of a LOT of code and will probably break compatibility anyway, so I'd go ahead and develop some useful named parameter stuff as an add-on for the time being.
Sat Aug 20 2022, 15:08:43
(no subject) (by uberintj)
Great. Thanks for the reply Paul. I'll get this in my queue. I should have time during the cold months of winter to take a deep dive and start understanding these issues.
Sun Aug 21 2022, 16:24:05
(no subject) (by ruevs)
The comment where I've collected relevant information:
https://github.com/solvespace/...sues/77#issuecomment-697234706
Mon Aug 22 2022, 09:58:53
(no subject) (by ruevs)
Mon Aug 22 2022, 10:01:49
(no subject) (by ruevs)
Mon Aug 22 2022, 10:09:27
(no subject) (by uberintj)
Thanks, ruevs
Mon Aug 22 2022, 13:28:11
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.