-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introducing "Solid Section" node #4878
Conversation
A node that generates Curves and Points from intersecting different Shapes.
I'm not sure how to read this failing test:
I replicated how SvSolidBooleanNode was done and didn't expected this error. Is it a show stopper? |
At last run tests are passed. |
...and some minor changes.
@rendetto should we merge this, or maybe you want to add something? |
Err.. maybe it will be more appropriate to rename make_solid to make_section? I'll make one final pass for more appropriate variable and method names. |
okay, then please add a comment here when you think it will be ready for merge. |
Add more appropriate variable and method names.
@portnov I just did the renaming pass. I'm feeling a bit uncomfortable as I'm replacing the term "Solid" with the term "Shape". Will you approve this terminology twist? |
ok. |
In that case please merge it. I don't plan adding more things at this stage. Thanks a lot for the help! |
@rendetto FYI. |
Yes, I just checked this with FreeCAD and that's what Section operation does there too. BUT also noticed that there is an option in the tool to approximate the result. I did a quick search and found approximate( ) method in TopoShape API. It doesn't seem to have any parameters but it looks like it could be a valid option that we can use. EDIT: It seems that this approximate( ) method is not directly usable ...or at least I failed to do that. |
@rendetto there is
|
Yes, it sounds most appropriate for it to be there. I don't feel confident enough to dive into such thing yet :/ |
You can always experiment by use of scripted node. |
Yeah, I already started gathering the info and reading about but don't know If I will succeed. Too many new things and almost zero experience :) |
Solid Section
The node will generate Curves and Points from intersecting different Shapes including Solids, Solid Faces, Solid Edges, NURBS Surfaces and NURBS Curves.
This node can operate on pair of objects ("Shape A" intersects "Shape B") or on pair of lists of objects.
Inputs
The node has the following inputs:
Shape A. The first object to perform operation on. This input is
mandatory and can accept a list of Shapes*.
Shape B. The second object to perform operation on. This input is
mandatory and can accept a list of Shapes*.
Curves (NURBS Curves and Solid Edges) cannot be mixed with other Shape types.
For example [NURBS_Curve, Solid_Edge, Solid] is not a valid input list.
Valid inputs are [NURBS_Curve1, NURBS_Curve2, Solid_Edge] or [NURBS_Curve, Solid_Edge]
or [NURBS_Surface1, Solid, NURBS_Surface2] etc.
Options
This node has the following parameters:
checked, the node will generate curves in NURBS representation. Otherwise, it
will generate standard FreeCAD curves (Solid Edge curves). Unchecked by default.
Outputs
The has the following outputs:
Product variations of the Section operation:
Solid × Curve → Point (common case) or Curve (if the curve or part of the curve overlays with the solid)
Solid × Surface → Curve (common case) or Point (when both are only touching)
Curve × Surface → Point (common case) or Curve (if the curve or part of the curve overlays with the surface)
Solid × Solid → Curve (common case) or Point (when both are only touching)
Surface × Surface → Curve (common case) or Point (when both are only touching)
Curve × Curve → Point (common case) or Curve (if curves overlay at a certain segment)
If no intersections are found the node will output empty lists.
Examples
Curve × Curve → Points:
Curves × Surface → Points and Curve:
Surface × List of Surface → Curves:
Surface × Solid → Curves: