Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

netgen occ Pipe help \ where is user guide

More
1 year 5 days ago - 1 year 5 days ago #4768 by micron
Hello, I am having trouble with learning to use the occ modelling and in general to learn ngsolve/netgen without a proper user guide.. If there isn't one, can someone point me to the file in github where I can see what the basic functionality and classes are without having to say help(thing) every time I am trying to understand something.
For instance, the current thing I am trying to do is make a pipe around a curve. I see on the main OCCT user guide some interesting optional arguments I would like to try. ie. CorrectedFrenet, ConstantBinormal, etc. Are these available?when I say help(Pipe) I see two optional args which I would like to try out,
twist: Optional[Tuple[netgen.libngpy._NgOCC.gp_Pnt, float]] = None,auxspine: Optional[netgen.libngpy._NgOCC.Wire] = Nonebut no examples of what the usage is.. Specifically, how can I work with and define twist and can I do that by accessing the OCCT CorrectedFrenet etc options?


here's another example of something along the same lines:Help on built-in function Circle in module netgen.libngpy._NgOCC:

Circle(...) method of builtins.PyCapsule instance
Circle(*args, **kwargs)
Overloaded function.

1. Circle(c: netgen.libngpy._NgOCC.gp_Pnt2d, r: float) -> netgen.libngpy._NgOCC.Geom2d_Curve

create 2d circle curve

2. Circle(arg0: netgen.libngpy._NgOCC.gp_Pnt, arg1: netgen.libngpy._NgOCC.gp_Dir, arg2: float) -> netgen.libngpy._NgOCC.Edge

the second way to construct a circle has no explanation of what the args represent. I assume and it might be arguable obvious that they are: center, normal, radius? or something like this but it's not clear so it makes it hard to use..

Thank you.
Last edit: 1 year 5 days ago by micron. Reason: another example
More
1 year 4 days ago - 1 year 4 days ago #4770 by christopher
Hi,
Occ wrapper is still quite fresh in Netgen and people are currently extending it on a by-need basis. The best way to find out whats happening is to go to the source code in netgen/libsrc/occ/python_occ_shapes.cpp . There the occ functionality is wrapped to python and you can see what occ functions are called and how. It should also be quite straightforward to extend this wrapper by additional things you need.
Last edit: 1 year 4 days ago by christopher.
Time to create page: 0.107 seconds