solvespace icon indicating copy to clipboard operation
solvespace copied to clipboard

Circle tangent to line as construction tool

Open hofmannu opened this issue 1 year ago • 15 comments
trafficstars

System information

  • SolveSpace version: 3.1~70bde63c
  • Operating system: ArchLinux kernel 6.11.6-arch1-1

image

Expected behavior

If I add the constraint that the circle should be tangent to the two lines, the sketch is fully defined and the through hole will have ensured equidistance from the two object edges.

Actual behavior

I get an "Bad selection for tangent/parallel constraint" error when I try to add a parallel constraint to the circle and either of the lines. I tried it with and without including the point as an additional component to the constraint. To achieve this at the moment, I need to add two more connecting each of the points on the side to the center of the circle and enforce perpendicularity as shown below:

image

Additional information

Note that this is somehow linked to #937 but for one reason or another the issue is closed already and I did not want to necrobump it.

Attached is the tiny sketch. circle_tangent_to_line.zip

Btw: I discovered solvespace yesterday and am working with other feature overblown and unusable CAD software for Linux since three years. You guys are amazing and the tool you made here is honestly one of my favorite pieces of software I discovered in the past 5 years for Linux, well done <3

hofmannu avatar Nov 05 '24 06:11 hofmannu

Coolprop is not related in any way to CQ so that is rather esoteric (guess: ABI issue, but I wouldn't know how/why). Would you be able to:

a) check with conda-forge built packages (just download micromamba and do not bother with setting up your shell) b) attach gdb and provide a backtrace bt

adam-urbanczyk avatar Apr 04 '25 08:04 adam-urbanczyk

I can reproduce the hang without cadquery. I'll append to https://github.com/CoolProp/CoolProp/issues/2512

lorenzncode avatar Apr 06 '25 17:04 lorenzncode

Added some more details and a proposed fix at https://github.com/CoolProp/CoolProp/issues/2512#issuecomment-3141629917 (namely, using latest master for the C++ rapidjson version in coolprop).

By sheer luck the C++ rapidjson version that cadquery's wheels use seems to be compatible with the latest C++ rapidjson commit, even if the cadquery-ocp build system does not really pick a version: if I understand correctly, it just looks for rapidjson in the system.

@adam-urbanczyk I would recommend to patch cadquery-ocp's build system so that it fetches the latest version of C++ rapidjson rather than picking it up from the system.

eguiraud-pf avatar Aug 01 '25 01:08 eguiraud-pf

I'm not maintaining the ocp-build-system repo and I in general recommend to use the conda-forge package (which most likely would save you form the issue because in that ecosystem rapidjson is an explicit dep of both occt and coolprop). AFAICT ocp_build-system fetches the rapidjson via conda. This happens to be 1.1.0.post20240409. This could be made explicit in the env file.

adam-urbanczyk avatar Aug 01 '25 13:08 adam-urbanczyk

I don't think we are in the position to switch from pip to conda any time soon at Proxima, but point taken that this is likely a non-issue in the conda world.

eguiraud-pf avatar Aug 01 '25 14:08 eguiraud-pf

Fair enough. As discussed in https://github.com/CoolProp/CoolProp/issues/2512 adjusting the symbol visibility in cadquery-ocp is also an option here (probably a local optimum given your constraints).

adam-urbanczyk avatar Aug 01 '25 14:08 adam-urbanczyk