mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
""" Netgen OCC documentation
|
|
|
|
This module provides the Netgen OCCGeometry class, as well as Python wrappers
|
|
for OpenCascade functionality. This allows the construction from scratch, as well as
|
|
editing geometries imported via STEP format.
|
|
|
|
Most of the classes are directly py-wrapped from the OCCT classes.
|
|
For more detailed documentation consult the OCCT docs, a good starting point is
|
|
https://dev.opencascade.org/doc/refman/html/class_b_rep_builder_a_p_i___make_shape.html
|
|
"""
|
|
|
|
from .libngpy._NgOCC import *
|
|
from .meshing import meshsize
|
|
|
|
|
|
gp_Ax3 = Axes
|
|
gp_Ax1 = Axis
|
|
|
|
Translation = gp_Trsf.Translation
|
|
Rotation = gp_Trsf.Rotation
|
|
Mirror = gp_Trsf.Mirror
|
|
|
|
|
|
def Rectangle(l,w): return WorkPlane().Rectangle(l,w)
|
|
def MoveTo(x,y): return WorkPlane().MoveTo(x,y)
|
|
def LineTo(x,y): return WorkPlane().LineTo(x,y)
|
|
def Line(l): return WorkPlane().Line(l)
|
|
|
|
|
|
unit_square_shape = WorkPlane().Line(1, name="bottom").Rotate(90) \
|
|
.Line(1, name="right").Rotate(90) \
|
|
.Line(1, name="top").Rotate(90) \
|
|
.Line(1, name="left").Rotate(90).Face()
|
|
|
|
unit_square = OCCGeometry(unit_square_shape, dim=2)
|
|
|
|
|
|
|
|
|
|
|