microelly2 wrote:ping
Civil engineering feature implementation (Transportation Engineering)
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Civil engineering feature implementation (Transportation Engineering)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
I work at the moment on the problem finding a two arc connection between two lines AB and BC with tangential constraints
the expected short yellow curve
and the longer pink solution
both solutions have one degree of freedom.
It is the point T/T2 where the arcs connect.
I expect that is possible to create an unambigious parametric solution for that problem;start with two lines create this kind of connector.
here the example
There are always two solutionsthe expected short yellow curve
and the longer pink solution
both solutions have one degree of freedom.
It is the point T/T2 where the arcs connect.
I expect that is possible to create an unambigious parametric solution for that problem;start with two lines create this kind of connector.
here the example
- Attachments
-
- zwei_tangentenkreise_mehrere_loesungen.fcstd
- (21.28 KiB) Downloaded 50 times
Re: Civil engineering feature implementation (Transportation Engineering)
I never did any real road designs but back in the school we always used the euler spiral (klotoide) for this, like line-klotoide-arc-klotoide-line
https://en.wikipedia.org/wiki/Euler_spiral
https://de.wikipedia.org/wiki/Klothoide
https://en.wikipedia.org/wiki/Geometric_design_of_roads
https://sl.wikipedia.org/wiki/Klotoida# ... _curve.svg
https://en.wikipedia.org/wiki/Euler_spiral
https://de.wikipedia.org/wiki/Klothoide
https://en.wikipedia.org/wiki/Geometric_design_of_roads
https://sl.wikipedia.org/wiki/Klotoida# ... _curve.svg
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
There exists a lot of problems with multiple solutions.
Example:
Given 2 side lengths and one non enclosed angle for a triangle the solution can be ambigious.
How I have to model this task with the sketcher functionality to get exactly the solution I want?
The sketcher (always) gives you one solution. But is this solution that what you expect.
How I can constraint a sketch by using "inequalities" like: the point should lie inside a certain area (example rectangle or circle).
The other example is my last post.
I have looked for a method to describe inequalities/intervals in terms of the sketcher.
With these methods I can restrict the searching area for the sketcher solver.
Example:
Given 2 side lengths and one non enclosed angle for a triangle the solution can be ambigious.
How I have to model this task with the sketcher functionality to get exactly the solution I want?
The sketcher (always) gives you one solution. But is this solution that what you expect.
How I can constraint a sketch by using "inequalities" like: the point should lie inside a certain area (example rectangle or circle).
The other example is my last post.
I have looked for a method to describe inequalities/intervals in terms of the sketcher.
With these methods I can restrict the searching area for the sketcher solver.
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
If we can figure out how to support inequalities, I can see how to easily create a boundary that contains the correct solution. Another option would be to require that the rotation angle of the arc be less than 360 degrees as, in every case, the two solutions will be less than and greater than / equal to 360 degrees. A third approach would be to force it to calculate both solutions and choose the one with the shorter curve length.microelly2 wrote: ↑Wed Sep 20, 2017 8:56 pm How I can constraint a sketch by using "inequalities" like: the point should lie inside a certain area (example rectangle or circle).
In fact, it would be ideal to be able to specify an inequality as a property of the constraint itself, based on a property / properties of the adjoining geometry. Thus, when the solver solves the problem, it checks the constraint for any user-defined inequalities and rejects solutions which fail it.
That, in fact, might go a long way to solve the "user expectation" problem that we discussed earlier.
I don't see any way to get it done without rewriting the solver to support new functionality. But the concept of a "constraint inequality" makes a lot of sense to me.
edit: I didn't look closely enough to realize that these were two curves and not one. That said, a constraint with an inequality that doesn't permit the angle of either curve to meet or exceed 180 degrees would be sufficient, here.
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
this is an example of a circle which can only lie inside the square.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
an animation of the possible solution to connect two lines by tangential arcs.
I needed some investigation to "see" a robust structure for modeling the problem.
the next step will be a python sketch extension to create these parametric objects by one click from gui.
I needed some investigation to "see" a robust structure for modeling the problem.
the next step will be a python sketch extension to create these parametric objects by one click from gui.
- Joel_graff
- Veteran
- Posts: 1949
- Joined: Fri Apr 28, 2017 4:23 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
That definitely looks like it solves the problem. Good work!
FreeCAD Trails workbench for transportation engineering: https://www.github.com/joelgraff/freecad.trails
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
pivy_trackers 2D coin3D library: https://www.github.com/joelgraff/pivy_trackers
Re: Civil engineering feature implementation (Transportation Engineering)
@microelly2 nice! What's the next step ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Civil engineering feature implementation (Transportation Engineering)
This is the first version of a general feedback sketch
The idea of such a sketch was to reduce the inner complexity of a sketch by swap out helper construction to another sketch or to combine multiple sketches for complex constructions.
it is more powerful than expressions.
It is possible to deactivate some components to speed up design or flip between different sketches on demand.
this is the first version and not all parameters are already used.
Description
The Sketch_Rectangle contains a rectangle with constraints ax,ay for the position of the left lower corner and bx,by for the lenght an height of the rectangle.
The Skethc001_Circle contains a circle with constraint cr for the radoius of the circle.
The goal is to resize the rectangle depending on ax,ay with this conditions:
1) one corner is on the circle
2) the diagonal from this corner goes through the origin
The TwoClientsFeedback is a Sketch obekct, which does the calculation of bx,by and sends the values back to Sketch_Rectangle
it has 4 named constraints
ax,bx,cr are red constraints and get their values from the other skteches
bx,by are blue constraints and are used for feedback.
configuration of the TwoClientsFeedback
ClientA is Sketch_Rectangle
data from ClientA are ax,ay
date back to ClientA are bx,by
ClientB is Sketch_Circle
data from ClientB are cr
there are no date back to ClientB
Whenever ClientA or ClientB changes the Feedback Sketch is recomputed and the values are send back to ClientA.
To demonstrate this there are 3 Animation Managers.
When you double clickj a Manager and start it,
it changes one constraint (ax,ay, cr) by expressions
You can stop updating of a client <?> be setting its "active Client <?>" Flag to False.
Example file
https://www.dropbox.com/s/llyubzr3594rv ... fcstd?dl=0
required workbenches
nurbswb https://github.com/microelly2/freecad-n ... 66d83e7b5e
animation - not realy needed, you can delete the managers and change the parameters by hand.
The idea of such a sketch was to reduce the inner complexity of a sketch by swap out helper construction to another sketch or to combine multiple sketches for complex constructions.
it is more powerful than expressions.
It is possible to deactivate some components to speed up design or flip between different sketches on demand.
this is the first version and not all parameters are already used.
Description
The Sketch_Rectangle contains a rectangle with constraints ax,ay for the position of the left lower corner and bx,by for the lenght an height of the rectangle.
The Skethc001_Circle contains a circle with constraint cr for the radoius of the circle.
The goal is to resize the rectangle depending on ax,ay with this conditions:
1) one corner is on the circle
2) the diagonal from this corner goes through the origin
The TwoClientsFeedback is a Sketch obekct, which does the calculation of bx,by and sends the values back to Sketch_Rectangle
it has 4 named constraints
ax,bx,cr are red constraints and get their values from the other skteches
bx,by are blue constraints and are used for feedback.
configuration of the TwoClientsFeedback
ClientA is Sketch_Rectangle
data from ClientA are ax,ay
date back to ClientA are bx,by
ClientB is Sketch_Circle
data from ClientB are cr
there are no date back to ClientB
Whenever ClientA or ClientB changes the Feedback Sketch is recomputed and the values are send back to ClientA.
To demonstrate this there are 3 Animation Managers.
When you double clickj a Manager and start it,
it changes one constraint (ax,ay, cr) by expressions
You can stop updating of a client <?> be setting its "active Client <?>" Flag to False.
Example file
https://www.dropbox.com/s/llyubzr3594rv ... fcstd?dl=0
required workbenches
nurbswb https://github.com/microelly2/freecad-n ... 66d83e7b5e
animation - not realy needed, you can delete the managers and change the parameters by hand.