[Sketcher] External geometry intersect

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
mpetrasinovic
Posts: 106
Joined: Sat Feb 22, 2020 10:19 am
Location: Belgrade, Serbia
Contact:

[Sketcher] External geometry intersect

Post by mpetrasinovic »

Hi all,

I'm not sure if something like this already exists but I think that an external geometry command in the Sketcher workbench with an intersection with sketch plane in contrast to the projection to the sketch plane would be a very useful tool.

I would also like to know if defining external geometry from @realthunder will going to be in the official build.
realthunder wrote: ping
@realthunder sorry to bother, are we gonna see these very useful tools that you already implemented in the official version?
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: [Sketcher] External geometry intersect

Post by realthunder »

mpetrasinovic wrote: Mon Apr 13, 2020 8:16 am I'm not sure if something like this already exists but I think that an external geometry command in the Sketcher workbench with an intersection with sketch plane in contrast to the projection to the sketch plane would be a very useful tool.
Not sure about this. Any use case?

I would also like to know if defining external geometry from @realthunder will going to be in the official build.
Yes, but this can only happen in 0.20.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
mpetrasinovic
Posts: 106
Joined: Sat Feb 22, 2020 10:19 am
Location: Belgrade, Serbia
Contact:

Re: [Sketcher] External geometry intersect

Post by mpetrasinovic »

First, I would like to thank you for your response.
realthunder wrote: Tue Apr 14, 2020 8:04 am Not sure about this. Any use case?
I am part of the Aerospace Engineering Department at the University of Belgrade, we would commonly use this tool for modeling of an airplane fuselage. We first make 2D Sketches using Sketcher for guide lines and then for cross-sections, cross-sections and guide lines must intersect as you can see from the following image, it would be best to have this kind of tool that makes it easy to make a parametric connection.

Image

We would make guides and then link points of intersection at every cross-section plane.

Image

In the following image, you can see the final model for this exercise.


Image
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: [Sketcher] External geometry intersect

Post by realthunder »

That's nice. I'll see what I can do. Maybe add this to my fork first.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: [Sketcher] External geometry intersect

Post by Pauvres_honteux »

Would this request be in the same ball park?
issue #0003301 Container for intersections
User avatar
mpetrasinovic
Posts: 106
Joined: Sat Feb 22, 2020 10:19 am
Location: Belgrade, Serbia
Contact:

Re: [Sketcher] External geometry intersect

Post by mpetrasinovic »

realthunder wrote: Wed Apr 15, 2020 5:13 am That's nice. I'll see what I can do. Maybe add this to my fork first.
That would be perfect, thank you! Currently, I am not at the level to be able to implement this by myself but I will try other things that we need.
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: [Sketcher] External geometry intersect

Post by saso »

https://forum.freecadweb.org/viewtopic. ... 25#p362360
... there are basically three types of external geometries that are "projected" in to the sketcher plane (1) normal projection of the external geometries (2) silhouettes (reflect lines) projections of rounded surfaces/faces and (3) intersections of external geometries with the sketcher plane. And if I am not mistaken FreeCAD supports just the first type...

... it is also possible to sort of work around for type 2 and 3, that is to create the needed geometries outside the sketch with for example the PartWB section tool or CurvesWB reflect lines tool and then project (import) those in to the sketch, but ideally sketcher would have support to create the projections of this automatically.
The image below visually represents the three types mentioned above, FreeCAD currently supports only the blue one (type 1), this discussion is about the orange one (type 3), the discussion in the above link is about the pink one (type 2).

Also, about the intersecting type, if we take for example the cube from this example, if we select an intersecting edge of the cube, the result would obviously be just a point, if we select an intersecting face the result would be a line as shown in the example (or a curve, for not flat faces) and if we select the full cube, the result would be a closed profile of lines that represent all the faces of the cube that intersect with the plane...

Here is another topic on some additional limitations of "type 1" https://forum.freecadweb.org/viewtopic.php?f=19&t=46182 (update: fixed now)

This model is of course just an example, imagine the datum plane to be the sketch and I know that the extracted edges of the cube are not parametric, should have used a different tool but not so important for this example... :)
Attachments
sketcher external types.png
sketcher external types.png (138.98 KiB) Viewed 4970 times
sketcher external types.FCStd
(35.58 KiB) Downloaded 38 times
Last edited by saso on Fri Jan 15, 2021 9:28 am, edited 4 times in total.
User avatar
mpetrasinovic
Posts: 106
Joined: Sat Feb 22, 2020 10:19 am
Location: Belgrade, Serbia
Contact:

Re: [Sketcher] External geometry intersect

Post by mpetrasinovic »

saso wrote: Wed Apr 15, 2020 7:47 am The image below visually represents the three types mentioned above, FreeCAD currently supports only the blue one (type 1), this discussion is about the orange one (type 3), the discussion in the above link is about the pink one (type 2).
I agree with this, as I mentioned, it was very likely that this was discussed before. I would just add that I think type 2 needs to be combined with type 1 because in essence that is also projection, so at the end, we have projection and intersection tools.

For type 2 it should be similar to Shape 2D view from Draft.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: [Sketcher] External geometry intersect

Post by realthunder »

Intersection is likely easy to do, but I think projection is going to suffer from topological naming issue. I have some experience with the OCC projection API when working with Path WB, I don't remember it has any topological mapping interface. Need more investigation.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: [Sketcher] External geometry intersect

Post by saso »

realthunder wrote: Wed Apr 15, 2020 10:29 am Intersection is likely easy to do, but I think projection is going to suffer from topological naming issue. I have some experience with the OCC projection API when working with Path WB, I don't remember it has any topological mapping interface. Need more investigation.
Under the image there is also a model file that was used to create the image, while it is fake from the point of view that it is done on a plane and not in the sketch, the construction of the geometry is however real, maybe it can help a bit with the investigation and give some ideas.

In the above link to the previous topic about this there are also a few links to the documentation of this functionality in catia.

Here is also a link to the beginning of the discussion when we started to implement the reflect lines https://forum.freecadweb.org/viewtopic. ... 50#p287141, but probably mpetrasinovic comment about Draft WB Shape 2D is correct since we actually only need a projection of the silhuete to the flat plane, and not as in reflect lines back to the curved shape...
Post Reply