I have an interesting case and I cannot find the reason why sometimes the resulting Pad'ded sketch is correct (produces a solid) while when move some shapes a bit it produces just a frame of the pad. File attached.
There is a base shape (crescent shaped) and a rectangle (4th quarter) and a circle (1st quarter). When I move the rectangle inside the base shape or outside of it it produces a solid shape. If it intersects the basic shape in the 4th quarter then it produces just a frame of the solid but when moved to the 2nd quarter and still intersecting, the solid shape is produced again. Is there any reason or is it a bug?
OS: "openSUSE Leap 42.2"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10236 (Git) (Packman)
Build type: Release
Branch: master
Hash: dd20ba3d068c4a0903417d93144f8ac7fed068e9
Python version: 2.7.12
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.9.1.oce-0.18-dev
Sketcher: oversecting shapes break the resulting Pad depending on shape position
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Sketcher: oversecting shapes break the resulting Pad depending on shape position
- Attachments
-
- pads_intersects.fcstd
- (9.21 KiB) Downloaded 30 times
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Sketcher: oversecting shapes break the resulting Pad depending on shape position
Hi!
The reason for it is the way Part Extrude tries to figure out, which wire is an outline of a face and which is an outline of a hole. This is how it does it:
1. Sort wires using length of bounding box diagonal as sorting field.
This ensures that outer wires come in before hole wires, for the next step.
2. Take wire one by one. Test it if the first vertex of the wire lies on any of the faces made so far. If it does, it is a hole wire, so a hole is added to the face. If the wire is not on a face, a new face is created.
This produces expected results as long as wires are not intersecting each other. In your case they do, hence the behavior.
You can change that behavior by changing property of extrude "Face Maker", which defaults to "Part::FaceMakerBullseye". If you set "Part::FaceMakerSimple", it will create face from every wire, not testing anything at all. You will get a compound of intersecting solids. (solids are valid, but compound itself is not very valid). Then, you can fuse the compound into a valid solid by selecting it and invokig Part Union.
The reason for it is the way Part Extrude tries to figure out, which wire is an outline of a face and which is an outline of a hole. This is how it does it:
1. Sort wires using length of bounding box diagonal as sorting field.
This ensures that outer wires come in before hole wires, for the next step.
2. Take wire one by one. Test it if the first vertex of the wire lies on any of the faces made so far. If it does, it is a hole wire, so a hole is added to the face. If the wire is not on a face, a new face is created.
This produces expected results as long as wires are not intersecting each other. In your case they do, hence the behavior.
You can change that behavior by changing property of extrude "Face Maker", which defaults to "Part::FaceMakerBullseye". If you set "Part::FaceMakerSimple", it will create face from every wire, not testing anything at all. You will get a compound of intersecting solids. (solids are valid, but compound itself is not very valid). Then, you can fuse the compound into a valid solid by selecting it and invokig Part Union.
Re: Sketcher: oversecting shapes break the resulting Pad depending on shape position
What's the purpose of making profiles intersect themselves in the first place?tml wrote:Is there any reason or is it a bug?
IMO this is not a proper way to model.
Re: Sketcher: oversecting shapes break the resulting Pad depending on shape position
I ended up moving the intersecting objects to a separate Sketch and then perform boolean operations on padded Sketches.
The reason why I made them intersecting was that I wanted to have an arc's ends adjacent to circle's circumference so that I could trim the internal line and I could not find a way to have it done correctly, like this: Every time I tried the ends looked to be misplaced and the internal line could not be trimmed (I must have done it wrongly).
I tried to do it now in 0.16 on an empty projects, seems to work, need to check 0.17pre once again when I'm back home.
EDIT: OK, just reproduced the issue I had (now on 0.16): if the circle/arc was already trimmed it cannot be trimed anymore.
As an example I added another arc on top and now I cannot trim the line indicated by yellow arrow as it produces random effects. The constraints look to be in place. Attached the FreeCAD project for that.
The reason why I made them intersecting was that I wanted to have an arc's ends adjacent to circle's circumference so that I could trim the internal line and I could not find a way to have it done correctly, like this: Every time I tried the ends looked to be misplaced and the internal line could not be trimmed (I must have done it wrongly).
I tried to do it now in 0.16 on an empty projects, seems to work, need to check 0.17pre once again when I'm back home.
EDIT: OK, just reproduced the issue I had (now on 0.16): if the circle/arc was already trimmed it cannot be trimed anymore.
As an example I added another arc on top and now I cannot trim the line indicated by yellow arrow as it produces random effects. The constraints look to be in place. Attached the FreeCAD project for that.
- Attachments
-
- trims.FCStd
- (3.45 KiB) Downloaded 26 times
Re: Sketcher: oversecting shapes break the resulting Pad depending on shape position
I see your issue, yeah the trimming tool has always been iffy with trimming circles... Sometimes I'll add a straight line and trim the circle to it, then reconnect the arc end points and delete the line. When I know I want an arc I'll sketch an arc directly rather than a circle.